TITLE: Analytical solution for rational equality, square root in denominator on both sides
QUESTION [5 upvotes]: So I was trying to solve a problem I saw in a practice set for a 6th-grade math competition, as far as I can remember it. It was a story problem, but I think the solution is the minimum value of
$$
\sqrt{x^2 + 25} + \sqrt{(5-x)^2 + 49}
$$
for $x$ in the interval $[0,5]$. I know the derivative at a minimum should be zero, so
$$
{x \over \sqrt{x^2+25}} + {x-5 \over \sqrt{(5-x)^2 + 49}} = 0 
$$
I can see by experimentation that the answer is close to $13$, with $x$ close to $2.08$. However, I get stuck after that. If I write as
$$
{x \over \sqrt{x^2+25}} = {5-x \over \sqrt{(5-x)^2 + 49}} 
$$
can I multiply both sides by the product of the denominators? Can I square both sides? When I do that, I get a fourth-degree polynomial on each side, but the fourth-degree and third-degree term cancel out; and the I'm left with a quadratic equation whose roots are nowhere near the interval I need. 
More generally, is there an analytical solution for
$$
\min\left(\sqrt{x^2+y_0^2} + \sqrt{(x_0-x)^2+y_1^2}\right)
$$
where $y_0$, $y_1$, and $x_0$ are positive constants?

REPLY [4 votes]: Not many Grade 6 students are comfortable with calculus, so we solve the problem in another way.
Draw the point $P=(0,5)$ and the point $Q=(5,7)$. We want the point $X=(x,0)$ on the $x$-axis such that the sum of the distances $PX$ and $XQ$ is a minimum. (We also want $0\le x\le 5$, but that will turn out to be irrelevant.)
Let $P'=(0,-5)$. By symmetry we want $P'X+XQ$ to be a minimum.
Join $P'$ and $Q$. Putting $X$ where $P'Q$ meets the $x$-axis minimizes the sum of the distances.  (The straight line path from $P'$ to $Q$ minimizes the distance travelled.)
By the Pythagorean Theorem, the distance $P'Q$ is $\sqrt{5^2+12^2}$.