|
|
|
|
|
by nicolewhite
3959 days ago
|
|
You should check out this algebra.js project I've been working on for funsies. var exp = new Expression("a");
exp = exp.multiply("b");
exp = exp.multiply("x");
exp = exp.add("c");
console.log(exp.toString());
exp = exp.evaluateAt({a:5, b:1, c:-1})
console.log(exp.toString());
var eq = new Equation(exp, new Expression("y"));
console.log(eq.toString());
var x = eq.solveFor("x");
console.log("x = " + x.toString());
Yields: abx + c
5x - 1
5x - 1 = y
x = 1/5y + 1/5
You can play with it here: http://algebra.js.org/ |
|