Equation Solver

Result
x = 1

One real solution (after rejecting the extraneous answer).

  • Type: Absolute value equation
  • Method: Split into two cases
  • Rejected: \displaystyle x = -3 (extraneous)

Step-by-step solution

The problem

\left|x - 3\right| = 2x
1

Split into two cases

x - 3 = 2x \quad\text{or}\quad x - 3 = -2x

If \displaystyle |E| = B then \displaystyle E = B or \displaystyle E = -B – the inside is \displaystyle 2x or its opposite. Because the right side contains \displaystyle x, each answer must be checked.

2

Case 1: \displaystyle x - 3 = 2x

3

Subtract \displaystyle x from both sides

\begin{aligned} x - 3\textcolor{#0b5c56}{ - x} &= 2x\textcolor{#0b5c56}{ - x} \\[4pt] \left(x - x\right) - 3 &= 2x - x \\[4pt] -3 &= x \end{aligned}
4

Write it with \displaystyle x first

x = -3
5

Case 2: \displaystyle x - 3 = -2x

6

Add \displaystyle 2x to both sides

\begin{aligned} x - 3\textcolor{#0b5c56}{ + 2x} &= -2x\textcolor{#0b5c56}{ + 2x} \\[4pt] \left(x + 2x\right) - 3 &= -2x + 2x \\[4pt] 3x - 3 &= 0 \end{aligned}
7

Add \displaystyle 3 to both sides

\begin{aligned} 3x - 3\textcolor{#0b5c56}{ + 3} &= 0\textcolor{#0b5c56}{ + 3} \\[4pt] 3x + \left(-3 + 3\right) &= 3 \\[4pt] 3x &= 3 \end{aligned}
8

Divide both sides by \displaystyle 3

\frac{3x}{\textcolor{#0b5c56}{3}} = \frac{3}{\textcolor{#0b5c56}{3}}
x = \frac{3}{3} = 1
9

Check the answers and reject the extraneous one

\text{For } x = -3\text{:}\text{Left: } \left|-3 - 3\right| = \left|-6\right| = 6\text{Right: } 2 \cdot \left(-3\right) = -6 \;\times\ \text{reject}\text{For } x = 1\text{:}\text{Left: } \left|1 - 3\right| = \left|-2\right| = 2\text{Right: } 2 \cdot 1 = 2 \;\checkmark

The right side contains the variable, so an answer only counts if it makes the original equation true. \displaystyle x = -3 does not work, so it is extraneous.

Graph

  • \displaystyle y = \left|x - 3\right|
  • \displaystyle y = 2x

Each side of the equation as a graph. The solutions are the \displaystyle x-values where the graphs meet. An open circle marks a rejected (extraneous) answer.

Where they meet
x = 1
Where they meet
x = −3 rejected
−5−4−3−2−1123−1010x = 1x = −3 rejected

Type one equation in x (or any letter) – like 3(x - 2) + 4 = 2x - 5. Add solve for y: to pick the letter. Use ^ for powers.

Type an equation and the solver will solve for x – or any letter you name – and shows each step, a check and a graph. 3x + 7 = 22 gives x = 5. It picks the method a teacher would: balancing for linear equations; factoring, the formula or completing the square for quadratics; checks for extraneous roots with radicals and fractions; and rearranging for formulas like “solve A = πr^2 for r”.

The method for each type of equation

EquationExampleMethod
Linear2x + 3 = 5x - 9Expand, collect x-terms on one side, numbers on the other, divide
With fractions(x+3)/2 - x/3 = 4Multiply every term by the LCD first
Quadraticx^2 - 5x + 6 = 0Square root, factoring or the quadratic formula
Polynomialx^3 - 6x^2 + 11x = 6Factor (grouping, rational roots), then each factor = 0
Rationalx/(x-1) + 2/x = 1Restrictions, cross-multiply or multiply by the LCD, reject extraneous answers
Radicalsqrt(x+3) = x - 3Isolate the root, square both sides, check every answer
Absolute value|2x - 1| = 5Isolate, then split into E = B or E = −B
Exponential2^(x+1) = 8Same base → equal exponents; otherwise take logarithms
Logarithmiclog2(x) + log2(x-2) = 3Combine logs, rewrite as a power, check the domain
FormulaA = pi r^2 for rIsolate the chosen letter

The golden rule

An equation is a balance: whatever you do to one side you must do to the other. Adding, subtracting, multiplying or dividing both sides by the same (non-zero) number keeps the solutions the same. Two operations need care, and the solver always flags them:

  • Multiplying by an expression with the variable (to clear a fraction) can add a solution that makes a denominator zero.
  • Squaring both sides (to remove a root) can add a solution where the original sides had opposite signs.

That is why every answer is put back into the original equation at the end.

For a quadratic you want to practise in a particular way, use the quadratic equation solver; for two or more equations at once, the system of equations calculator.

Frequently asked questions

How do you solve an equation with fractions?

Multiply every term on both sides by the lowest common denominator. The fractions cancel and you are left with an equation without fractions.

What is an extraneous solution?

A value that comes out of the algebra but does not satisfy the original equation – typically after squaring both sides or multiplying by an expression containing x. Always check your answers in the original equation.

What if the variable cancels out?

If you are left with a true statement such as 4 = 4, every number is a solution (an identity). If you get a false statement such as 0 = 5, there is no solution.

Can it solve equations that need logarithms?

Yes. 5^x = 12 is solved by taking logarithms: x = ln 12 / ln 5 ≈ 1.544. When both sides are powers of the same number, like 2^(x+1) = 8, the exponents are set equal instead.

What about equations like 2^x = x + 3?

No algebraic method isolates x when it appears both in an exponent and outside it. The solver finds the solutions numerically and says so.