Finding minimum of trigonometric function Let $$v=\sqrt{a^2\cos^2(x)+b^2\sin^2(x)}+\sqrt{b^2\cos^2(x)+a^2\sin^2(x)}$$
Then find difference between maximum and minimum of $v^2$.
I understand both of them are distance of a point on ellipse from origin, but how do we find maximum and minimum?
I tried guessing, and got maximum $v$ when $x=45^{o}$ and minimum when $x=0$, but how do we justify this?

Set $\sin^2(x) = 1 - \cos^2(x) = y^2$ Then you have 
$$
v=\sqrt{a^2(1-y^2)+b^2 y^2}+\sqrt{b^2 (1-y^2)+a^2 y^2}
$$
One extremum is obtained (differentiate w.r.t. y) at 
$$
\sqrt{a^2(1-y^2)+b^2 y^2}= \sqrt{b^2 (1-y^2)+a^2 y^2}
$$
or
$$
y^2 = 1/2
$$
The other extremum is obtained at $y=0$. 
So the difference of $v^2$ between maximum and minimum is 
$$
2(a^2 + b^2) - (a+b)^2 = (a-b)^2
$$ 
