MT Math Tools

Equation Solver

Simplify algebraic expressions, differentiate them, and solve linear equations step by step with mathjs.

🔒 Runs entirely in your browser — nothing is uploaded

Result

x = 4

    Linear equation solved locally with mathjs.

    Advertisement

    Simplify, differentiate and solve

    This equation solver works with two kinds of input. If you type a plain algebraic expression such as 2x + 3x - 5, it returns the simplified form using the mathjs computer-algebra engine, and also shows the symbolic derivative with respect to your chosen variable. If you type a full equation containing an equals sign, such as 2x + 3 = 11, it rearranges the equation to the form f(x) = 0 and solves it when the equation is linear in one variable.

    The solving method is transparent. The tool builds the difference left side − right side, then samples it at two points to recover the slope and intercept of the line, giving the coefficients a and b in a·x + b = 0. The unique solution is x = −b ÷ a. A third sample point confirms the expression is actually linear; if it is not, the tool tells you so and still shows the simplified form so you can continue by hand or with the quadratic solver.

    Supported syntax

    Use the usual operators + − * / ^ and parentheses for grouping. Multiplication next to a variable is understood, so 2x means 2*x. Functions such as sqrt, sin, cos, log and exp are available because the parser is the full mathjs grammar. Constants like pi and e are recognized. Choose any single letter as the variable as long as it matches the letter used in your expression.

    Accuracy and privacy

    Symbolic simplification is exact, while the linear solution uses standard double-precision arithmetic, which is more than enough for schoolwork and quick checks. Very large coefficients or expressions that are nearly degenerate can show tiny rounding artifacts. Everything is computed in your browser: no expression is uploaded, no history is saved and no external math service is called. For non-linear equations, pair this tool with the quadratic solver or the graphing calculator to locate roots visually.

    How to use

    1. Type an expression or equationEnter an algebraic expression like 2x + 3x - 5, or a linear equation such as 2x + 3 = 11.
    2. Set the variableUse x by default, or change it to any single letter that matches your input.
    3. Read the result and stepsSee the simplified form, the derivative, and a worked solution for linear equations.

    Frequently asked questions

    Does this tool use eval?
    No. Expressions are parsed and simplified with the mathjs library, never with JavaScript eval.
    Which equations can it solve exactly?
    It solves linear equations in one variable. Non-linear equations are simplified but not solved symbolically.
    Can it differentiate?
    Yes. For an expression it also shows the symbolic derivative with respect to your chosen variable.
    Does my input leave the browser?
    No. All parsing and algebra runs locally and nothing is uploaded or stored.
    Advertisement