Calculus.js
function polydiff(symbol) {
                if(symbol.value === d || symbol.contains(d, true)) { 
                    symbol.multiplier = symbol.multiplier.multiply(symbol.power);
                    symbol.power = symbol.power.subtract(new Frac(1)); 
                    if(symbol.power.equals(0)) {
                        symbol = Symbol(symbol.multiplier);
                    }
                } 
                
                return symbol;
            }
function polydiff(symbol) {
                if(symbol.value === d || symbol.contains(d, true)) { 
                    symbol.multiplier = symbol.multiplier.multiply(symbol.power);
                    symbol.power = symbol.power.subtract(new Frac(1)); 
                    if(symbol.power.equals(0)) {
                        symbol = Symbol(symbol.multiplier);
                    }
                } 
                
                return symbol;
            }
function polydiff ( symbol ) { if ( symbol . value === d || symbol . contains ( d , true ) ) { symbol . multiplier = symbol . multiplier . multiply ( symbol . power ) ; symbol . power = symbol . power . subtract ( new Frac ( 1 ) ) ; if ( symbol . power . equals ( 0 ) ) { symbol = Symbol ( symbol . multiplier ) ; } } return symbol ; }
Equivalent to "derivative of the outside".
Equivalent to derivative of the outside .