Weeks
Mathematics 1Week 3 · Quadratic Functions and Equations
Week 3 Notes

Mathematics for
Data Science 1

Quadratic functions: the parabola, vertex and axis of symmetry, minima and maxima, slope, and solving quadratic equations three ways.

9 chapters~22 min read
Parabola and vertexMinima and maximaSlopeQuadratic formula

Chapters

  1. 01Quadratic FunctionsThe quadratic function
  2. 02Axis of Symmetry and VertexThe parabola
  3. 03Types of Parabola: Minima and MaximaThe parabola
  4. 04Slope of a Quadratic FunctionThe parabola
  5. 05Quadratic Equations and RootsQuadratic equations
  6. 06Solving by FactoringQuadratic equations
  7. 07Solving by Completing the SquareQuadratic equations
  8. 08Solving by the Quadratic FormulaQuadratic equations
  9. 09Week 3 Summary SheetAll topics
01
The quadratic function

Quadratic Functions

Definition: quadratic functionA quadratic function is a function of the form
f(x)=ax2+bx+cwhere a≠0f(x) = ax^2 + bx + c \qquad \text{where } a \neq 0
a
  • Coefficient of x2x^2. Must not be zero.
b
  • Coefficient of xx. May be any number, including 0.
c
  • Constant term. May be any number, including 0.
Why a cannot be 0If a=0a = 0 the term ax2ax^2 disappears and f(x)=bx+cf(x) = bx + c, which is a straight line of Week 2, not a quadratic. The curve representing any quadratic function is always a parabola.
-8-6-4-20246-30-20-10010axis of symmetry x = −1vertex (−1, −25)(0, −24)x = −6x = 4xy
Figure 1. A parabola: the graph of f(x) = x² + 2x − 24, with its axis of symmetry, vertex and intercepts (all explained in this week's notes)

1.1Reading a, b and c

Example 1: identify a, b and c

Write each function in the form ax2+bx+cax^2 + bx + c and read off a, b, c.

Functionabc
x2+2x−24x^2 + 2x - 2412−24
4x2+9x−94x^2 + 9x - 949−9
−x2−2x+24-x^2 - 2x + 24−1−224
2x2−82x^2 - 820 (no x term)−8

Take the sign with the number: in (iii) the coefficient of x2x^2 is −1-1, and in (iv) b=0b = 0 because there is no x term. The functions (i) and (ii) are the ones these notes use for all examples; (iii) and (iv) are extra illustrations.

1.2Evaluating the function

Example 2: values of f(x) = x² + 2x − 24

Find f(0)f(0), f(4)f(4), f(−6)f(-6) and f(−1)f(-1).

f(0)=0+0−24=−24f(4)=16+8−24=0f(−6)=36−12−24=0f(−1)=1−2−24=−25\begin{aligned} f(0) &= 0 + 0 - 24 = -24 \\ f(4) &= 16 + 8 - 24 = 0 \\ f(-6) &= 36 - 12 - 24 = 0 \\ f(-1) &= 1 - 2 - 24 = -25 \end{aligned}

These four points (0,−24)(0, -24), (4,0)(4, 0), (−6,0)(-6, 0) and (−1,−25)(-1, -25) are the y-intercept, the two x-intercepts and the vertex of Figure 1. Note that f(0)=cf(0) = c always, so cc is where the curve meets the y-axis.

1.3Going deeper

  1. Three numbers fix the parabola. Change aa and the curve gets wider, narrower or flips; change cc and it slides up or down; bb moves it sideways and up or down together (extra remark).
  2. Always one y-intercept. f(0)=cf(0) = c, so a quadratic function meets the y-axis exactly once, at (0,c)(0, c).
  3. Name the type first. If a problem gives x2+2x=24x^2 + 2x = 24, move everything to one side to see aa, bb, cc before doing anything else.
Exam tips
  • Write a,b,ca, b, c with their signs before using any formula.
  • If the xx term is missing, b=0b = 0; if the constant is missing, c=0c = 0.
Common mistakes
  • Dropping the minus sign of aa or cc.
  • Taking a=0a = 0 for something like 2x−32x - 3 and still calling it a quadratic.
Next · The parabolaAxis of Symmetry and Vertex
02
The parabola

Axis of Symmetry and Vertex

Definition: axis of symmetryAll parabolas have an axis of symmetry: if the graph paper is folded along it, the two sides of the parabola match exactly.
Definition: vertexThe point at which the axis of symmetry meets the parabola is the vertex.
Axis of symmetry: x=−b2a\text{Axis of symmetry: } x = \frac{-b}{2a}
  1. x-coordinate of the vertex. Compute x=−b2ax = \frac{-b}{2a}.
  2. y-coordinate of the vertex. Put this xx into the function: y=f(−b2a)y = f\left(\frac{-b}{2a}\right).

2.1Worked examples

Example 3: vertex of x² + 2x − 24

  1. Here a=1a = 1, b=2b = 2, c=−24c = -24.
  2. Axis. x=−22(1)=−1x = \frac{-2}{2(1)} = -1.
  3. y-coordinate. f(−1)=(−1)2+2(−1)−24=1−2−24=−25f(-1) = (-1)^2 + 2(-1) - 24 = 1 - 2 - 24 = -25.
Vertex

(−1,−25)(-1, -25)

Example 4: vertex of 4x² + 9x − 9

  1. Here a=4a = 4, b=9b = 9, c=−9c = -9.
  2. Axis. x=−92(4)=−98x = \frac{-9}{2(4)} = -\frac{9}{8}.
  3. y-coordinate. f(−98)=4⋅8164−818−9=8116−16216−14416=−22516f\left(-\frac{9}{8}\right) = 4 \cdot \frac{81}{64} - \frac{81}{8} - 9 = \frac{81}{16} - \frac{162}{16} - \frac{144}{16} = -\frac{225}{16}.
Vertex

(−98,−22516)\left(-\frac{9}{8}, -\frac{225}{16}\right), that is (−1.125,−14.0625)(-1.125, -14.0625).

2.2Why folding works: mirror pairs

-8-6-4-20246-30-20-10010x = −1(-3, -21)(1, -21)(-4, -16)(2, -16)(-6, 0)(4, 0)vertexxy
Figure 2. Folding along x = −1 matches every point with its mirror image: the pairs (−3, −21) and (1, −21), (−4, −16) and (2, −16), (−6, 0) and (4, 0) share the same height and sit the same distance either side of the axis
Reading the diagram

Each pair of points at the same height has x-values −1−t-1 - t and −1+t-1 + t, so the axis x=−1x = -1 sits exactly halfway between them. The vertex is the one point that is its own mirror image.

2.3Why the formula works

Completing the square (Chapter 7) gives

ax2+bx+c=a(x+b2a)2+(c−b24a)ax^2 + bx + c = a\left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right)

