clear;clc;
%ff='x^3-2*x-5';
%ff='cos(x)-x*exp(x)'
%ff='x*log10(x)-1.2'
ff='x^4-32'
a=2;b=3;
% Method of False Position or Regula False Method
f=inline(ff);k=1;i=1;x=[];
while i<10
c=a-(b-a)*f(a)/(f(b)-f(a));d=c;a1=a;b1=b;
if f(a)*f(c)<0
b=c;
else
a=c;
end
x=[x;i a1 f(a1) b1 f(b1) d f(d)];
i=i+1;
end
fprintf('%gt %1.5ft %1.5ft %1.5ft %1.5ft %1.5ft %1.5ftn',x')
fprintf('Approximate solution of %s = 0 is %1.5fn',ff,d)
FALSE POSITION METHOD
False Position Method
FALSE POSITION METHOD
function root = newtonRaphson(func, dfunc, x0, tol, maxIter)
% func: function handle of f(x)
% dfunc: derivative of f(x) (function handle)
% x0: initial guess
% tol: tolerance for stopping criterion
% maxIter: maximum number of iterations
end
Complete function is attached herewith this link newtonRaphson.m
NEWTON RAPHSON’S METHOD
NEWTON RAPHSON’S METHOD
NEWTON RAPHSON’S METHOD
nrm.m
NEWTON RAPHSON’S METHOD
BISECTION METHOD
Bisection Method
Thank you so much

Root Finding Methods in Numerical Analysis