3.13 The divide and average method, an old-time iterative method for approximating the square root of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3.13 The "divide and average" method, an old-time iterative method for approximating the square root of any positive number,7 a, can be formulated as xi +alxi 2 where the subscripts indicate iteration i to i + 1. The relative change term from one iteration to the next can be described as Xi+1-xil Xi+1 Xi+1 = Ei+1 = x 100% Write a well-structured Python function based on a while...break loop. Repeat the loop until the relative change is less than a specified tolerance. Test your program for a tolerance of 0.0001% and a values of 2, 10 and -3. For negative values of a, your function should return the imaginary result, that is, -4 returns a value close to 2j. Hint: You can create an imaginary value from a real value by multiplying it by 1j. 3.13 The "divide and average" method, an old-time iterative method for approximating the square root of any positive number,7 a, can be formulated as xi +alxi 2 where the subscripts indicate iteration i to i + 1. The relative change term from one iteration to the next can be described as Xi+1-xil Xi+1 Xi+1 = Ei+1 = x 100% Write a well-structured Python function based on a while...break loop. Repeat the loop until the relative change is less than a specified tolerance. Test your program for a tolerance of 0.0001% and a values of 2, 10 and -3. For negative values of a, your function should return the imaginary result, that is, -4 returns a value close to 2j. Hint: You can create an imaginary value from a real value by multiplying it by 1j.
Expert Answer:
Answer rating: 100% (QA)
The code is equivalent to the Newton Raphson method becau... View the full answer
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Posted Date:
Students also viewed these programming questions
-
Michael Wittry has been investing in his Roth IRA retirement account for 18 years. Three years ago, his account was worth $215,672. After losing 1/4 of its original value, it then gained 1/3 of its...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
The divide and average? method, an old-time method for approximating the square root of any positive number ? can be formulated as x = x + a/x / 2. (a) Write well-structured pseudosode to implement...
-
Explain the advantages of using JDBC metadata for Java database applications.
-
Dielectric materials used in the manufacture of capacitors are characterized by conductivities that are small but not zero. Therefore, a charged capacitor slowly loses its charge by leaking across...
-
A submatrix of a given matrix A is one that we get by deleting some of the rows and columns of A. Thus, the first matrix here is a submatrix of the second. Prove that for any square matrix, the rank...
-
\(\mathrm{NaK}(56 \% / 44 \%)\), which is an alloy of sodium and potassium, is used to cool fast neutron nuclear reactors. The NaK flows at a rate of \(\dot{m}=0.8 \mathrm{~kg} / \mathrm{s}\) through...
-
How will a dollar devaluation affect businesses and consumers in the twin cities of El Paso, United States, and Juarez, Mexico?
-
The Atlanta Food Bank is a nonprofit organization that receives donations of food and distributes this food to appropriate charitable organizations. View the additional information. He used this wait...
-
APC, Inc is a venture capital firm that invests in new businesses to help them grow. Wyatt Newark owns and serves as a chef at Earp's, a restaurant with a Western design that he operates as a sole...
-
What are your core strengths or motivated skills? In what functions and responsibilities do you excel? For what things are you the designated "gc to" person? What gap would your company be faced with...
-
Bob has a budget a Hockey $ 100 to host a HOCKEY Game night. A can of beer coasts $2.00, and a slice of Pizza is about $ 4.00. please derive the OC curve for BOB and indicate what would be the OC for...
-
You run an custom t-shirt shop. You have a very specific process to make your t-shirts. First, you need to bleach the t-shirt, which takes 30 seconds. Then you add colors (done in any order) that...
-
Maggie purchased a passenger car on June 1, 2022 for $28,000. She placed it in service in her business on June 1, 2022 and it is used exclusively for the business. What is Maggie's cost recovery...
-
Understanding Linux System Initialization and X Windows In Linux, a boot loader can locate and execute the kernel of the operating system, as well as performing other functions.In this lesson, you...
-
Explain and/or show graphically, how the large increase in government spending would impact equilibrium in the IS-LM model. (You would need to clearly show/explain the path not just the result in the...
-
10 suspects are rounded by the police and questioned about a bank robbery. Only one of them is guilty. The suspects are made to stand in a line and each person declares that the person next to him on...
-
Floyd Distributors, Inc., provides a variety of auto parts to small local garages. Floyd purchases parts from manufacturers according to the EOQ model and then ships the parts from a regional...
-
A simple electric circuit consisting of a resistor, a capacitor, and an inductor is depicted in Fig. P2.6. The charge on the capacitor q(t) as a function of time can be computed as where t = time, q...
-
Use a centered difference approximation of O(h 2 ) to estimate the second derivative of the function examined in Prob. 4.13. Perform the evaluation at x = 2 using step sizes of h = 0.2 and 0.1....
-
As displayed in Fig. P13.6, an LC circuit can be modeled by the following system of differential equations: where L = inductance (H), t = time (s), i = current (A), and C = capacitance (F). Assuming...
-
The equity section of Atrio Ltd. showed the following: share premium 6,101, share capitalordinary 925, share capitalpreference 58, retained earnings 7,420, and treasury shares 2,828. (All amounts are...
-
The following equity accounts are in the ledger of Eudaley Group at December 31, 2025. Instructions Prepare the equity section of the statement of financial position at December 31, 2025. Share...
-
Travis Mordica asks, Since share dividends dont change anything, why declare them? What is your answer to Travis?
Study smarter with the SolutionInn App