The bracket squared is never negative and is zero exactly when x=−b2ax = \frac{-b}{2a}. So the curve is symmetric about that line, and the vertex has height c−b24ac - \frac{b^2}{4a}, which agrees with f(−b2a)f\left(\frac{-b}{2a}\right). The lecture states the axis and vertex formulas without proof; this short derivation is added to show where they come from.

2.4Going deeper

  1. The axis is a vertical line, so it is written x=…x = \ldots; the vertex is a point, written as a pair.
  2. Quick check. The vertex of x2+2x−24x^2 + 2x - 24 is the midpoint of its x-intercepts −6-6 and 44: −6+42=−1\frac{-6 + 4}{2} = -1 (see Chapter 8).
  3. Fractions are normal. The vertex of 4x2+9x−94x^2 + 9x - 9 is (−98,−22516)\left(-\frac{9}{8}, -\frac{225}{16}\right); keep it as a fraction and convert to a decimal only at the end.
Exam tips
  • Do the two steps in order: xx first, then f(x)f(x).
  • Substitute into the original function, not into the slope.
Common mistakes
  • Forgetting the minus in −b-b when bb is already negative.
  • Writing the axis as a point instead of x=…x = \ldots.
Next · The parabolaTypes of Parabola: Minima and Maxima
03
The parabola

Types of Parabola: Minima and Maxima

The sign of aa decides which way the parabola opens.

a > 0: upward parabola
  • Opens towards the positive y-axis and has a minimum value.
a < 0: downward parabola
  • Opens towards the negative y-axis and has a maximum value.
-8-6-4-20246-40-30-20-10010203040minimum value −25xy-8-6-4-20246-40-30-20-10010203040maximum value 25xy
Figure 3. Two parabolas: a > 0 (left, a = 1) and a < 0 (right, a = −1). The dashed line is the axis of symmetry in both
Reading the diagram

