How can I do polynominal factorization?

 Respuesta aceptada

Star Strider
Star Strider el 13 de Nov. de 2016
You are factoring a 3-degree polynomial, not analytically easy.
The best I can do is:
syms k1 k2 k3 x real
assume(k1 ~= 0)
assume(k2 ~= 0)
assume(k3 ~= 0)
Eqn = 1 + k1*x + k2*x^2 + k3*x^3;
F1 = solve(Eqn == 0, x, 'MaxDegree',2, 'Real',1);
F1v = vpa(F1,3);
abc = vpa(simplify(F1v, 'steps', 30), 3) % ‘a’, ‘b’, ‘c’ Coefficients
Simplifying the result or attempting to find subexpressions that would make it more tractable are not possible. No worries about the warning, but it is instructive.

4 comentarios

Deokjae Jeong
Deokjae Jeong el 13 de Nov. de 2016
Thank you for your answer. I realized that LHS does not always have three real values when expresed LHS==0. I checked your answer and it works. Thank you.
Star Strider
Star Strider el 13 de Nov. de 2016
My pleasure.
If my Answer solved your problem, please Accept it.
Deokjae Jeong
Deokjae Jeong el 13 de Nov. de 2016
Oh, my mistake. I accepted it.
Star Strider
Star Strider el 13 de Nov. de 2016
Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 13 de Nov. de 2016

Comentada:

el 13 de Nov. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by