# If $u=\sqrt {a\cos^{2}x+b\sin^{2}x} + \sqrt {b\cos^{2}x+a\sin^{2}x}$ , find the maximum and minimum value of $u^2$.

If $$u=\sqrt {a\cos^{2}x+b\sin^{2}x} + \sqrt {b\cos^{2}x+a\sin^{2}x}$$ , find the maximum and minimum value of $$u^2$$.

This problem was bothering me for a while. The minimum value of $$u$$ seemed relatively easy to find by using AM-GM followed by Cauchy-Schwarz but both equalities don't hold simultaneously. It seems a bit tempting to assume that the maximum occurs at $$x= {\pi/4}$$ but I couldn't find a proof to the conjecture. Would someone please help me to find the maximum and minimum with a short relevant proof?

Note: I discovered that the function $$u$$ is periodic with period $${\pi/2}$$.

• Are there any restrictions on $a$ and $b$? Aug 17 '19 at 17:31
• They are real constants. The answer depends on them. Aug 17 '19 at 17:33
• @Shashwat1337, What about the minimum value? Aug 17 '19 at 18:17
• Sorry, in AM-GM and Cauchy Schwatz, both equalities don't hold simultaneously. I've edited the question. Aug 19 '19 at 18:04

Put $$1-\cos2x =2\sin^2x$$ $$1+\cos2x =2\cos^2x$$

• Would you please give me another hint? Aug 18 '19 at 7:06

$$u=\sqrt {a\cos^{2}x+b\sin^{2}x} + \sqrt {b\cos^{2}x+a\sin^{2}x}$$

Let

$$p = a \cos^2 x + b \sin^2 x$$

$$q = b \cos^2 x + a \sin^2 x$$

and

$$u = \sqrt{p} + \sqrt{q}$$

Then $$u^2 = p + q + 2 \sqrt{pq}$$

Now

$$p + q = a + b$$

and

$$\displaystyle pq = \frac{(a+b)^2}{4} - \frac{(a-b)^2}{8} - \frac{(a-b)^2}{8} \cos 4x$$

If $$\cos 4x = -1$$ then $$u^2$$ is maximum and is equal to

$$2(a+b)$$

If $$\cos 4x = 1$$ then $$u^2$$ is minimum and is equal to

$$a+b + 2 \sqrt{ab}$$

$$(a\cos^2x+b\sin^2 x)(b\cos^2x+a\sin^2x) = \frac 18\left((a+b)^2+4ab-(a-b)^2\cos(4x)\right)$$