finding the max of $f(x)=\sqrt{(x^2-4)^2+(x-5)^2}-\sqrt{(x^2-2)^2+(x-1)^2}$

197 Views Asked by At

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.

4

There are 4 best solutions below

5
On BEST ANSWER

here is geo solution which might be make things clear:

enter image description here

let $y=x^2,A(x,y),B(5,4),C(1,2)$,your problem become when $A$ moves on $y=x^2$, find max of $AB-AC$.

it is trivial $AB-AC <CB$, except when $A=D$ then $DB-DC=CB$

7
On

You have $\frac{-5-7x+2x^3}{\sqrt{41-10x-7x^3+x^4}}+\frac{1+3x-2x^3}{\sqrt{5-2x-3x^2+x^4}}=0$ so $\frac{-5-7x+2x^3}{\sqrt{41-10x-7x^3+x^4}}=-\frac{1+3x-2x^3}{\sqrt{5-2x-3x^2+x^4}}$ then $\frac{(-5-7x+2x^3)^2}{41-10x-7x^3+x^4}=\frac{(1+3x-2x^3)^2}{5-2x-3x^2+x^4}$ and finally $(5-2x-3x^2+x^4)(-5-7x+2x^3)^2=(41-10x-7x^3+x^4)(1+3x-2x^3)^2$

Its a large polynomial but you have to find the 10 roots (removing the strange roost that made $41-10x-7x^3+x^4<0$ or $5-2x-3x^2+x^4<0$) and check which of them is the max or if the max is in $-\infty$ or $\infty$. It will be a long way if you want to made it by your own...

Well you can remove $(x+1)^2$ by common factor in both sides so $x=-1$ are 2 roots and remain 8:

$(2x^2-2x-5)^2(x^4-3x^2-2x+5)=(2x^2-2x-1)^2(x^4-7x^3-10x+41)$

And by expanding you can get

$28x^7-84x^6+72x^5-108x^4+267x^3-155x^2-104x+84=0$ and dividing by $(x-1)$ (and therefore $x=1$ is another root)

$28x^6-56x^5+16x^4-92x^3+172x^2+20x-81=0$

only 6 roots remain and you can use methods to approach them to $x\approx-0.614946$ and $x\approx0.886814$

2
On

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.

3
On

Hint: enter image description here

Consider the points $A=(4,5)$ and $B=(1,2)$ and a point $P$ on the line $x=y$ parallel to the line AB. We have for the distances $PA$, $PB$ $AB$ the triangle inequality $$PA-PB \le AB$$ with equality if an only if $A$,$B$, $P$ lie on a line in this order. This will only happen for points $P$ chosen on $x=y$ at $-\infty$. The supremum value is $AB = 3\sqrt{2}$, the maximum is not achieved.