
Bradford T. answered 03/20/21
Retired Engineer / Upper level math instructor
Out of curiosity, I wrote a short Basic program based on
f(x) = 2sin(x)-x+2
f'(x) = 2cos(x)-1
xi+1 = xi - f(x)/f'(x)
I decided to start x0 at π and let it loop 10 times
run
1 3.14159265358979 2.76106176905986
2 2.76106176905986 2.75467908751146
3 2.75467908751146 2.75467375425005
4 2.75467375425005 2.75467375424629
5 2.75467375424629 2.75467375424629
6 2.75467375424629 2.75467375424629
7 2.75467375424629 2.75467375424629
8 2.75467375424629 2.75467375424629
9 2.75467375424629 2.75467375424629
10 2.75467375424629 2.75467375424629
OK
list
10 fnf(x)=2*sin(x)-x+2
20 fnd(x)=2*cos(x)-1
30 fnn(x) = x - fnf(x)/fnd(x)
40 x= pi
50 for i = 1 to 10
60 y = fnn(x)
70 print i,x," ",y
80 x = y
90 next i
OK
So it pretty well settles down after 4 iterations to 2.75467375424629

Doug C.
And if you want to try is with Desmos: desmos.com/calculator/soe2oeflcs03/20/21