On the left the curve rises on both sides of the vertex, so the vertex is the lowest point: the minimum. On the right the curve falls on both sides, so the vertex is the highest point: the maximum. The right-hand function is the left-hand one with every sign reversed, so it is the reflection in the x-axis.

3.1Minimum and maximum values

Definition: minimum or maximum valueThe vertex is the turning point of the parabola. Its y-coordinate f(−b2a)f\left(\frac{-b}{2a}\right) is the minimum value of ff when a>0a > 0 and the maximum value when a<0a < 0. It is attained at x=−b2ax = \frac{-b}{2a}.
a > 0a < 0
ShapeUpward parabolaDownward parabola
Opens towardspositive y-axisnegative y-axis
Turning pointminimum valuemaximum value
Value at the vertexlowest value of fhighest value of f

Example 5: minimum or maximum?

For each function decide whether it has a minimum or a maximum, and find its value and where it occurs: (i) x2+2x−24x^2 + 2x - 24, (ii) 4x2+9x−94x^2 + 9x - 9, (iii) −x2−2x+24-x^2 - 2x + 24.

  • (i) a=1>0a = 1 > 0, so a minimum. It occurs at x=−1x = -1 and equals f(−1)=−25f(-1) = -25.
  • (ii) a=4>0a = 4 > 0, so a minimum. It occurs at x=−98x = -\frac{9}{8} and equals −22516=−14.0625-\frac{225}{16} = -14.0625.
  • (iii) a=−1<0a = -1 < 0, so a maximum. The axis is x=−(−2)2(−1)=−1x = \frac{-(-2)}{2(-1)} = -1 and the maximum value is f(−1)=−1+2+24=25f(-1) = -1 + 2 + 24 = 25.

So (i) never goes below −25-25, (ii) never goes below −14.0625-14.0625, and (iii) never goes above 2525. These three computations apply the rule with the vertex formula.

3.2Going deeper

  1. Range of the function. For a>0a > 0 the values of ff are all numbers from the minimum upwards; for a<0a < 0, all numbers from the maximum downwards. For (i) that is f(x)≥−25f(x) \ge -25 (extra remark).
  2. Optimisation. Questions like “the least cost” or “the greatest height” of a quadratic are asking for the vertex value.
  3. Minimum value is a y-value. Say where it occurs (xx) and what it is (yy) separately.
Exam tips
  • Look at the sign of aa first: it settles minimum or maximum before any calculation.
Common mistakes
  • Quoting the x-value of the vertex as the minimum value.
  • Calling a downward parabola’s vertex a minimum.
Next · The parabolaSlope of a Quadratic Function
04
The parabola

Slope of a Quadratic Function

Definition: slope of a quadraticFor f(x)=ax2+bx+cf(x) = ax^2 + bx + c with a≠0a \neq 0, the slope of ff at any given point (x,f(x))(x, f(x)) is
slope=2ax+b\text{slope} = 2ax + b

A straight line has one slope everywhere. A parabola bends, so its slope changes from point to point; the formula 2ax+b2ax + b gives the slope at each xx (the slope of the tangent line touching the curve there).

4.1Worked examples

Example 6: slope of x² + 2x − 24

  1. a=1a = 1, b=2b = 2, so the slope at xx is 2(1)x+2=2x+22(1)x + 2 = 2x + 2.
  2. Substitute:
x−6−5−3−10134
Slope 2x + 2−10−8−4024810
-8-6-4-20246-30-20-10010x = −5: slope −8x = −1: slope 0x = 3: slope 8xy
Figure 4. Tangent lines at x = −5, −1 and 3: slopes −8, 0 and 8
Reading the diagram

Left of the vertex the curve falls, so the slope is negative (the red tangent, slope −8-8). At the vertex the tangent is flat, slope 0 (yellow). Right of the vertex the curve rises, so the slope is positive (green, slope 8). The steeper the curve, the larger the size of the slope.

Example 7: slope of 4x² + 9x − 9

Find the slope at x=−3,−98,0x = -3, -\frac{9}{8}, 0 and 34\frac{3}{4}.

  1. a=4a = 4, b=9b = 9, so the slope is 8x+98x + 9.
  2. Substitute:
