Find the point on the line $6x+5y+3=0$ which is closest to the point $(5,5)$
I'm trying to solve this problem using calculus because it's from my calculus class. Here is my attempt:
The distance between a point in the $(x,y)$ plane and the poin $(5,5)$ is given by the distance formula:
$d = \sqrt{(x-5)^2+(y-5)^2}$
However, I'm not interested in just ANY point in the plane... I'm interested in points that belong on the line $6x+5y+3=0$. If I solve this equation for $y$, then I can plug that into my distance formula, thus expressing distance between a point on the line and the point $(5,5)$ as a function of $x$.
Solving $6x+5y+3=0$ for $y$:
$5y = -3 - 6x$
$y = \frac{-3}{5}-\frac{6x}{5}$
Plugging this into the distance formula:
$d = \sqrt{(x-5)^2+(\frac{-3}{5}-\frac{6x}{5}-5)^2}$
$ = \sqrt{(x-5)^2+(\frac{-3}{5}-\frac{6x}{5}-\frac{25}{5})^2}$
$ = \sqrt{(x-5)^2+(-\frac{6x}{5}-\frac{28}{5})^2}$
Now, i could take the derivative of this distance with respect x, set it equal to zero, and solve for $x$. This would give me the x coordinate of the point on the line that minimizes the distance. However, minimizing the distance is the same as minimizing the square of the distance, and the square of the distance is an easier function to work with because the square root will be gone.
$d^2 = f(x) = (x-5)^2+(-\frac{6x}{5}-\frac{28}{5})^2$
I could expand these square's and then collect like terms before taking the derivative, or I could just take the derivative as it is now... I'll take the latter route, using the chain rule where necessary:
$f'(x) = 2(x-5)(x-5)' +2(-\frac{6x}{5}-\frac{28}{5})(-\frac{6x}{5}-\frac{28}{5})'$
$= 2(x-5)(1) +2(-\frac{6x}{5}-\frac{28}{5})(-\frac{6}{5})$
$=2x-10+\frac{72x}{25}+\frac{336}{25}$
I have to set this equal to zero and solve for x...
$f'(x) =2x-10+\frac{72x}{25}+\frac{336}{25}=0$
Multiply both sides by 25:
$50x-250+72x+336=0$
$122x+86=0$
$x = \frac{-86}{122} = \frac{-43}{61}$
This is the x coordinate of a point on the line $6x+5y+3=0$ which minimizes the distance to the point $(5,5)$. To find the $y$ coordinate I just plug in this $x$ coordinate and solve for $y$ in the equation of the line:
$6x+5y+3=0$
$6(\frac{-43}{61}) + 5y + 3 = 0$
$5y = -3 +\frac{258}{61})$
$y = \frac{15}{61}$
Therefore, the point on the line $6x+5y+3=0$ that minimizes the distance to the point $(5,5)$ is $(x,y) = (\frac{-43}{61},\frac{15}{61})$
Is this solution correct? Thanks in advance!!
As an alternative way and also to check, the perpendicular line passing through the given point is
$$5x-6y+5=0$$
and the intersection with $6x+5y+3=0$ is given by
$\text{5 times the first one plus 6 times the second one}$: $61 x+43 =0 \implies x=-\frac{43}{61}$
$\text{6 times the first one minis 5 times the second one}$:$-61 y+15 =0 \implies y=\frac{15}{61}$
and your solution seems to be correct.