The maximum value of expression $ \sqrt{\sin^2x+ 2a^2} - \sqrt{-1 -\cos^2x+ 2a^2} $ If $a,x\in\Bbb R$, what is the maximum value of the expression 
$ \sqrt{\sin^2x+ 2a^2} - \sqrt{-1 -\cos^2x+ 2a^2} $?
I tried to differentiate but it became messy.

With a difference of square roots, there are many potential approaches to consider for basic evaluation.  Of note in this case is that we have some nice trigonometry happening that gives the problem an "easy" out: $-\cos^2x = -1+\sin^2x$:
$$\sqrt{\sin^2x+ 2a^2} - \sqrt{-1 -\cos^2x+ 2a^2}=\sqrt{\sin^2x+ 2a^2} - \sqrt{-2+\sin^2x+ 2a^2}$$
We can immediately see that we have $u=\sin^2x+2a^2$ transforms the above to
$$\sqrt{u}-\sqrt{u-2}$$
Now what is left is to find the limits on $u$, including the minimum and maximum possibilities.  The most obvious limitation is that $a\ge \frac{\sqrt 2}2$, since the maximum value available from $\sin^2x$ is $1$, and $u-2\ge0$ must be maintained.  After this, it looks like taking derivatives should be fairly straightforward to approaching the result.
It is also worth noting that another valuable approach to a difference of square roots is as follows:
$$\sqrt a-\sqrt b=\frac{a-b}{\sqrt a+\sqrt b}$$
where we have treated $a-b$ as a "difference of squares".
Putting this together, we complete the result as follows:

 $$\sqrt u-\sqrt{u-2}=\frac {u-(u-2)}{\sqrt u+\sqrt{u-2}}=\frac{2}{\sqrt u+\sqrt{u-2}}\\u\ge 2\implies \sqrt u+\sqrt{u-2}\ge \sqrt 2\\ \implies\frac2{\sqrt u+\sqrt{u-2}}\le \frac 2{\sqrt 2}=\sqrt 2$$

Therefore our maximum value is obtained by minimizing $u$, and knowing that we have a minimum possible value for $u$.
