Equation Solver

Solve any equation for x, or a system of linear equations, with each step explained.

Answer

Quadratic equation
x1=−1,x2=2x_{1} = -1,\quad x_{2} = 2

Checked numerically before it is shown

Step-by-step solution

Solve by

Factoring

  1. Two numbers

    Find two numbers whose product is −2-2 and whose sum is −1-1:

    1⋅(−2)=−2,1+(−2)=−11 \cdot \left(-2\right) = -2,\quad 1 + \left(-2\right) = -1
  2. Factor

    (x−2)(x+1)=0\left(x - 2\right) \left(x + 1\right) = 0
  3. Zero product property

    A product is zero when one of its factors is zero:

    x−2=0,x+1=0x - 2 = 0,\quad x + 1 = 0
  4. Add to both sides

    Add 22 to both sides:

    x=2x = 2
  5. Subtract from both sides

    Subtract 11 from both sides:

    x=−1x = -1

Check

  • (−1)2−(−1)−2=0  ✓\left(-1\right)^{2} - \left(-1\right) - 2 = 0\;\checkmark
  • 22−2−2=0  ✓2^{2} - 2 - 2 = 0\;\checkmark

Try an example

Solved examples

About this solver

How to use

  1. Type the equation with an equals sign, for example 2x^2+7x+3=0.
  2. For a system, separate the equations with a comma: 2x+y=5, x-y=1.
  3. Press Solve. Solutions that do not satisfy the original equation are listed as rejected.

How to type math

To enterType
Powerx^2 x^(n+1)
Rootsqrt(x) \sqrt[3]{x}
Fraction(x+1)/(x-1) \frac{1}{x}
Functionssin(x) ln(x) log_2(x) exp(x)
Absolute value|x| abs(x)
Derivatived/dx x^2 sin x (x^2+x)'
Integral\int x^2 dx \int_0^1 x^2 dx
Limitlim x->0 sin(x)/x \lim_{x\to\infty} 1/x
Degreessin(30°)
System of equations2x+y=5, x-y=1

How it works

Linear and quadratic equations are solved by moving terms and by the quadratic formula with the discriminant.

Equations with fractions, roots, logarithms or absolute values are reduced to simpler ones. Every candidate is substituted into the original equation, and candidates outside the domain are rejected.

For systems, separate the equations with a comma, for example 2x+y=5, x-y=1.

Frequently asked questions

Does it give complex solutions?

Yes, for polynomial equations. Equations with roots, logarithms or absolute values are solved over the real numbers.

Why is a solution rejected?

Squaring both sides or clearing fractions can add values that do not satisfy the original equation. They are checked and rejected.

Can it solve systems of equations?

Yes, linear systems with two or three unknowns. Separate the equations with commas.

What if the equation has no solution?

The answer says so, and the steps show why.