- 中国代数故事(少年读经典·第二辑)
- 许莼舫
- 1462字
- 2023-07-07 16:13:37

在中国古代的方程算法中,所列的方程不象现今代数里那样用字母代替未知数,而是记出每一未知项的系数于一定地位,和代数里的“分离系数法”一样。解方程所用的直除法,是从一个方程累减(或累加)另一个方程,用来消去一部分未知数,和现今的加减消元法略有不同。下面举两个例题,把古代的筹算式和代数的新记法并举,读者对照一下就可以明了。
【例一】今有上禾(稻棵)3秉(一秉即一束),中禾2秉,下禾1秉,共有实(禾的果实,即稻谷)39斗,上禾2秉,中禾3秉,下禾1秉,共有实34斗。上禾1秉,中禾2乘,下禾3秉,共有实26斗,问上中下禾各一秉有实多少?答:上禾1秉有斗,中禾1秉有∠
斗,下禾1秉有
斗。(题见《九章算术》)
列上禾3秉,中禾2秉,下禾1秉,实39斗于左行。同法列得中行和右行,如(A)式(古法自右向左依次列三式,现在为便利起见,把它对调一下)。

以左行上禾遍乘中行,如(B)式。

用直除法从中行累减左行,经二次而头位减尽,如(C)式。

仿上法以左行上禾遍乘右行,如(D)式。

从右行减左行一次,头位已尽,如(E)式。

再以中行中禾遍乘右行,如(F)式。

从右行累减中行,经四次而第二位也尽,再把右行约简,如(G)式。

以右行下禾遍乘中行,如(H)式。

从中行减右行一次,第三位已尽,以(G)式中行中禾来除它,如(I)式。

以右行下禾遍乘左行,如(J)式。

从左行减右行一次,又累减中行二次,第二、三两位都尽,以(I)式左行上禾除之,如(K)式。

三行各以上数为除数,下数做被除数,除得商数就是上中下禾各一秉的斗数。
设上禾1秉的实是x斗,中禾1秉的实是y斗,下禾1秉的实是z斗,那么依题意可列三元一次方程如下:
(A)

以(A1)式首项的系数3乘(A2)式,得
(B)

从(B2)式减(B1)式二次,得
(C)

又以(C1)式首项的系数3乘(C3)式,得
(D)

从(D3)式减去(D1)式,得
(E)

再以(E2)式首项的系数5乘(E3)式,得
(F)

从(F3)式减(F2)式四次,再以9除所余的式,得
(G)

以(G3)式首项的系数4乘(G2)式,得
(H)

从(H2)式减(H3)式,再以(G2)式首项的系数5除,得
(I)

以(I3)式首项的系数4乘(I1)式,得
(J)

从(J1)式减(J2)式二次,再减(J3)式,再以(I1)式首项的系数3除,得
(K)


从上举的解法,可见古时的方程算法很是别致,虽较新法略繁,但步骤非常整齐,在使用筹算时可说是很便利的。
【例二】今有上禾6秉的实,去掉1斗8升,等于下禾10秉的实,下禾15秉的实,去掉5升,等于上禾5秉的实。问上下禾各1秉有实多少?答:上禾1秉有实8升,下禾1秉有实3升。(题见《九章算术》)
列上禾6秉正,下禾10秉负,实18升正于左行;又列上禾5秉负,下禾15秉正,实5升正于右行,如(A)式(负数的筹式,《九章算术》用颜色分别,现在为便利计,仿宋代的方法在末位加一斜划)。

以左行上禾遍乘右行,如(B)式。

从右行累加左行,经五次而头位尽,如(C)式。

右行上数做除数,下数做被除数,除得商数是下禾1秉的实,如(D)式。

又以所得数乘左行下禾,从左行末位减,再以头位除,得上禾1秉的实,如(E)式。

设上禾1秉的实是x升,下禾1秉的实是y升,那么依题意可得二元一次方程组如下:

移项,整理,得
(A)

以(A1)式首项的系数6乘(A2)式,得
(B)

(B2)式加上(B1)式五次,得
(C)

去掉(C2)式左边的系数,得
(D)

以(D2)式右边的3乘(D1)式的第二项系数,从右边18减,再以第一项系数6除,得
(E)

在上举的解法中,有(-30)+(+6)=-24,(+90)+(-10)=+80,(+18)-(-30)=+48……的正负数加减法,又有(-5)×(+6)=-30的乘法。