secant method in maple. Find a root of the statement $x^3-3x^2+4x-1=0$ with the initial value $x_0=0$ and $x_1=1$ with 5 digits point approximation.
2026-03-28 08:17:16.1774685836
On
secant method in maple
1.9k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
another one:
eps_step := 0.00001;
eps_abs := 0.00001;
f := x -> x^3-3*x^2+4*x-1;
x[0] := 1.0;
x[1] := 1.5;
for i from 2 to 100 do
x[i] := (x[i - 2]*f(x[i - 1]) - x[i - 1]*f(x[i - 2]))/(f(x[i - 1]) - f(x[i - 2]));
if abs( x[i] - x[i - 1] ) < eps_step and abs( f( x[i] ) ) < eps_abs then
eps_abs then break;
elif i = 100 then
end if;
end do:
evalf(x[i],5);
eps_step := 0.00001
eps_abs := 0.00001
f := x -> x^3-3*x^2+4*x-1
x[0] := 1.0
x[1] := 1.5
0.31767
If this is homework and you're supposed to program it yourself then you could show what you've accomplished on your own already.
If you just want to see answers from such an algorithm then you could use the Student:-NumericalAnalysis command. Eg,
Programming questions about Maple are better asked on stackoverflow, unless it is the mathematics behind the algorithm that is your central concern.