<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] Though this has been asked and answered, I'll give an alternate solution That avoids messy derivative calculations. Notice that $4\sin^2{x}+3\cos^2{x}$ is very close to $4(\sin^2{x}+\cos^2{x})=4(1)=4$. So we fix it so we get what we want.
$$
4\sin^2{x}+3\cos^2{x}=4\sin^2{x}+3\cos^2{x}+\big(\cos^2{x}-\cos^2{x}\big)
$$
Which gives us
$$
4(\sin^2{x}+\cos^2{x})-\cos^2{x}=4-\cos^2{x}=4+(-\cos^2{x})
$$
So the maximum of our original function will occur whenever $-\cos^2{x}$ has a minimum (since we have added it to our original function). Since the minimum of $-\cos^2{x}$ is $0$, the maximum value of our original function $4\sin^2{x}+3\cos^2{x}$ is $4$.
</s>