Algebra.js
function(symbol, factors) {
                
                if(symbol.group !== FN) {
                    var vars = variables(symbol).reverse();
                    for(var i=0; i<vars.length; i++) {
                        do {
                            if(vars[i] === symbol.value){
                                //the derivative tells us nothing since this symbol is already the factor
                                factors.add(symbol);
                                symbol = new Symbol(1);
                                continue;
                            }
                            var d = __.Factor.coeffFactor(core.Calculus.diff(symbol, vars[i]));
                            
                            if(d.equals(0)) 
                                break;
                            var div = __.div(symbol, d.clone()),
                                is_factor = div[1].equals(0);
                            if(div[0].isConstant()) {
                                factors.add(div[0]);
                                break;
                            }
                            if(is_factor) {
                                factors.add(div[0]);
                                symbol = d;
                            }
                        }
                        while(is_factor)
                    }
                }

                return symbol;
            }
function(symbol, factors) {
                
                if(symbol.group !== FN) {
                    var vars = variables(symbol).reverse();
                    for(var i=0; i<vars.length; i++) {
                        do {
                            if(vars[i] === symbol.value){
                                //the derivative tells us nothing since this symbol is already the factor
                                factors.add(symbol);
                                symbol = new Symbol(1);
                                continue;
                            }
                            var d = __.Factor.coeffFactor(core.Calculus.diff(symbol, vars[i]));
                            
                            if(d.equals(0)) 
                                break;
                            var div = __.div(symbol, d.clone()),
                                is_factor = div[1].equals(0);
                            if(div[0].isConstant()) {
                                factors.add(div[0]);
                                break;
                            }
                            if(is_factor) {
                                factors.add(div[0]);
                                symbol = d;
                            }
                        }
                        while(is_factor)
                    }
                }

                return symbol;
            }
function ( symbol , factors ) { if ( symbol . group !== FN ) { var vars = variables ( symbol ) . reverse ( ) ; for ( var i = 0 ; i < vars . length ; i ++ ) { do { if ( vars [ i ] === symbol . value ) { //the derivative tells us nothing since this symbol is already the factor
 factors . add ( symbol ) ; symbol = new Symbol ( 1 ) ; continue ; } var d = __ . Factor . coeffFactor ( core . Calculus . diff ( symbol , vars [ i ] ) ) ; if ( d . equals ( 0 ) ) break ; var div = __ . div ( symbol , d . clone ( ) ) , is_factor = div [ 1 ] . equals ( 0 ) ; if ( div [ 0 ] . isConstant ( ) ) { factors . add ( div [ 0 ] ) ; break ; } if ( is_factor ) { factors . add ( div [ 0 ] ) ; symbol = d ; } } while ( is_factor ) } } return symbol ; }
Equivalent of square free factor for multivariate polynomials
@param {type} symbol
@param {type} factors
@returns {AlgebraL#18.Factor.mSqfrFactor.symbol|Array|AlgebraL#18.__.Factor.mSqfrFactor.d}
Equivalent of square free factor for multivariate polynomials