<s>[INST] Problem related to quadratic equation 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$.
 [/INST] $$f(x)=2(a-x)\left(x+\sqrt{x^2+b^2}\right)$$
$$f'(x)=2 (a-x) \left(1+\frac{x}{\sqrt{x^2+b^2}}\right)-2 \left(x+\sqrt{x^2+b^2}\right)$$ 
$$f'(x)=2(a-x)\frac{x+\sqrt{x^2+b^2}}{\sqrt{x^2+b^2}}-2 \left(x+\sqrt{x^2+b^2}\right)$$
$$f'(x)=2\left(x+\sqrt{x^2+b^2}\right) \left(\frac{a-x}{\sqrt{x^2+b^2}}-1 \right)$$ So, you need to solve
$$\frac{a-x}{\sqrt{x^2+b^2}}=1\implies \frac{(a-x)^2}{x^2+b^2}=1$$ which makes your quadratic equation which, in fact, is linear
$$\frac{(a-x)^2}{x^2+b^2}=1 \implies (a^2-b^2)-2 a x=0$$ I am sure that you can take it from here.
</s>