# Find the shortest distance from the point (2, 0) to y= 3x - 1.

## Question:

Find the shortest distance from the point (2, 0) to y= 3x - 1.

## Distance Between a Point and a Line:

The distance between two points {eq}P(x_1, y_1)\; \text{and} \; Q(x_2, y_2) {/eq} is given by the following formula:

{eq}\begin{align} S &=\sqrt{( x_2-x_1)^2+ ( y_2-y_1)^2 }\\ \end{align} {/eq}

By using this formula, we can find a function that will represent the distance of an arbitrary point on the line from the indicated point. Using the equation of the line, we can express the distance in terms of a single variable. To maximize or minimize a function, we will apply the first derivative and the second derivative test to the distance function.

{eq}\begin{align} \displaystyle \frac{dy}{dx}&=0 \ \text{and} \ \frac{d^2y}{dx^2}\lt 0 & \left[\text{This is the condition of local maxima } \right]\\ \displaystyle \frac{dy}{dx}&=0 \ \text{and} \ \frac{d^2y}{dx^2}\gt 0 & \left[\text{This is the condition of local minima } \right]\\ \end{align} {/eq}

{eq}\begin{align} S &=\sqrt{( x_2-x_1)^2+ ( y_2-y_1)^2 }\\ P(2, 0)\; \; Q(x, y) & \left[\text{Where Q(x, y) is an arbitrary point on the given line } \right]\\ S &=\sqrt{( x-2)^2+ ( y-0)^2 }\\ &=\sqrt{( x-2)^2+ y^2 }\\ &=\sqrt{( x-2)^2+ (3x - 1)^2 } & \left[\text{This is the distance between the inficated point and a point on the line. It is a function of single variable }\; x \right]\\ \Rightarrow S^2 =D &=( x-2)^2+ (3x - 1)^2 & \left[If\; S^2\text{ is minimum then D will also be minimum. We will minimize }\; D \right]\\ \Rightarrow \frac{dD}{dx} &= \frac{d}{dx} \left[ ( x-2)^2+ (3x - 1)^2 \right]& \left[\text{ Apply the first derivative test to find the critical point } \right]\\ &=\left[ 2 ( x-2)+2 (3x - 1) (3) \right]\\ &= 2x-4+18x -6 \\ \Rightarrow \frac{dD}{dx} &=20x -10& \left[\text{ This is the first derivative} \right]\\ 20x -10 &=0 & \left[\text{We know, first derivative has to be zero at the critical point } \right]\\ 20x &=10\\ x &=\frac{1}{2}\\ \Rightarrow \frac{dD}{dx} &=20x -10 \\ \Rightarrow \frac{d^2D}{dx^2} &=20& \left[\text{ This is the second derivative and it is positive for all values of x. This means that the distace is minimum at the critical point} \right]\\ S &=\sqrt{( x-2)^2+ (3x - 1)^2 } & \left[\text{ Apply the value of critical point to obtain the minimum distance} \right]\\ S_{minimum} &=\sqrt{ \left[ \frac{1}{2}-2 \right]^2+ \left[ 3 \left( \frac{1}{2}\right) -1 \right]^2 } \\ &=\sqrt{\frac{5}{2}} \\ &=1.58113\\ \end{align} {/eq}

Therefore, the shortest distance is:

{eq}\displaystyle \boxed{\color{blue} { S_{minimum} =1.58113 }} {/eq} 