Problem
Using Newton's Method, find the equation of a line tangent to the curve y = sin(x) that passes through the origin. Give the answer to 6 decimal places.
Solution
We'll give away at the start the lesson shown by this example, that the line we find depends on the starting value. This is why the problem asks for "a line", not "the line". A line that touches the curve and passes through the origin goes through the points (0, 0) and (a, sin(a)), and has slope equal to
The equation of the line will be
Since the line is tangent to y = sin(x), and the derivative of sin(x) is cos(x), L(x) can also be written
and in particular, for the point (0, 0), this yields
which we can rewrite this as
and we will apply Newton's Method to the equation tan(a) – a = 0 to solve for a.
Let
Choose a value to start with.
Then at each step, given an approximation xn,
Here is a table of the first 10 approximations, for the initial value chosen.
As noted above, what is interesting about this particular problem is that you will get different answers depending on your initial guess because of the periodicity of tan(x). Some guesses diverge quickly, but only with an initial guess in the range (–p/2, p/2) will the method produce the correct answer, which is 0. And, if you guess x0 = 0 right off, you cannot calculate x1 because the denominator of the fraction equals 0.
The initial guesses that produced the different lines shown in the graph below are given in these tables. You may want to experiment with the Newton's Method applet to see how large a range you can find for each guess that still converges to a solution.
Here is a graph of sin(x) in red with the tangent lines that are found by Newton's Method with different initial guesses. The line with the largest slope is shown as a thick black line. The other 4 lines shown are produced by choosing different initial guesses. The line produced by the choice of x0 = 8 is shown in magenta.