Quadratic Equations

What is a quadratic equation?

A quadratic equation is any equation of the form

ax2+bx+c=0ax^2 + bx + c = 0

where:

  • xx represents a variable or an unknown
  • aa, bb, and cc are constants
  • a≠0a \neq 0

Here are some examples:

  • x2+2x+8=0x^2 + 2x + 8 = 0
  • 4x2−6x+9=04x^2 - 6x + 9 = 0
  • x2−25x=0x^2 - 25x = 0
  • 9x2+81=09x^2 + 81 = 0

9x+5=09x + 5 = 0 is not a quadratic equation since the x2x^2term is missing: it's a linear equation.

A few more points to remember:

  • A quadratic equation involves only one unknown (xx in this case).
  • A quadratic equation only contains powers of xx that are non-negative.
  • The solutions to the equation are the values of xx that make it equal 0. These are called the roots of the equation.

Solving by factoring

When a quadratic factors neatly, splitting the middle term is often faster than completing the square. Solve 2x2+7x+52=0\sqrt{2}x^2 + 7x + 5\sqrt{2} = 0.

Multiply the outer coefficients: 2×52=10\sqrt{2} \times 5\sqrt{2} = 10. Find two numbers that multiply to 10 and add to 7: that's 5 and 2. Split the middle term using them, then factor by grouping:

2x2+5x+2x+52=0\sqrt{2}x^2 + 5x + 2x + 5\sqrt{2} = 0x(2x+5)+2(2x+5)=0x(\sqrt{2}x + 5) + \sqrt{2}(\sqrt{2}x + 5) = 0(2x+5)(x+2)=0(\sqrt{2}x + 5)(x + \sqrt{2}) = 0

Each factor set to zero gives a root: x=−52x = -\dfrac{5}{\sqrt{2}} or x=−2x = -\sqrt{2}.

Solving by completing the square

A quadratic equation with real or complex coefficients has two roots. These two roots may or may not be distinct, and they may or may not be real. One way to find them is a method called completing the square, starting from the standard form ax2+bx+c=0ax^2 + bx + c = 0:

  1. Divide each side by aa: x2+bxa+ca=0x^2 + \dfrac{bx}{a} + \dfrac{c}{a} = 0
  2. Subtract the constant ca\dfrac{c}{a} from both sides: x2+bxa=−cax^2 + \dfrac{bx}{a} = -\dfrac{c}{a}
  3. Add the square of one-half of ba\dfrac{b}{a}, the coefficient of xx, to both sides: x2+bxa+b24a2=−ca+b24a2x^2 + \dfrac{bx}{a} + \dfrac{b^2}{4a^2} = -\dfrac{c}{a} + \dfrac{b^2}{4a^2}
  4. Rewrite the left side as a square and simplify the right side: (x+b2a)2=b2−4ac4a2\left(x + \dfrac{b}{2a}\right)^2 = \dfrac{b^2 - 4ac}{4a^2}
  5. Take the square root of both sides: x+b2a=±b2−4ac2ax + \dfrac{b}{2a} = \pm\dfrac{\sqrt{b^2 - 4ac}}{2a}, so x=±b2−4ac2a−b2ax = \pm\dfrac{\sqrt{b^2 - 4ac}}{2a} - \dfrac{b}{2a}

This leads to the quadratic formula:

x=−b±b2−4ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}

The ±\pm means both −b+b2−4ac2a\dfrac{-b + \sqrt{b^2 - 4ac}}{2a} and −b−b2−4ac2a\dfrac{-b - \sqrt{b^2 - 4ac}}{2a} are roots of the equation.

Worked example

Let's solve 4x2−12x+3=04x^2 - 12x + 3 = 0 using this method.

  1. Divide each side by 4: x2−3x+34=0x^2 - 3x + \dfrac{3}{4} = 0
  2. Subtract 34\dfrac{3}{4} from both sides: x2−3x=−34x^2 - 3x = -\dfrac{3}{4}
  3. Add the square of one-half of 3 (the coefficient of xx) to both sides: x2−3x+94=−34+94x^2 - 3x + \dfrac{9}{4} = -\dfrac{3}{4} + \dfrac{9}{4}
  4. Rewrite the left side as a square: (x−32)2=64\left(x - \dfrac{3}{2}\right)^2 = \dfrac{6}{4}
  5. Take the square root of both sides: x−32=±62x - \dfrac{3}{2} = \pm\dfrac{\sqrt{6}}{2}, so x=3±62≈2.72 or 0.28x = \dfrac{3 \pm \sqrt{6}}{2} \approx 2.72 \text{ or } 0.28

The shape of the graph

