The task
Show that the squaring method for stays within the stated error limits when each square is replaced by an approximate value .
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
Define , where is the number that the method has built after steps. Compare with Eq. (19).
Hint 2
Prove by induction that lies between and .
Hint 3
Take logarithms, and use .
Solution
Show the solution
Assume and . Let with chosen so that , which is possible because . Put , and . The method returns .
Claim: for ,
For , , and the given condition says , so the claim holds with the exponent .
Step. Since , . Hence
By the hypothesis on , . Also . So . Insert the claim for : the lower bound becomes , and the upper bound in the same way. This proves the claim.
Logarithms. Take of the claim and use :
Divide by . As , , and as , . So
Check
A python run of random cases, with random in , up to , and in and random errors inside these limits, gave results inside the two limits in every case.
Remarks
The errors do not grow as the exponent grows: the factor in the exponent is cancelled by the division by , so the total error stays near or plus the term from the truncation of the series.
This solution is checked, and a person has not reviewed it yet. The source.
In Lean
not stated yet The exercise is not stated in Lean yet.
The status is computed from the Lean build. The node of the map.