Methods used inside "roots" and "solve" functions to solve polynomial equations.
Ältere Kommentare anzeigen
I am wondering to know which mathematical methods is used inside the Matlab "roots" and "solve" functions to solve for polynomial equations. I read their descriptions and there are no references to methods or papers used to build these functions.
Antworten (1)
For numerial computation of polynomial roots, see
For symbolic computation of polynomial roots, see the analytical formula for polynomials up to degree 4.
In short: numerically, the roots of a polynomial are computed as the eigenvalues of the companion matrix.
4 Kommentare
Mahrad Sharifvaghefi
am 17 Jan. 2023
I don't see that "solve" gives a solution for polynomials of degree >= 5. You will have to use "root" or "vpasolve" instead (which most probably use the same method as "roots", namely the eigenvalue solution).
For degree <= 4, there exist analytical solutions, and specifying "MaxDegree" in the "solve" command will activate these formulae, I guess.
syms x
r = solve(x^5 + 6*x^4 + 7*x^3 -15*x^2-6*x+20==0,x)
r = solve(6*x^4 + 7*x^3 -15*x^2-6*x+20==0,x)
r = solve(6*x^4 + 7*x^3 -15*x^2-6*x+20==0,x,"MaxDegree",4)
Kategorien
Mehr zu Polynomials finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


