Write Matlab programs implementing the algorithms based onbisection,Newton, and secant method for numerical solution ofscalar nonlinear equa-tions. Use these programs to computeapproximations to real roots of the
following equations:
exp(x)?3x^2=0, (1)
x^3=x^2+x+1, (2)
exp(x) =1/(0.1 +x^2), (3)
and
x= 1 + 0.3 cos(x). (4)
Use an error tolerance tol=10^(?12). Display the obtainedapproximations to the roots of these equations, and compare thenumber of iterations, starting with the same initial values x0 forbisection and Newton methods, and with x0 and x1, where x1 wascomputed by bisection starting with x0, for secant method.