Back to functions

sqcomp


complete the square

Attempts to rewrite to polynomial to complete the square.

Usage: nerdamer("sqcomp(polynomial, x)")


Parameters

expression polynomial The polynomial for which is to be rewritten.
expression x The variable to use. Will automatically assume the variable for univariate polynomials.

Returns

Vector

EXAMPLES:
var x = nerdamer('sqcomp(9*x^2-18*x+17)');
console.log(x.toString());
var y = nerdamer('sqcomp(a*x^2+b*x-11*c, x)');
console.log(y.toString());
OUTPUT:
Back to functions