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.
-
Give two reasons why the use of smooth curves to describe shapes of distributions is helpful.
-
Why is the analyzing step of the process crucial to the success of a MedImmune proposal? In the discussion, draw students attention to the intersection of medical, legal, and social issues. Why is...
-
On January 1, 2020, Jet Air Inc. contracted with Systems Plus Inc. to manufacture heavy equipment. Jet Air Inc. issued a \(\$ 75,000\) note to Systems Plus Inc. in exchange for the equipment that...
-
NPV, Relevant costs, Income taxes Phish Corporation is the largest manufacturer and distributor of novelty ice creams across the East Coast. The companys products, because of their perishable nature,...
-
On January 1, 2020, Maris Enterprises issued 9%, 5-year bonds with a face amount of $800,000 at par. Interest is payable annually on January 1. Prepare the entries to record the issuance of the bonds...
-
In the figure for Problem 13-35, pinion 2 is to be a right-hand helical gear having a helix angle of 30, a normal pressure angle of 20, 16 teeth, and a normal diametral pitch of 6 teeth/in. A motor...
-
The conflict perspective of sociology draws attention to : A. competition over scarce resources. B. the symbolic aspects of society. C. how elements contribute to the overall operation of society. D....
-
Cigarette Smoking in China On May 1, 2011, the Chinese Government issued a call for no-smoking in 28 public indoor spaces such as offices, restaurants, museums, waiting rooms of train stations, bus...
-
Sunshine Inc., sells a single product. The company's most recent income statement is given below: Sales (4,000 units) P120,000 Less: Flexible expenses 68,000 Contribution margin P52,000 Less:...
-
Does acetazolamide have self limiting effect?
-
To find the best solution to a conflictit will be necessary to have a clear plan and decide on a type of solution. Name 3 types of solution that may be considered.
-
Does acetazolamide produce hyperkalemia?
-
Local Co. has sales of $10.4 million and cost of sales of $6.1 million. Its selling, general and administrative expenses are $520,000 and its research and development is $1.3 million. It has annual...
-
What types of inventory issues Starbucks might reflect upon at the end of each year? The mission of Starbucks is to inspire and nurture the human spiritone person, one cup, and one neighborhood at a...
-
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...
-
3. Under Delaware law, a corporation cannot appear in court without a lawyer, but a partnership can. Fox Hollow Ventures, Ltd., was a limited liability company. One of its employees, who was not a...
-
4. Glenleigh Falls Development Co. was a limited liability company that hired architects John and Marion Zaugg to design a residential golf course. The Zauggs were to receive partial payment for...
-
6. CPA QUESTION A joint venture is a(n): (a) Association limited to no more than two persons in business for profit (b) Enterprise of numerous co-owners in a nonprofit undertaking (c) Corporate...
Study smarter with the SolutionInn App