How I can Solve an Advanced Cubic Equation
11 ビュー (過去 30 日間)
古いコメントを表示
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
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
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
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!