The oil-well is
6km off shore. The refinery is on the coast,
8 km from the nearest point of land to the oil well. The costs is $
S per km to lay pipe along the shore
but U times as much per km to lay pipe underwater. Pipe may be laid either straight to the refinery, or to an intermediate point on the coast then along the coast.
The question asks me to find the total cost as a function of the distance x between the point directly opposite the oil well and the place where the pipe comes ashore.
I came up with
S(8 - x) + U sqrt(x ^ 2 + 36) but its not right and I can't find out what I did wrong.
Any help would be much appreciated.