Back to functions

Solve.solve


solve

Similiar to solveFor this will solve for a given variable. The difference is that this is a self contained function.


Usage: nerdamer("solve(expression, variable")


Parameters

Expression expression The expression to solve
String variable The variable to solve for.

EXAMPLES:
var x = nerdamer('solve(x^3+1, x)');
console.log(x.toString());
x = nerdamer.solve('x^2+2*x+1', 'x');
console.log(x.toString());
x = nerdamer.solve('3*(x+a)*(x-b)', 'x');
console.log(x.toString());
OUTPUT:
Back to functions