背景
说到方程求解,我想大家都会想到一元二次方程:
ax2+bx+c=0
可使用
配方法,求得根为:
x=−b±b2−4ac−−−−−−−√2a
当
b2−4ac>0
时,方程有两实根
当
b2−4ac=0
时,方程有两相同实根
当
b2−4ac<0
时,没有实根,但在复数上有两复根
当二次方程求解成功之后,人们开始转向研究解决三次主程的方法。然而在解决三次方程时,人们的进展没有想像中那么快。但人们还是找到了一些特殊三次方程的解决,于是乎,学术界和民间纷纷开展了一场解决三次方程的比赛。也有人找到了通用的解方程办法,但是秘而不宣,造成三次方程的解决一直没有告知于众。
数学界解三次方程这段历史非常有历,在这些就不详细说明了,有兴趣的读者可以网上google一下,可以找到不错的史料。
为了降低阅读的难度,本文先介绍一种特殊三次方程的解决,看看如何求解决这种特殊的三次方程。
特殊三次方程求解
卡尔丹首先突破的三次方程是没有二次项的三次方程,它的形式如下:
x3+px+q=0
那如何解这个新方程呢?卡尔丹想到很奇妙的方法,令
x=u+v
,代入原方程,化简后得:
u3+v3+3uv(u+v)+p(u+v)+q=0
然后,再对u和v增加一个约束:
3uv=−p
,就可以将
(u+v)
项消灭,从而得到:
u3+v3+q=0
由增加的约束可得
v=−p3u
,代入得:
u3+(−p/3u)3+q=0
然后两边同时乘以
27u3
,整理移项得:
27u6+27qu3−p3=0
显然,此方程可以看作是
u3
为变元的二次方程,根据二次方程的求根公式,马上可以得到:
u3=−q2±q24+p327−−−−−−−√
从这里开始就犯难了,这里遇到两个问题:
1. 如果
q24+p327<0
,则
q24+p327−−−−−−√
是复数。
2. 从
u3
中求解
u
,似乎又涉及3次方程求解,它有3个根,而且涉及复数。
为了保证求解过程不产生跳跃性,我们对q24+p327的值分情况讨论。
情况一:
q24+p327≥0
因为从
u3
求解
u
,涉及开3次方,而3次方根却一定涉及到复数,对于没有学习过复变函数的读者来说,会有一定的困难。
即然涉及开3次方,那么我们将u3写到复数形式,同时为了方便做开方运算,使用复数的三角形式。
u3=−q2±q24+p327−−−−−−−√+0i=(−q2±q24+p327−−−−−−−√)(cos0+isin0)
根据复数的定义,开3次方,等于模开3次方,而辐解有3个值,即:
u=(−q2±q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)(cos0+2nπ3+isin0+2nπ3)
其中
n=0,1,3
即
u1=−q2±q24+p327−−−−−−−√−−−−−−−−−−−−−−√3
u2=(−q2±q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω
u3=(−q2±q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω2
其中
ω=cos2π3+isin2π3=−12+3√2i
接下来,就可以计算
v
了。 由3uv=−p 得到:
v=−p3u
取
u1=−q2±q24+p327−−−−−−√−−−−−−−−−−−−−√3
可得
v1=−p3−q2±q24+p327−−−−−−√−−−−−−−−−−−−−√3
=−p−q2∓q24+p327−−−−−−√−−−−−−−−−−−−−√33(−q2±q24+p327−−−−−−√−−−−−−−−−−−−−√3)(−q2∓q24+p327−−−−−−√−−−−−−−−−−−−−√3)
=−p−q2∓q24+p327−−−−−−√−−−−−−−−−−−−−√33q24−(q24+p327)−−−−−−−−−−−−√3
=−p−q2∓q24+p327−−−−−−√−−−−−−−−−−−−−√33−p327−−−−√3
=−q2∓q24+p327−−−−−−−√−−−−−−−−−−−−−−√3
有没有从
u1
求
v1
计算过程中,发现这个计算过程很有规律,没有丝毫的复杂性,一切看起来很简洁。
由
u2=(−q2±q24+p327−−−−−−√−−−−−−−−−−−−−√3)ω
,可得:
v2=−p3(−q2±q24+p327−−−−−−√−−−−−−−−−−−−−√3)ω
=−p3−q2±q24+p327−−−−−−√−−−−−−−−−−−−−√3(1ω)
=(−q2∓q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)(1ω)
=(−q2∓q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω2
同理,由
u3=(−q2±q24+p327−−−−−−√−−−−−−−−−−−−−√3)ω2
可得
v3=(−q2∓q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω
由前面引入
u
和v时,有
x=u+v
关系,而在求解过程中发现
u
和v分别有6组值,是不是说
x
也有6组值呢?非也,如何细仔观察这6组值,会发现u和
v
有对称性,他们加起来一才有3组值,分别是:
x1=u1+v1=−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3+−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3
x2=u2+v2=(−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω+(−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω2
x3=u3+v3=(−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω2+(−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω
注意:这里的
√
是求算术平方根,运行结果只取正值,而
√3
是在实数范围内求3次方根,运行结果为实数结果。
情况二:
q24+p327<0
如果
q24+p327<0
,则开平方根是一个纯虚数,那应该写成:
u3=−q2±(−q24−p327−−−−−−−−−√)i
注意:这个式中的
√
仍然是算术平方根。
为了方便开3次方求解
u
,我们将u3写成它的三角形式,要写它的三角形式。由于
u3
实部和虚部同时存在,则需要求
u3
的模和辐角。
|u3|=(−q2)2+(−q24−p327−−−−−−−−−√)2−−−−−−−−−−−−−−−−−−−−√=−p327−−−−−√
接下来要求辐角了,为了避免后续再从三角形式转换成代数形式,这里不对辐解进行求解,直接将它的辐角记为
θ
,满足:
−π2≤θ≤π2
cosθ=−q2−p327−−−−√
sinθ=−q24−p327−−−−−−−−√−p327−−−−√
那么
u3
可表示为:
u3=−p327−−−−−√(cosθ+isinθ)
从而有:
u=−p327−−−−−√−−−−−−√3(cosθ+2nπ3+isinθ+2nπ3)=−p3−−−−√(cosθ+2nπ3+isinθ+2nπ3)(n=0,1,2)
根据复数的定义:
(cosα+isinα)(cosβ+isinβ)=cos(α+β)+isin(α+β)
,将
u
表达式后面的复数部分拆成两个复数相乘,即:
u=−p3−−−−√(cosθ3+isinθ3)(cos2nπ3+isin2nπ3)=−p3−−−−√(cosθ3+isinθ3)ωn(n=0,1,2)
怎么样,
ω
又现身了,求三次方根,永远都少不了
ω
的身影,正如对负数求平方根一样,永远少不了
i
的身影一样。
为了减少对θ的依赖,我们先消去
θ
再计算
v
。由于有θ,如何将它变成
θ
呢,很简单,先做立方运算,再开3次方。即:
u=−p3−−−−√(cosθ3+isinθ3)ωn
=(−p3−−−−√)3(cosθ3+isinθ3)3−−−−−−−−−−−−−−−−−−−−−√3ωn
=−p327−−−−−√(cosθ+isinθ−−−−−−−−−−−−−−−−√3)ωn
=−q2+−q24−p327−−−−−−−−−√−−−−−−−−−−−−−−−−√3iωn
噢,上式中的
−q2+−q24−p327−−−−−−−−√−−−−−−−−−−−−−−−√3i
又变回了对复数开三次方,但了复数原理的都知道,任一复数开三次方根时,有三个数值,那么这里的具体表示哪一个呢?
答案是任一个都可以,但这个根值选定之后,后面所有
−q2+−q24−p327−−−−−−−−√−−−−−−−−−−−−−−−√3i
结果都要使用相同的值,才能保证结果是正确的。
好了,下面由
3uv=−p
,从
u
求解v:
v=−p3u
=−p3−q2+−q24−p327−−−−−−−−√−−−−−−−−−−−−−−−√3iωn
=−p(−q2−−q24−p327−−−−−−−−√i−−−−−−−−−−−−−−−−√3)3(−q2+−q24−p327−−−−−−−−√i−−−−−−−−−−−−−−−−√3)(−q2−−q24−p327−−−−−−−−√i−−−−−−−−−−−−−−−−√3)ωn
=−p(−q2−−q24−p327−−−−−−−−√i−−−−−−−−−−−−−−−−√3)3q24+(−q24−p327)−−−−−−−−−−−−−−√3ωn
=−p(−q2−−q24−p327−−−−−−−−√i−−−−−−−−−−−−−−−−√3)3−p327−−−−√3ωn
=−q2−−q24−p327−−−−−−−−√i−−−−−−−−−−−−−−−−√3ωn
=(−q2−−q24−p327−−−−−−−−−√i−−−−−−−−−−−−−−−−−√3)ω3−n(n=0,1,2)
然后通过
x=u+v
,对
x
做运行有:
x=u+v=−q2+−q24−p327−−−−−−−−−√−−−−−−−−−−−−−−−−√3iωn+(−q2−−q24−p327−−−−−−−−−√i−−−−−−−−−−−−−−−−−√3)ω3−n(n=0,1,2)
为了方便公式统一化,我们将算术平方根
√
符号在复数上做一个扩展,即当n为负数,那么
n√
表示
−n−−−√i
,如果n为正数是,
n√
仍时算述平方根。同样地,对于开3次方根,会有3个根值,但我们使用
q√3
表示为辐角值为
−π2≤θ≤π2
的那个根。
那么求根分式可以写成:
x=(−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ωn+(−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω3−n(n=0,1,2)
综合两种情况下的求根据公式
上述两种情况下的求根公式其它是一样的,只是采用不同的写法而已。如果采用3根的表达方式时,写成如下:
x1=−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3+−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3
x2=(−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω+(−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω2
x3=(−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω2+(−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω
其实还有情况二写成的那种通用公式,如下:
x=(−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ωn+(−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω3−n(n=0,1,2)
这里的秘密是
ω3=1
,上述两组公式是等价的。但这个求解公式有些要注意的地方,这也是我第一次看到这个求根公式百思不得其解的原因:
- 算术平方根运算,它里面是负数时,它的结果是前面带正号的纯虚数 (事实上用前带负号的纯虚数也可以,但后面的同值计算要保持一致)
- 对于公式中的两个立方根运算,可以取3个结果中的一个,但一个确定后,另一个也随之确定,两者的结果需要满足
(−q2+q24+p327−−−−−−√−−−−−−−−−−−−−√3)(−q2−q24+p327−−−−−−√−−−−−−−−−−−−−√3)=−p3
,为了方便计算,我们通常使用三次方根运行来表示辐角满足
−π2≤θ≤π2
r 那个根
求根公式
综合上述两种情况,然后定义好二次方根和三次方根运行,求根公式可以表示为:
x1=−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3+−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3
x2=(−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω+(−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω2
x3=(−q2+q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω2+(−q2−q24+p327−−−−−−−√−−−−−−−−−−−−−−√3)ω