How I can Solve an Advanced Cubic Equation

11 ビュー (過去 30 日間)
Jean-Hubert Olivier
Jean-Hubert Olivier 2020 年 1 月 23 日
回答済み: Walter Roberson 2020 年 1 月 24 日
I am aiming to solve the following cubic equation for x.
x^3*a^2(r-1)+x^2*a*(a-2*(r-1)) - x*(2a+1)+1 = 0
Essentially, I would like to express x as a function of the variable r and a. Any pointer as of how I shouldt ackle this problem. Thanks
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 1 月 23 日
Symbolic Toolbox solve() with 'MaxDegree', 3 option and simplify() afterwards.
Complete answers exist, but it is normal for the output to be what appears to be a moderately long string of nonsense.
J. Alex Lee
J. Alex Lee 2020 年 1 月 24 日
Why not just start with Wikipedia or textbooks on solution of cubics? It's usually easier to do that than to decipher/simplify the results of symbolic solvers (at least my experience with Mathematica; I've never use TMW's symbolic toolbox)

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

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 1 月 24 日
syms x a r
eqn = x^3*a^2*(r-1)+x^2*a*(a-2*(r-1)) - x*(2*a+1)+1;
sol = simplify(solve(eqn, x, 'maxdegree', 3));
The second and third solution are over 1000 characters each. I don't think the solution will have any meaning to you.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by