Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Modify the bisection m-file to perform the false-position method and discuss the differences between these two methods. The false-position formula/algorithm can be found

 

a) Modify the bisection m-file to perform the false-position method and discuss the differences between these two methods. The false-position formula/algorithm can be found in the lectures notes. (Basically just change one line in the bisection code on how to define "x"). Rename the root finding user-defined function to FalsePos. Modify the code to return the approximate root, the number of iterations required to perform the calculation, and any other useful information for the user. Critical Thinking: The basic logics of the bisection method and the false position method are the same. The only difference is the definition of the variable x, i.e., how to make the bracket smaller. Thus, change one line in the bisection code to get the false position code. The false position method is supposed to accelerate the convergence by reducing the number of iterations to obtain a sufficiently small bracket for convergence since the bisection method is usually very slow in convergence by only halving the bracket in each iteration. Part (c) is an interesting problem to demonstrate a situation when the false position method actually fails to accelerate the convergence. Understand why by using graphical method and then conclude under what situation would the false position method fail to accelerate the convergence. b) Test the above user-defined function by applying it to find the roots of the polynomial function. Compare results with those obtained by roots. f(x) = x 30x + 50 Critical Thinking: For polynomials, we can quickly determine where all the roots (both real and complex) are. Use these results to guide you to make a plot which shows all the real roots. Then select the proper brackets based on the plot. c) Find the 10-th root of the number 15 using both the bisection method and false position method. Use an initial bracket defined by a = 1 and b = 2. Print the results of each iteration and compare the convergence of the two methods. Which method converges faster? Look at a graph of the function and comment on why this method is expected to converge faster.

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

Intermediate Accounting

Authors: Donald E. Kieso, Jerry J. Weygandt, and Terry D. Warfield

15th edition

978-1118159644, 9781118562185, 1118159640, 1118147294, 978-1118147290

More Books

Students also viewed these Algorithms questions

Question

Again, try to justify your findings.

Answered: 1 week ago