414 14. EQUATIONS AND ALGORITHMS
distance d of the tree from the gate. For that kind of data, the problem is the linear
equation (x + s/2)/(s/2 + d) = s/(2d). When the side of the town is the unknown,
a quadratic equation results, as in one case, in which it is asserted that the tree is
20 paces north of the north gate and is just visible to a person who walks 14 paces
south of the south gate, then 1775 paces west. This problem proposes a quadratic
equation as a problem to be solved for a single unknown number, in contrast to the
occurrence of quadratic equations in Mesopotamia, where they amount to finding
two numbers given their sum and product. Since the Chinese technique of solving
equations numerically is practically independent of degree, we shall not bother to
discuss the techniques of solving quadratic equations separately.
2.3. Cubic equations. Cubic equations first appear in Chinese mathematics (Li
and Du, 1987, p. 100; Mikami, 1913, p. 53) in the seventh-century work Xugu
Suanjing (Continuation of Ancient Mathematics) by Wang Xiaotong. This work
contains some intricate problems associated with right triangles. For example,
compute the length of a leg of a right triangle given that the product of the other
leg and the hypotenuse is 1337^ and the difference between the hypotenuse and
the leg is l^j-^5 Obviously, the data are perfectly general for a product Ñ and a
difference D. Wang Xiaotong gives a general description of the result of eliminating
the hypotenuse and the other leg that amounts to the equation
3 5£> , „ p^2 D^3
x^3 + —x^2 + 2D ÷ =
2 2D 2
In this particular case the equation is
x^3 + \x^2 + -J-x - 8938513^: = 0.
4 50 125
He then says to compute the root (which he gives as 921) "according to the
rule of the cubic root extraction." Li and Du (1987, pp. 118-119) report that
the eleventh-century mathematician Jia Xian developed the following method for
extracting the cube root. This method generalizes from the case ÷^3 = Í to the
general cubic equation quite easily, as we shall see.
The computation is arranged in rows (or columns) of five elements. We shall
use columns for convenience. The top entry is always the current approximation á
to the cube root, the bottom entry is always 1. The entries in the next-to-bottom
and middle rows are obtained successively by multiplying the entry that was just
below at the preceding stage by the adjustment and adding to the entry that was
in the same row at the preceding step. The entry next to the top is obtained the
same way, except that the adjustment is subtracted instead of being added. This
row always contains the current or adjusted error. The adjustment procedure works
first from the bottom to the second row, then from the bottom to the third row,
and finally, from the bottom to the fourth row. For example, the first four steps go
as follows, assuming a "zeroth" approximation of 0, which is to be improved by an
initial guess a:
(^5) Mikami gives as the difference, which is incompatible with the answer given by Wang Xiao-
tong. I do not know if the mistake is due to Mikami or is in the original.