Question: 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 1.(Component Skills 7.1-7.3)
A former TA of this class studied caterpillar life cycles. She encountered the following equation in
her research:
6-3x(1+e3(1-x))=0.
Here, x represents the population of caterpillars in thousands. By guess and check, one can see
that x=1 is a solution of (1). There are two other nontrivial solutions x1 and x2. We take x2>x1
without loss of generality.
a. Use the MATLAB built-in function fzero with initial guess 0.1 to determine the value of x1.
Assign A1 to the value of x1.
b. Use the MATLAB built-in function fzero with initial guess 1.9 to determine the value of x2.
Assign A2 to the value of x2.
c. Copy the MATLAB function bisectionMethod from the weekly lecture notes. Paste this
function at the very bottom of your hw7.m script. Use this function to perform the bisec-
tion method on the function f(x) given by the LHS of (1). Take the initial interval to be
0x0.5. Set the stop criterion to 10-15. Assign A3 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 hw7.m script. Use this function to perform the Newtons method on the function f (x)
given by the LHS of (1). Take the initial guess to be x0=0.1. Set the stop criterion to 1015.
Assign A4 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.
 Coding Exercises CAN YOU PLEASE JUST SOLVE PART C AND D?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!