Equation Solver
Solve for x and see how. Exact answers where they exist — including surds like (3 ± √5)/2 — and an honest numeric answer where they do not, with every solution marked on the curve.
Solved by the quadratic formula
Two real solutions: 2 and 3.
- x = 2
- x = 3
Solved as a degree 2 polynomial: x² − 5x + 6 = 0
How it was solved
- Move everything to one sideSubtract the right-hand side from both sides so the equation reads "something = 0". Every method below needs that form.
x² − 5x + 6 = 0 - Identify the coefficientsIn ax² + bx + c = 0 form: a = 1, b = -5, c = 6.
- Compute the discriminantb² − 4ac decides how many real solutions there are before any are found.
Δ = (-5)² − 4(1)(6) = 1 - Apply the quadratic formulaThe discriminant is a perfect square, so the roots are rational and the equation factors over the rationals.
x = 2, x = 3
How it decides what to do
There is no method dropdown, because choosing the method requires already knowing the answer to the question you came to ask. The solver looks at what you typed and takes the strongest approach that fits it.
| What you typed | What it does | How exact the answer is |
|---|---|---|
| Linear, like 2x + 6 = 0 | Isolates the variable | Exact, as a fraction |
| Quadratic, like x² − 3x + 1 = 0 | Discriminant, then the quadratic formula | Exact, as a rational or a surd |
| Cubic or higher | Rational root theorem, then the quadratic formula on what is left | Exact where the roots are rational or quadratic |
| A polynomial with an irreducible factor of degree 3+ | Numeric root-finding on the remaining factor | Nine figures, labelled approximate |
| Anything else, like sin x = x/2 | Scans for sign changes and bisects each one | Nine figures, within the window searched |
Why the answer is a surd
The single biggest difference between this and a pocket calculator is what it does with an irrational root. The roots of x² − 3x + 1 = 0 are exactly
x = (3 − √5)/2 and x = (3 + √5)/2
A calculator gives 0.381966 and 2.618034, which are those numbers rounded to six places. They are not the answer; they are a photograph of it. If the question asks you to solve the equation, the surd is what goes on the page, and a decimal loses marks.
Getting there requires exact integer arithmetic. The discriminant is computed as a fraction, the radical is reduced — √72 becomes 6√2 — and the whole expression is put in lowest terms, so (2 + 2√5)/4 comes out as (1 + √5)/2 rather than being left in a form no textbook would write.
The discriminant, and what it decides
For ax² + bx + c = 0, the discriminant is b² − 4ac, and it settles the shape of the answer before you find it:
- Positive and a perfect square — two rational roots, and the quadratic factors neatly over the whole numbers. If you were asked to factorise and could not, this is why.
- Positive but not a perfect square — two irrational roots, written as surds. The quadratic does not factorise over the rationals.
- Zero — one repeated root. The parabola touches the axis rather than crossing it, which is why the two solutions coincide.
- Negative — no real solution. The curve never reaches the axis. The two solutions are complex conjugates, and this tool gives them rather than stopping at “no solution”.
Cubics and above
There is a formula for the cubic and one for the quartic, both too unwieldy to be useful, and for degree five and higher there is provably no formula at all in terms of radicals. That is the Abel–Ruffini theorem, and it is a fact about mathematics rather than a shortcoming of any particular tool.
What is worth doing instead is finding the rational roots exactly, which the rational root theorem makes possible: any rational root p/q of a polynomial with whole-number coefficients has p dividing the constant term and q dividing the leading coefficient, so there is a finite list of candidates to test. Nearly every exercise is built to have small whole number roots, so this finds them all.
Each root found is divided out, and whatever is left is handled by the quadratic formula if it has dropped to degree two, or numerically if it has not. The result says which happened, so you always know whether the number in front of you is exact.
Four mistakes this will catch
- A sign error in the discriminant. b² − 4ac, with b squared first. If b is negative, squaring it makes it positive — −3 squared is 9, not −9, and that slip changes the whole answer.
- Losing a root by dividing through. Dividing x² = 4x by x gives x = 4 and quietly discards x = 0. Move everything to one side and factor instead; the solver always does.
- Calling a repeated root two roots. A zero discriminant gives one solution, not two identical ones written twice.
- Assuming no real solution means no solution. A negative discriminant gives two complex solutions, and in many courses those are the expected answer.
What it does not do
- More than one unknown — use the matrix calculator for systems.
- Inequalities. It solves equations only.
- Symbolic answers in terms of other letters, such as solving ax + b = 0 for x in terms of a and b.
- Complex roots of anything beyond a quadratic.
- Roots of a non-polynomial outside the window searched, which is stated on every such result.
Questions
Why is my answer written as (3 ± √5)/2 instead of a decimal?
Because that is the exact answer, and the decimal is not. The roots of x² − 3x + 1 really are (3 ± √5)/2; 2.618034 and 0.381966 are those values rounded. Any course that sets a quadratic with a non-square discriminant is asking for the surd form, and a marker will want to see it. The decimal is shown underneath so you have both.
What does the discriminant tell me before I solve anything?
Everything about how many real solutions there are. b² − 4ac positive means two, zero means one repeated root where the parabola touches the axis, and negative means none — the curve never reaches the axis, and the two solutions are complex. It is worth computing first, because it tells you what kind of answer to expect and catches an arithmetic slip early.
Why does it sometimes say "found by searching" rather than giving an exact answer?
Because no exact answer exists in a form worth writing. There is no general formula for a polynomial of degree five or higher — that is a theorem, not a limitation of this tool — and equations mixing different kinds of function, like sin x = x/2, usually have no closed form at all. In those cases the solver scans for sign changes and narrows each one down by bisection, and labels the result as approximate so you know which kind of answer you are holding.
It found no solution — does that mean there is none?
Not always, and the tool is careful about the difference. For a polynomial, the search is exhaustive and no solution means no real solution. For anything else, only the window shown was searched, so a root outside it will not appear — widen the range and look again. A root where the curve touches the axis without crossing it produces no sign change and can also be missed; that is a genuine limitation of searching, and it is stated on the result.
Can it solve for two unknowns at once?
No — it solves one equation in one unknown. For a system of linear equations in several unknowns, use the matrix calculator, which solves Ax = b and gives the complete solution set including the infinite families.
Does it handle fractions in the equation?
Yes, and exactly. x/3 + 1/2 = 0 keeps its thirds and halves right through to the answer rather than becoming 0.3333333333333333 somewhere in the middle. Decimals you type are read as exact fractions too, so 0.25x is a quarter of x.
Related
-
Graphing calculator
Plot functions and equations, find roots and intersections, export for printing.
-
Matrix calculator
Systems of equations in several unknowns, with the complete solution set.
-
Derivative calculator
Derivatives with the working shown, integrals, turning points and limits.
-
Systems of equations
Reading intersections exactly, and recognising no-solution and infinite-solution systems.