finding the max of $f(x)=\sqrt{(x^2-4)^2+(x-5)^2}-\sqrt{(x^2-2)^2+(x-1)^2}$ I need to find the max of $$f(x)=\sqrt{(x^2-4)^2+(x-5)^2}-\sqrt{(x^2-2)^2+(x-1)^2}$$
When $x$ is a real number.
What i did is to simplify: $$f(x)=\sqrt{x^4-7x^2-10x+41}-\sqrt{x^4-3x^2-2x+5}$$.
Then i compute: $$f'(x)=\frac{-5-7x+2x^3}{\sqrt{41-10 x-7 x^2+x^4}}+\frac{1+3x-2x^3}{\sqrt{5-2 x-3 x^2+x^4}}$$.
But failed to solve $f'(x)=0$ for finding $f(x)_{max}$.
I would be glad for your help.
Thanks.

I have notice that if $A(x^2,x),B(1,2),C(5,4)$, so $f(x)=AC-AB$.
Also $AC-AB\leq BC$. so the max of $f(x)$ will be $BC=\sqrt{20}$.
I checked and it's the right value by wolfram.
The problem is that i can't justify it.
For example if i take: $g(x)=\sqrt{(x-4)^2+(x-5)^2}-\sqrt{(x-2)^2+(x-1)^2}$
And choose: $A(x,x),B(1,2),C(5,4)$ it still be $\sqrt{20}$ but this function doesn't have a max value by wolfram.
Maybe someone can explain my mistake. 
