# How do you solve for x?

Finds every real x that makes an equation true, and checks each one.

- Page: https://www.acalculator.org/math/solve-for-x-calculator
- JSON spec: https://www.acalculator.org/math/solve-for-x-calculator.json
- Version: a3ab6bec4866

## Default answer

Example with the default inputs (Equation 2x + 7 = 19): Solving 2x + 7 = 19 gives x = 6.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| eq | Equation | The equation, in one letter. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| solutions | Solutions | Every real solution. |
| decimals | As decimals | Each solution as a decimal. |
| count | Number of real solutions | How many there are. |

## Method

A computer algebra system; each root is checked, and a numeric scan finds any missed.

## Assumptions

- Only real solutions; no answer for sin, cos or tan of the variable.

## Worked examples

1. eq = 2x + 7 = 19 gives solutions = x = 6, count = 1. Source: OpenStax College Algebra 2e, 2.2, Ex. 1. https://openstax.org/books/college-algebra-2e/pages/2-2-linear-equations-in-one-variable.
2. eq = 7/(2x) - 5/(3x) = 22/3 gives solutions = x = 1/4, decimals = x ≈ 0.25, count = 1.

## FAQ

### What does it mean to solve for x?

To find every number that makes the equation true when it takes the place of x. For 2x + 7 = 19, only x = 6 works: 2 × 6 + 7 = 19. An equation can have one solution, several (x² + x − 6 = 0 has x = −3 and x = 2), none, or, for an identity such as 2(x + 1) = 2x + 2, every number; for that last kind the page says the solutions fill an interval.

### How do I isolate x by hand?

Undo each operation on x in reverse order, doing the same to both sides. For 2x + 7 = 19, subtract 7 from both sides (2x = 12), then divide both sides by 2 (x = 6). For an equation with x in several places, first collect the x terms on one side and the numbers on the other.

### What if x is in a denominator?

Multiply both sides by the denominators to clear them, solve, and then check that no solution makes a denominator 0. For 7/(2x) − 5/(3x) = 22/3, multiplying by 6x gives 21 − 10 = 44x, so x = 1/4. The page does the same, and drops any value that makes a denominator 0.

### What if the equation has x squared?

A quadratic equation can have two real solutions, one, or none. The page lists the real ones in increasing order: x² + x − 6 = 0 gives x = −3, x = 2. When the solutions involve a square root, it shows them exactly and as decimals.

### Can I solve for a different letter?

Yes. Type the equation in any one lowercase letter, such as 5y − 3 = 12, and the page solves for y. An equation with two different letters, such as x + y = 10, has no single answer and gives none here. The letter e is Euler’s number, not an unknown.

### Why does the page say "No verified answer"?

Each value of x is tested before it is shown. If a value fails the test, if the scan finds a possible solution it cannot confirm, or if the work takes over 3 seconds, the page says "No verified answer" instead.

## Sources

- OpenStax, College Algebra 2e, section 2.2 Linear Equations in One Variable: https://openstax.org/books/college-algebra-2e/pages/2-2-linear-equations-in-one-variable
- OpenStax, College Algebra 2e, section 2.5 Quadratic Equations: https://openstax.org/books/college-algebra-2e/pages/2-5-quadratic-equations
