The introductory approximation article presented bisection, Newton and Taylor. Here we investigate how to compute √2 and know which digits are reliable. We begin with an elementary procedure requiring no derivatives, then derive Newton as an extension to very different equations. The crucial distinction is between a displayed digit and a proved digit.

Roots and Newton: laboratory · Introductory approximation article
1. √2 is exact; a finite decimal is not
A unit square has diagonal √2. Immediately 1<√2<2 because 1²<2<2². The symbol √2 exactly identifies the positive number whose square is 2; 1.4142 is an approximation. A first check does not require a calculator.
1,4142²=1,99996164<2
1,4143²=2,00024449>2
1,4142<√2<1,4143
√2 is irrational. If p/q in lowest integer terms, p²=2q² makes p even; writing p=2k gives q²=2k² and q even too, a contradiction. Fractions and finite decimals cannot equal √2, but can enclose it ever more tightly.
2. A practical formula using a nearby square
Let N>0. Choose a nearby perfect square M and m=√M>0. The first estimate is (N+M)/(2√M). For √29 choose M=25,m=5 to obtain 54/10=5.4. For √2 choose M=1 to obtain 3/2=1.5. These are estimates, not equalities with the root.
q=(N+M)/(2√M)
q=(m²+N)/(2m)=(m+N/m)/2
The practical formula already averages two numbers: m and N/m. The perfect square only supplies an easy starting m; later estimates need not be square roots of perfect squares.
3. Why the estimate is always an upper bound
A squared difference is nonnegative. Apply this to √N and √M and divide by positive 2√M. This yields both the upper-bound direction and an exact formula for mathematical error.
(√N−√M)²≥0
N+M≥2√N√M
q≥√N
q−√N=(√N−√M)²/(2√M)
=(N−M)²/[2√M(√N+√M)²]
Equality holds only when N=M. Nearby roots have a small difference, which is squared: this explains the good first estimate. “Choose the closest square” is a convenient starting rule, not an optimality theorem among all possible estimates.
4. The Babylonian method: repeat the averaging
Imagine an area-N rectangle with sides x and N/x. If x is too large, N/x is too small; averaging makes the next pair more square-like. The Babylonian method, also called Heron’s method, repeats this operation from any x₀>0.
xₙ₊₁=(xₙ+N/xₙ)/2, N>0, x₀>0
No derivatives are needed. After the first update the estimate is at least √N, even if x₀ was below it. Subsequent estimates decrease, unless already exact, and stay above the root. Their limit satisfies ℓ=(ℓ+N/ℓ)/2, so ℓ²=N and ℓ=√N. N=0 gives x/2 and is a different case.
5. √2 step by step, including exact fractions
Set N=2,x₀=1. Each new row uses the preceding result, not its printed rounded value. Fractions permit the first calculations without any rounding.
x₁=(1+2)/2=3/2
x₂=(3/2+4/3)/2=17/12
x₃=(17/12+24/17)/2=577/408
x₄=665857/470832
x₅=886731088897/627013566048
| n | xₙ ≈ | 2/xₙ ≈ | Interval width ≈ | Verified decimal places |
|---|---|---|---|---|
| 0 | 1 | 2 | 1 | — |
| 1 | 1.5 | 1.333333333333 | 0.166666666667 | — |
| 2 | 1.416666666667 | 1.411764705882 | 0.004901960784 | 1 |
| 3 | 1.414215686275 | 1.414211438475 | 0.0000042478 | 4 |
| 4 | 1.414213562375 | 1.414213562372 | 3.18972e-12 | 11 |
| 5 | 1.414213562373 | 1.414213562373 | 1.79859e-24 | 23 |
The speed is striking, but displayed digits alone are not evidence. A computer may print identical digits simply because of rounding. Next we build a check that does not use the machine’s √2 as proof.
6. Bounds and verified digits without knowing the root
For every x>0, x and N/x lie on opposite sides of √N or equal it. Their minimum and maximum therefore enclose the root. After a Babylonian update x is the upper endpoint. Rational N and x give exact rational endpoints.
L=min(x,N/x), U=max(x,N/x)
L≤√N≤U
0≤U−√N≤U−L
x=577/408 → 816/577<√2<577/408
To verify rounding to d decimal places, round both endpoints by the same rule: if the results agree, the root rounds to that value too. The lab compares fractions using arbitrary-precision integers, not endpoints already rounded to 15 digits. “24 verified decimal places” is a display limit, not a claim about JavaScript Number precision.
7. Why error shrinks so quickly
Write s=√N,eₙ=xₙ−s. Substituting N=s² and collecting terms makes the numerator a perfect square. This is an exact identity, not a Taylor approximation.
xₙ₊₁−s=(xₙ²+s²−2xₙs)/(2xₙ)
eₙ₊₁=eₙ²/(2xₙ)
Near s>0 the denominator is near 2s and error is essentially squared: quadratic convergence. Correct digits tend roughly to double, until arithmetic precision intervenes. This is not exact doubling at every step or infinite accuracy from fixed-precision arithmetic.
8. √29 and other numbers: same rule, new data
For N=29,x₀=5 we obtain x₁=5.4 and x₂=5.385185185… . The root is about 5.385164807…: after two updates the difference is about 0.000020378. Use exact 5.4 for the second update, not an independently chosen estimate.
x₂=(27/5+145/27)/2=727/135
| N | M | Initial estimate ≈ | Numerical reference ≈ |
|---|---|---|---|
| 10 | 9 | 3.166666666667 | 3.162277660168 |
| 17 | 16 | 4.125 | 4.123105625618 |
| 29 | 25 | 5.4 | 5.385164807135 |
| 50 | 49 | 7.071428571429 | 7.071067811865 |
| 80 | 81 | 8.944444444444 | 8.944271909999 |
| 99 | 100 | 9.95 | 9.949874371066 |
M>N is allowed: √80 with M=81 gives 161/18≈8.944444, still an upper bound. For N=2 both M=1 and M=4 give 1.5. Comparing two choices teaches more than relying blindly on “nearby”.
9. Newton: from a special case to a general rule
The Babylonian method long predates Newton. In this teaching sequence Newton extends the idea: rather than only square roots, seek a zero of a function f. This is a mathematical generalization, not a claim that Newton invented the Babylonian procedure. From here derivatives are needed; everything before remains elementary.
Near xₙ replace the graph by its tangent. The tangent’s horizontal-axis intercept becomes the next estimate. Write its equation, set y=0 and solve for xₙ₊₁.
y=f(xₙ)+f′(xₙ)(x−xₙ)
0=f(xₙ)+f′(xₙ)(xₙ₊₁−xₙ)
f′(xₙ)(xₙ₊₁−xₙ)=−f(xₙ)
xₙ₊₁=xₙ−f(xₙ)/f′(xₙ), f′(xₙ)≠0
10. Complete derivation for √N
To find √N choose f(x)=x²−N, whose positive zero is the desired root. Its derivative is 2x. Substitute into Newton and simplify each step: the Babylonian method is recovered exactly, not just approximately.
xₙ₊₁=xₙ−(xₙ²−N)/(2xₙ)
=(2xₙ²−xₙ²+N)/(2xₙ)
=(xₙ²+N)/(2xₙ)
=(xₙ+N/xₙ)/2
Hypotheses matter. For N>0,x₀>0 the specialized method has the positive global convergence proved above. General Newton does not automatically inherit that guarantee. Near a simple zero with nonzero derivative and sufficient regularity, convergence is normally quadratic; far from it, failure is possible.
11. Other roots: ∛N and kth roots
For ∛N solve x³−N=0 using derivative 3x². The square-root average cannot be copied unchanged: x gets weight 2 and the divisor becomes 3.
xₙ₊₁=xₙ−(xₙ³−N)/(3xₙ²)
=(2xₙ+N/xₙ²)/3
N=2, x₀=1 → x₁=4/3 → x₂=91/72
∛2≈1,259921049894873
For integer k≥2,N>0, Newton on xᵏ−N gives ((k−1)x+N/xᵏ⁻¹)/k. Start positive to seek the positive root. A nearby perfect power is unnecessary, though a reasonable initial value matters for cost and avoiding extreme numerical operations.
12. A different equation: cos x=x
Set f(x)=cos x−x,f′(x)=−sin x−1, with radians. Starting at 1 gives approximately 0.750364,0.739113,0.739085. This is no longer averaging x and N/x: the correction genuinely uses the function and derivative.
xₙ₊₁=xₙ−(cos xₙ−xₙ)/(−sin xₙ−1)
x*≈0,7390851332151607
On [0,1], continuity and f(0)>0,f(1)<0 guarantee a zero; f′<0 makes it unique there. The bracket is mathematical information separate from the Newton sequence: an appealing graph is not an existence proof.
13. Bisection, secant and Halley: what changes
Bisection preserves a sign-changing bracket and halves it: from width w, after n halvings the midpoint error is at most w/2ⁿ⁺¹. Slower, but with direct error control. Secant replaces f′ by a two-point slope; it avoids derivatives but need not preserve a bracket.
xₙ₊₁=xₙ−f(xₙ)(xₙ−xₙ₋₁)/(f(xₙ)−f(xₙ₋₁))
Halley provides another useful comparison. For square roots it uses the formula below. With s=√N, its error satisfies an exact cubic identity: potentially faster, but each step costs more operations. Iteration count alone is not a fair cost comparison.
H(x)=x(x²+3N)/(3x²+N)
H(x)−s=(x−s)³/(3x²+s²)
N=2, x₀=1 → x₁=7/5=1,4
14. When Newton fails or slows down
Zero derivative: f=x³−1,x₀=0 has f′(0)=0 but f(0)=−1; its horizontal tangent gives no step although root 1 exists. Cycle: f=x³−2x+2 started at 0 goes to 1 and back to 0. Valid divisions alone do not guarantee convergence.
f=x³−2x+2
0−2/(−2)=1
1−1/1=0
0 → 1 → 0 → 1 → …
Multiple root: f=(x−1)² gives xₙ₊₁=(xₙ+1)/2, so error merely halves: linear convergence. Knowing multiplicity 2, modified correction x−2f/f′ reaches 1 in one step from x≠1; at 1 do not divide 0 by 0. Domain errors, huge steps and convergence to an undesired root are other risks.
15. Residual, step size and error are not synonyms
Residual is |f(xₙ)|, step size |xₙ₊₁−xₙ|, error distance from the true zero. A small residual need not mean equally small error: for f=(x−1)², residual 10⁻¹² means error 10⁻⁶. A zero machine step can mean stagnation, not an exact solution.
|x−√N|=|x²−N|/(x+√N), x>0
For square roots use the proved intervals above. In general, if |f′|≥m>0 between estimate and root, the mean value theorem gives error≤|f(x)|/m. Without hypotheses, checking both residual and step size is useful operationally, not universal certification. Also cap iterations and handle failures explicitly.
16. The laboratory: from explanation to experiment
This new lab complements rather than replaces the introductory bisection, Newton and Taylor lab. Choose one of nine experiments, adjust inputs and advance once per second. The graph shows function and current tangent or secant; bisection shows its bracket, and Babylonian iteration also shows the area-N rectangle.
The table separates estimate, residual, step and error against a numerical reference; the last is only diagnostic. In Babylonian mode exact fractions independently verify rounded root digits: open them to inspect endpoints. Moving-point and graph coordinates remain approximate even when the underlying fraction is exact.
Try √29 starting at 5; compare √2 with bisection, Babylonian and Halley; then try ∛2 and cos x=x. Finally inspect the 0↔1 cycle and zero derivative. Compare both speed and the conditions needed to trust an algorithm.
Exercises: try before revealing
1. Verify 1.4142<√2<1.4143 without a square-root key.
Show the explained answer
1.4142²=1.99996164<2 and 1.4143²=2.00024449>2. Squaring is increasing on positives, so the root lies strictly between them.
2. Compute two √29 updates starting at 5.
Show the explained answer
x₁=(5+29/5)/2=27/5=5.4; x₂=(27/5+145/27)/2=727/135≈5.385185185. Both are upper estimates, not exact roots.
3. Can M=81 approximate √80?
Show the explained answer
Yes: (80+81)/(2·9)=161/18≈8.944444. The squared-difference proof also holds for M>N, so this remains an upper bound.
4. For √2 compare M=1 and M=4.
Show the explained answer
M=1 gives (2+1)/2=1.5; M=4 gives (2+4)/(2·2)=1.5. Starts 1 and 2 are the two sides of an area-2 rectangle, so averaging gives the same update.
5. Does starting below √N keep the first update below it?
Show the explained answer
No: x₁−√N=(x₀−√N)²/(2x₀)≥0 for x₀>0. The update is above or exact; monotone decrease starts after this first update.
6. Prove 816/577<√2<577/408 using integers only.
Show the explained answer
577²=332929>2·408²=332928, so the upper square exceeds 2. 816²=665856<2·577²=665858, so the lower square is below 2. Denominators are positive.
7. Derive Babylonian iteration from Newton.
Show the explained answer
For f=x²−N,f′=2x: x−(x²−N)/(2x)=(x²+N)/(2x)=(x+N/x)/2. Requires x≠0; choose x>0 for the positive root.
8. First Newton step for ∛2 from 1.
Show the explained answer
f=x³−2,f′=3x² gives x₁=1−(1−2)/3=4/3. Rule (2x+2/x²)/3, not (x+2/x)/2.
9. How do you set up Newton for cos x=x?
Show the explained answer
Use f=cos x−x,f′=−sin x−1 with radians. From 1 obtain about 0.750364, then 0.739113. Do not use degrees.
10. Why is 0→1→0 not convergence?
Show the explained answer
For f=x³−2x+2,f(0)=2,f(1)=1: neither is a zero. Alternating distinct values has no limit; more steps do not improve it.
11. Does residual 10⁻¹² for (x−1)² mean error 10⁻¹²?
Show the explained answer
No: |x−1|=√10⁻¹²=10⁻⁶. The root is double, f′ vanishes there, and ordinary Newton halves error rather than converging quadratically.
12. Halley for √2 from 1: compare the first update.
Show the explained answer
Halley gives (1+6)/(3+2)=7/5=1.4; Babylonian gives 1.5. Halley is below here, Babylonian above. Being closer after one update does not settle total cost.
Introductory approximation article · Introductory lab: bisection, Newton and Taylor · Derivatives: from the difference quotient to tangents and applications