import { TrendingUp, BarChart, Zap, RotateCcw, Layers, BookOpen, } from "lucide-react"; import LessonShell, { ConceptCard, FormulaBox, ExampleCard, TipCard, PracticeFromDataset, } from "../../../components/lessons/LessonShell"; import ParabolaWidget from "../../../components/lessons/ParabolaWidget"; import PolynomialBehaviorWidget from "../../../components/lessons/PolynomialBehaviorWidget"; import ExponentialExplorer from "../../../components/lessons/ExponentialExplorer"; import RemainderTheoremWidget from "../../../components/lessons/RemainderTheoremWidget"; import GrowthComparisonWidget from "../../../components/lessons/GrowthComparisonWidget"; import { NONLINEAR_FUNC_EASY, NONLINEAR_FUNC_MEDIUM, } from "../../../data/math/nonlinear-functions"; interface LessonProps { onFinish?: () => void; } const SECTIONS = [ { title: "Quadratic Functions", icon: TrendingUp }, { title: "Polynomial Behavior", icon: BarChart }, { title: "Exponential Growth & Decay", icon: Zap }, { title: "Radical & Rational Functions", icon: RotateCcw }, { title: "Transformations", icon: Layers }, { title: "Practice & Quiz", icon: BookOpen }, ]; export default function NonlinearFunctionsLesson({ onFinish }: LessonProps) { return ( {/* Section 1: Quadratic Functions */}

Quadratic Functions

A quadratic function can be written in three forms, each revealing different information:

Standard Form

f(x) = ax² + bx + c

Shows y-intercept (c)

Vertex Form

f(x) = a(x − h)² + k

Shows vertex (h, k)

Factored Form

f(x) = a(x − r₁)(x − r₂)

Shows x-intercepts (r₁, r₂)

Vertex x-coordinate: x = −b ÷ 2a

If a > 0 → opens up (minimum). If a < 0 → opens down (maximum).

f(x) = 2x² − 8x + 3

x = −(−8) ÷ (2 × 2) = 8 ÷ 4 = 2

f(2) = 2(4) − 16 + 3 = −5

Vertex: (2, −5), minimum value = −5

{/* Section 2: Polynomial Behavior */}

Polynomial Behavior

The degree determines the maximum number of turning points (degree − 1). The leading coefficient and degree determine end behavior.

Degree Leading Coeff Left End Right End
Even Positive ↑ Up ↑ Up
Even Negative ↓ Down ↓ Down
Odd Positive ↓ Down ↑ Up
Odd Negative ↑ Up ↓ Down

f(x) = −2x³ + 5x

Degree 3 (odd), negative leading coefficient

Rises left, falls right

Remainder Theorem Explorer

Slide the divisor value to see how the remainder changes — when it hits zero, you've found a root!

{/* Section 3: Exponential Growth & Decay */}

Exponential Growth & Decay

Exponential functions change by a constant factor{" "} (not a constant amount like linear functions).

Growth: f(x) = a(1 + r)x   where b = 1 + r > 1 Decay: f(x) = a(1 − r)x   where b = 1 − r < 1

Growth (b > 1)

Population, compound interest, bacteria

Decay (0 < b < 1)

Depreciation, radioactive decay, cooling

Population starts at 500, grows 8% per year

P(t) = 500(1.08)t

Car worth $25,000 depreciates 15% per year

V(t) = 25000(0.85)t

Linear vs Exponential Growth

Compare how linear and exponential growth diverge over time.

"Doubles every 3 years" means f(t) = a × 2t÷3. "Halves every 5 hours" means f(t) = a × (0.5)t÷5.

{/* Section 4: Radical & Rational Functions */}

Radical & Rational Functions

Radical functions: f(x) = √(expression). Domain requires expression ≥ 0.
Rational functions: f(x) = p(x) ÷ q(x). Domain excludes where q(x) = 0.

Vertical Asymptotes

Where denominator = 0 (and numerator ≠ 0)

Horizontal Asymptotes

Compare degrees of numerator and denominator

f(x) = (x + 2) ÷ (x − 3)

Vertical asymptote: x = 3

Horizontal asymptote: y = 1 (same degree → ratio of leading coefficients)

{/* Section 5: Transformations */}

Function Transformations

Transformations modify the graph of a parent function.

Notation Transformation
f(x) + k Shift up k units
f(x) − k Shift down k units
f(x − h) Shift right h units
f(x + h) Shift left h units
−f(x) Reflect over x-axis
f(−x) Reflect over y-axis
af(x) Vertical stretch (a > 1) or compress (0 < a < 1)

"Inside" changes (affecting x) go the opposite{" "} direction. "Outside" changes (affecting y) go the{" "} same direction.

{/* Section 6: Practice & Quiz */}

Practice & Quiz

{NONLINEAR_FUNC_EASY.slice(0, 2).map((q) => ( ))} {NONLINEAR_FUNC_MEDIUM.slice(0, 1).map((q) => ( ))}
); }