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

5x−3=2x+125x - 3 = 2x + 12
  1. Subtract 2x from both sides
    3x−3=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+x−24=3\frac{x}{3} + \frac{x - 2}{4} = 3
  1. Least common denominator is 12
    12⋅x3+12⋅x−24=12⋅312 \cdot \frac{x}{3} + 12 \cdot \frac{x-2}{4} = 12 \cdot 3
  2. Fractions cleared
    4x+3(x−2)=364x + 3(x - 2) = 36
  3. Expand and collect
    4x+3x−6=36  ⇒  7x=424x + 3x - 6 = 36 \;\Rightarrow\; 7x = 42
  4. Divide by 7
    x=6x = 6
Answer
x=6x = 6

Solve |2x - 5| = 7

∣2x−5∣=7\lvert 2x - 5 \rvert = 7
  1. An absolute value gives two cases
    2x−5=7or2x−5=−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
    AP−1=rt\frac{A}{P} - 1 = rt
  3. Divide by t
    r=AP−1t=A−PPtr = \frac{\frac{A}{P} - 1}{t} = \frac{A - P}{Pt}
Answer
r=A−PPtr = \dfrac{A - P}{Pt}

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

Solved problems

Asked here and worked through in full. Open one for every step.

  1. Solve 7x - 12 = 51
    Answer x=9x = 9
  2. Solve for x: 3(2x - 5) + 4 = 7x - 11
    Answer x=0x = 0
  3. Solve 3x - 7 = 11
    Answer x=6x = 6
  4. Power[ⅇ,9x]=Sin[x+3y] find Divide[dy,dx]
    Answer dydx=3e9xcos⁡(x+3y)−13\frac{dy}{dx} = \frac{3e^{9x}}{\cos(x + 3y)} - \frac{1}{3}

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

How do I solve an equation?

Keep both sides balanced: whatever you do to one side, do to the other, until the unknown stands alone. Undo addition with subtraction, and multiplication with division.

What is an equation?

A statement that two expressions are equal, joined by an equals sign. Solving it means finding every value of the unknown that makes the statement true.

How do I solve an equation with the variable on both sides?

Move all the variable terms to one side and all the numbers to the other. 6x − 11 = 7x − 11 becomes −x = 0, so x = 0.

How do I solve an equation with absolute value?

An absolute value equals a positive number in two ways, so split it. |2x − 5| = 9 gives 2x − 5 = 9 or 2x − 5 = −9, so x = 7 or x = −2. Always check both against the original.

How do I solve linear equations?

Clear brackets, clear fractions, gather the variable on one side, then divide by its coefficient. Every linear equation has one solution, no solution, or infinitely many.

How do I solve an equation with fractions?

Multiply through by the lowest common denominator so the fractions disappear, then solve the equation that is left. Remember to check for values that would have made a denominator zero.

What does no solution mean?

The variables cancelled and left something false, like 3 = 5, so no number can satisfy the equation. If they cancel and leave something true, like 4 = 4, every number works.

Can it solve equations with two variables?

A single equation in two variables has a line of solutions rather than one. Give it a second equation and it solves the pair together as a system.