Quiz 2

Polynomial Operations

2521 words
13 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Polynomial Operations ## 🎯 Learning Objectives By the end of this topic, you will be able to: 1. **Define** a polynomial function and classify by degree and number of terms 2.

Polynomial Operations

🎯 Learning Objectives

By the end of this topic, you will be able to:
  1. Define a polynomial function and classify by degree and number of terms
  2. Perform addition, subtraction, multiplication, and division of polynomials
  3. Apply the Remainder Theorem and Factor Theorem
  4. Determine the end behavior, xx-intercepts, multiplicities, and turning points of polynomial graphs
  5. Sketch the graph of a polynomial function given its equation

📋 Prerequisites

  • Quadratic Functions & Equations — degree-2 polynomials
  • Algebra — exponent rules, distributive property, factoring
  • Coordinate geometry — plotting points, intercepts

📖 Core Content

5.1 What is a Polynomial?

5.1.1 Intuition

A polynomial is a mathematical expression built from variables and constants using only addition, subtraction, multiplication, and non-negative integer exponents. Think of it as "many terms" (poly = many, nomial = name/term). Polynomials model smooth, continuous relationships — from simple linear trends (y=2x+1y = 2x + 1) to complex curves (y=x53x3+2xy = x^5 - 3x^3 + 2x).
💡 Why this matters: Polynomials are the building blocks of approximation. Taylor series (Maths 2) approximates any smooth function as a polynomial. In ML, polynomial regression captures non-linear patterns.

5.1.2 Formal Definition

A polynomial function is of the form:
P(x)=anxn+an1xn1++a1x+a0P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0
where:
  • an0a_n \neq 0 is the leading coefficient
  • nn is a non-negative integer (the degree)
  • a0a_0 is the constant term
  • Each akxka_k x^k is a term Classification by degree:
DegreeNameExample
0ConstantP(x)=5P(x) = 5
1LinearP(x)=2x+3P(x) = 2x + 3
2QuadraticP(x)=x24x+4P(x) = x^2 - 4x + 4
3CubicP(x)=x3xP(x) = x^3 - x
4QuarticP(x)=x45x2+4P(x) = x^4 - 5x^2 + 4
nnnn th-degreeP(x)=anxn+P(x) = a_n x^n + \cdots
Not a polynomial: f(x)=xf(x) = \sqrt{x} (fractional exponent), f(x)=1/xf(x) = 1/x (negative exponent), f(x)=2xf(x) = 2^x (variable exponent).

5.2 Operations on Polynomials

5.2.1 Addition and Subtraction

