I have probably used more Mathematica options than you would need to use to do this problem. For example, you don't need to make one plot red to solve this problem.

Example

Use Newton's Method with initial approximation (Subscript[x, 1])=1to find (Subscript[x, 2]), the second approximation to the root of the equation (x^4)-x-1=0. Explain how the method works by first graphing the function and its tangent line at (1,-1).

Your Solution (try it before you look at mine!)

Barry's Solution

The root of the equation is found by looking for the zeros of f(x)=(x^4)-x-1. Here is a plot of the function:

f[x_]=x^4-x-1
plot1=Plot[f[x],{x,-2,2}]

We want to use Newton's method to find the next approximation to the root, and we want to start at (Subscript[x, 1])=1. We need the tangent line to the curve at x=1.

The equation of the tangent line is:

y-(Subscript[y, 1])=f'((Subscript[x, 1]))(x-(Subscript[x, 1]))
y=f((Subscript[x, 1]))+f'((Subscript[x, 1]))(x-(Subscript[x, 1]))

The quantities we need are:

f(x) = (x^4)-x-1
f(1) = (((1))^4)-(1)-1=-1
f'(x) = 4(x^3)-1
f'(1) = 4(((1))^3)-1=3

The tangent line is given by :

y=f((Subscript[x, 1]))+f'((Subscript[x, 1]))(x-(Subscript[x, 1]))
y=(-1)+(3)(x-(1))
y=3x-4

We could have figured this out using Mathematica:

y[x_]=Simplify[f[1]+f'[1](x-1)]

Here is a plot of the tangent line:

plot2=Plot[y[x],{x,-2,2},PlotStyle->{Red}]

And here are the two plots overlayed:

Show[plot1,plot2,PlotRange->{{-2,2},{-2.5,1}}]

From this plot, it looks like the second approximation to the root will be between 1.3 and 1.4. Let's zoom in on the above graph:

Show[plot1,plot2,PlotRange->{{1.3,1.4},{-0.5,0.5}}]

Now, let's use Newton's method to get the next approximation to the root:

xnew[x_]=x-f[x]/f'[x]

xnew[1.]

This is our value for (Subscript[x, 2]), which agrees very well with what our graph tells us.

Example

Use Newton's method to approximate (((1000))^(1/7)) correct to eight decimal places

Your Solution (try it before you look at mine!)

Barry's Solution

Here, we need to cast the problem in a form that will allow us to use Newton's method.

x=(((1000))^(1/7))
(x^7)=1000
(x^7)-1000=0
f(x)=(x^7)-1000

So if we find the zero of f(x)to eight decimal places we will have found the value of (((1000))^(1/7))to eight decimal places. We can do this using Newton's method.

We can figure out a suitable starting value by doing a bit of arithmetic:

2^7
3^7

The value must be somewhere between 2 and 3. We can choose a starting value of 2.5

Here is one way of implementing Newton's method in Mathematica:

f[x_]=x^7-1000
xnew[x_]=x-f[x]/f'[x]

xnew[2.5]

xnew[%]

xnew[%]

xnew[%]

We found the root, but we did not find it to eight digits of accuracy. A simple change will give us that.

f[x_]=x^7-1000
xnew[x_]:=SetPrecision[x-f[x]/f'[x],25]

xnew[2.5]

xnew[%]

xnew[%]

xnew[%]

xnew[%]

Therefore, we have (((1000))^(1/7))~ 2.682 695 79 with truncation at the ninth decimal.

How well did we do?

SetPrecision[(1000)^(1/7),25]

We did very well indeed.