SolveMathAI

Equation solver

Type the equation. Get x, and the line-by-line route to it.

Enter to solve · Shift+Enter for a new line

  • Free
  • No account
  • Every step shown
  • Arithmetic to calculus

An equation is a balance. Solving it means peeling operations off the unknown, one at a time, doing the same thing to both sides at every step. The order is the reverse of how the expression was built: undo addition before multiplication, multiplication before powers.

Solving for x, step by step

This works for every linear equation and is the opening move for most others.

  1. Clear fractions

    Multiply every term by the least common denominator. Fractions disappear and the equation becomes ordinary.

  2. Expand brackets

    Distribute across every bracket, minding the sign in front of it. A minus outside flips every sign inside.

  3. Collect like terms

    Simplify each side on its own before moving anything across the equals sign.

  4. Isolate the unknown

    Move the x terms one way and the numbers the other by adding or subtracting from both sides.

  5. Divide by the coefficient

    One division finishes a linear equation. Leave the answer as a fraction if it is not whole; decimals lose exactness.

  6. Substitute back

    Put the answer into the original equation. If both sides agree, you are done.

Worked examples

Each one is solved the way the solver solves it: the rule first, then the line.

Solve 5x - 3 = 2x + 12

5x3=2x+125x - 3 = 2x + 12
  1. Subtract 2x from both sides
    3x3=123x - 3 = 12
  2. Add 3 to both sides
    3x=153x = 15
  3. Divide both sides by 3
    x=5x = 5
  4. Check
    5(5)3=22,2(5)+12=22  5(5) - 3 = 22, \qquad 2(5) + 12 = 22 \;\checkmark
Answer
x=5x = 5

Solve x/3 + (x - 2)/4 = 3

x3+x24=3\frac{x}{3} + \frac{x - 2}{4} = 3
  1. Least common denominator is 12
    12x3+12x24=12312 \cdot \frac{x}{3} + 12 \cdot \frac{x-2}{4} = 12 \cdot 3
  2. Fractions cleared
    4x+3(x2)=364x + 3(x - 2) = 36
  3. Expand and collect
    4x+3x6=36    7x=424x + 3x - 6 = 36 \;\Rightarrow\; 7x = 42
  4. Divide by 7
    x=6x = 6
Answer
x=6x = 6

Solve |2x - 5| = 7

2x5=7\lvert 2x - 5 \rvert = 7
  1. An absolute value gives two cases
    2x5=7or2x5=72x - 5 = 7 \qquad \text{or} \qquad 2x - 5 = -7
  2. Solve the first
    2x=12    x=62x = 12 \;\Rightarrow\; x = 6
  3. Solve the second
    2x=2    x=12x = -2 \;\Rightarrow\; x = -1
  4. Both check out
    7=7  7=7  \lvert 7 \rvert = 7 \;\checkmark \qquad \lvert -7 \rvert = 7 \;\checkmark
Answer
x=6 or x=1x = 6 \ \text{or}\ x = -1

Solve A = P(1 + rt) for r

A=P(1+rt)A = P(1 + rt)
  1. Divide both sides by P
    AP=1+rt\frac{A}{P} = 1 + rt
  2. Subtract 1
    AP1=rt\frac{A}{P} - 1 = rt
  3. Divide by t
    r=AP1t=APPtr = \frac{\frac{A}{P} - 1}{t} = \frac{A - P}{Pt}
Answer
r=APPtr = \dfrac{A - P}{Pt}

Rearranging a formula uses exactly the same moves as solving for a number.

Where marks get lost

Doing it to one side only

Every operation has to hit both sides. Half the wrong answers in a marking pile are one side that got the change and one that did not.

The sign in front of a bracket

In 7 − 2(x − 3), the minus multiplies both terms: 7 − 2x + 6. The +6 is the one that goes missing.

Dividing by something that could be zero

Cancelling an x from both sides quietly throws away the solution x = 0. Factor instead of cancelling.

Questions

What kinds of equations can it solve?

Linear, quadratic, cubic, fractional, radical, absolute value, exponential, logarithmic and trigonometric equations, and systems of several equations at once.

Can it solve for a different variable?

Yes. Name the one you want, for example "solve for t", and it rearranges the formula for that letter.

What if the equation has no solution?

It says so, and shows why. When the unknown cancels and leaves something false, like 3 = 5, there is no solution; when it leaves something always true, like 0 = 0, every number works.

Does it show working or just the answer?

Working first, answer last, with the rule named on every line. The answer alone is the part you can already get anywhere.