416 14. EQUATIONS AND ALGORITHMS
We see that we need to make the following conversion of the coefficients (reading
from bottom to top):
s ñáë + qa^2 + ra + s
r Spa^2 + 2qa + r
q 'Spa + q
Ñ Ñ
The procedure followed in the cube root algorithm works perfectly. That is,
start at the bottom and at each stage, multiply the element below by a and add it
to the element in the same row at the preceding stage. Going from bottom all the
way to the top gets the top row correct. Then going from bottom to the second
row gets the second row correct; and finally going from the bottom to the third row
completes the transition:
,s pa^3 + qa? + ra + s pa^3 + qa^2 + ra + s pa^3 + qa^2 + ra+ s
r pa^2 + qa + r Spa^2 + 2qa + r Spa^2 + 2qa + r
q pa + q 2pa + q Spa + q
ñ ñ ñ ñ
In this context the cube root algorithm itself becomes merely the case ñ = 1,
q = 0 = r, s = —N, with the top row omitted and the subtraction in the second
row (now the top row) replaced by addition, since Í has been replaced by —N.
Not only is this algorithm simple to use; it also provides the most efficient and ac-
curate way of computing a polynomial numerically. Before the advent of computer
algebra programs, numerical analysis books instructed the student to compute the
polynomial pa;^3 + qx^2 + rx + s at different values of ÷ by the sequence of operations
ñ —> px —> px + q -* x(px + q) —> x(px + q) + r —>
—> ,r(.r(p.r + q) + r) —• x(x(px + q) + r) + .s.
This sequence of operations avoids the error that tends to accumulate when large
numbers of opposite sign are added.^7
Wang Xiaotong's reference to the use of cube root extraction for solving his
equation seems to suggest that this method was known as early as the seventh
century. However, as we have just noted, the earliest explicit record of it seems to
be in the treatise of Qin Jiushao, who illustrated it by solving the quartic equation
-á·^4 + 703200á·^2 - 40642560000 = 0.
The method of solution gives proof that the Chinese did not think in terms of a
quadratic formula. If they had, this equation would have been solved for x^2 using
that formula and then ÷ could have been found by taking the square root of any
positive root. But Qin Jiushao applied the method described above to get the
solution ÷ = 840. (He missed the smaller solution ÷ = 240.)
The efficiency of this method in finding approximate roots allowed the Chinese
to attack equations involving large coefficients and high degrees. Qin Jiushao (Lib-
brecht, 1973, pp. 134 136) considered the following problem: Three li north of the
wall of a circular town there is a tree. A traveler walking east from, the southern
gate of the town first sees the tree after walking 9 li. What, are the diameter and
circumference of the town?
(^7) In addition, a very simple hand calculator with no memory cells can carry out this sequence of
operations without the need to stop entering and write down a partial result.