a) Modify the bisection m-file to perform the false-position method and discuss the differences between these...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Related Book For
Intermediate Accounting
ISBN: 978-1118147290
15th edition
Authors: Donald E. Kieso, Jerry J. Weygandt, and Terry D. Warfield
Posted Date:
Students also viewed these algorithms questions
-
Define the contextual-equivalence relation ` M =ctx M0 : for pairs of PCF terms M, M0 , PCF types , and PCF type environments . [3 marks] (ii) For PCF terms M and N with respective typings ` M : and...
-
What is the effect of cultural commoditization and transformation on local traditions and customs? Give an example. Check Chapter 4 in the textbook for information on cultural commoditization and...
-
Six months ago, Qualitybank issued a $ 100 million, one-year-maturity CD, denominated in British pounds (Euro CD). On the same date, $ 60 million was invested in a -denominated loan and $ 40 million...
-
A transverse wave is traveling on a string. The displacement y of a particle from its equilibrium position is given by y = (0.021 m) sin (25t - 2.0 x). Note that the phase angle 25t - 2.0x is in...
-
The law enforcement defense extends only to those people tasked with and legally authorized to enforce laws (i.e., police). Today, the right of citizens to use deadly force for crime prevention...
-
A circular coil of radius \(R=50 \mathrm{~mm}\) rotates about an axis that is perpendicular to a uniform magnetic field of magnitude \(B=0.50 \mathrm{~T}\) (Figure P29.23). If the coil completes 60...
-
In the country of Ruritania there are two regions, A and B. Two goods (X and Y) are produced in both regions. Production functions for region A are given by XA = LX YA = LY LX and LY are the quantity...
-
1. What is Stock Market Analysis. Explain in Detail? 2. Discuss about Nature and Scope of Stock Market Analysis. 3. Discuss about Basics of Stock Market Analysis. 4. What is Investment? Explain in...
-
You first need to download the spreadsheet with stock price and return data from the Assignments tab in Canvas and access the spreadsheet tab titled "Stock Price Data". This tab contains monthly...
-
The company that I researched was Microsoft, I'm utilizing their income statement for this assignment as well. A company's income statement shows their revenues, expenses, and profitability over a...
-
A consumer earns I a week and spends his entire weekly income on new dress shirts and ties, because these are the only two items that provide utility to him. Further- more, he insists that for every...
-
What are the mechanisms underlying enzyme inhibition, including competitive, non-competitive, and uncompetitive inhibition, and how do reversible and irreversible inhibitors modulate enzyme activity...
-
Firm A $ Price Per Share Shares Outstanding (millions of shares) Total Value (millions) Firm B Firm AB 4 $ 6 50 50 200 $ 300 $ 625 $ Firm A is going to acquire Firm B. Firm B will swap 75 million...
-
On January 1, Year 1, Twisted Pretzel, Inc., purchased equipment for $32,000 with an estimated useful life of 8 years and $0 salvage value. On January 1, Year 5, Twisted Pretzel, sold the equipment...
-
Sales Costs Other Expenses Depreciation EBIT Interest Taxable Income Taxes Net Income Dividends Retained Earnings $250,000 $120,000 $20,000 $15,000 $95.000 $29,000 S66,000 S23,100 $42.900 $12.870...
-
A company has two divisions A and Z operating in two different countries. The two divisions manufacture the same product and sell this product locally in their own country. Both divisions have excess...
-
Given the table below, about how much force does the rocket engine exert on the 4.0 kg payload? Distance traveled with rocket engine firing (m) Payload final velocity (m/s) 500 320 490 310 1020 450...
-
You have been asked by a client to review the records of Roberts Company, a small manufacturer of precision tools and machines. Your client is interested in buying the business, and arrangements have...
-
Gordeeva Corporation began selling goods on the installment basis on January 1, 2014. During 2014, Gordeeva had installment sales of $150,000; cash collections of $54,000; cost of installment sales...
-
Assume the facts in the preceding exercise, except that Zeile Company has chosen not to accrue paid sick leave until used, and has chosen to accrue vacation time at expected future rates of pay...
-
Use a HashMap to create a reusable class for choosing one of the 13 predefined colors in class Color. The names of the colors should be used as keys, and the predefined Color objects should be used...
-
Use SecureRandom method ints to generate a stream of 50 random numbers in the range 1 to 999, then filter the resulting stream elements to select only the odd numbers and display the results in...
-
(a) What percentage of those not completing high school were females? (b) What percentage of those not completing high school were males? (c) What percentage of those completing high school were...
Study smarter with the SolutionInn App