The maximum and minimum values of the expression Here is the question:find the difference between maximum and minimum values of $u^2$ where $$u=\sqrt{a^2\cos^2x+b^2\sin^2x} + \sqrt{a^2\sin^2x+b^2\cos^2x}$$

My try:I have just normally squared the expression  and got
$u^2=a^2\cos^2x+b^2\sin^2x + a^2\sin^2x+b^2\cos^2x +2\sqrt{a^2\cos^2x+b^2\sin^2x} \sqrt{a^2\sin^2x+b^2\cos^2x}$ 
$u^2=a^2+b^2 +2\sqrt{a^2\cos^2x+b^2\sin^2x} .\sqrt{a^2\sin^2x+b^2\cos^2x}$ 
I am not getting how to solve the irrational part,so how should we do it.Is there some general way to solve such questions?

Expanding $u^2$ more:$$u^2=a^2+b^2 +2\sqrt{\sin^2x\cos^2x(a^4+b^4)+a^2b^2(\sin^4x+\cos^4x)}$$
Using trigonometric identity $\sin^2x+\cos^2x=1$ we can derive that:$$\sin^4x+\cos^4x=1-2\sin^2x\cos^2x$$
Rewrite $u^2$ again:$$u^2=a^2+b^2 +2\sqrt{\sin^2x\cos^2x(a^2-b^2)^2+a^2b^2}$$
The minimum value of $\sin^2x\cos^2x$ is $0$ and its maximum value is (using AM-GM) $$\frac{\sin^2x+\cos^2x}{2}=\frac{1}{2}\ge\sin x\cos x$$
$$\frac{1}{4}\ge\sin^2x\cos^2x$$
Also you can find it this way using trigonometric identities $$\sin^2x\cos^2x = \frac{\sin^2(2x)}{4}\Rightarrow \max(\sin^2x\cos^2x)=\max \left(\frac{\sin^2(2x)}{4}\right)=\frac{1}{4}$$ 
So $$u^2_{min}=(\left |a\right |+\left |b\right |)^2$$
$$u^2_{max}=2(a^2+b^2)$$
