# how factor a polynomial into 2 quadratics?

94 visualizaciones (últimos 30 días)
Robert Wake el 15 de Nov. de 2021
Comentada: Walter Roberson el 15 de Nov. de 2021
hi I have a 4th order polynomial like so
mypolynomial = x^4 +a*x^3 + b*x^2 + c*x + d == 0
I now want to factorise this into 2 quadratic equations, as either quadratic equation contains the natural frequency and damping of a certain flight mode of an aircraft. Is there a way to do this? I have tried the 'factor' function, and also tried
collect(mypolynomial, x^2)
however this just returns the original fourth order polynomial. The equation i wish to obtain looks something like this
(x^2 + A*x + B)(x^2 + C*x + D) = 0
where the upper case coefficients are not the same as the lower case coefficients in 'mypolynomial'.
Any help is appreciated, thanks!
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

John D'Errico el 15 de Nov. de 2021
Editada: John D'Errico el 15 de Nov. de 2021
You cannot uniquely factor a 4th degree polynomial into such a pair of quadratics. You may think that you can, but it is provably impossible to do so, and a simple counter-example is sufficient to show why.
syms x
quartic = expand((x-1)*(x-2)*(x-3)*(x-4))
quartic =
But that polynomial can be trivially written as the product of two quadratic polynomials.
Q1 = expand((x-1)*(x-2))
Q1 =
Q2 = expand((x-3)*(x-4))
Q2 =
expand(Q1*Q2)
ans =
As you can see, Q1*Q2 must yield the same fourth degree polynomial. But is there any reason I could not have done this?
Q1 = expand((x-1)*(x-3))
Q1 =
Q2 = expand((x-2)*(x-4))
Q2 =
expand(Q1*Q2)
ans =
So we have completely different quadratic factors. There is indeed no unique way to write such a 4th degree polynomial. This is no different from saying that an integer like 210 = 2*3*5*7, can be written in any of the forms 6*35 = 10*21 = 15*14. There is no unique factorization possible. The same idea applies to polynomials.
All that you can do is to find all 4 roots, then you could pair them up in any order you wish, Whatever makes you happy. This would suffice:
xroots = solve(mypolynomial,'maxdegree',4);
Or, if the coefficients of your polynomial are all numerical values, then you can use vpasolve.
xroots = vpasolve(mypolynomial);
In some cases, your roots MAY pair naturally up into pairs of complex conjugate roots. But that still does not give you a unique factorization.
##### 4 comentariosMostrar 2 comentarios más antiguosOcultar 2 comentarios más antiguos
Robert Wake el 15 de Nov. de 2021
Hi walter thanks I mustn't have been explaining it correctly as I've found a way.
syms x
A = [-0.00687 0.01395 0 -9.81; -0.0905 -0.31498 236 0; 3.89e-4 -0.00336 -0.4282 0; 0 0 1 0];
I = eye(4) %identity matrix
eqn = det(I*x - A)
where eqn returns the following 4th order polynomial;
eqn = x^4 + 0.75*x^3 + 0.934*x^2 + 0.00945*x + 0.00419
i then use the factor function
quad = factor(eqn, x, 'FactorMode', 'real')
this then returns the equation
quad = [x^2 + 0.00658*x + 0.00453, x^2 + 0.743*x + 0.925]
where the coefficients 0.00453 and 0.925 correspond to the natural frequency of two separate flight modes of a disturbed aircraft. Thanks!
Walter Roberson el 15 de Nov. de 2021
factor() with 'real' sounds good.

Iniciar sesión para comentar.

### Categorías

Más información sobre Polynomials 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!

Translated by