Maple Program for Bisection Method

 

Bisection Method

restart;

 with(Student[NumericalAnalysis]):

f := x^3 + 4*x^2 - 10;

Bisection(f, x = [1, 2], tolerance = 10^(-4));

1.365112304

Bisection(f, x = [1, 2], tolerance = 10^(-4), output = sequence);

[1., 2.], [1., 1.500000000], [1.250000000, 1.500000000], [1.250000000, 1.375000000], [1.312500000, 1.375000000], [1.343750000, 1.375000000], [1.359375000, 1.375000000], [1.359375000, 1.367187500], [1.363281250, 1.367187500], [1.363281250, 1.365234375], [1.364257812, 1.365234375]

Bisection(f, x = [1, 2], tolerance = 10^(-2), stoppingcriterion = absolute);

1.367187500

Bisection(f, x = [1, 2], output = animation, tolerance = 10^(-3), stoppingcriterion = function_value);


Bisection(f, x = [1, 2], output = plot, tolerance = 10^(-3), maxiterations = 15, stoppingcriterion = relative);


Bisection(f, x = [1, 2], output = animation, tolerance = 10^(-3), maxiterations = 15, stoppingcriterion = relative);

Bisection(f, x = [1, 2], output = information, tolerance = 10^(-9), maxiterations = 15, stoppingcriterion = function_value);


 

Comments

Popular posts from this blog

Maple Program for Secant Method