x−3−9/803/4
Slope 8x + 98(−3) + 9 = −158(−9/8) + 9 = 098(3/4) + 9 = 15

4.2What the slope tells us

Slope zero: the vertex
  • Put x=−b2ax = \frac{-b}{2a} into 2ax+b2ax + b: 2a⋅−b2a+b=−b+b=02a \cdot \frac{-b}{2a} + b = -b + b = 0. The slope is zero exactly at the vertex, which is why the vertex is the minimum or maximum.
Sign of the slope: rising or falling
  • For a>0a > 0 the slope 2ax+b2ax + b is negative to the left of the vertex and positive to the right. For a<0a < 0 it is the other way round.

The lecture gives only the formula 2ax+b2ax + b. The two observations above are direct consequences of it, using the vertex formula of Chapter 2.

4.3Going deeper

  1. A straight line is the special case. With a=0a = 0 the formula 2ax+b2ax + b becomes just bb, the constant slope of bx+cbx + c from Week 2.
  2. The slope changes by 2a2a per unit. In 2x+22x + 2 it grows by 2 each step: −8,−6,…-8, -6, \ldots. The bigger ∣a∣|a|, the faster the curve bends (extra remark).
  3. Use it to find the vertex. Set 2ax+b=02ax + b = 0 and solve: you get x=−b2ax = \frac{-b}{2a} again.
Exam tips
  • Always substitute xx into 2ax+b2ax + b, not into ff.
  • Slope 0 means the vertex.
Common mistakes
  • Using ax+bax + b instead of 2ax+b2ax + b.
  • Reading the slope as the height of the curve.
Next · Quadratic equationsQuadratic Equations and Roots
05
Quadratic equations

Quadratic Equations and Roots

If a quadratic function is set equal to a value, the result is a quadratic equation.

Standard form
  • If ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0 and a,b,ca, b, c integers, the quadratic equation is said to be in standard form.
Roots
  • The solutions of the equation are called the roots of the equation.
Zeros
  • The zeros of ff are the x-intercepts of its curve; they are the solutions of f(x)=0f(x) = 0.

So one method for finding the roots of ax2+bx+c=0ax^2 + bx + c = 0 is to find the zeros of the quadratic function f(x)=ax2+bx+cf(x) = ax^2 + bx + c.

5.1Putting an equation in standard form

Example 8: standard form

Write (i) x2+2x=24x^2 + 2x = 24 and (ii) 4x2+9x=94x^2 + 9x = 9 in standard form and read off a, b, c.

  • (i) Subtract 24 from both sides: x2+2x−24=0x^2 + 2x - 24 = 0, so a=1a = 1, b=2b = 2, c=−24c = -24.
  • (ii) Subtract 9 from both sides: 4x2+9x−9=04x^2 + 9x - 9 = 0, so a=4a = 4, b=9b = 9, c=−9c = -9.

5.2Roots and the graph

The equation x2+2x=24x^2 + 2x = 24 says: the function x2+2xx^2 + 2x has value 24. Its solutions are the x-values where the curve is at height 24, that is, where the horizontal line y=24y = 24 meets it. Moving 24 to the left gives the same solutions as the x-intercepts of y=x2+2x−24y = x^2 + 2x - 24.

-8-6-4-20246-20-10010203040y = 24x = −6x = 4xy-40-20-16-12-8-404812x = −3x = 3/4vertexxy
Figure 5. Left: the line y = 24 meets the curve y = x² + 2x at x = −6 and x = 4. Right: the roots of 4x² + 9x − 9 = 0 are the x-intercepts −3 and 3/4; the vertex (−9/8, −225/16) lies on the axis halfway between them
Reading the diagrams

A root is a value of xx, not a point: it is the x-coordinate where the curve meets the x-axis. A parabola can cut the x-axis twice, touch it once, or miss it; this is why a quadratic equation has two, one or no real roots (Chapter 8). The slides solve the equations algebraically, by three methods, in the next chapters.

