一元三次方程是型如ax^3+bx^2+cx+d=0的标准型其解法如下将上面的方程化为x^3+bx^2+cx+d=0,设x=y-b/3,则方程又变为y^3+(c-b^2/3)y+(2b^3/27-bc/3+d)=0设p=c-b^2/3,q=2b^3/27-bc/3+d,方程为y^3+py+q=0再设 y=u+vp=—3uv则(u^3+v^3)+3uv(u+v)+p(u+v)+q=0 => u^3+v^3+q=0所以q+u^3-(p/(3u))^3=0,即(u^3)^2+qu^3-(p/3)^3=0设u^3=t,则t^2+qt-(p/3)^3=0解得t=(-q±(q^2+4(p/3)^3)^0.5)/2所以u=((-q±(q^2+4(p/3)^3)^0.5)/2)^(1/3),所以v=—p/(3u)=(-p/3)/((-q±(q^2+4(p/3)^3)^0.5)/2)^(1/3)所以y1=u+v=((-q±(q^2+4(p/3)^3)^0.5)/2)^(1/3)+(-p/3)/((-q±(q^2+4(p/3)^3)^0.5)/2)^(1/3) 这是一个根,现求另两根:将y1代入方程得y^3+py+q=(y-y1)*f(x)f(x)用待定系数法求,即设y^3+py+q=(y-y1)(y^2+k1y+k2)=y^3+(k1-y1)y^2+(k2-k1y1)y-k2y1所以k1=y1,k2=p+k1^2f(x)=y^2+y1*y+p+y1^2然后用求根公式解出另两根y2,y3.