Answer:
$6,598,076.21
Explanation:
<h2>
THE KEY IS TO FIND OUT THE COST FUNCTION, the calculations are very easy!!!</h2><h2>
</h2><h3>In order to find the cost function, take a look at the drawing attached. </h3>
We can see the river (sort of) that is 3 km wide and the storage tanks on the other side of the river 8 km apart.
<h3 />
Laying pipes under (across) the river costs 1,000,000 the km & laying pipes over land costs 500,000 per km.
<h3 /><h3>So basically the cost function is 1,000,000 multiplied by something plus 500,000 multiplied by another something.</h3><h3 />
The distance across the river can be found by using Pythagoras Theorem. A side is 3 km the other is unknown, so we call it X. And it is equal to:
![\sqrt{3^{2} +x^{2}}=\\\sqrt{9 +x^{2}}](https://tex.z-dn.net/?f=%5Csqrt%7B3%5E%7B2%7D%20%2Bx%5E%7B2%7D%7D%3D%5C%5C%5Csqrt%7B9%20%2Bx%5E%7B2%7D%7D)
And we multiply it by 1,000,000; the cost of laying pipe under the river, the we get:
![1000000\sqrt{9+x^{2}](https://tex.z-dn.net/?f=1000000%5Csqrt%7B9%2Bx%5E%7B2%7D)
The distance over the land is (8-x), as we can see in the drawing. So we multiply it by its cost, 500,000. And we get 500,000(8-x).
So the cost function f(x) would be:
![f(x)=1000000\sqrt{9+x^{2}} + 500000(8-x)](https://tex.z-dn.net/?f=f%28x%29%3D1000000%5Csqrt%7B9%2Bx%5E%7B2%7D%7D%20%2B%20500000%288-x%29)
<h2>From here, we just have to differentiate and the derivative found must be equal to zero in order to minimize cost. </h2><h3>The value of x when the derivative is zero is plugged in the original function to get the cost.</h3><h3 /><h2>LET'S DO THIS</h2>
![f(x)=1000000\sqrt{9+x^{2}} + 500000(8-x)\\f(x)=1000000(9+x^{2})^{1/2}+4000000-500000x\\f'(x)=\frac{1}{2} 1000000(9+x^{2})^{-1/2}(2x)-500000\\\\f'(x)=\frac{1000000x}{\sqrt{9+x^2}} - 500000](https://tex.z-dn.net/?f=f%28x%29%3D1000000%5Csqrt%7B9%2Bx%5E%7B2%7D%7D%20%2B%20500000%288-x%29%5C%5Cf%28x%29%3D1000000%289%2Bx%5E%7B2%7D%29%5E%7B1%2F2%7D%2B4000000-500000x%5C%5Cf%27%28x%29%3D%5Cfrac%7B1%7D%7B2%7D%201000000%289%2Bx%5E%7B2%7D%29%5E%7B-1%2F2%7D%282x%29-500000%5C%5C%5C%5Cf%27%28x%29%3D%5Cfrac%7B1000000x%7D%7B%5Csqrt%7B9%2Bx%5E2%7D%7D%20%20-%20500000)
<h2>f'(x)=0</h2>
![f'(x)=\frac{1000000x}{\sqrt{9+x^2}} - 500000=0\\\frac{1000000x}{\sqrt{9+x^2}} = 500000\\\frac{2x}{\sqrt{9+x^2}} = 1\\2x={\sqrt{9+x^2}}\\4x^2=9+x^2\\3x^2=9\\x^2=3\\x=\sqrt{3} \\](https://tex.z-dn.net/?f=f%27%28x%29%3D%5Cfrac%7B1000000x%7D%7B%5Csqrt%7B9%2Bx%5E2%7D%7D%20%20-%20500000%3D0%5C%5C%5Cfrac%7B1000000x%7D%7B%5Csqrt%7B9%2Bx%5E2%7D%7D%20%20%3D%20500000%5C%5C%5Cfrac%7B2x%7D%7B%5Csqrt%7B9%2Bx%5E2%7D%7D%20%20%3D%201%5C%5C2x%3D%7B%5Csqrt%7B9%2Bx%5E2%7D%7D%5C%5C4x%5E2%3D9%2Bx%5E2%5C%5C3x%5E2%3D9%5C%5Cx%5E2%3D3%5C%5Cx%3D%5Csqrt%7B3%7D%20%5C%5C)
And we plug square root of 3 in the original cost function ad we get
![f(\sqrt{3} )=1000000\sqrt{9+x^{2}} + 500000(8-x)\\f(\sqrt{3})=1000000\sqrt{9+(\sqrt{3} )^{2}} + 500000(8-(\sqrt{3}))\\f(\sqrt{3})=1000000\sqrt{9+3} + 500000(8-(\sqrt{3}))\\f(\sqrt{3})=1000000\sqrt{12}+500000(6.27)\\f(\sqrt{3})=1000000(3.46)+500000(6.27)\\f(\sqrt{3})=3464101.62+3133974.60\\f(\sqrt{3})=6598076.21\\](https://tex.z-dn.net/?f=f%28%5Csqrt%7B3%7D%20%29%3D1000000%5Csqrt%7B9%2Bx%5E%7B2%7D%7D%20%2B%20500000%288-x%29%5C%5Cf%28%5Csqrt%7B3%7D%29%3D1000000%5Csqrt%7B9%2B%28%5Csqrt%7B3%7D%20%29%5E%7B2%7D%7D%20%2B%20500000%288-%28%5Csqrt%7B3%7D%29%29%5C%5Cf%28%5Csqrt%7B3%7D%29%3D1000000%5Csqrt%7B9%2B3%7D%20%2B%20500000%288-%28%5Csqrt%7B3%7D%29%29%5C%5Cf%28%5Csqrt%7B3%7D%29%3D1000000%5Csqrt%7B12%7D%2B500000%286.27%29%5C%5Cf%28%5Csqrt%7B3%7D%29%3D1000000%283.46%29%2B500000%286.27%29%5C%5Cf%28%5Csqrt%7B3%7D%29%3D3464101.62%2B3133974.60%5C%5Cf%28%5Csqrt%7B3%7D%29%3D6598076.21%5C%5C)
<h2>so the minimal cost is $6,598,076.21</h2><h2 /><h3 />