一元三次方程求解
(0.014*x*x*x)/49188.0-0.021*x*x-6466.6*x+766990000=0
麻烦哪位用matlab求解一下,给我答案即可。谢谢。在线等
[解决办法]
a*x*x*x + b*x*x + c*x +d = 0
求x 值的求根公式!!!!!
先简化成为:
x^3 + ax^2 + bx + c = 0;
让 x=y-a/3, 得到:
y^3 + py + q = 0;
下面按照顺序计算:
w1 = (-1+sqrt(-3))/2;
w2 = (-1-sqrt(-3))/2;
z1 = (-q/2 + sqrt(q*q/4+p*p*p/27))^(1/3) ;
z2 = (-q/2-sqrt(q*q/4+p*p*p/27))^(1/3)
y1 = z1 + z2;
y2 = w1*z1 + w2*z2;
y3 = w2*z1 + s2*z2;
再由y1 y2 y3回头计算就得到x了
[解决办法]
ans =
-164309.06632686772218732212366548
119045.53316343386109366106183274-47209.582107552481771565015718453*i
119045.53316343386109366106183274+47209.582107552481771565015718453*i
[解决办法]
给个原程序好吗!!?