I am a Calculus 1 student and I have an optimization word-problem that is giving me a lot of trouble.

It has two variables. I have found the value for $y$, but when I plugged it into the equation and tried to solve for the $x$ I couldn't find it's value. I used Symbolab to solve it, but it came up with a decimal number that's extremely complicated when written as a fraction. My professor has given us very complicated problems before, but the complexity of this number is such that I feel like it's very likely I did something wrong.

I have checked other parts of my work with Symbolab and I am still not sure where I went wrong, but I would really appreciate it if you would take a look and determine if there are any parts that don't look right to you.

An oil refinery is located on the north bank of a straight river which is $2$km wide. A pipeline is to be constructed from the refinery to storage tanks located on the south bank of the river $6$km east of the refinery. The cost of laying pipe is $\$400,000$ per km over land to a point $P$ on the north bank and $\$800,000$ per km under the river to the tanks. To minimize the cost of the pipeline, where should $P$ be located?

$P=$ The area where the pipeline enters the river.

$x=$ The horizontal distance between the oil refinery and the storage tanks.

$y=$ The euclidean distance between $P$ and the storage tanks.

The Pythagorean theorem states $2^2+(6-x)^2=y^2$.

The cost of the pipeline is $C = 400,000x+800,000y$.

finding $y$:

$$4+(6-x)^2 = y^2 \to y= \pm \sqrt{4+(6-x)^2}$$

Differentiating $C = 400,000x+800,000\sqrt{4+(6-x)^2}$:


$$\frac{d}{dx}800,000\sqrt{4+(6-x)^2}=[\frac{-(6-x)}{\sqrt{4+(6-x)^2}}\cdot800,000] = \frac{-800,000(6-x)}{\sqrt{4+(6-x)^2}}$$


Setting $400,000-\frac{800,000(6-x)}{\sqrt{4+(6-x)^2}} = 0$ and solving for $x$.


I'm not completely sure how to write the fraction out with math notation here because a single square root seems to cover part of the numerator and all of the denominator, but you can see it if you plug $400,000-\frac{800,000(6-x)}{\sqrt{4+(6-x)^2}} = 0$ into Symbolab's "solve for" calculator.

  • 1
    $\begingroup$ You equations are correct. The answer is indeed $6 - \frac2{\sqrt{3}} \approx 4.8453$ and there's nothing complicated about it. $\endgroup$ Apr 12 '19 at 22:49
  • $\begingroup$ @LeeDavidChungLin Thank you! Symbolab came up with something really weird so I got freaked out. $\endgroup$ Apr 12 '19 at 22:51

As a commenter has made clear, when solving $400,000-\frac{800,000(6-x)}{\sqrt{4+(6-x)^2}} = 0$ for $x$, $x=6-\frac{2}{\sqrt{3}}$.

Steps Involved:

$$400,000-\frac{800,000(6-x)}{\sqrt{4+(6-x)^2}} = 0$$

Subtract $400,000$ from both sides.

$$\frac{800,000(6-x)}{\sqrt{4+(6-x)^2}} = 400,000$$

Divide both sides by $400,000$.


Multiply both sides by $\sqrt{4+(6-x)^2}$.


Take both sides to the power of $2$


Subtract $(6-x)^2$ from both sides.


Divide both sides by $3$.


Square both sides.


Subtract $6$ from both sides.


  • 1
    $\begingroup$ You lost the $\sqrt 3$ $\endgroup$ Apr 13 '19 at 5:58
  • $\begingroup$ @ClaudeLeibovici Whoops, I have fixed it. $\endgroup$ Apr 13 '19 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.