Squarefree polynomial factorization

The calculator extracts square factors from the input polynomial.

This page exists due to the efforts of the following people:


Created: 2018-03-23 19:10:52, Last updated: 2020-11-03 14:19:35
Creative Commons Attribution/Share-Alike License 3.0 (Unported)

This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/7762/. Also, please do not modify any references to the original work (if any) contained in this content.

A univariate square-free polynomial p(x) has no square factors: q2(x), where q(x) - positive degree polynomial.
The calculator below factorizes an input polynomial into square factors if any. The input polynomial should be primitive (i.e. all the coefficients must be co-prime), otherwise the calculator produces a constant factor equals to polynomial content.
The coefficients can be integer, complex number, fraction or complex fraction.
It produces square free factors along with their exponent.
The calculator uses Yun's square-free factorization algorithm, which is described just below the calculator.

PLANETCALC, Squarefree polynomial factorization

Squarefree polynomial factorization

Polynomial coefficients, space separated.
The file is very large. Browser slowdown may occur during loading and creation.

Yun square-free factorization algorithm

The algorithm pseudo code: 1

//Input polynomial (must be primitive)
 //Derivative calculation
b(x) ⟵ a'(x)            
//Greatest common divisor calculation     
c(x) ⟵ gcd( a(x), b(x) ) 
if  c(x)=0  {
    w(x) ⟵ a(x)
} else {
    w(x) ⟵ a(x)/c(x)
    y(x) ⟵ b(x)/c(x)
    z(x) ⟵ y(x) - w'(x)
    while( z(x)!=0 ) {
        g(x) ⟵ gcd(w(x),z(x))
        output ⟵ g(x)^i
        i⟵ i + 1
        w(x) ⟵ w(x) / g(x)
        y(x) ⟵ z(x) / g(x)
        z(x) ⟵ y(x) - w'(x)
output ⟵ w(x)^i

  1. Keith O. Geddes, Stephen R. Czapor, George Labahn, Algorithms for Computer Algebra. Kluwer Academic Publishers, 1992, p. 342 

URL copied to clipboard
PLANETCALC, Squarefree polynomial factorization