# How do you solve an equation?

Lists every real solution of an equation, exact where possible, each checked.

- Page: https://www.acalculator.org/math/equation-solver
- JSON spec: https://www.acalculator.org/math/equation-solver.json
- Version: 78f745968bba

## Default answer

Example with the default inputs (Equation x^2 - 3x - 5 = 0): Solving x^2 - 3x - 5 = 0 gives x = 3/2 - sqrt(29)/2, x = sqrt(29)/2 + 3/2.

## 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 = x^2 - 3x - 5 = 0 gives solutions = x = 3/2 - sqrt(29)/2, x = sqrt(29)/2 + 3/2, decimals = x ≈ -1.192582404, x ≈ 4.192582404, count = 2. Source: OpenStax College Algebra 2e, 2.5, Ex. 8. https://openstax.org/books/college-algebra-2e/pages/2-5-quadratic-equations.
2. eq = 4x^2 + 15x + 9 = 0 gives solutions = x = -3, x = -3/4, count = 2.

## FAQ

### What kinds of equations can it solve?

Equations in one letter: linear (2x + 7 = 19), quadratic (x² − 3x − 5 = 0), higher-degree polynomials (x³ − 6x² + 11x − 6 = 0), rational equations with the letter in a denominator (3/(x − 6) = 5/x), equations with square roots (√(x + 1) = x − 1), absolute values (|2x − 3| = 5), exponentials (3^(x + 1) = 27) and logarithms (ln(x) + ln(x − 2) = ln(3)). Equations with sin, cos or tan of the letter get no answer, because they usually have infinitely many solutions.

### Why is a solution shown with ≈?

Some equations have solutions with no exact formula the algebra can find, such as x⁵ − x − 1 = 0, or a formula it does not find, such as the three solutions of x³ − 3x + 1 = 0. Such a solution is shown as a decimal to 10 significant figures with ≈ in front. It was still checked: both sides of the equation agree there, and the two sides change sign across it.

### What does "no real solution" mean?

No real number makes the two sides equal. x² + x + 2 = 0 has only complex solutions, (−1 ± i√7)/2, because its discriminant 1 − 8 is negative. This page lists real solutions only. For complex roots of a quadratic, use the quadratic formula calculator.

### Why is a value I found by hand not listed?

It may make a denominator 0 or put a negative number under a square root or a logarithm. Multiplying out fractions or squaring both sides can create such false solutions. In x/(x − 3) = 5/(x − 3) − 1/2, the value 3 makes both denominators 0, so it is excluded; the only solution is 13/3.

### How do I type the equation?

Use one = sign between the two sides, ^ for powers, and brackets where they help: 4(x − 3) + 12 = 15 − 5(x + 6). A number next to a letter multiplies (2x). If you leave out the = sign, the page solves expression = 0. You may use any one lowercase letter as the unknown, such as t or y; e is Euler’s number.

### What does "No verified answer" mean?

Every solution is checked before it is shown. If a solution the algebra gives does not satisfy the equation, if the scan for missed solutions finds a place it cannot confirm, or if the work takes over 3 seconds, the page says "No verified answer" instead of showing a list it could not check.

## Sources

- OpenStax, College Algebra 2e, section 2.5 Quadratic Equations: https://openstax.org/books/college-algebra-2e/pages/2-5-quadratic-equations
- 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
- NIST Digital Library of Mathematical Functions, section 1.11 Zeros of Polynomials: https://dlmf.nist.gov/1.11
