If $x$ is a real number then what is the greatest value of $$ f(x)=2(a-x)\left(x+\sqrt{x^2+b^2}\right)\;\;? $$ I cannot figure out how to convert this into a quadratic equation to find out the greatest value of $f(x).$
From what I've read, the answer is given by $a^2+b^2$.
Let $M$ be the largest value of $f$. Then equation $f(x)=M$ has exactly one solution in $x$. This equation is equivalent to:
$$ M-2x(a-x)= 2(a-x)\sqrt{x^2+b^2}$$ after squaring and rearranging and canceling we get:
$$ M^2-2M(ax-x^2)= 4(a-x)^2b^2$$
If $M\ne 2b^2$ then this is quadratic equation in $x$ has discriminant $0$ so...