a water - line is to be built from point p to point s and must pass through regions where construction costs…

a water - line is to be built from point p to point s and must pass through regions where construction costs differ (see figure). the cost per kilometer in dollars is 5k from p to q, 4k from q to r, and k from r to s. find x and y (in km) such that the total cost c will be minimized. (x,y)=( ) km
Answer
Explanation:
Step1: Express distances using Pythagorean theorem
The distance from $P$ to $Q$ is $d_{PQ}=\sqrt{2^{2}+x^{2}}=\sqrt{4 + x^{2}}$. The distance from $Q$ to $R$ is $d_{QR}=\sqrt{1^{2}+(y)^{2}}=\sqrt{1 + y^{2}}$, and the distance from $R$ to $S$ is $10-(x + y)$. The cost function $C$ is $C = 5\sqrt{4 + x^{2}}+4\sqrt{1 + y^{2}}+1\times(10-(x + y))$.
Step2: Take partial - derivatives
First, take the partial - derivative of $C$ with respect to $x$: $\frac{\partial C}{\partial x}=\frac{5x}{\sqrt{4 + x^{2}}}-1$. Set $\frac{\partial C}{\partial x}=0$, then $\frac{5x}{\sqrt{4 + x^{2}}}=1$. Cross - multiply to get $5x=\sqrt{4 + x^{2}}$. Square both sides: $25x^{2}=4 + x^{2}$, $24x^{2}=4$, $x^{2}=\frac{1}{6}$, $x=\frac{1}{\sqrt{6}}\approx0.408$ km. Next, take the partial - derivative of $C$ with respect to $y$: $\frac{\partial C}{\partial y}=\frac{4y}{\sqrt{1 + y^{2}}}-1$. Set $\frac{\partial C}{\partial y}=0$, then $\frac{4y}{\sqrt{1 + y^{2}}}=1$. Cross - multiply to get $4y=\sqrt{1 + y^{2}}$. Square both sides: $16y^{2}=1 + y^{2}$, $15y^{2}=1$, $y^{2}=\frac{1}{15}$, $y=\frac{1}{\sqrt{15}}\approx0.258$ km.
Answer:
$(x,y)=\left(\frac{1}{\sqrt{6}},\frac{1}{\sqrt{15}}\right)$ km