Question: Problem 4 : False Position Method for Root Finding a ) Modify the bisection m - file to perform the false - position method and
Problem : False Position Method for Root Finding
a Modify the bisection file to perform the falseposition method and discuss the differences between these two methods. The falseposition formulaalgorithm can be found in the lectures notes. Basically just change one line in the bisection code on how to define Rename the root finding userdefined 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 ie 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 userdefined function by applying it to find the roots of the polynomial function. Compare results with those obtained by roots.
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 th root of the number using both the bisection method and false position method. Use an initial bracket defined by and 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
