Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


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..

share|cite|improve this question
Looks like a Lagrange multiplier problem. – math-visitor Jun 3 '12 at 10:51
up vote 15 down vote accepted

Norbert and Ross Millikan have already suggested one slick solution, and Gerry Myerson the even slicker solution, but you can do it purely algebraically: you ran into trouble because your derivative isn’t quite right. It should be


with the second term negative from the chain rule applied to $3-x$. Setting that to $0$ and doing a little algebra, we get

$$\begin{align*} x\sqrt{18-6x+x^2}&=(3-x)\sqrt{1+x^2}\;,\\ 18x^2-6x^3+x^4&=(3-x)^2(1+x^2)\;,\\ 18x^2-6x^3+x^4&=9-6x+10x^2-6x^3+x^4\;,\\ 18x^2&=9-6x+10x^2\;,\\ 8x^2+6x-9&=0\;,\text{ and}\\ (4x-3)(2x+3)&=0\;. \end{align*}$$

The desired solution is clearly $x=\dfrac34$.

share|cite|improve this answer

Use physical analogy. Consider $ACB$ as the path of light travelling from $A$ to $B$ with reflection at point $C$. As we all know light travels along the shortest path, and angle of incidence equals angle of reflection. So you had to choose point $C$ such that angle between $x$-axis and $AC$ must be equal to angle between $x$-axis and $CB$

enter image description here

Since angles $ACO$ and $BCD$ are equal we can say that their tangents are equal. Hence $$ \frac{1}{x}=\frac{3}{3-x} $$ and we get $x=3/4$

share|cite|improve this answer
Thanks, +1 but I'll accept Brian's answer since it's what my assignment was about – Schiavini Jun 3 '12 at 11:05
Not at all.${}{}{}$ – Norbert Jun 3 '12 at 11:07
+1 Very nice answer! – DonAntonio Jun 3 '12 at 11:08
@Norbert: Great. nothing can describe the problem but a graphical view. – Babak S. Jun 3 '12 at 11:09
@Norbert, I'm learning derivatives – Schiavini Jun 3 '12 at 14:18

Let $B'=(0,-1)$. Do you see that $AC+BC=AC+B'C$? Do you see where to put $C$ to minimize $AC+B'C$?

share|cite|improve this answer
This is a great answer, +1 but I'll accept Brian's answer since it's what my assignment was about – Schiavini Jun 3 '12 at 11:05

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$.

share|cite|improve this answer

Hint: you might look at Wikipedia on angle of reflection

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.