三次方程式の解で結果の意味が分かりません
12 views (last 30 days)
Show older comments
kenichiro inagaki
on 11 Oct 2021
Commented: kenichiro inagaki
on 11 Oct 2021
三次方程式の解が知りたいのですが、下記のような値しか出てきません。ヘルプで調べても意味のわからないことばかり書いてあって困ってます。
素人にわかるように説明いただけないでしょうか。お願いいたします。zの意味が出てきません。
>> syms x ;
>> eqn = -0.00302 * x^3 + x - 0.3828==0;
>> S = solve(eqn,x)
S =
root(z^3 - (50000*z)/151 + 19140/151, z, 1)
root(z^3 - (50000*z)/151 + 19140/151, z, 2)
root(z^3 - (50000*z)/151 + 19140/151, z, 3)
0 Comments
Accepted Answer
Atsushi Ueno
on 11 Oct 2021
高階数多項方程式の求解で説明している「陽的な解」が今求めている内容です。取り合えず結果のみ書きます。
syms x ;
S = solve(-0.00302 * x^3 + x - 0.3828==0, x); % 'MaxDegree'のデフォルト値は2
S = solve(-0.00302 * x^3 + x - 0.3828==0, x, 'MaxDegree', 3) % こう書けば陽的な解を解いてくれます
2 Comments
Atsushi Ueno
on 11 Oct 2021
数値解を出す場合はsolveではなくvpasolveを使います。
syms x ;
S = vpasolve(-0.00302 * x^3 + x - 0.3828==0, x)
More Answers (0)
See Also
Categories
Find more on 方程式の解法 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!