Can this equation be solved for x? If yes, how does the solution look? Thank you. Karl.
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Askic V
2023-5-30
编辑:Askic V
2023-5-30
Things become complicated very easy with high degree polynomials.
First, this is an example for qudratic equation:
syms a b c x
% Define the equation
eqn = a*x^2 + b*x + c == 0;
% Solve the equation symbolically
sol = solve(eqn, x);
pretty(sol)
and this is for 4th order:
syms a b c d x
% Define the equation
eqn = a*x^4-b*x^2-c*x+d == 0;
% Solve the equation symbolically
% The option specifies the max degree
% of polynomials for which the solver tries to find and return
% an explicit solutions
sol = solve(eqn, x,'MaxDegree',4);
pretty(sol(1)) % only first solution
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!