y=4x+4
find the point on the curve (a straight line) closest to the point (4,0)
the curve is a straight line with slope =4 and y intercept = 4, the point (0,4)
x intercept =-1 the point (-1,0)
it helps to graph the line. plot the two intercepts and connect them with a straight line
find the equation of the perpendicular line through (0,4)
it has a negative inverse slope to y=4x+4
y =-x/4 +b
0 = -4/4 +b
b = 1
y = -x/4 + 1
find the point where the two lines intersect
set the two values of y equal
-x/4 +1 = 4x + 4 = 16x/4 +4
solve for x
17x/4 = -3
multiply both sides by 4/17
x = -3(4)/17 =-12/17
x=-12/17
y = 4(-12/17) + 4
y = -48/17 +4 = -48/17 + 68/17 =(68-48)/17 = 20/17
the intersection point is (-12/17, 20/17)
= the closest point on the curve to the point (4,0)
from a rough sketch of the two lines and points
(-12/17, 20/17) looks about right, at least in the right range
= about (-.71, 1.18)
the closest distance from a point to a line is the perpendicular distance
this is more of an algebra geometry problem than for calculus
but you could use differential calculus to find a minimum distance
by taking the derivative and setting it equal to zero
work it both ways. if you get the same answer, it's virtual certain to be the right answer
get a different answer and at least one is incorrect
but the real check on an answer is graph the lines and plot the points to see if
the answer looks reasonable
use the distance formula to calculate the distance from the point to the line
d^2 = (x-4)^2 +(y-0)^2= (x-4)^2 + (4x+4-0)^2
= x^2 -8x +16 +16x^2 +32x +16
= 17x^2 +24x +32
f' = 34x +24 = 0
34x = -24
x =-24/34 = -12/17 = same x coordinate found above by an algebra method
y = 4x+4 = -48/17 +4 = 20/7 = same y coordinate as above
(-12/17, 20/7) is closest point to (0,4) found by an optimization calculus method