node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


Metadelta Solver

Step-by-step equation solving for metadelta


To solve an equation:

const solver = require('@metadelta/solver');
const steps  = solver.solveEquation('2x + 3x = 35');
steps.forEach(step => {
    console.log("Before this change: " + step.oldEquation.print());  // e.g. before change: 2x + 3x = 35 
    console.log("Type of change: " + step.changeType);               // e.g. change: SIMPLIFY_LEFT_SIDE 
    console.log("After this change: " + step.newEquation.print());   // e.g. after change: 5x = 35 
    console.log("Number of substeps: " + step.substeps.length);      // e.g. # of substeps: 2 

To see all the change types:

const changes = solver.ChangeTypes;


First clone the project from github:

git clone
cd packages/solver

Install the project dependencies:

npm install


To execute tests for the library, install the project dependencies once:

npm install

Then, the tests can be executed:

npm test


This project is a fork of's mathsteps and licensed under the Apache 2.0 License.