Back to functions

expand


expand

Expands a function or expression.

Usage: nerdamer("expand(x)")


Parameters

expression x Returns the appropriate value if possible otherwise it returns the function with the simplified expression

Returns

Expression

EXAMPLES:
var x = nerdamer('expand((x^2+1)^2/4)');
console.log(x.toString());
var y = nerdamer('expand(x*(x+1))');
console.log(y.toString());
x = nerdamer('(x+y)*(x-5)*x').expand();
console.log(x.toString());
OUTPUT:
(1/2)*x^2+(1/4)*x^4+1/4
x+x^2
-5*x*y-5*x^2+x^3+x^2*y
Back to functions