Precalculus - connect 2 towns

A state highway department plans to construct a new road between towns $A$ and $B$. Town $A$ lies on an abandoned road that runs east-west. Town $B$ is $20$ miles north of the point on that road that is $40$ miles east of $A$. The engineering division proposes that the road be constructed by restoring a section of the old road from $A$ up to a point $C$ and joining it to a new road that connects $C$ and $B$. If the cost of restoring the old road is \$200,000 per mile and the cost of the new road is \$400,000 per mile, determine the function describing the total cost. Estimate how much of the old road should be restored in order to minimize the department’s costs.

I'm having trouble with how to determine the function to describe the total cost. My thought process was to solve for the hypotenuse. I used $40-x$ as the base, and $20$ as the height, and came up with the $\sqrt{x^2-80x+2000}$. but then i get stuck as to what to do next – I don't know whether the cost $=200,000x+400,000\sqrt{x^2-80x+2000}$, or if there is a way to simplify. It's also confusing to me because I know when solving the hypotenuse it results in imaginary numbers. –

• What difficulty are you having with this exercise? – user147263 Jan 31 '15 at 2:10
• Is this really a precalc problem? – apnorton Jan 31 '15 at 2:11
• Yes it is a precalc problem! I'm having trouble with how to determine the function to describe the total cost. My thought process was to solve for the hypotenuse. I used 40-x as the base, and 20 as the height, and came up with the sqrt(x^2-80x+2000). but then i get stuck as to what to do next – Stacey Rydzewska Jan 31 '15 at 2:14
• I don't know whether the cost=200,000x+400,000sqrt(x^2-80x+2000), or if there is a way to simplify. It's also confusing to me because I know when solving the hypotenuse it results in imaginary numbers. – Stacey Rydzewska Jan 31 '15 at 2:17
• The image! I'm sorry I didn't realize! I wil try to edit the post – Stacey Rydzewska Jan 31 '15 at 2:19

Your thought is correct, as is your expression for the cost of the road. Now in a calculus class you would be expected to take the derivative of the cost with respect to $x$, set it to zero, and solve the resulting equation. As you tagged it precalculus people are confused because we assume you don't know how to take the derivative. Do you? Alternately you could ask Alpha to plot over a much smaller range and find the minimum that way. I would start plotting from $0$ to $40$, see where the minimum seems to be, and zoom in.
• No, the amount of the old road to be reconstructed is the minimum, so according to you is 25.3 miles. When I look at the graph it is closer to 28.4 miles. You could plug this into your formula to get the total cost. $40-20/\sqrt 3 \approx 28.45$ – Ross Millikan Jan 31 '15 at 4:20