Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Coding Exercises CAN YOU PLEASE JUST SOLVE PART C AND D ? THANKS Exercise 1 . ( Component Skills 7 . 1 - 7 .
Coding Exercises CAN YOU PLEASE JUST SOLVE PART C AND D THANKS
Exercise Component Skills
A former TA of this class studied caterpillar life cycles. She encountered the following equation in
her research:
Here, represents the population of caterpillars in thousands. By guess and check, one can see
that is a solution of There are two other nontrivial solutions and We take
without loss of generality.
a Use the MATLAB builtin function fzero with initial guess to determine the value of
Assign A to the value of
b Use the MATLAB builtin function fzero with initial guess to determine the value of
Assign A to the value of
c Copy the MATLAB function bisectionMethod from the weekly lecture notes. Paste this
function at the very bottom of your hwm script. Use this function to perform the bisec
tion method on the function given by the LHS of Take the initial interval to be
Set the stop criterion to Assign A to the number of iterations necessary
to satisfy the stop criterion. d Copy the MATLAB function newtonMethod from the weekly lecture notes. Modify the func
tion so that the Cauchy error is used as the stopping criterion. Have your function return the
approximation of the root according to Newtons method as well as the number of iterations
necessary to satisfy the stop criterion.
Once your function has been modified appropriately, paste this function at the very bottom
of your hwm script. Use this function to perform the Newtons method on the function f x
given by the LHS of Take the initial guess to be x Set the stop criterion to
Assign A to the number of iterations necessary to satisfy the stop criterion.
Note: You will need to compute f x by hand and write this as a function handle to run
Newtons method in MATLAB.
Step 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