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?

Let $$p=\sqrt{a^2\cos^2(x)+b^2\sin^2(x)},q=\sqrt{b^2\cos^2(x)+a^2\sin^2(x)}$$
Now $p^2+q^2=a^2+b^2$
and $$2(p^2+q^2)-(p+q)^2=(p-q)^2\ge0\iff(p+q)^2\le2(p^2+q^2)=?$$
