Algebrite is a JavaScript/TypeScript library for symbolic mathematics. It allows you to perform operations like simplification, expansion, substitution, differentiation, and integration.
All built-in methods are exposed through a JavaScript interface. Strings are automatically parsed as expressions, and numbers are converted into appropriate representations. Methods return internal 'cons' objects, which you can convert to a human-readable string using the .toString() method.
var Algebrite = require('algebrite')
// Basic expression evaluation
Algebrite.run('x + x') // => "2 x"
// Factoring
Algebrite.factor('10!').toString() // => "2^8 3^4 5^2 7"
// Calculus: Integrals
Algebrite.eval('integral(x^2)').toString() // => "1/3 x^3"
// Composing operations
Algebrite.integral(Algebrite.eval('x')).toString() // => "1/2 x^2"