The first derivative is used to minimize (optimize) the distance travelled between two points.
In what follows, \( C \) represents the constant of integration where applicable.
Problem
The diagram below shows the path that Wilson follows every morning to take water from the river to his farm. Help Wilson minimize the total distance travelled from his house to the farm.
Show Solution to the Problem
Two methods to solve this problem are suggested below.
METHOD 1: Calculus (First Derivative)
In the diagram below, we find the distances \( d \) and \( D \), add them, and minimize the total distance.
The total distance \( T \) is given by:
\[ T = d + D = \sqrt{x^2 + 25} + \sqrt{(20 - x)^2 + 100} \]We now find the first derivative \( \dfrac{dT}{dx} \) of \( T \) with respect to \( x \), check that \( T \) has a minimum value, and find the value of \( x \) that minimizes \( T \):
\[ \frac{dT}{dx} = \frac{x}{\sqrt{x^2 + 25}} - \frac{20 - x}{\sqrt{(20 - x)^2 + 100}} \]The graph of \( \dfrac{dT}{dx} \) is shown below. At approximately \( x = 6.67 \), the first derivative is equal to zero; below that value it is negative, and above that value it is positive. Hence, \( T \) has a minimum value at around \( x = 6.67 \).
Setting \( \dfrac{dT}{dx} = 0 \) to find the critical value:
\[ \frac{x}{\sqrt{x^2 + 25}} = \frac{20 - x}{\sqrt{(20 - x)^2 + 100}} \]Cross-multiplying:
\[ x \sqrt{(20 - x)^2 + 100} = (20 - x) \sqrt{x^2 + 25} \]Squaring both sides:
\[ x^2 \left((20 - x)^2 + 100\right) = (20 - x)^2 (x^2 + 25) \] \[ x^2(400 - 40x + x^2 + 100) = (400 - 40x + x^2)(x^2 + 25) \] \[ x^2(x^2 - 40x + 500) = (x^2 - 40x + 400)(x^2 + 25) \] \[ x^4 - 40x^3 + 500x^2 = x^4 + 25x^2 - 40x^3 - 1000x + 400x^2 + 10000 \] \[ 500x^2 = 425x^2 - 1000x + 10000 \implies 75x^2 + 1000x - 10000 = 0 \]Dividing the quadratic equation by 25:
\[ 3x^2 + 40x - 400 = 0 \]Solving for \( x \) using the quadratic formula and selecting the positive value:
\[ x = \frac{-40 + \sqrt{40^2 - 4(3)(-400)}}{2(3)} = \frac{-40 + \sqrt{1600 + 4800}}{6} = \frac{-40 + \sqrt{6400}}{6} = \frac{-40 + 80}{6} = \frac{40}{6} = \frac{20}{3} \approx 6.67 \; \text{km} \]METHOD 2: Geometric Projection
We construct a "virtual house" (reflection) \( H \) on the other side of the river. For the total distance \( d + D \) to be minimum, points \( H \), \( O \), and \( F \) must be collinear because the shortest distance between two points is a straight line. For these points to be collinear, angles \( HOH' \) and \( FOF' \) must be equal in size, meaning their tangents are equal.
Calculating the tangents for both angles in terms of \( x \):
\[ \tan(HOH') = \frac{5}{x} \] \[ \tan(FOF') = \frac{10}{20 - x} \]Equating the tangents:
\[ \frac{5}{x} = \frac{10}{20 - x} \]Solving for \( x \):
\[ 5(20 - x) = 10x \implies 100 - 5x = 10x \implies 15x = 100 \implies x = \frac{100}{15} = \frac{20}{3} \approx 6.67 \; \text{km} \]