Question
USING MATLAB ONLY : Write secant function that finds root and saves convergence data Use code to find zero f(x) = e^x - 3x^2 in
USING MATLAB ONLY : Write secant function that finds root and saves convergence data
Use code to find zero f(x) = e^x - 3x^2 in the interval [-1,0].
On a semi-log plot, compare the rate of convergence of the secant
method to that of the bisection method with the same starting values [-1,0]
and to Newtons method with initial guesses -1 and 0.
Verify that all 3 method converge to the same zero.
Hand in a copy of the command window where functions were called.
Hand in a plot of the convergence data on the 3 methods with axes and curves labeled.
The plot of the script should look like this
Comparison bisection and Newton method 0 bsect newt1 newt2 4 . secent -5 -10 -15 0 2468 10 12 14 168 20 Number of iterations 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started