Back to functions

nerdamer.solveFor


solveFor

This method requires that the Solve, Calculus, and Algebra add-ons are loaded. It will attempt to solve an equation. If solutions no solutions are found then an empty array is returned. It can solve for multivariate polynomials up to the third degree. After which it can solve numerically for polynomials up to the the 100th degree. If it's a univariate equation it will attempt to solve it using numerical methods.


Usage: nerdamer(equation).solveFor(variable)


Parameters

String variable The variable to solve for.

EXAMPLES:
var eq = nerdamer('a*x^2+b*x=y').evaluate({y: 'x-7'});
console.log(eq.toString());
var solutions = eq.solveFor('x').toString();
console.log(solutions);
OUTPUT:
Back to functions