How to find the maximum value of the expression $y=2(a-x)(x+\sqrt{x^2+b^2})$ The maximum value of the expression $y=2(a-x)(x+\sqrt{x^2+b^2})$
If we take derivative, then I am not getting anything, please guide how to proceed in such problems will be of great help. Thanks.

Differentiation + some work:
$$
\begin{align}
y'
&=
-2\left(x+\sqrt{x^2+b^2}\right)
+2(a-x)\left(1+\frac{x}{\sqrt{x^2+b^2}}\right) \\
&=
-2\sqrt{x^2+b^2}\left(\frac{x+\sqrt{x^2+b^2}}{\sqrt{x^2+b^2}}\right)
+2(a-x)\left(\frac{\sqrt{x^2+b^2}+x}{\sqrt{x^2+b^2}}\right) \\
&=0
\end{align}
$$
this implies:
$$
\sqrt{x^2+b^2}=(a-x)
$$
and you can square both sides and work out the equation.
