Last time we talked about 2β[1] and demonstrated how to calculate the approximate value of 2β. So what if we want to calculate the square root nβ of any positive integer n?
When calculating 2β, there was a key recursive formula:
2β=1+1+2β1β
Careful observation will reveal that 2β is divided into an integer part 1 and a fractional part 1+2β1β.
If we represent the square root nβ of any positive integer n as both an integer and a fractional part[2]:
nβ=βnββ+{nβ}β
How can we construct such an equation for nβ and then recursively substitute it to calculate? We can use the difference of squares formula[3] to assist us:
For a specific n, although we do not yet know the approximate value of nβ, βnββ can be determined[4]. Use your preferred method to solve for βnββ.
Solution
Let's try to solve 19β. It is easy to find that β19ββ=4. Substituting into formula (1),
Here are brief answers to some of the questions mentioned in the previous article. If there are any inaccuracies, please bear with me.
Why can an equation be substituted into itself? Is this method correct?
Replacing an equation into itself is essentially the definition of recursion.
For other square root numbers, like 3β, how can we construct an equation that is similar to the equation for calculating 2β?
This article is the answer.
The form of the continued fraction seems similar to the iterative method for finding the greatest common divisor. What is their relationship?
The iterative method for finding the greatest common divisor essentially breaks down two numbers using smaller numbers continuously. In continued fractions, a similar mechanism operates, as shown in formulas (2) and (3).