Find Maxima and Minima of $f( \theta) = a \sin^2 \theta + b \sin \theta \cos \theta + c \cos^2 \theta$

By the double angle formulas, the expression is equivalent to

$$\frac12\left(a+c+(a-c)\cos2\theta+b\sin2\theta\right).$$

Now the expression $(a-c)\cos2\theta+b\sin2\theta$ can be seen as the dot product of a vector with a rotating unit vector, which takes its extreme values when the vectors are parallel or antiparallel, giving

$$\pm\|(a-c,b)\|=\pm\sqrt{(a-c)^2+b^2}.$$


The same result can be obtained by differentiation, or by reducing to the sine addition formula.


Yet another way is by finding the extrema of $(a-c)x+by$ under the constraint $x^2+y^2=1$. Using a Lagrange multiplier, the equations are

$$\begin{cases}x^2+y^2&=1,\\a-c&=2\lambda x,\\b&=2\lambda y,\end{cases}$$

easily giving

$$x=\pm\frac{a-c}{\sqrt{(a-c)^2+b^2}},\\y=\pm\frac{b}{\sqrt{(a-c)^2+b^2}}.$$


We can use a trick to express the function as something easier to deal with. We claim that we can write the function as $(d \cos \theta + e \sin \theta)^2 + f$ or $-(d \cos \theta - e \sin \theta)^2 + f$ for some constants $d, e, f$. From here, converting $d \cos \theta + e \sin \theta$ into a single trigonometric function is simple, and we can find the bounds exactly.

Note that for our expression to work, we must have $de = \frac{b}{2}$. So we expand $(d \cos \theta + \frac{b}{2d} \sin \theta)^2$ to get $d^2 \cos^2 \theta + b \sin \theta \cos \theta + \frac{b^2}{4d^2} \sin^2 \theta$. If we can find a $d$ satisfying $d^2 - \frac{b}{4d^2} = a^2 - c^2$, then the expression will be exactly $a \sin^2 \theta + b \sin \theta \cos \theta + c \cos^2 \theta - f(\sin^2 \theta + \cos^2 \theta)$ for some $f$. But solving for $d$ is now a quadratic in $d^2$. A similar approach can be taken with $-(d \cos \theta - e \sin \theta)^2$; one of the two will always work, and yield the exact bounds required.


By C-S we obtain: $$a\sin^2\theta+b\sin\theta\cos\theta+c\cos^2\theta=a\cdot\frac{1-\cos2\theta}{2}+b\cdot\frac{\sin2\theta}{2}+c\cdot\frac{1+\cos2\theta}{2}=$$ $$=\frac{1}{2}\left(a+c+b\sin2\theta-(a-c)\cos2\theta\right)\leq\frac{1}{2}\left(a+c+\sqrt{(b^2+(-a+c)^2)\left(\sin^22\theta+\cos^22\theta\right)}\right)=$$ $$=\frac{1}{2}\left(a+c+\sqrt{b^2+(a-c)^2}\right)$$ and by C-S again we obtain: $$a\sin^2\theta+b\sin\theta\cos\theta+c\cos^2\theta=\frac{1}{2}\left(a+c+b\sin2\theta-(a-c)\cos2\theta\right)\geq$$ $$\geq \frac{1}{2}\left(a+c-\sqrt{(b^2+(-a+c)^2)\left(\sin^22\theta+\cos^22\theta\right)}\right)=$$ $$=\frac{1}{2}\left(a+c-\sqrt{b^2+(a-c)^2}\right).$$ The equality in the both cases occurs for $$(\sin2\theta,\cos2\theta)||(b,-a+c),$$ which says that we got a minimal and the maximal value of the expression.

Now, since $f$ is a continuous function, we obtain that the range of $f$ it's: $$\left[\frac{1}{2}\left(a+c-\sqrt{b^2+(a-c)^2}\right),\frac{1}{2}\left(a+c+\sqrt{b^2+(a-c)^2}\right)\right]$$