What point on the graph of y = sin x is the closest to (0,1)?

Our topics include derivatives and optimization

2 Answers
Mar 31, 2018

#x approx 0.4787 #

Explanation:

We can find a distance function to the point via Pythagorean theorem:
#d(x)^2 = Delta x^2 + Delta y^2 = x^2 + (1 - sin(x))^2 #

We want to minimize #d(x)#. Now, we could take a squareroot and then find the min, but minimizing a number is the same as minimizing its squareroot, so we can just minimize #d(x)^2#:

#d/dx(d(x)^2) = 2x + 2(1-sin(x))(-cos(x)) = 0 #
#0 = x -cos(x)(1-sin(x)) #

This equation is transcendental, i.e. we cannot actually solve it analytically. We have to solve numerically.

The plot of the above clearly only has one zero:

graph{x -cos(x)(1-sin(x)) [-3, 3, -3, 3]}

This is at #x approx 0.4787#, where the distance is minimized.

Mar 31, 2018

#x_0 approx 0.4787#

Explanation:

There's a nifty way to do this with any curve with a geometric property.

The line connecting (0,1) to (x, sin(x)) will have distance which peaks (is minimized) at a number #x_0# which we want to find. We know that this line will be perpendicular to the curve at that point.

#m_{text(line)} = (Delta y)/(Delta x) = (1-sin(x_0))/(0 - x_0) = (sin(x_0) - 1)/x_0 #
#m_{text(curve)} = d/dx(sin(x)) |_(x = x_0) = cos(x_0) #

Perpendicular lines are negative inverses, i.e.
#m_(text(curve)) = - 1/(m_(text(line)) #
#cos(x_0) = x_0 / (1-sin(x_0)) implies x_0 = cos(x_0)(1-sin(x_0)) #

This must be solved numerically, not analytically. We find that #x_0 approx 0.4787#