mark
Let f(x) = x^3 - 2x - 1. Write down the corresponding Newton’s method iteration function and perform two Newton steps from x_0=1.
Let f(x) = x^3 - 2x - 1. Write down the corresponding Newton’s method iteration function and perform two Newton steps from x_0=1.
Newton’s method iteration function for f(x) is
N(x)=x -\bigg( \frac{x^3-2x-1}{3x^2-2} \bigg).
We perform two Newton steps starting from x_0=1 using the following code:
x=1
cnt=0
def n(x): return x-((x**3-2*x-1)/(3*x**2-2))
while cnt <2:
x=n(x)
cnt=cnt+1
x,cnt
Executing this code we obtain 2.2.
I think you can do this by hand. That’s why I asked for only two steps.
Doing it by hand we get:
x_1=1-\bigg(\frac{1^3-2(1)-1}{3(1)^2-2}\bigg)=1-\bigg(\frac{-2}{1}\bigg)=1+2=3
x_2=3-\bigg(\frac{3^3-2(3)-1}{3(3)^2-2}\bigg)=3-\bigg(\frac{20}{25}\bigg)=\frac{11}{5}