Show that the maximum of $f(x)= \sqrt{x^{2}+a} - |x| $ on $[-1,1]$ for some real $a>0$ is $\sqrt{a}$. Show that the maximum of $f(x)= \sqrt{x^{2}+a} - |x| $ on $[-1,1]$ for some real $a>0$ is $\sqrt{a}$.
Plotting the graph of both $\sqrt{x^{2}+a}$ and $|x|$, it is clear that the maximum difference is at $x=0$ and is equal to $\sqrt{a}$. However, as $f(x)= \sqrt{x^{2}+a} - |x| $ is not differentiable at $x=0$ I am unsure of how to prove this.
Any help would be greatly appreciated.

If we write $|x| = \sqrt{x^2}$, we obtain:
$$f(x) = \sqrt{x^2+a} - \sqrt{x^2} = \frac {(\sqrt{x^2+a} - \sqrt{x^2})(\sqrt{x^2+a} + \sqrt{x^2})}{\sqrt{x^2+a} + \sqrt{x^2}} = \frac {a}{\sqrt{x^2+a}+\sqrt{x^2}}$$
The denominator is obviously strictly increasing as $|x|$ increases.
Hence the maximum of $f$ occurs at $x=0$, with $f(0) = \sqrt a$.
