# Writing an objective function

I have this problem here: How to write a formula for the objective function?

A powerhouse is located on one bank of a straight river that is $30$ feet wide. A factory is situated on the opposite bank of the river, $200$ feet downstream from the point $P$ directly opposite the powerhouse. What is the most economical path for a cable connecting the powerhouse to the factory if it costs $4$ dollars per foot to lay the cable under water and $2$ dollars per foot on land?

HINT:

Choose a point on the side of the river that the factory is on, $x$ feet downstream from the powerhouse. Plan to run the cable from the powerhouse to that point under water, then from that point to the factory on land.

You need to find the distance of the cable under water then its cost, then find the distance of the cable on land and its cost. Add those two costs, and there is your objective function.

Ask again if you have trouble with any of those steps, but be sure to show the work that you have done so far.

• I wrote my function as C=4*x+2*y I represented x as connecting under water and y for connecting on land. and the area is 30(wideness of the river)*200(the distance from power house to factory) : x*y=300*200 I did this to reduce the function to has one variable. is my work true ? – Malaz Kreiker Jan 2 '16 at 15:41
• @MalazKreiker: No, you made several mistakes. You only need one variable, as I showed in my outline. In my version, the distance under water is not $x$, it is the hypotenuse of a right triangle where one side is $x$. The distance on land is the remaining distance from the end of that hypotenuse to the factory: this is a simple line segment, but the distance here is also not $x$. Both those distances are functions of $x$, which you need to find. Draw a diagram to represent the problem's situation and add my information to that diagram. – Rory Daulton Jan 2 '16 at 15:46