Wednesday, December 26, 2018

Some Polynomial Factoring Formulas


  I got Nio to work out some polynomial factoring formulas for me. Looks like they follow a simple pattern.


Factoring a Quartic Polynomial into Two Quadratics 2


  The previous blog neglected to mention what happens if b=0 which has to be treated as a special case since the formula for d results in division by zero. When b=0 the initial sets of constraints are simplified slightly and the formula for d changes.


One can then proceed as before to find the best values for a, b, c and d.


There is only one remaining constraint which gives the same zeros.


We need only one solution to factor the quartics since the various zeros correspond to alternative permutations of the monomials in the quartic. Another special case occurs when in addition a=0 and the altered constraints tell us that d=A0 and c=A3. Zero coefficients warn about the occurrence of the special cases. One can use the same general method to factor a cubic equation into a quadratic and a monomial where one also finds a special case for a=0 since the formula for b involves division by a.

Tuesday, December 25, 2018

Factoring a Quartic Polynomial into Two Quadratics


  Lately I've been working on an Excel spreadsheet to solve for the eigenvalues of a given 4x4 matrix M with real coefficients. These eigenvalues are the roots of the eigenvalue equation |M-μI|=0 which is actually a 4th degree polynomial, a quartic equation. But before I got around to doing a blog on solving for the roots of these equations with numerical methods I decided to check to see if it was easier to factor the quartic into two quadratic equations instead.

This turned out to be the case. To see this lets start with a set of coefficients for a quartic equation and compare them with those that result from multiplying the two quadratics together. If the first quadratic is represented by q₁(x)=x²+ax+b and the second by q₂(x)=x²+cx+d so equating their products gives the set of four equations which need to be solved for a, b, c and d.


The first and last equations allow us to easily compute d and c if a and b are known. One can then substitute these formulas into the second and third equations to get two equation f₁(a)=0 and f₂(a)=0 by assuming that b is a function of a. Substituting the solution for b(a)² from one into the other results in a linear equation for b(a) giving us a rational function for b(a).



One can do a one dimensional search for the magnitude of the minimum error between the computed values for the quartic coefficients and the given values. One can alter the range of the search and change the step size to zoom in on a zero using feedback if necessary for precise values. Evaluating the function f₁(a) gives us a check on the zeros.


Substituting the four values for the zeros of a into our formulas gives the corresponding values for b, c, and d which check with the original polynomials used to generate the coefficients.


Note there are four pairs of monomials here since there is one double root. In general there would be six zeros but as with the example given here there is duplication since the coefficients of the first and second quadratic can be exchanged. The feedback mentioned above for finding the zeros uses copy and paste to transfer the value of a for the minimum err into the first row of the a column.

Merry Christmas to All