Answered step by step
Verified Expert Solution
Link Copied!

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 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions

Question

Distinguish between formal and informal reports.

Answered: 1 week ago