Can this equation be solved for x? If yes, how does the solution look? Thank you. Karl.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Respuesta aceptada
Askic V
el 30 de Mayo de 2023
Editada: Askic V
el 30 de Mayo de 2023
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!