The graph of a quadratic equation is a curve called a parabola. When aa is positive, the parabola opens upward; when aa is negative, it opens downward. As ∣a∣|a| increases, the parabola gets narrower. (If a=0a = 0, it's no longer a quadratic equation at all.) Changing bbshifts the vertex left or right of the y-axis without changing the parabola's shape, and changing cc shifts the whole graph up or down.

Quadratic equations in real life

Quadratic equations show up whenever a quantity depends on the square of another, such as finding the speed of a moving object, a product's profit, or an area. Here's one example: finding the speed of a boat that travels up and down a river.

A river flows at 2 km/hour. A boat travels 20 km upstream against the current and then back, and the round trip takes 4 hours. Let xxbe the boat's speed in still water.

Going upstream, the boat's speed relative to the ground is x−2x - 2 (the current slows it down); going downstream it's x+2x + 2 (the current helps it along). Since time=distancespeed\text{time} = \dfrac{\text{distance}}{\text{speed}} and the total time is 4 hours:

4=20x−2+20x+24 = \dfrac{20}{x-2} + \dfrac{20}{x+2}

Expanding this algebraically gives x2−10x−4=0x^2 - 10x - 4 = 0. Solving with the quadratic formula gives two values: x≈10.38x \approx 10.38 and x≈−0.38x \approx -0.38. The negative value has no physical meaning here, so the boat's speed in still water is about 10.38 km/hour.

Quadratic Equations: Solved Examples

These work through the main question types one at a time: checking whether an equation is quadratic, setting one up from a word problem, solving it, and reading the nature of its roots.

Is it actually quadratic?

An equation is quadratic only once it's simplified: expand both sides fully and collect like terms first, then check the degree. Two examples with different outcomes:

(x+1)2=2(x−3)(x+1)^2 = 2(x-3) expands to x2+2x+1=2x−6x^2+2x+1=2x-6, which simplifies to x2+7=0x^2 + 7 = 0, degree 2, so this is a quadratic equation.

(x−2)(x+1)=(x−1)(x+3)(x-2)(x+1) = (x-1)(x+3) expands to x2−x−2=x2+2x−3x^2 - x - 2 = x^2 + 2x - 3, and the x2x^2 terms cancel, leaving −3x+1=0-3x + 1 = 0, only degree 1, so this is not a quadratic equation, despite looking like one before expanding.

Turning a word problem into a quadratic equation

The product of two consecutive positive integers is 306. Represent this as a quadratic equation.

Solution: Let the first integer be xx, so the next consecutive integer is x+1x+1. Their product is 306:

x(x+1)=306  ⇒  x2+x−306=0x(x+1) = 306 \;\Rightarrow\; x^2 + x - 306 = 0

Solving by factorization

Solve 2x2+x−6=02x^2 + x - 6 = 0.

Solution: Split the middle term into two parts whose product matches 2×(−6)=−122 \times (-6) = -12 and whose sum is 11: that's 44 and −3-3.

2x2+4x−3x−6=0  ⇒  2x(x+2)−3(x+2)=0  ⇒  (x+2)(2x−3)=02x^2 + 4x - 3x - 6 = 0 \;\Rightarrow\; 2x(x+2) - 3(x+2) = 0 \;\Rightarrow\; (x+2)(2x-3) = 0

So x=−2x = -2 or x=32x = \dfrac{3}{2}.

A word problem solved end to end

The altitude of a right triangle is 7 cm less than its base. If the hypotenuse is 13 cm, find the other two sides.

Solution: Let the base be xx cm, so the altitude is x−7x - 7 cm. By the Pythagorean theorem:

132=x2+(x−7)2  ⇒  169=2x2−14x+49  ⇒  x2−7x−60=013^2 = x^2 + (x-7)^2 \;\Rightarrow\; 169 = 2x^2 - 14x + 49 \;\Rightarrow\; x^2 - 7x - 60 = 0x2−12x+5x−60=0  ⇒  (x−12)(x+5)=0  ⇒  x=12 or x=−5x^2 - 12x + 5x - 60 = 0 \;\Rightarrow\; (x-12)(x+5) = 0 \;\Rightarrow\; x = 12 \text{ or } x = -5

A side length can't be negative, so x=12x = 12: the base is 12 cm and the altitude is 12−7=512 - 7 = 5 cm, a 5-12-13 right triangle, and 52+122=1325^2 + 12^2 = 13^2 checks out.

Solving by completing the square

Solve 2x2−7x+3=02x^2 - 7x + 3 = 0 by completing the square.

Solution: Divide by 2, then move the constant to the right:

x2−72x=−32x^2 - \dfrac{7}{2}x = -\dfrac{3}{2}

Add (74)2=4916\left(\dfrac{7}{4}\right)^2 = \dfrac{49}{16} to both sides to complete the square on the left:

(x−74)2=−24+4916=2516  ⇒  x−74=±54\left(x-\dfrac{7}{4}\right)^2 = \dfrac{-24+49}{16} = \dfrac{25}{16} \;\Rightarrow\; x - \dfrac{7}{4} = \pm\dfrac{5}{4}

So x=124=3x = \dfrac{12}{4} = 3 or x=24=12x = \dfrac{2}{4} = \dfrac{1}{2}.

The nature of the roots

The discriminant b2−4acb^2-4ac tells you what kind of roots to expect before you even solve: positive means two distinct real roots, zero means one repeated real root, and negative means no real roots at all.

For what value(s) of kk does 2x2+kx+3=02x^2+kx+3=0 have two equal roots?

Solution: Equal roots require b2−4ac=0b^2-4ac=0:

k2−4(2)(3)=0  ⇒  k2=24  ⇒  k=±26k^2 - 4(2)(3) = 0 \;\Rightarrow\; k^2 = 24 \;\Rightarrow\; k = \pm 2\sqrt{6}

Continue learning

Quadratic equations lean heavily on recognizing squares quickly, so a fast reference for them speeds up both solving and double-checking your roots.