JS: mathsteps [mathsteps] is a JS library that does algebra. It just lacks certain logic like sorting coefficients.