Quadratic Equation Solver

Result
x = \frac{-3 \pm \sqrt{41}}{4}

2 real solutions.

  • Type: Quadratic equation
  • Method: Completing the square
  • Decimal: \displaystyle x \approx -2.3508, \displaystyle x \approx 0.8508
  • Solve it another way: by the quadratic formula

Step-by-step solution

The problem

2x^{2} + 3x - 4 = 0
1

Divide every term by \displaystyle 2

x^{2} + \frac{3}{2}x - 2 = 0
2

Add \displaystyle 2 to both sides

\begin{aligned} x^{2} + \frac{3}{2}x - 2\textcolor{#0b5c56}{ + 2} &= 0\textcolor{#0b5c56}{ + 2} \\[4pt] x^{2} + \frac{3}{2}x &= 2 \end{aligned}
3

Add \displaystyle \frac{3}{4}^2 = \frac{9}{16} to both sides

\begin{aligned} x^{2} + \frac{3}{2}x\textcolor{#0b5c56}{ + \frac{9}{16}} &= 2\textcolor{#0b5c56}{ + \frac{9}{16}} \\[4pt] x^{2} + \frac{3}{2}x + \frac{9}{16} &= \frac{41}{16} \\[4pt] \left(x + \frac{3}{4}\right)^{2} &= \frac{41}{16} \end{aligned}
4

Take the square root of both sides

\begin{aligned} x + \frac{3}{4} &= \pm\sqrt{\frac{41}{16}} \\[4pt] x + \frac{3}{4} &= \pm \frac{\sqrt{41}}{4} \end{aligned}

Both a positive and a negative number square to \displaystyle \frac{41}{16}, so write \displaystyle \pm. Simplify: \displaystyle \sqrt{\frac{41}{16}} = \frac{\sqrt{41}}{4} (multiply top and bottom so no root is left in the denominator).

5

Subtract \displaystyle \frac{3}{4} from both sides

\begin{aligned} x &= -\frac{3}{4} \pm \frac{\sqrt{41}}{4} \\[4pt] x &= \frac{-3 \pm \sqrt{41}}{4} \end{aligned}

Graph

  • \displaystyle y = 2x^{2} + 3x - 4

The graph of the left side. The solutions are where it meets the x-axis.

Crosses the x-axis at
x = −2.351, 0.851
Crosses the y-axis at
(0, −4)
Lowest point (vertex)
(−3/4, −41/8)
Axis of symmetry
x = −3/4
Opens
upwards (a U shape)
−4−3−2−1123−101020x = (−3 − √41)/4x = (−3 + √41)/4

Type a quadratic like 2x^2 + 3x - 4 = 0 – or add by factoring, by quadratic formula or by completing the square to choose the method.

Type a quadratic and it is solved the way a teacher would choose – factoring when the numbers allow (x² − 5x + 6 = (x − 2)(x − 3)), otherwise the quadratic formula or completing the square. 2x² + 3x − 4 = 0 shows the discriminant, exact and decimal roots, complex roots when it is negative, and a graph with the vertex marked.

The quadratic formula

For ax^2 + bx + c = 0 with a \ne 0:

x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

The number under the root, the discriminant D = b^2 - 4ac, tells you what kind of answers to expect:

DiscriminantSolutionsExample
D > 0, a perfect squareTwo rational solutions – it factorsx^2 - 5x + 6 = 0: D = 1
D > 0, not a squareTwo irrational solutions with a square rootx^2 - 6x + 4 = 0: D = 20
D = 0One repeated solutionx^2 + 6x + 9 = 0
D < 0No real solutions (two complex ones)x^2 + 2x + 5 = 0: D = -16

Example: 2x^2 + 3x - 4 = 0, so a = 2, b = 3, c = −4.

D = 3^2 - 4 \cdot 2 \cdot (-4) = 9 + 32 = 41,\qquad x = \frac{-3 \pm \sqrt{41}}{4} \approx 0.851 \text{ or } -2.351

41 isn’t a perfect square, so this one can’t be factored with whole numbers – the formula is the way. Open it in the solver, which also draws the parabola and marks both crossings and the vertex.

Which method is best?

  • Square-root method – when there is no x-term (3x^2 - 27 = 0) or the equation is already a square ((x - 3)^2 = 16).
  • Factor out x – when there is no constant term (x^2 = 5x). Never divide by x: that loses the solution x = 0.
  • Factoring – when the discriminant is a perfect square. With a = 1, find two numbers that multiply to c and add to b; otherwise use the AC method (split the middle term and group).
  • Quadratic formula – always works; the best choice when the answers involve square roots.
  • Completing the square – always works too, and shows where the formula comes from; it also gives the vertex form a(x - h)^2 + k.

Completing the square, briefly

Solve x^2 - 6x + 4 = 0

\begin{aligned} x^2 - 6x &= -4 \\ x^2 - 6x + 9 &= -4 + 9 && \text{half of } -6 \text{ is } -3,\ (-3)^2 = 9 \\ (x - 3)^2 &= 5 \\ x - 3 &= \pm\sqrt{5} \\ x &= 3 \pm \sqrt{5} \end{aligned}

A quick check: sum and product of the roots

For ax^2 + bx + c = 0 the two solutions always add up to -\tfrac{b}{a} and multiply to \tfrac{c}{a}. For 2x² + 3x − 4 = 0 they must add to −3/2 and multiply to −2 – and indeed 0.851 + (−2.351) = −1.5 and 0.851 × (−2.351) ≈ −2. It’s a fast way to catch a sign slip, and it works in reverse: two numbers that add to 5 and multiply to 6 are the roots of x² − 5x + 6 = 0.

Quadratics in word problems

  • Area: a rectangle is 3 m longer than it is wide and has an area of 40 m². With width w, w(w + 3) = 40, so w² + 3w − 40 = 0 gives w = 5 or w = −8. A width can’t be negative, so the room is 5 m by 8 m.
  • Things thrown upwards: a ball’s height is h = 20t − 5t² metres after t seconds. It is 15 m up when 20t − 5t² = 15: t = 1 s on the way up and t = 3 s on the way down. The highest point is halfway between, at t = 2 s.
  • Profit: when price changes affect how many you sell, revenue is often a quadratic in the price – its vertex gives the price that earns the most.

Always check answers against the story – a length, a time or a number of people can’t be negative, so one of the two solutions is often rejected.

To factor a quadratic expression without solving it, use the factoring calculator.

Frequently asked questions

How do I know if a quadratic can be factored?

With whole numbers, exactly when the discriminant b² − 4ac is a perfect square (0, 1, 4, 9, 16 …).

Can a quadratic have no solution?

It always has two solutions counting complex numbers, but when b² − 4ac is negative there is no real solution – the parabola does not cross the x-axis.

Why not divide both sides by x?

Because x might be 0. Dividing x² = 5x by x gives only x = 5 and loses x = 0. Factor instead: x(x − 5) = 0.