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.

Let $\sqrt{x^2+b^2}+x=z.$ Then $\displaystyle \sqrt{x^2+b^2}-x=\frac{b^2}{z}.$
So $$y=z \bigg(2a-z+\frac{b^2}{z}\bigg)=2az-z^2+b^2=a^2+b^2-(z-b)^2\leq a^2+b^2$$
