Question: 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.

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

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

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!