Mathematics for
Data Science 1
Quadratic functions: the parabola, vertex and axis of symmetry, minima and maxima, slope, and solving quadratic equations three ways.
Chapters
- 01Quadratic FunctionsThe quadratic function
- 02Axis of Symmetry and VertexThe parabola
- 03Types of Parabola: Minima and MaximaThe parabola
- 04Slope of a Quadratic FunctionThe parabola
- 05Quadratic Equations and RootsQuadratic equations
- 06Solving by FactoringQuadratic equations
- 07Solving by Completing the SquareQuadratic equations
- 08Solving by the Quadratic FormulaQuadratic equations
- 09Week 3 Summary SheetAll topics
Quadratic Functions
- Coefficient of . Must not be zero.
- Coefficient of . May be any number, including 0.
- Constant term. May be any number, including 0.
1.1Reading a, b and c
Example 1: identify a, b and c
Write each function in the form and read off a, b, c.
| Function | a | b | c |
|---|---|---|---|
| 1 | 2 | −24 | |
| 4 | 9 | −9 | |
| −1 | −2 | 24 | |
| 2 | 0 (no x term) | −8 |
Take the sign with the number: in (iii) the coefficient of is , and in (iv) 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 , , and .
These four points , , and are the y-intercept, the two x-intercepts and the vertex of Figure 1. Note that always, so is where the curve meets the y-axis.
1.3Going deeper
- Three numbers fix the parabola. Change and the curve gets wider, narrower or flips; change and it slides up or down; moves it sideways and up or down together (extra remark).
- Always one y-intercept. , so a quadratic function meets the y-axis exactly once, at .
- Name the type first. If a problem gives , move everything to one side to see , , before doing anything else.
- Write with their signs before using any formula.
- If the term is missing, ; if the constant is missing, .
- Dropping the minus sign of or .
- Taking for something like and still calling it a quadratic.
Axis of Symmetry and Vertex
- x-coordinate of the vertex. Compute .
- y-coordinate of the vertex. Put this into the function: .
2.1Worked examples
Example 3: vertex of x² + 2x − 24
- Here , , .
- Axis. .
- y-coordinate. .
Example 4: vertex of 4x² + 9x − 9
- Here , , .
- Axis. .
- y-coordinate. .
, that is .
2.2Why folding works: mirror pairs
Each pair of points at the same height has x-values and , so the axis 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
The bracket squared is never negative and is zero exactly when . So the curve is symmetric about that line, and the vertex has height , which agrees with . The lecture states the axis and vertex formulas without proof; this short derivation is added to show where they come from.
2.4Going deeper
- The axis is a vertical line, so it is written ; the vertex is a point, written as a pair.
- Quick check. The vertex of is the midpoint of its x-intercepts and : (see Chapter 8).
- Fractions are normal. The vertex of is ; keep it as a fraction and convert to a decimal only at the end.
- Do the two steps in order: first, then .
- Substitute into the original function, not into the slope.
- Forgetting the minus in when is already negative.
- Writing the axis as a point instead of .
Types of Parabola: Minima and Maxima
The sign of decides which way the parabola opens.
- Opens towards the positive y-axis and has a minimum value.
- Opens towards the negative y-axis and has a maximum value.
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
| a > 0 | a < 0 | |
|---|---|---|
| Shape | Upward parabola | Downward parabola |
| Opens towards | positive y-axis | negative y-axis |
| Turning point | minimum value | maximum value |
| Value at the vertex | lowest value of f | highest 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) , (ii) , (iii) .
- (i) , so a minimum. It occurs at and equals .
- (ii) , so a minimum. It occurs at and equals .
- (iii) , so a maximum. The axis is and the maximum value is .
So (i) never goes below , (ii) never goes below , and (iii) never goes above . These three computations apply the rule with the vertex formula.
3.2Going deeper
- Range of the function. For the values of are all numbers from the minimum upwards; for , all numbers from the maximum downwards. For (i) that is (extra remark).
- Optimisation. Questions like “the least cost” or “the greatest height” of a quadratic are asking for the vertex value.
- Minimum value is a y-value. Say where it occurs () and what it is () separately.
- Look at the sign of first: it settles minimum or maximum before any calculation.
- Quoting the x-value of the vertex as the minimum value.
- Calling a downward parabola’s vertex a minimum.
Slope of a Quadratic Function
A straight line has one slope everywhere. A parabola bends, so its slope changes from point to point; the formula gives the slope at each (the slope of the tangent line touching the curve there).
4.1Worked examples
Example 6: slope of x² + 2x − 24
- , , so the slope at is .
- Substitute:
| x | −6 | −5 | −3 | −1 | 0 | 1 | 3 | 4 |
|---|---|---|---|---|---|---|---|---|
| Slope 2x + 2 | −10 | −8 | −4 | 0 | 2 | 4 | 8 | 10 |
Left of the vertex the curve falls, so the slope is negative (the red tangent, slope ). 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 and .
- , , so the slope is .
- Substitute:
| x | −3 | −9/8 | 0 | 3/4 |
|---|---|---|---|---|
| Slope 8x + 9 | 8(−3) + 9 = −15 | 8(−9/8) + 9 = 0 | 9 | 8(3/4) + 9 = 15 |
4.2What the slope tells us
- Put into : . The slope is zero exactly at the vertex, which is why the vertex is the minimum or maximum.
- For the slope is negative to the left of the vertex and positive to the right. For it is the other way round.
The lecture gives only the formula . The two observations above are direct consequences of it, using the vertex formula of Chapter 2.
4.3Going deeper
- A straight line is the special case. With the formula becomes just , the constant slope of from Week 2.
- The slope changes by per unit. In it grows by 2 each step: . The bigger , the faster the curve bends (extra remark).
- Use it to find the vertex. Set and solve: you get again.
- Always substitute into , not into .
- Slope 0 means the vertex.
- Using instead of .
- Reading the slope as the height of the curve.
Quadratic Equations and Roots
If a quadratic function is set equal to a value, the result is a quadratic equation.
- If with and integers, the quadratic equation is said to be in standard form.
- The solutions of the equation are called the roots of the equation.
- The zeros of are the x-intercepts of its curve; they are the solutions of .
So one method for finding the roots of is to find the zeros of the quadratic function .
5.1Putting an equation in standard form
Example 8: standard form
Write (i) and (ii) in standard form and read off a, b, c.
- (i) Subtract 24 from both sides: , so , , .
- (ii) Subtract 9 from both sides: , so , , .
5.2Roots and the graph
The equation says: the function has value 24. Its solutions are the x-values where the curve is at height 24, that is, where the horizontal line meets it. Moving 24 to the left gives the same solutions as the x-intercepts of .
A root is a value of , 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
- Root, zero, x-intercept: one idea. For the numbers and are the roots of the equation, the zeros of the function and the x-coordinates of the intercepts.
- Why standard form first. Every method of the next chapters starts from ; a root only appears when one side is zero.
- Sum of the roots (extra remark). and : the roots add up to , twice the axis.
- Move every term to one side, keep positive if you can, then read .
- Subtracting from only one side.
- Treating a root as a point instead of the number .
Solving by Factoring
6.1Steps
- Write the equation in standard form (equal to 0).
- Factor the polynomial.
- Use the Zero Product Property to set each factor equal to zero.
- Solve each resulting linear equation.
6.2Lecture examples
Example 9: solve x² + 2x = 24 by factoring
- Standard form. .
- Factor. Split as :
- Zero Product Property. or .
- Solve. or .
Check. and . Both work.
Example 10: solve 4x² + 9x = 9 by factoring
- Standard form. .
- Factor. Split as :
- Zero Product Property. or .
- Solve. or .
Check. and .
6.3Going deeper
- Why the right side must be 0. The Zero Product Property says nothing about a product equal to 24: does not mean a factor is 24 or 0. Always move everything to one side first.
- Finding the split. For , list pairs with product : ; ; ; ; ; ; ; . Only adds to 2.
- Always check by expanding. . If this does not return the original, the factoring is wrong.
- 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.
- Substitute each root back into the original equation.
- For a root like , the factor is , not with a stray 4.
- Setting a product equal to a non-zero number and splitting into factors.
- Dropping the sign when reading the root from a factor: gives .
Solving by Completing the Square
The blue square and the two strips make . They form a larger square with one corner missing. Adding the corner (area 1) gives a square of side , so . Add 1 to complete the square, and take 1 away again to keep the equation balanced.
7.1Steps
- Transform the equation so that a perfect square is on one side and a constant is on the other.
- Take the square root of each side. Remember that the square root of a constant gives a positive and a negative value.
- 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
- Add and subtract 1 (half of 2, squared): .
- Perfect square. .
- or .
- or .
Example 12: solve 4x² + 9x = 9 by completing the square
- Write as and as , then add and subtract :
- The first three terms are a perfect square, and :
- or .
- or .
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 becomes , which has no real solution. The slides state the rule without an example; this equation is an illustration.
7.4Going deeper: the general recipe
- Make the coefficient of equal to 1 (or write as a square, as in Example 12).
- Half the coefficient of , squared. For it is . Add and subtract it.
- The same idea finds the vertex. , so the vertex is (extra remark).
- Do not forget the . Dropping the negative root loses half the answer.
- Check both roots in the original equation.
- A negative right-hand side means stop: no real solution.
- Adding the number to one side only.
- Writing only and forgetting .
Solving by the Quadratic Formula
The expression is called the discriminant.
8.1Number of real roots
| Value of the discriminant | Number of real roots |
|---|---|
| two real roots | |
| one real root | |
| no real roots |
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 (discriminant 0, root ) and (discriminant ), are illustrations of its three rows.
8.2Lecture examples
Example 13: solve x² + 2x − 24 = 0 by the formula
- , , .
- Discriminant. , so two real roots.
- Substitute. .
- or .
Example 14: solve 4x² + 9x − 9 = 0 by the formula
- , , .
- Discriminant. , so two real roots.
- Substitute. .
- or .
8.3The same equations by all three methods
| Equation | Factoring | Completing the square | Formula | Roots |
|---|---|---|---|---|
| discriminant 100 | 4 and −6 | |||
| discriminant 225 | 3/4 and −3 |
8.4Check with the vertex
The axis of symmetry lies halfway between the two roots. For the first equation, , the axis found in Chapter 2. For the second, , again the axis. The formula shows why: the two roots are , equally spaced about . At each root the slope equals : for the first equation and for the second. This check follows from the formulas; it is not on the slides.
8.5Where the formula comes from
Start from , complete the square as in Chapter 2, and take square roots:
This also explains the table: the square root is real only when , and it vanishes when , 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
- 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.
- Which method? Factoring is fastest when the numbers are nice; completing the square shows the vertex; the formula always works.
- Parentheses with negative and . Write as and with its signs: , so .
- Write first, then the discriminant, then the roots.
- Check the roots with the axis: their average should be .
- Putting only (not ) in the numerator.
- Dividing only the square root by , not the whole numerator.
- Forgetting that a negative discriminant means no real roots.
Week 3 Summary Sheet
Everything in Week 3 on one sheet, for a last-minute revision.
Formulas
Shape and roots at a glance
| Condition | Meaning |
|---|---|
| upward parabola, minimum value at the vertex | |
| downward parabola, maximum value at the vertex | |
| two real roots (curve crosses the x-axis twice) | |
| one real root | |
| no real roots |
Three methods
| Method | Idea |
|---|---|
| Factoring | Standard form, factor, Zero Product Property, solve each linear equation |
| Completing the square | Perfect square on one side, constant on the other; take ± square roots |
| Quadratic formula | Substitute a, b, c into the formula; the discriminant tells the number of real roots |
Values computed in the notes
| Function / equation | Axis and vertex | Min or max | Roots |
|---|---|---|---|
| ; | minimum −25 | 4 and −6 | |
| ; | minimum −225/16 | 3/4 and −3 |
Graph is a parabola
Vertex: (−b / 2a, f(−b / 2a))
a < 0: downward, maximum value
Zero at the vertex
Roots = zeros = x-intercepts
Completing the square
Formula: x = (−b ± √(b² − 4ac)) / 2a