Optimization. Example Problem In this situation, we want to determine the fastest and most cost-effective route for transporting oil from offshore drilling platforms 2 kilometers off the coast to a refinery 4 kilometers down the coast. Laying a pipeline in the ocean is twice as expensive as it is on land. To minimize costs, it is necessary to determine the most economical route for a pipeline that connects an oil well located two kilometers offshore to a refinery located four miles down the coast. We will use the color green to represent our pipe in the ocean. And then we'll use blue for the ocean itself. There is a path through the diagram that minimizes the cost. Let's call this point x, and as far as cost is concerned, let's call the price p. For this section of the diagram, the cost is 2p. Each of the letters in the word "price" represents a different parameter that we will need to take into account when determining a price. To minimize cost, we can write the equation 2p times the distance from point a to point b equals p times the distance from point a to point c, where both ab and ac represent the shortest route. Now, solving for x is easy. If this whole distance is 4 and this is x, that means this is 4 minus x. Over here, though, we have created a right triangle. By the Pythagorean theorem, if this side is x and this side is 2 kilometers long-- so just 2-- then this side would be the square root of x squared plus 4. So, square root x squared plus 4. We have the equation for cost. We'll take the derivative of this equation with respect to x, which is x squared plus 4 to the 1/2. So 1/2 times 2 is 1, times x squared plus 4 to the negative 1/2.
By the chain rule of differentiation, we have the derivative of p times 2x minus x equals negative p. We will now take the derivative of the function. We will set that equal to 0, and we will solve for x. First, we rewrite this expression: 2px divided by the square root of x squared plus 4. I have added the constant p to both sides. Since I have p on each side, if I divide through by p, I get 1. To continue with my solution, I will multiply both sides by the square root term, so that x equals 2 times the square root of x squared plus 4. So we have 3x squared equals 4. In order to solve this equation, we divide by 3, giving us 4 over 3. We then take the square root of both sides of the equation, allowing us to solve for x: x is equal to 2 over the square root of 3 or 2/3√3. Let me redraw our picture, since we are going to go down the coast and hit a point 2 over square root of 3 kilometers down the side of the coast. Then we will be able to see what will be submerged. So that is what will be put into the ocean. And on land will be this 2 over the square root of 3, 4 minus 2 square root of 3 is what we'll do on land. And if the question had asked "what is cost?" then they would have to tell us what the price was to begin with. And then we could use the cost equation to come back and get the total price-- if they had asked. So, to figure out the cost of the project, we will calculate the area of the construction site on land and multiply that by our initial price. We will then divide this number by the area in the ocean and multiply that by the cost per square foot in the ocean. This gives us our total project cost. The diagram is our answer here.