Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- eps = 0.000001;
- i=64;
- x0=4;
- x1=x0-1;
- f0=x0^3-2*x0^2-11*x0+12;
- while abs(x1-x0)>eps && i>1 && abs(x0^3-2*x0^2-11*x0+12) >eps,
- f1=diff(x0^3-2*x0^2-11*x0+12);
- x1=x0;
- x0=x0-(x0^3-2*x0^2-11*x0+12)/(3*x0^2-4*x0-11);
- i=i-1;
- end
- x0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement