Please make a Python program to solve Example 7 using the combined bisection - secant method. Reproduce
Fantastic news! We've Found the answer you've been seeking!
Question:
Please make a Python program to solve Example 7 using the combined bisection - secant method. Reproduce Tables 7 and 8.
Transcribed Image Text:
Combined Bisection - Secant Method Many times it is advantageous to combine the bisection and secant methods. The primary reason for doing this is that the function one is considering may have point discontinuities or very sharp gradients. As an example, consider the Area-Mach number relation, Equation (2), repeated below. 2+1 2 2 2 (4) = ( - ) [, ( + M)]* (1 Y- 2 Mach Number (M) (2) This equation has a subsonic solution, M < 1, and a supersonic solution, M> 1 for a fixed area ratio, A/A*, as shown in Figure 5. Also notice that as the area ratio, A/A* approaches 1 the 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0.0 0 1 Page 8 of 10 2 3 Supersonic Subsonic Solution to Nonlinear Eqns 7 4 Area Ratio (A/A Figure 5: Plot of A/A* = f(M). A lim = 00 M00 A* A lim M0 A* 8 9 10 = solution to Equation (2) may not converge to the correct value of Mach number due to the steep gradient near M = 1, unless who selects a starting interval near our desired solution. In order to have a robust code, for any arbitrary function, we would want our interval to be large and non-restrictive. One way to assure convergence to a valid solution is to combine the bisection and secant methods. Recall that the bisection method will always converge to a solution and the secant method will rapidly converge. So by using a larger tolerance for the bisection method with an arbitrary interval, then using the secant method with a smaller tolerance, and an interval defined by the last iteration of the bisection method, we can assure a rapidly converged and accurate solution. Specifically, consider a function, f(p) = 0, and an interval (a, b), where f(a) and f(b) have opposite signs. First implement the bisection method with a large tolerance. Once converged, we use the last interval assignment after the nth iteration, (an, bn), as the starting interval for the secant method. Experience shows that this combined method assures a converged solution that is also accurate. Example 7 For this example, we will determine a supersonic solution to Equation (2) using the combined bisection - secant method for A/A* = 2.0. For this example we choose the interval [1.0, 10.0]. For the bisection method, we set a tolerance of 0.01 and for the secant method we set a tolerance of 0.0001. Once we converge on the bisection method, we use the final values of (a, b) as the starting values of (po, p1) for the secant method. Tables 7 - 8 summarize the results of this computation. Note that even for a large tolerance (tol = 0.01), the bisection method converges quickly and the final result is less than 1% of the correct value. The secant method then only requires 2 iterations to converge to the exact value of M = 2.197198, accurate to the significant digits of the calculation. Combined Bisection - Secant Method Many times it is advantageous to combine the bisection and secant methods. The primary reason for doing this is that the function one is considering may have point discontinuities or very sharp gradients. As an example, consider the Area-Mach number relation, Equation (2), repeated below. 2+1 2 2 2 (4) = ( - ) [, ( + M)]* (1 Y- 2 Mach Number (M) (2) This equation has a subsonic solution, M < 1, and a supersonic solution, M> 1 for a fixed area ratio, A/A*, as shown in Figure 5. Also notice that as the area ratio, A/A* approaches 1 the 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0.0 0 1 Page 8 of 10 2 3 Supersonic Subsonic Solution to Nonlinear Eqns 7 4 Area Ratio (A/A Figure 5: Plot of A/A* = f(M). A lim = 00 M00 A* A lim M0 A* 8 9 10 = solution to Equation (2) may not converge to the correct value of Mach number due to the steep gradient near M = 1, unless who selects a starting interval near our desired solution. In order to have a robust code, for any arbitrary function, we would want our interval to be large and non-restrictive. One way to assure convergence to a valid solution is to combine the bisection and secant methods. Recall that the bisection method will always converge to a solution and the secant method will rapidly converge. So by using a larger tolerance for the bisection method with an arbitrary interval, then using the secant method with a smaller tolerance, and an interval defined by the last iteration of the bisection method, we can assure a rapidly converged and accurate solution. Specifically, consider a function, f(p) = 0, and an interval (a, b), where f(a) and f(b) have opposite signs. First implement the bisection method with a large tolerance. Once converged, we use the last interval assignment after the nth iteration, (an, bn), as the starting interval for the secant method. Experience shows that this combined method assures a converged solution that is also accurate. Example 7 For this example, we will determine a supersonic solution to Equation (2) using the combined bisection - secant method for A/A* = 2.0. For this example we choose the interval [1.0, 10.0]. For the bisection method, we set a tolerance of 0.01 and for the secant method we set a tolerance of 0.0001. Once we converge on the bisection method, we use the final values of (a, b) as the starting values of (po, p1) for the secant method. Tables 7 - 8 summarize the results of this computation. Note that even for a large tolerance (tol = 0.01), the bisection method converges quickly and the final result is less than 1% of the correct value. The secant method then only requires 2 iterations to converge to the exact value of M = 2.197198, accurate to the significant digits of the calculation.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these algorithms questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
What are the mechanisms underlying enzyme inhibition, including competitive, non-competitive, and uncompetitive inhibition, and how do reversible and irreversible inhibitors modulate enzyme activity...
-
A potential difference of 1.20 V will be applied to a 33.0 m length of 18-gauge copper wire (diameter = 0.0400 in.). Calculate (a) The current, (b) The magnitude of the current density, (c) The...
-
Radiation of a certain wavelength causes electrons with a maximum kinetic energy of 0.68 eV to be ejected from a metal whose work function is 2.75 eV. What will be the maximum kinetic energy (in eV)...
-
If the sample data were to result in the scatterplot shown here, what is the value of the linear correlation coefficient r?
-
Selling at below-market prices is not the only means of putting a competitor out of business. A firm might also seek to hire individuals that have rare talents or skills, not for that firms own...
-
Crescendo Company purchased a computer for $1,120. It has an estimated useful life of four years and an estimated residual value of $120. Compute the depreciation charge for each of the four years...
-
6. If the tangent to the curve y = x at the point P(t, t) meets the curve again at Q, then the ordinate of the point which divides PQ internally in the ratio 1:2 is: (a) 0 7. (b)-t The system of...
-
A microstrip circuit board with substrate thickness of b contains a fan-out that connects the output of a logic gate on chip 0 to the input logic gates of two other chips, as illus- trated in the...
-
4. Consider a 30-year U.S. Treasury bond paying 4.5 percent coupon, and selling for $1010. What is the yield to maturity? Make sure to show your work. 5. A 30-year U.S. corporate bond with a 6...
-
What is the weighted average rate of return for the following $100,000 investment portfolio, in dollars? Retirement fund: $50,000 (6% annual interest) Stocks: $20,000 (7% annual interest) Bonds:...
-
Below are selected transactions of Cheyenne Ltd. for 2023, which uses a perpetual inventory system: 1. 2. 3. On May 10, the company purchased goods from Jay Corp. for $60,000, terms 4/10, n/30. The...
-
Use the following selected account balances of Delray Manufacturing for the year ended December 31. Sales Raw materials inventory, beginning Work in process inventory, beginning Finished goods...
-
Write an Assembly language program that performs basic arithmetic operations (add, subtract, multiply, divide). Develop an Assembly program that converts uppercase letters to lowercase in a given...
-
To compare the dry braking distances from 30 to 0 miles per hour for two makes of automobiles, a safety engineer conducts braking tests for 35 models of Make A and 35 models of Make B. The mean...
-
Problem 3.5 (4 points). We will prove, in steps, that rank (L) = rank(LT) for any LE Rnxm (a) Prove that rank (L) = rank (LTL). (Hint: use Problem 3.4.) (b) Use part (a) to deduce that that rank(L) =...
-
Walter, a single taxpayer, purchased a limited partnership interest in a tax shelter in 1985. He also acquired a rental house in 2012, which he actively manages. During 2012, Walter's share of the...
-
Abigail (Abby) Boxer is a single mother working as a civilian accountant for the U.S. Army. Her Social Security number is 676-73-3311 and she lives at 3456 Alamo Way, San Antonio, TX 78249. Helen,...
-
Jenny earns $34,500 in 2012. Calculate the FICA tax that must be paid by: Jenny: ..............................Soc,Sec. ..................$______________...
-
When nitrogen and fluorine combine to form a molecule, the most likely chemical formula is: (a) N 3 F. (b)N 2 F. (c) NF 4 . (d) NF. (e) NF 3 .
-
A substance consisting of which of the two molecules shown below should have a higher boiling point? Why? (a) the molecule on the left, SCO, because it comes later in the periodic table (b) the...
-
In terms of the periodic table, is there an abrupt or gradual change between ionic and covalent bonds? (a) An abrupt change occurs across the metalloids. (b) Actually, any element of the periodic...
Study smarter with the SolutionInn App