# Math Help - Optimization problem

1. ## Optimization problem

Two towns A and B are 5km and 7km, 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 S to B?

So I set up the question in order to minimize the length of AS^2+SB^2 (since we are not suppose to use trig). I squared the sides in order to make the problem easier to work with. I made x be the length from C to S, and 6-x the length from S to D.

I have,

(5^2 + x^2) + (7^2 + (6-x)^2) = 110 - 12x + 2x^2

differentiating, I get,

-12+4x

When I solve for x, I get 3. However, the answer in the back of the book is 21/6=3.5 from point D.

What am I doing wrong?

2. Originally Posted by BrownianMan
Two towns A and B are 5km and 7km, 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 S to B?

So I set up the question in order to minimize the length of AS^2+SB^2 (since we are not suppose to use trig). I squared the sides in order to make the problem easier to work with. I made x be the length from C to S, and 6-x the length from S to D.

I have,

(5^2 + x^2) + (7^2 + (6-x)^2) = 110 - 12x + 2x^2

differentiating, I get,

-12+4x

When I solve for x, I get 3. However, the answer in the back of the book is 21/6=3.5 from point D.

What am I doing wrong?
Did you make a sketch?

1. The triangles $\Delta ASC$ and $\Delta B'SD$ are similar.

2. Use the proportion

$\frac x{6-x} = \frac75$ Solve for x.

3. Originally Posted by BrownianMan
Two towns A and B are 5km and 7km, 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 S to B?

So I set up the question in order to minimize the length of AS^2+SB^2 (since we are not suppose to use trig). I squared the sides in order to make the problem easier to work with. I made x be the length from C to S, and 6-x the length from S to D.

I have,

(5^2 + x^2) + (7^2 + (6-x)^2) = 110 - 12x + 2x^2

differentiating, I get,

-12+4x

When I solve for x, I get 3. However, the answer in the back of the book is 21/6=3.5 from point D.

What am I doing wrong?
since $d = \sqrt{5^2+x^2} + \sqrt{7^2 + (6-x)^2}$

you cannot square "everything" ...

$d^2 \ne (5^2+x^2) + [7^2 + (6-x)^2]$

4. The shortest distance between 2 points is a straight line.
As illustrated by Earboth, in this case,
the straight line goes to the image of one of the points.