<s>[INST] Find point on x-axis that is a minimum distance from 2 points Find the point on the x-axis the sum of whose distances from (2, 0) and
(0, 3) is a minimum.
Let the point be denoted (x, 0) and the sum of the distances be D.
By Pythagoras' Theorem, 
$$D = \sqrt{(x-2)^2+(0-0)^2} + \sqrt{(x-0)^2+(0-3)^2}$$
$$D = \sqrt{x^2-4x+4} + \sqrt{x^2+9}$$
The minimum distance is at the point where D'(x) = 0.
$$D'(x) = \frac{2x-4}{2\sqrt{x^2-4x+4}} + \frac{2x}{2\sqrt{x^2+9}}$$
$$D'(x) = \frac{x-2}{\sqrt{x^2-4x+4}} + \frac{x}{\sqrt{x^2+9}}$$
That is,
$$\frac{x-2}{\sqrt{x^2-4x+4}} = \frac{-x}{\sqrt{x^2+9}}$$
Square both sides:
$$\frac{(x-2)^2}{x^2-4x+4} = \frac{x^2}{x^2+9}$$
$$(x-2)^2(x^2+9) = (x^2)(x^2-4x+4)$$
$$(x^2-4x+4)(x^2+9) = (x^2)(x^2-4x+4)$$
$$x^4+9x^2-4x^3-36x+4x^2+36 = x^4-4x^3+4x^2$$
$$9x^2-36x = 0$$
$$x^2 = 4$$
$$x=2$$
But if 
$$D = \sqrt{(x-2)^2+(0-0)^2} + \sqrt{(x-0)^2+(0-3)^2}$$
$$D = x-2 + \sqrt{(x-0)^2+(0-3)^2}$$
$$D'(x) = 1 + \frac{2x}{2\sqrt{x^2+9}}$$
$$1 = \frac{-x}{\sqrt{x^2+9}}$$
$$\sqrt{x^2+9} = -x$$
Square both sides:
$$x^2+9 = x^2$$
$$9 = 0$$
What's wrong here?
 [/INST] This is a great algebra problem.
Even though Jason's remark is correct, it does NOT address the full issue here.
Why not use the TI for a change.
Put in for $y1$ the first D function with the square roots.
You can look at the graph and clearly see that the function makes an abrupt turn at its minimum $x=2$. In other words, even though $x=2$ represents a minimum, it is not differentiable at that value.
Now let's take the squareroot of $(x-2)^2$ and replace it by $x-2$ , put in for $y2$ and compare the graphs. For $x<2$ the graphs differ en the second graph no longer show $x=2$ as a minimum. Then replace $x-2$ by $2-x$ This time for $x>2$ the graphs are different with again the second graph showing no minimum at $x=2$.
In other words: The first method is correct, a simplification on the second method cannot be done. More important with optimization problems: Examine the graph with your graphing device to see if it makes sense!
</s>