Bisection method with accuracy
clc;
clear all;
close all;
f=(@(x)((x^3))-x-11);
x=(input('enter the value of x =');
acc=(input('enter the accuracy=');
while((f(x1)*f(x2))>0)
x=input('enter the new value of x=');
end
x3=(x1+x2)/2;
if f(x3)>acc;
x2=x3;
else
x1=x3;
end
x3=(x1+x2)/2;
fprintf('the root of equation is %f,''x1')