TITLE: Calculating the shortest possible distance between points
QUESTION [8 upvotes]: Question:
Given the points $A(3,3)$, $B(0,1)$ and $C(x,0)$ where $0 < x < 3$, $AC$ is the distance between $A$ and $C$ and $BC$ is the distance between $B$ and $C$. What is x for the distance $AC + BC$ to be minimal?
What have I done?
I defined the function $AC + BC$ as:
$\mathrm{f}\left( x\right) =\sqrt{{1}^{2}+{x}^{2}}+\sqrt{{3}^{2}+{\left( 3-x\right) }^{2}}$
And the first derivative:
$\mathrm{f'}\left( x\right) =\frac{x}{\sqrt{{x}^{2}+1}}+\frac{3-x}{\sqrt{{x}^{2}-6\,x+18}}$
We need to find the values for $\mathrm{f'}\left( x\right) = 0$, so by summing and multiplying both sides I got to the equation:
$2x^4 - 12x^3  + 19x^2 -6x+18 = 0$
But I don't think the purpose should be to solve a 4th grade equation, there should be another way I'm missing..

REPLY [3 votes]: The following little trick (method?) is useful in many places. Let $y=3-x$. We want to minimize $\sqrt{1+x^2}+\sqrt{3^2+y^2}$, where $x+y=3$. 
Differentiate with respect to $x$. Using the fact that $\frac{dy}{dx}=-1$, we arrive at the equation 
$$\frac{x}{\sqrt{1+x^2}}=\frac{y}{\sqrt{9+y^2}}.$$
Note that this is (apart from a little minus sign problem) the equation you arrived at, with $3-x$ replaced by $y$.
Square both sides, cross-multiply. We get
$$x^2(9+y^2)=y^2(1+x^2),$$
which simplifies to $9x^2=y^2$.  
No fourth degree equation here! Since $x$ and $y$ are non-negative, we get $y=3x$, a linear equation.   Now from $x+y=3$ we obtain $x=3/4$.