Published
Edited
May 5, 2020
Insert cell
Insert cell
algebra = require('https://bundle.run/algebra.js')
Insert cell
{
var n1 = algebra.parse("x + 2");
var n2 = algebra.parse("x + 3");
var n3 = algebra.parse("x + 4");

var cubic = new algebra.Equation(n1.multiply(n2).multiply(n3), 0);

var answers = cubic.solveFor("x");

return cubic.toString() + "\n" + "x = " + answers.toString();
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more