Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For Questions show the code solution for just the bisection method for question 1.b) and for the bisection method please include comments explaining the code

For Questions show the code solution for just the bisection method for question 1.b) and for the bisection method please include comments explaining the code and providing detail to it that explains what is do what and what does this variable represents, etc. Please show the steps clearly for the Bisection method.

image text in transcribed

image text in transcribed

image text in transcribed

Question 1. Bracketing Methods For this problem you are required to build MATLAB functions for the bisection method and false position method to approximate a root r satisfying f(r)=0 for a given function f. Design these MATLAB functions to take as input a real-valued function " f", initial lower and upper bounds for the root " a" and " b ", and a desired upper bound "err" on the absolute error of the final root approximation. Your algorithms should iterate until the absolute error cnr of the final root approximation cn is less than the input error bound err.]1 b) For this sub-problem, modify your code for the bisection method and false position method to take an additional input parameter " r " which represents the true value of the root r(a,b) such that f(r)=0 and to display two values at each iteration of the main loop: 1. An approximation for the relative error of the (n1)st root approximation given by (cncn1)/cn. 2. The true value of the relative error of the (n1)st root approximation given by (rcn1)/r. Consider the function f(x)=x101. Implement your modified code with a=0 and b=1.3 and with an input absolute error bound of err =102. Based on the result, does (cncn1)/cn appear to be a decent approximation (or at least provide an upper bound) on the true relative error (rcn1)/r when using the bisection method? What about when using the false position method? 4 To be clear, we don't typically know r when root flnding, but this modifled code will be used for algorithm analysis

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

8. Explain the contact hypothesis.

Answered: 1 week ago

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago