<s>[INST] What is the maximum value of $4(\sin x)^2 + 3(\cos x)^2$ The question is: What is the maximum value of: $4\sin^2\theta + 3\cos^2\theta$
This is the way I did it:
$4\sin^2\theta + 3\cos^2\theta = \sin^2\theta + 3\sin^2\theta + 3\cos^2\theta = \sin^2\theta + 3$
The max value of $\sin^2\theta$ is $1$, so the answer must be $4$. However my book says  that the answer is $5$. Where did I go wrong?
 [/INST] Your argument is OK. You can check it taking the derivative of the function:
$$f(x)=4\sin(x)^2+3\cos(x)^2$$
$$y'(x)=2\sin(x)\cos(x)$$
which is null for $x=0,x=\frac{\pi}{2}$
The first value gives $y(x)=3$, with the second one you get $y(x)=4$. So, $4$ is the maximum value of $f(x)$
</s>