Question: Newton's Method in Maple



I'm doing a math assignment for numerical methods and I had to answer a question - solving Newton's method in maple to submit. I need to solve the question to an accuracy of 10^-5. I don't have access to the software right now as I only have it on the computers at our school, but I did take a maple course in my first year of university and have some experience with it. I wrote up this formula, but I'm not 100% sure if its correct. Could someone guide me so that I know what changes I should make when I have access to the lab tomorrow? Thank you!

F:= x-> 2*(x^2) – 4*cos(5*x) – 4*x*sin(x) + 1;


Fd:= diff(F(x),x);


G:= x-> x - (F)/(Fd);


x[0]:= 0;


x[1]:= evalf(subs(x=0, G));


for i from 2 to 6 do
x[i]:= evalf(x=%, G)
end do;


for i from 1 to 6 do

if abs(x[i] – x[i-1]) > 0.00005
print(accuracy not reached)
else print (accuracy reached)
end if;
end do;

Please Wait...