Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Matlab R2019a 3. (20 Points) Using the Bisect and False Position functions, compute the roots of the function f(x) = -0.1 0.0025 cos(x) e3x

In Matlab R2019aimage text in transcribed

3. (20 Points) Using the Bisect and False Position functions, compute the roots of the function f(x) = -0.1 0.0025 cos(x) e3x and the number of iterations required as described below. Use an error tolerance of 0.001%. Hint: Modify your functions to include the number of iterations as an output to the functions. Plot the function between 0 and 5. a. b. Compute the root between 0 and 4 for both methods. Display a table in the command window with the following columns: Method, Root, and Iterations. Display the root with 10 decimal places. Just above the table, use an fprintf statement to display a statement such as: "Using 0 and 4 as the bounds". After the table, explain the difference in the number of iterations between the two methods (use fprintf statement). c. Create the table again but use 4 and 5 as the bounds. After the table, explain the difference in the number of iterations between part b and c for the False Position method (use fprintf statement). d. Plot all solutions (on the plot from part a) using: Bisection part b: a red asterisk Bisection part c: green asterisk False Position part b: a red square False Position part c: a green square M4. 3. (20 Points) Using the Bisect and False Position functions, compute the roots of the function f(x) = -0.1 0.0025 cos(x) e3x and the number of iterations required as described below. Use an error tolerance of 0.001%. Hint: Modify your functions to include the number of iterations as an output to the functions. Plot the function between 0 and 5. a. b. Compute the root between 0 and 4 for both methods. Display a table in the command window with the following columns: Method, Root, and Iterations. Display the root with 10 decimal places. Just above the table, use an fprintf statement to display a statement such as: "Using 0 and 4 as the bounds". After the table, explain the difference in the number of iterations between the two methods (use fprintf statement). c. Create the table again but use 4 and 5 as the bounds. After the table, explain the difference in the number of iterations between part b and c for the False Position method (use fprintf statement). d. Plot all solutions (on the plot from part a) using: Bisection part b: a red asterisk Bisection part c: green asterisk False Position part b: a red square False Position part c: a green square M4

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

More Books

Students also viewed these Databases questions

Question

Identify changes that will affect nursings future AppendixLO1

Answered: 1 week ago

Question

=+b. Who would the brand be as a famous person?

Answered: 1 week ago