5.3Going deeper

  1. Root, zero, x-intercept: one idea. For x2+2x−24x^2 + 2x - 24 the numbers −6-6 and 44 are the roots of the equation, the zeros of the function and the x-coordinates of the intercepts.
  2. Why standard form first. Every method of the next chapters starts from ax2+bx+c=0ax^2 + bx + c = 0; a root only appears when one side is zero.
  3. Sum of the roots (extra remark). −6+4=−2=−ba-6 + 4 = -2 = -\frac{b}{a} and −3+34=−94=−ba-3 + \frac{3}{4} = -\frac{9}{4} = -\frac{b}{a}: the roots add up to −ba-\frac{b}{a}, twice the axis.
Exam tips
  • Move every term to one side, keep aa positive if you can, then read a,b,ca, b, c.
Common mistakes
  • Subtracting from only one side.
  • Treating a root as a point (x,0)(x, 0) instead of the number xx.
Next · Quadratic equationsSolving by Factoring
06
Quadratic equations

Solving by Factoring

Zero Product PropertyZero Product Property. When the product of two factors equals zero, then at least one of the factors is zero.

6.1Steps

  1. Write the equation in standard form (equal to 0).
  2. Factor the polynomial.
  3. Use the Zero Product Property to set each factor equal to zero.
  4. Solve each resulting linear equation.
How to split the middle termFor ax2+bx+cax^2 + bx + c find two numbers whose product is acac and whose sum is bb; write bxbx as the sum of two terms with those coefficients and factor by grouping. In (i) below ac=−24ac = -24 and the numbers 66 and −4-4 have sum 2; in (ii) ac=−36ac = -36 and the numbers 1212 and −3-3 have sum 9.

6.2Lecture examples

Example 9: solve x² + 2x = 24 by factoring

  1. Standard form. x2+2x−24=0x^2 + 2x - 24 = 0.
  2. Factor. Split 2x2x as 6x−4x6x - 4x:
  3. Zero Product Property. x−4=0x - 4 = 0 or x+6=0x + 6 = 0.
  4. Solve. x=4x = 4 or x=−6x = -6.
x2+6x−4x−24=0  ⇒  x(x+6)−4(x+6)=0  ⇒  (x−4)(x+6)=0x^2 + 6x - 4x - 24 = 0 \;\Rightarrow\; x(x + 6) - 4(x + 6) = 0 \;\Rightarrow\; (x - 4)(x + 6) = 0

Check. 42+2(4)=244^2 + 2(4) = 24 and (−6)2+2(−6)=36−12=24(-6)^2 + 2(-6) = 36 - 12 = 24. Both work.

Example 10: solve 4x² + 9x = 9 by factoring

  1. Standard form. 4x2+9x−9=04x^2 + 9x - 9 = 0.
  2. Factor. Split 9x9x as 12x−3x12x - 3x:
  3. Zero Product Property. 4x−3=04x - 3 = 0 or x+3=0x + 3 = 0.
  4. Solve. x=34x = \frac{3}{4} or x=−3x = -3.
4x2+12x−3x−9=0  ⇒  4x(x+3)−3(x+3)=0  ⇒  (4x−3)(x+3)=04x^2 + 12x - 3x - 9 = 0 \;\Rightarrow\; 4x(x + 3) - 3(x + 3) = 0 \;\Rightarrow\; (4x - 3)(x + 3) = 0

Check. 4(34)2+9⋅34=94+274=94\left(\frac{3}{4}\right)^2 + 9 \cdot \frac{3}{4} = \frac{9}{4} + \frac{27}{4} = 9 and 4(9)+9(−3)=36−27=94(9) + 9(-3) = 36 - 27 = 9.

6.3Going deeper

  1. Why the right side must be 0. The Zero Product Property says nothing about a product equal to 24: (x−1)(x+3)=24(x-1)(x+3) = 24 does not mean a factor is 24 or 0. Always move everything to one side first.
  2. Finding the split. For x2+2x−24x^2 + 2x - 24, list pairs with product −24-24: 1,−241, -24; −1,24-1, 24; 2,−122, -12; −2,12-2, 12; 3,−83, -8; −3,8-3, 8; 4,−64, -6; −4,6-4, 6. Only −4,6-4, 6 adds to 2.
  3. Always check by expanding. (x−4)(x+6)=x2+6x−4x−24=x2+2x−24(x-4)(x+6) = x^2 + 6x - 4x - 24 = x^2 + 2x - 24. If this does not return the original, the factoring is wrong.
  4. When factoring is hard. It works when the polynomial can be factored into nice integers. When it cannot, use completing the square or the quadratic formula.
