How to solve a third order polynom?

6 ビュー (過去 30 日間)
ChristianM89
ChristianM89 2018 年 8 月 22 日
コメント済み: Star Strider 2018 年 8 月 22 日
I need some help solving a third order polynom. I have the function showen in the code. And I would like to get x. The first solution i expect is 30 for the code below.
Later I would like to solve e.g.: "fun == 200" and I expect the result to be 10.859
syms x;
fun = (pi*(x^3 - 234*x^2 + 18252*x))/2700;
eqn1 = fun == (674*pi)/5; %original Function
eqn2 = fun == 423.4867; %rounded
solve(eqn1,x)
30
102 - 3^(1/2)*24i
102 + 3^(1/2)*24i
solve(eqn2,x)
root(4398046511104*z^3*pi - 1029142883598336*z^2*pi + 80273144920670208*z*pi - 5028788349271654875, z, 1)
root(4398046511104*z^3*pi - 1029142883598336*z^2*pi + 80273144920670208*z*pi - 5028788349271654875, z, 2)
root(4398046511104*z^3*pi - 1029142883598336*z^2*pi + 80273144920670208*z*pi - 5028788349271654875, z, 3)
  1 件のコメント
Dimitris Kalogiros
Dimitris Kalogiros 2018 年 8 月 22 日
It seems that you can solve a polynomial equation of 3rd degree. What exactly your question is ?

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2018 年 8 月 22 日
Use the related vpasolve function for ‘eqn2’:
vpasolve(eqn2,x)
30.000001280214526389167507957467
101.99999935989273680541624602127 - 41.56921827295475289777603563479i
101.99999935989273680541624602127 + 41.56921827295475289777603563479i
  2 件のコメント
ChristianM89
ChristianM89 2018 年 8 月 22 日
Great, it works. Thanks =)
Star Strider
Star Strider 2018 年 8 月 22 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (1 件)

Torsten
Torsten 2018 年 8 月 22 日
Use MATLAB'S "roots".
Best wishes
Torsten.

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by