# Minimum value of the length of a line

1. Apr 7, 2010

### shanshan

1. The problem statement, all variables and given/known data
Two towns, A and B are 5 km and 7 km respectively, from a railroad line. The points C and D nearest to A and B on the line are 6 km apart. Where should a station be located to minimize the length of a new road from A to B?

2. Relevant equations
a^2+b^2 = c^2, a=0.5bh(?)

3. The attempt at a solution
I thought for this question that I could use pythagorus' theorum to find the value of c. If I considered CS as x, and SD as x-6, then I could find c in terms of x. So I've got that
c(1)=sqrt(x^2-12x+85), and
c(2)=sqrt(25+x^2)
and then I thought maybe I could add these two c values together and find the derivative of their sum, and make that equal to 0 (because I am looking for a minimum value).
Of course, this method of solving, if it is even right, is a lot more work than most of the other questions around it, which makes me wonder if there a simpler way of doing the question, or if my method even makes sense..
Does this solution make any sense? Can I use the derivative of a line's length to find it's minimum? Or are there restrictions on what type of function I can differentiate to find a minimum?

2. Apr 7, 2010

### LCKurtz

I assume this new road is to pass through the station? Otherwise, if the cities
A and B are on the same side of the railroad you would just use the straight line between them, eh? And if they are on opposite sides of the road, why not put the station on the straight line joining the cities? Otherwise think about reflecting one city through the railroad.

Are you sure you have stated the whole problem?

3. Apr 7, 2010

### lanedance

you need to be a little clearer in description, what is c?

so if S is the station, i assume you mean
a = |AC| = 5
b = |BD| = 7
x = |CS|
x-6 = |SD|
c1 = |AS|
c2 = |BS|

so i'm guessing c is the length of the road, with c(x) = c1(x) + c2(x)

if that's the case, your method sounds fine to differentiate c(x) to find the minimum.

There's probably a simpler way, but that should work - what answer do you get?

4. Apr 7, 2010

### lanedance

much simpler LCKurtz

5. Apr 8, 2010

### shanshan

Sorry, that's all the question's given me.. I know it's not really worded that well but I'd really appreciate your help...
I'm going to assume from the types of question I've been doing that the road has to pass through the station.
"so if S is the station, i assume you mean
a = |AC| = 5
b = |BD| = 7
x = |CS|
x-6 = |SD|
c1 = |AS|
c2 = |BS|"
Yes, that's what I got out of the question too. But then I went to solve it...

according to pythagorus' theorum,
(7^2) + (6-x)^2 = c1^2, so
c1 = sqrt(x^2 - 12x + 85),
and
5^2 + x^2 = c2^2, so
c2 = sqrt (25+x^2)

Since I'm looking for the minimum length of c1 + c2, I need to find x when dx(c1+c2)=0.
So...
dx(sqrt(x^2 - 12x + 85) + sqrt (25+x^2)) = 0
I found the derivative of that to be
((x-6)sqrt(25-x^2)+xsqrt(x^2-12x+85))/(sqrt(x^2-12x+85)(sqrt(25-x^2))
Once I've made that equal to 0, I can eliminate the denominator and am left with
0 = (x-6)sqrt(25-x^2)+xsqrt(x^2-12x+85)
And then I can solve for x...
(x-6)sqrt(25-x^2) = -xsqrt(x^2-12x+85)
(sqrt(25-x^2) = -xsqrt(x^2-12x+85)/(x-6))^2
25-x^2 = (-x^2(x^2-12x))/(x-6)^2
(25-x^2)(x-6)^2 = -x^4+12x^3
25x^2-300x+900-x^4+12x^3-36x^2 = -x^4 + 12x^3
-11x^2 - 300x + 900 = 0
And then, using the quadratic formula, I find that
x = (150 +/- 6sqrt(350))/-11

.. But this can't be right for two reasons. First, this makes it a negative distance (or can I just take the absolute value?), and second, I'm supposed to find that the station is 21/6 km from d.

6. Apr 8, 2010

### lanedance

have you tried LC Kurtz suggestion? that will lead to ACS & BDS being similar triangles...

7. Apr 8, 2010

### shanshan

No, I haven't.. I asked my teacher what it was, and she said that I shouldn't try to teach it to myself, and that she wouldn't accept it on a test.. :S

8. Apr 8, 2010

### lanedance

note you can make superscpipts for powers using the button in advanced or by writing tex
so just to check derivatives
$$\frax{d}{dx}c_1(x) = \frax{d}{dx}\sqrt{x^2 - 12x + 85} = \frac{1}{2}\frac{2x-12}{\sqrt{x^2 - 12x + 85} }$$

$$\frax{d}{dx}c_2(x) = \frax{d}{dx}\sqrt{x^2 + 25} = \frac{1}{2}\frac{2x}{\sqrt{x^2+25} }$$

then the derivative of c will be zero when
$$\frax{d}{dx}c_1(x)=-\frax{d}{dx}c_2(x)$$

giving
$$= \frac{2x-12}{\sqrt{x^2 - 12x + 85}} = \frac{2x}{\sqrt{x^2+25} }$$

multpliying out
$$(2x-12)\sqrt{x^2+25} = 2x \sqrt{x^2 - 12x + 85}$$

squaring gives
$$(2x-12)^2(x^2+25) = (2x)^2 (x^2 - 12x + 85)$$
$$(x-6)^2(x^2+25) = x^2 (x^2 - 12x + 85)$$
$$(x^2-12x+36)(x^2+25) = (x^2)(x^2 - 12x + 85)$$
$$36x^2 + 25x^2-300x+900 = 85x^2$$
$$24x^2+300x-900=0$$
$$2x^2+25x-75=0$$

factoring gives
$$(2x-5)(x+15)=0$$

so the positive solution is x = 5/2

that was tough work... hope i didn't make any errors

as a check if you use LCKurtz method, then you recognise they are similar (reflected) triangles, then:
$$\frac{|AC|}{|CS|} = \frac{|BD|}{|DS|}$$
$$\frac{5}{x} = \frac{7}{6-x}$$

so
$$5(6-x) = 7x$$
$$30-5x = 7x$$
$$30 = 12x$$
$$x = 30/12 = 5/2$$
sama, sama - x is distance from C, so distance form D is 6-5/2 = 7/2...not sure where 21/6 = 7/3 came from?

9. Apr 8, 2010

### shanshan

.. Stupid question I'm sure, but I thought that you couldn't just square both sides of the equation? So when you square each term, it's okay?
Thanks a bunch, I know that was a lot of work.. And i think my textbook probably has a mistake for the answer, i know it has before.

10. Apr 8, 2010

### lanedance

you can, it just means you are only comparing magnitudes,

re-looking at what i did, it appears i dropped a negative before, so the square actually helped out

11. Apr 9, 2010

### HallsofIvy

No derivatives are needed nor are squares or square roots- the shortest distance between two points is a straight line. Use LCKurtz's suggestion:
excellent!