Exam tips
  • Substitute each root back into the original equation.
  • For a root like 34\frac{3}{4}, the factor is 4x−34x - 3, not x−34x - \frac{3}{4} with a stray 4.
Common mistakes
  • Setting a product equal to a non-zero number and splitting into factors.
  • Dropping the sign when reading the root from a factor: x+6=0x + 6 = 0 gives x=−6x = -6.
Next · Quadratic equationsSolving by Completing the Square
07
Quadratic equations

Solving by Completing the Square

x²xx1x² + 2x is a squarewith one corner missingadd the missing 1:x² + 2x + 1 = (x + 1)²so x² + 2x = (x + 1)² − 1
Figure 6. Why x² + 2x + 1 is a perfect square: the missing yellow corner of area 1 completes the square of side x + 1
Reading the diagram

The blue square x2x^2 and the two strips xx make x2+2xx^2 + 2x. They form a larger square with one corner missing. Adding the corner (area 1) gives a square of side x+1x + 1, so x2+2x+1=(x+1)2x^2 + 2x + 1 = (x + 1)^2. Add 1 to complete the square, and take 1 away again to keep the equation balanced.

7.1Steps

  1. Transform the equation so that a perfect square is on one side and a constant is on the other.
  2. Take the square root of each side. Remember that the square root of a constant gives a positive and a negative value.
  3. Solve each resulting equation. (If you are taking the square root of a negative number, there is no real solution.)

7.2Lecture examples

Example 11: solve x² + 2x = 24 by completing the square

  1. Add and subtract 1 (half of 2, squared): x2+2x+1−1=24x^2 + 2x + 1 - 1 = 24.
  2. Perfect square. (x+1)2=25  ⇒  x+1=±25(x + 1)^2 = 25 \;\Rightarrow\; x + 1 = \pm\sqrt{25}.
  3. x+1=+5x + 1 = +5 or x+1=−5x + 1 = -5.
  4. x=4x = 4 or x=−6x = -6.

Example 12: solve 4x² + 9x = 9 by completing the square

  1. Write 4x24x^2 as (2x)2(2x)^2 and 9x9x as 2⋅2x⋅942 \cdot 2x \cdot \frac{9}{4}, then add and subtract (94)2=8116\left(\frac{9}{4}\right)^2 = \frac{81}{16}:
  2. The first three terms are a perfect square, and 9+8116=225169 + \frac{81}{16} = \frac{225}{16}:
  3. 2x+94=1542x + \frac{9}{4} = \frac{15}{4} or 2x+94=−1542x + \frac{9}{4} = -\frac{15}{4}.
  4. 2x=64⇒x=342x = \frac{6}{4} \Rightarrow x = \frac{3}{4} or 2x=−244=−6⇒x=−32x = -\frac{24}{4} = -6 \Rightarrow x = -3.
4x2+2⋅2⋅94 x+8116−8116=9  ⇒  (2x+94)2=22516  ⇒  2x+94=±1544x^2 + 2\cdot 2 \cdot \tfrac{9}{4}\, x + \tfrac{81}{16} - \tfrac{81}{16} = 9 \;\Rightarrow\; \left(2x + \tfrac{9}{4}\right)^2 = \tfrac{225}{16} \;\Rightarrow\; 2x + \tfrac{9}{4} = \pm\tfrac{15}{4}

7.3When there is no real solution

If the right-hand side after completing the square is negative, there is no real solution because a real square is never negative. For example x2+2x+5=0x^2 + 2x + 5 = 0 becomes (x+1)2=−4(x + 1)^2 = -4, which has no real solution. The slides state the rule without an example; this equation is an illustration.

7.4Going deeper: the general recipe

  1. Make the coefficient of x2x^2 equal to 1 (or write ax2ax^2 as a square, as in Example 12).
  2. Half the coefficient of xx, squared. For x2+2xx^2 + 2x it is (22)2=1\left(\frac{2}{2}\right)^2 = 1. Add and subtract it.
  3. The same idea finds the vertex. x2+2x−24=(x+1)2−25x^2 + 2x - 24 = (x + 1)^2 - 25, so the vertex is (−1,−25)(-1, -25) (extra remark).
  4. Do not forget the ±\pm. Dropping the negative root loses half the answer.
Exam tips
  • Check both roots in the original equation.
  • A negative right-hand side means stop: no real solution.