Combine like terms (same variable and exponent). Example 1.1: Add (3x22x+5)+(x2+4x1)(3x^2 - 2x + 5) + (x^2 + 4x - 1). &= (3x^2 + x^2) + (-2x + 4x) + (5 - 1) \\ &= 4x^2 + 2x + 4 \end{aligned}
\\boxed{4x^2 + 2x + 4} **Example 1.2:** Subtract $(5x^3 - 2x + 7) - (3x^3 + 4x^2 - x + 2)$.
\begin{aligned} &= 5x^3 - 2x + 7 - 3x^3 - 4x^2 + x - 2 \\ &= (5x^3 - 3x^3) - 4x^2 + (-2x + x) + (7 - 2) \\ &= 2x^3 - 4x^2 - x + 5 \end{aligned}
\\boxed{2x^3 - 4x^2 - x + 5} \#### 5.2.2 Multiplication Multiply every term of one polynomial by every term of the other (distributive property). **Example 2.1 (Easy):** Multiply $(x)(x^2 - 3x + 2)$. $x \\cdot x^2 = x^3$, $x \\cdot (-3x) = -3x^2$, $x \\cdot 2 = 2x$ Result: $x^3 - 3x^2 + 2x$ \\boxed{x^3 - 3x^2 + 2x} **Example 2.2 (Medium):** Multiply $(2x + 1)(x^2 - 3x + 4)$.
\begin{aligned} &= 2x(x^2 - 3x + 4) + 1(x^2 - 3x + 4) \\ &= 2x^3 - 6x^2 + 8x + x^2 - 3x + 4 \\ &= 2x^3 - 5x^2 + 5x + 4 \end{aligned}
\\boxed{2x^3 - 5x^2 + 5x + 4} **Example 2.3 (Special products):** - $(x + a)(x - a) = x^2 - a^2$ (difference of squares) - $(x + a)^2 = x^2 + 2ax + a^2$ (perfect square) - $(x + a)(x + b) = x^2 + (a+b)x + ab$ #### 5.2.3 Division (Long Division) **Recipe for polynomial long division:** 1. Write dividend and divisor in descending powers 2. Divide leading terms: first term of quotient 3. Multiply quotient term by divisor, subtract from dividend 4. Repeat with remainder as new dividend 5. Stop when remainder degree < divisor degree **Example 3.1:** Divide $(x^3 - 2x^2 + 3x - 5) \\div (x - 2)$.
\begin{aligned} & \phantom{)} \quad x^2 + 0x + 3 \\ x - 2 &\overline{)x^3 - 2x^2 + 3x - 5} \\ &\underline{x^3 - 2x^2} \\ &\phantom{)} \quad 0x^2 + 3x \\ &\phantom{)} \quad \underline{0x^2 + 0x} \\ &\phantom{)} \qquad \quad 3x - 5 \\ &\phantom{)} \qquad \quad \underline{3x - 6} \\ &\phantom{)} \qquad \quad \qquad 1 \end{aligned}
Quotient: $x^2 + 3$, Remainder: $1$ \\boxed{x^2 + 3 + \\frac{1}{x-2}} \--- ### 5.3 Remainder Theorem #### 5.3.1 Statement If a polynomial $P(x)$ is divided by $(x - a)$, the remainder is $P(a)$. **Proof:** $P(x) = (x-a)Q(x) + R$, where $R$ is constant (since divisor is degree 1). Substitute $x = a$: $P(a) = (a-a)Q(a) + R = R$. ∎ #### 5.3.2 Worked Example Find the remainder when $P(x) = x^3 - 3x^2 + 2x + 1$ is divided by $(x - 4)$. *Step 1 — Using Remainder Theorem:* $P(4) = 64 - 48 + 8 + 1 = 25$ *Step 2 — Verify with long division (optional):* Quotient $= x^2 + x + 6$, remainder $= 25$ ✓ \\boxed{25} \--- ### 5.4 Factor Theorem #### 5.4.1 Statement $(x - a)$ is a factor of $P(x)$ **if and only if** $P(a) = 0$. This follows directly from the Remainder Theorem: if the remainder is 0, $(x - a)$ divides $P(x)$ exactly. #### 5.4.2 Worked Examples **Example 4.1:** Show that $(x - 2)$ is a factor of $P(x) = x^3 - 4x^2 + x + 6$. *Step 1:* $P(2) = 8 - 16 + 2 + 6 = 0$ *Step 2:* Since $P(2) = 0$, $(x - 2)$ is a factor. \\boxed{P(2) = 0 \\rightarrow \\text{factor}} **Example 4.2:** Factor $P(x) = x^3 - 3x^2 - 4x + 12$ completely. *Step 1 — Find a root by testing:* $P(2) = 8 - 12 - 8 + 12 = 0$. So $(x-2)$ is a factor. *Step 2 — Divide:* $(x^3 - 3x^2 - 4x + 12) \\div (x-2) = x^2 - x - 6$ *Step 3 — Factor quotient:* $x^2 - x - 6 = (x-3)(x+2)$ *Step 4 — Complete factorization:* $P(x) = (x-2)(x-3)(x+2)$ \\boxed{(x-2)(x-3)(x+2)} \--- ### 5.5 Graphs of Polynomial Functions #### 5.5.1 Key Features \`\`\`mermaid graph TD subgraph "Polynomial Graph Analysis" DEG\["Degree n"\] --> EB\["End behavior<br/>n even: same direction<br/>n odd: opposite directions"\] DEG --> TP\["Turning points<br/>At most n-1"\] ROOTS\["x-intercepts"\] --> MULT\["Multiplicity<br/>Odd: crosses<br/>Even: touches"\] COEFF\["Leading coeff an"\] --> DIR\["an>0: up-right<br/>an<0: down-right"\] end \`\`\` #### 5.5.2 End Behavior As $x \\to \\pm\\infty$, the term with highest degree dominates: | $n$ (degree) | $a_n$ (leading coeff) | $x \\to -\\infty$ | $x \\to \\infty$ | |:---:|:---:|:---:|:---:| | Even | Positive | Up | Up | | Even | Negative | Down | Down | | Odd | Positive | Down | Up | | Odd | Negative | Up | Down | #### 5.5.3 Multiplicity If $(x - r)^k$ is a factor of $P(x)$, then $r$ is a root with **multiplicity** $k$. | Multiplicity | Behavior at $x = r$ | |:---:|:---| | $k = 1$ (odd) | Graph **crosses** the $x$-axis | | $k$ odd $> 1$ | Graph **crosses** with flattening | | $k$ even | Graph **touches** (bounces off) $x$-axis | #### 5.5.4 Turning Points A polynomial of degree $n$ has at most $n-1$ turning points (local maxima/minima). #### 5.5.5 Worked Examples **Example 5.1:** Analyze $P(x) = (x+2)(x-1)^2(x-3)$. *Step 1 — Degree:* $1 + 2 + 1 = 4$ (quartic) *Step 2 — Leading coefficient:* $1 > 0$, even degree → both ends up *Step 3 — x-intercepts:* $-2$ (multiplicity 1, crosses), $1$ (mult. 2, touches), $3$ (mult. 1, crosses) *Step 4 — y-intercept:* $P(0) = (2)(1)^2(-3) = -6$ *Step 5 — Turning points:* at most $3$ \\boxed{\\text{Up/up, crosses at }-2,3,\\text{ touches at }1,\\text{ y-int }-6} **Example 5.2:** Sketch $P(x) = -x^3 + 2x^2 + x - 2$. *Step 1 — Degree:* 3 (odd), leading coeff $-1$ (negative) *Step 2 — End behavior:* $x \\to -\\infty$, up; $x \\to \\infty$, down *Step 3 — Factor:* $P(x) = -(x-1)(x+1)(x-2)$ *Step 4 — x-intercepts:* $1, -1, 2$ (all multiplicity 1, all cross) *Step 5 — y-intercept:* $P(0) = -2$ The graph starts up, crosses at $-1$, goes down then up, crosses at $1$, goes down then up, crosses at $2$, goes down. \\boxed{\\text{Up/down ends, crosses at }-1,1,2,\\text{ y-int }-2} \--- ### 5.6 Why This Matters Polynomials are universal approximators. The **Taylor series** (BSMA1003 Maths 2) shows that any smooth function can be approximated by a polynomial. In data science: - **Polynomial regression** captures non-linear trends - **Spline fitting** uses piecewise polynomials - **Activation functions** in neural networks are sometimes polynomial-ish --- ## 📐 Key Formulas — Summary Table | Concept | Formula | Notes | |:---|:---|:---| | Remainder Theorem | $P(a)$ = remainder when divided by $(x-a)$ | | | Factor Theorem | $P(a) = 0 \\iff (x-a)$ is a factor | | | Standard polynomial | $P(x) = a_n x^n + a_{n-1} x^{n-1} + \\cdots + a_0$ | $a_n \\neq 0$ | | Degree | $n$ | Highest exponent | | End behavior (even, $a_n>0$) | Up / Up | Similar for both ends | | End behavior (odd, $a_n>0$) | Down / Up | Opposite ends | | Max turning points | $n-1$ | | | Max $x$-intercepts | $n$ | Real roots | | Division algorithm | $P(x) = (x-a)Q(x) + R$ | $R$ is constant | --- ## ⚠️ Common Pitfalls ### Pitfall 1: Forgetting to Include Missing Terms in Long Division **Mistake:** Writing $x^3 + 2x - 5$ as is when dividing, ignoring the missing $x^2$ term. **Correct:** Write $x^3 + 0x^2 + 2x - 5$ to keep columns aligned. ### Pitfall 2: Sign Errors in Subtraction **Mistake:** Subtracting $x^2 - 3x$ from $x^2 + x$ gives $4x$ (WRONG: $x^2 + x - (x^2 - 3x) = x^2 + x - x^2 + 3x = 4x$... wait that IS $4x$. Let me redo: actually the common mistake is: $x^2 + x - (x^2 - 3x) = x^2 + x - x^2 + 3x = 4x$ — that's correct. A better example: **Correct:** $(2x^3 - 5x^2) - (2x^3 + x^2) = 2x^3 - 5x^2 - 2x^3 - x^2 = -6x^2$. The mistake is forgetting to distribute the minus sign to every term of the subtracted polynomial. ### Pitfall 3: Confusing Number of Turning Points with Degree **Mistake:** A degree-4 polynomial always has exactly 3 turning points. **Correct:** At MOST 3 turning points. Could have fewer (e.g., $P(x) = x^4$ has 0 turning points). ### Pitfall 4: Ignoring Multiplicity When Sketching **Mistake:** Drawing all $x$-intercepts as "crossing" the axis. **Correct:** Check multiplicity — even multiplicity means the graph **touches** (bounces), odd means **crosses**. --- ## 📝 Practice Questions > **Q1: Add $(2x^3 - x^2 + 3) + (x^3 + 4x^2 - 2x + 1)$.** > > **Strategy Hint:** Combine like terms. > > $= 3x^3 + 3x^2 - 2x + 4$ > >
\boxed{3x^3 + 3x^2 - 2x + 4}
> **Q2: Multiply $(x + 3)(x^2 - 2x + 1)$.** > > **Strategy Hint:** Distribute each term of first polynomial. > > $= x(x^2 - 2x + 1) + 3(x^2 - 2x + 1)$ > $= x^3 - 2x^2 + x + 3x^2 - 6x + 3$ > $= x^3 + x^2 - 5x + 3$ > >
\boxed{x^3 + x^2 - 5x + 3}
> **Q3: Divide $(x^3 - 3x^2 + 5x - 2) \\div (x - 1)$ using synthetic division.** > > **Strategy Hint:** Synthetic division: coefficients 1, -3, 5, -2; evaluate at $x=1$. > > $1 \\mid 1 \\quad -3 \\quad 5 \\quad -2$ > $\\quad \\mid \\quad 1 \\quad -2 \\quad 3$ > $\\quad \\overline{1 \\quad -2 \\quad 3 \\quad 1}$ > > Result: $x^2 - 2x + 3 + \\frac{1}{x-1}$ > >
\boxed{x^2 - 2x + 3 + \frac{1}{x-1}}
> **Q4: Use the Remainder Theorem to find $P(-2)$ for $P(x) = x^3 + 2x^2 - 3x + 5$.** > > **Strategy Hint:** $P(-2)$ is the remainder when dividing by $(x+2)$. > > $P(-2) = -8 + 8 + 6 + 5 = 11$ > >
\boxed{11}
> **Q5: Is $(x - 3)$ a factor of $x^3 - 7x + 6$?** > > **Strategy Hint:** Check $P(3) = 0$? > > $P(3) = 27 - 21 + 6 = 12 \\neq 0$ → NOT a factor. > >
\boxed{\text{No, } P(3) = 12 \neq 0}
> **Q6: Find the $x$-intercepts and multiplicities for $P(x) = (x-1)^3(x+2)^2$.** > > **Strategy Hint:** Roots from each factor. > > $x = 1$ (multiplicity 3, crosses), $x = -2$ (multiplicity 2, touches). > >
\boxed{x=1 \text{ (cross), } x=-2 \text{ (touch)}}
> **Q7: Determine the end behavior of $P(x) = -2x^5 + 3x^3 - x + 7$.** > > **Strategy Hint:** Degree 5 (odd), leading coeff -2 (negative). > > As $x \\to -\\infty$: up (since odd, $a_n<0$) > As $x \\to \\infty$: down > >
\boxed{\text{Up left, down right}}
> **Q8: How many turning points can $P(x) = x^4 - 3x^2 + 2$ have at most?** > > **Strategy Hint:** Degree 4 → at most $4-1=3$ turning points. > >
\boxed{3}
> **Q9: Factor completely: $x^3 - 4x^2 + x + 6$.** > > **Strategy Hint:** Test $x=2$: $8-16+2+6=0$, so $(x-2)$ is a factor. > > $(x^3 - 4x^2 + x + 6) \\div (x-2) = x^2 - 2x - 3 = (x-3)(x+1)$ > $P(x) = (x-2)(x-3)(x+1)$ > >
\boxed{(x-2)(x-3)(x+1)}
> **Q10: Find a cubic polynomial with roots $-2, 1, 3$ and leading coefficient $2$.** > > **Strategy Hint:** $P(x) = a(x - r_1)(x - r_2)(x - r_3)$. > > $P(x) = 2(x+2)(x-1)(x-3)$ > $= 2(x+2)(x^2 - 4x + 3)$ > $= 2(x^3 - 4x^2 + 3x + 2x^2 - 8x + 6)$ > $= 2(x^3 - 2x^2 - 5x + 6)$ > $= 2x^3 - 4x^2 - 10x + 12$ > >
\boxed{2x^3 - 4x^2 - 10x + 12}
> **Q11: The graph of $P(x)$ touches the $x$-axis at $x=2$ and crosses at $x=-1$. What can you say about the factors?** > > **Strategy Hint:** Touching → even multiplicity. Crossing → odd multiplicity. > > $(x-2)$ has even exponent (at least 2). $(x+1)$ has odd exponent (at least 1). > >
\boxed{(x-2)^k \text{ with } k \text{ even}, (x+1)^m \text{ with } m \text{ odd}}
> **Q12: Divide $(x^4 - 3x^3 + 2x^2 - x + 5) \\div (x^2 + 1)$.** > > **Strategy Hint:** Long division with quadratic divisor. > > $x^4 - 3x^3 + 2x^2 - x + 5$ ÷ $(x^2 + 1)$ > Quotient: $x^2 - 3x + 1$, Remainder: $2x + 4$ > >
\boxed{x^2 - 3x + 1 + \frac{2x+4}{x^2+1}}$$ --- ## 🔗 Cross-References - Previous topics: [Quadratic Functions](/courses/bsma1001/notes/quadratics-introduction), [Quadratic Equations](/courses/bsma1001/notes/quadratics-equations) - Next topic: [Exponential Functions](/courses/bsma1001/notes/.%2Fweek05%2Ffunctions-exponential) - Across courses: BSMA1003 Maths 2 (Taylor polynomials, polynomial interpolation); BSMA1002 Stats 1 (polynomial regression) Join Discord Previous3.2 Quadratic Equations & DiscriminantNext5.1 Exponential Functions
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.