Max. and Min. of $a\sin^2 x+b \cos^2 x$ $f(x)=a\sin^2 x+b \cos^2 x$
It is stated that, pls check link
If a > b, Maximum value = a and Minimum value = b
If a < b, Maximum value = b and Minimum value = a
How do we find this?
My attempt:
$$
f(x)=a\sin^2 x+b \cos^2 x=a\sin^2 x+b (1-\sin^2 x)=a\sin^2 x+b-b\sin^2 x\\=\sin^2 x(a-b)+b
$$
Range of $\sin^2 x:[0,1]$, So it seems like
$f_{max}=1(a-b)+b=a$ and 
$f_{min}=0(a-b)+b=b$
is the only possibility. What am I missing here ?

$$f(x)=(a-b)\sin^2(x)+b$$
Once $0 \le\sin^2(x) \le 1$ the $f(x)$ has limits $a$ and $b$.
If $a<b$ then $f_{max}=b$ and $f_{min}=a$ 
If $b<a$ then $f_{max}=a$ and $f_{min}=b$