Common mistakes
  • Adding the number to one side only.
  • Writing x+1=5x + 1 = 5 only and forgetting x+1=−5x + 1 = -5.
Next · Quadratic equationsSolving by the Quadratic Formula
08
Quadratic equations

Solving by the Quadratic Formula

Quadratic formulaThe roots of ax2+bx+c=0ax^2 + bx + c = 0 can be found directly from the quadratic formula
x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

The expression b2−4acb^2 - 4ac is called the discriminant.

8.1Number of real roots

Value of the discriminantNumber of real roots
b2−4ac>0b^2 - 4ac > 0two real roots
b2−4ac=0b^2 - 4ac = 0one real root
b2−4ac<0b^2 - 4ac < 0no real roots
-8-6-4-20246-30-20-1001020b² − 4ac = 100 > 0xy-20246-40481216b² − 4ac = 0xy-6-4-2024-40481216b² − 4ac = −16 < 0xy
Figure 7. The discriminant tells how the parabola meets the x-axis: twice, once (touching), or not at all. Illustrations: x² + 2x − 24, x² − 4x + 4, x² + 2x + 5
Reading the diagrams

With a positive discriminant the parabola crosses the x-axis at two points. With zero it just touches the axis at its vertex, giving one root. With a negative discriminant the whole curve stays on one side of the axis and never reaches it. The slides give the table only; the three graphs, and the equations x2−4x+4=0x^2 - 4x + 4 = 0 (discriminant 0, root x=2x = 2) and x2+2x+5=0x^2 + 2x + 5 = 0 (discriminant −16-16), are illustrations of its three rows.

8.2Lecture examples

Example 13: solve x² + 2x − 24 = 0 by the formula

  1. a=1a = 1, b=2b = 2, c=−24c = -24.
  2. Discriminant. b2−4ac=22−4(1)(−24)=4+96=100>0b^2 - 4ac = 2^2 - 4(1)(-24) = 4 + 96 = 100 > 0, so two real roots.
  3. Substitute. x=−2±1002=−2±102x = \frac{-2 \pm \sqrt{100}}{2} = \frac{-2 \pm 10}{2}.
  4. x=−2+102=4x = \frac{-2 + 10}{2} = 4 or x=−2−102=−6x = \frac{-2 - 10}{2} = -6.

Example 14: solve 4x² + 9x − 9 = 0 by the formula

  1. a=4a = 4, b=9b = 9, c=−9c = -9.
  2. Discriminant. b2−4ac=92−4(4)(−9)=81+144=225>0b^2 - 4ac = 9^2 - 4(4)(-9) = 81 + 144 = 225 > 0, so two real roots.
  3. Substitute. x=−9±2258=−9±158x = \frac{-9 \pm \sqrt{225}}{8} = \frac{-9 \pm 15}{8}.
  4. x=−9+158=34x = \frac{-9 + 15}{8} = \frac{3}{4} or x=−9−158=−3x = \frac{-9 - 15}{8} = -3.

8.3The same equations by all three methods

x² + 2x = 24Factoring(x − 4)(x + 6) = 0each factor = 0Completing the square(x + 1)² = 25x + 1 = ±5Quadratic formulax = (−2 ± √100) / 2discriminant 100x = 4 or x = −6
Figure 8. One equation, three routes to the same roots
EquationFactoringCompleting the squareFormulaRoots
x2+2x=24x^2 + 2x = 24(x−4)(x+6)=0(x - 4)(x + 6) = 0(x+1)2=25(x + 1)^2 = 25discriminant 1004 and −6
4x2+9x=94x^2 + 9x = 9(4x−3)(x+3)=0(4x - 3)(x + 3) = 0(2x+94)2=22516\left(2x + \frac{9}{4}\right)^2 = \frac{225}{16}discriminant 2253/4 and −3

8.4Check with the vertex

The axis of symmetry lies halfway between the two roots. For the first equation, 4+(−6)2=−1\frac{4 + (-6)}{2} = -1, the axis found in Chapter 2. For the second, 34+(−3)2=−98\frac{\frac{3}{4} + (-3)}{2} = -\frac{9}{8}, again the axis. The formula shows why: the two roots are −b2a±b2−4ac2a\frac{-b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a}, equally spaced about −b2a\frac{-b}{2a}. At each root the slope 2ax+b2ax + b equals ±b2−4ac\pm\sqrt{b^2 - 4ac}: ±10\pm 10 for the first equation and ±15\pm 15 for the second. This check follows from the formulas; it is not on the slides.

8.5Where the formula comes from

Start from ax2+bx+c=0ax^2 + bx + c = 0, complete the square as in Chapter 2, and take square roots:

a(x+b2a)2=b2−4ac4a  ⇒  x+b2a=±b2−4ac2a  ⇒  x=−b±b2−4ac2aa\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a} \;\Rightarrow\; x + \frac{b}{2a} = \pm\frac{\sqrt{b^2 - 4ac}}{2a} \;\Rightarrow\; x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

This also explains the table: the square root is real only when b2−4ac≥0b^2 - 4ac \ge 0, and it vanishes when b2−4ac=0b^2 - 4ac = 0, leaving a single root. This derivation is added to show where the formula and the discriminant table come from; the slides state them directly.

8.6Going deeper

  1. Compute the discriminant first. It tells you whether to expect real roots before you take any square root. A perfect-square discriminant (100, 225) means the roots are rational and the equation factors.
  2. Which method? Factoring is fastest when the numbers are nice; completing the square shows the vertex; the formula always works.
  3. Parentheses with negative bb and cc. Write −b-b as −(2)=−2-(2) = -2 and 4ac4ac with its signs: 4(1)(−24)=−964(1)(-24) = -96, so b2−4ac=4+96b^2 - 4ac = 4 + 96.
Exam tips
  • Write a,b,ca, b, c first, then the discriminant, then the roots.
  • Check the roots with the axis: their average should be −b2a\frac{-b}{2a}.
Common mistakes
  • Putting only bb (not −b-b) in the numerator.
  • Dividing only the square root by 2a2a, not the whole numerator.
  • Forgetting that a negative discriminant means no real roots.
Next · All topicsWeek 3 Summary Sheet
09
All topics

Week 3 Summary Sheet

Everything in Week 3 on one sheet, for a last-minute revision.

Formulas

Quadratic function
f(x)=ax2+bx+c,a≠0f(x) = ax^2 + bx + c,\quad a \neq 0
Axis and vertex
x=−b2a,(−b2a, f ⁣(−b2a))x = \frac{-b}{2a},\quad \left(\frac{-b}{2a},\ f\!\left(\frac{-b}{2a}\right)\right)
Slope at (x, f(x))
2ax+b2ax + b
Quadratic formula
x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Shape and roots at a glance

ConditionMeaning
a>0a > 0upward parabola, minimum value at the vertex
a<0a < 0downward parabola, maximum value at the vertex
b2−4ac>0b^2 - 4ac > 0two real roots (curve crosses the x-axis twice)
b2−4ac=0b^2 - 4ac = 0one real root
b2−4ac<0b^2 - 4ac < 0no real roots

Three methods

MethodIdea
FactoringStandard form, factor, Zero Product Property, solve each linear equation
Completing the squarePerfect square on one side, constant on the other; take ± square roots
Quadratic formulaSubstitute a, b, c into the formula; the discriminant tells the number of real roots

Values computed in the notes

Function / equationAxis and vertexMin or maxRoots
x2+2x−24x^2 + 2x - 24x=−1x = -1; (−1,−25)(-1, -25)minimum −254 and −6
4x2+9x−94x^2 + 9x - 9x=−98x = -\frac{9}{8}; (−98,−22516)\left(-\frac{9}{8}, -\frac{225}{16}\right)minimum −225/163/4 and −3
Revision overview
Functionf(x) = ax² + bx + c, a ≠ 0
Graph is a parabola
Vertex and axisAxis of symmetry: x = −b / 2a
Vertex: (−b / 2a, f(−b / 2a))
Minima and maximaa > 0: upward, minimum value
a < 0: downward, maximum value
Quadratic functionsMathematics for Data Science 1
SlopeSlope at (x, f(x)) is 2ax + b
Zero at the vertex
Quadratic equationax² + bx + c = 0, a ≠ 0
Roots = zeros = x-intercepts
SolvingFactoring (Zero Product Property)
Completing the square
Formula: x = (−b ± √(b² − 4ac)) / 2a
Revision: the whole of Week 3 on one map
Back to top