Day 7 — Rational Expressions, Functions & Quadratics

Updated

July 30, 2025

Day 7 — Rational Expressions, Functions & Quadratics

Day 17 — Rational expressions

Stage II · concept day
Goal: Find domains of rational expressions; simplify by canceling factors; multiply, divide, and add; simplify complex fractions; set up partial fractions for distinct linear factors (prep for recurrences later).

Why this matters

Rational expressions are ratios of polynomials—the algebraic form of transfer functions, probabilities as ratios of polynomials in generating functions, and many closed forms. Canceling incorrectly creates extraneous domains or loses holes. Partial fractions decompose for integration and for inverse Z-transforms / recurrence solving later.

Theory

Definition and domain

A rational expression is \(\dfrac{p(x)}{q(x)}\) where \(p,q\) are polynomials and \(q\not\equiv 0\).
Domain: all \(x\) such that \(q(x)\neq 0\) (over \(\mathbb{R}\)).

Even after simplifying, report excluded values from the original denominator.

Simplifying

Factor numerator and denominator; cancel common factors (not terms).
\[\frac{x^2-1}{x^2-x}=\frac{(x-1)(x+1)}{x(x-1)}=\frac{x+1}{x}\quad(x\neq 0,1).\] At \(x=1\) original undefined (hole if simplified expression would be defined).

Multiplication and division

\[ \frac{a}{b}\cdot\frac{c}{d}=\frac{ac}{bd},\qquad \frac{a}{b}\div\frac{c}{d}=\frac{a}{b}\cdot\frac{d}{c}, \] with all denominators nonzero. Factor first, cancel across.

Addition and subtraction

Common denominator: \[\frac{a}{b}+\frac{c}{d}=\frac{ad+bc}{bd}.\] Prefer LCD of polynomial denominators (LCM of factorizations).

Complex fractions

Fractions within fractions: multiply top and bottom by LCD of all inner denominators, or rewrite as division.

Equations with rationals

Clear denominators by multiplying by LCD, then check solutions against excluded values (extraneous roots).

Partial fractions setup (distinct linear factors)

If \[R(x)=\frac{p(x)}{(x-r_1)(x-r_2)\cdots(x-r_n)}\] with \(\deg p<\deg\) denominator and distinct \(r_i\), seek \[R(x)=\frac{A_1}{x-r_1}+\cdots+\frac{A_n}{x-r_n}.\]

Cover-up / equate coefficients: multiply both sides by the full denominator: \[p(x)=A_1\prod_{j\neq 1}(x-r_j)+\cdots.\] Set \(x=r_i\) to isolate \(A_i\), or expand and compare coefficients.

Today: setup and solve small systems for \(A_i\); not full Heaviside theory.

Example form: \(\dfrac{3x+1}{(x-1)(x+2)}=\dfrac{A}{x-1}+\dfrac{B}{x+2}\).

If improper (\(\deg p\ge \deg q\)), first polynomial-divide, then decompose the proper remainder.

Holes vs vertical asymptotes (function view)

After canceling \((x-c)\) from \(\frac{(x-c)p_1(x)}{(x-c)q_1(x)}\) with \(q_1(c)\neq 0\), the simplified function \(\frac{p_1}{q_1}\) is defined at \(c\), but the original rational expression is not. Graphically this is a hole (removable discontinuity). If \(q_1(c)=0\) still, \(c\) remains a true singularity (often a vertical asymptote for the simplified form).

LCD construction algorithm

  1. Factor every denominator completely over \(\mathbb{R}\) (linears/irreducible quadratics—today linears).
  2. LCD = product of highest power of each distinct factor appearing.
  3. Rewrite each fraction with the LCD; add numerators; factor/simplify; restore excluded zeros of original denominators.

Why partial fractions work (dimension count lite)

For distinct linear factors, the map \((A_1,\ldots,A_n)\mapsto \sum A_i\prod_{j\neq i}(x-r_j)\) produces all polynomials of degree \(<n\) as numerators when the product of \((x-r_i)\) is the denominator of degree \(n\). So a unique decomposition exists for every proper rational with those poles.

Worked examples

Example 1 — Domain

\(\dfrac{x+1}{x^2-4}\): domain \(x\neq \pm 2\).

Example 2 — Simplify

\(\dfrac{x^2-9}{x^2-x-6}=\dfrac{(x-3)(x+3)}{(x-3)(x+2)}=\dfrac{x+3}{x+2}\), \(x\neq 3,-2\).

Example 3 — Multiply

\(\dfrac{x^2-1}{x}\cdot\dfrac{2x}{x+1}=\dfrac{(x-1)(x+1)\cdot 2x}{x(x+1)}=2(x-1)\), \(x\neq 0,-1\).

Example 4 — Divide

\(\dfrac{x}{x-2}\div\dfrac{x^2}{x^2-4}=\dfrac{x}{x-2}\cdot\dfrac{(x-2)(x+2)}{x^2}=\dfrac{x+2}{x}\), \(x\neq 0,2,-2\).

Example 5 — Add

\(\dfrac{2}{x}+\dfrac{3}{x-1}=\dfrac{2(x-1)+3x}{x(x-1)}=\dfrac{5x-2}{x(x-1)}\).

Example 6 — Subtract

\(\dfrac{x}{x+1}-\dfrac{1}{x}=\dfrac{x^2-(x+1)}{x(x+1)}=\dfrac{x^2-x-1}{x(x+1)}\).

Example 7 — Complex

\(\dfrac{1+\dfrac{1}{x}}{1-\dfrac{1}{x}}=\dfrac{\frac{x+1}{x}}{\frac{x-1}{x}}=\dfrac{x+1}{x-1}\), \(x\neq 0,1\).

Example 8 — Equation

\(\dfrac{x}{x-1}=2\). Multiply by \(x-1\): \(x=2(x-1)\). \(x=2x-2\). \(x=2\). Check: \(x\neq 1\), OK. \(\frac{2}{1}=2\).

Example 9 — Extraneous

\(\dfrac{x}{x-1}=\dfrac{1}{x-1}\). Multiply: \(x=1\), but \(x\neq 1\) excluded. No solution. (Equivalently \(x-1=0\) impossible in domain.)

Example 10 — Partial fractions

\(\dfrac{3x+1}{(x-1)(x+2)}=\dfrac{A}{x-1}+\dfrac{B}{x+2}\).
\(3x+1=A(x+2)+B(x-1)\).
\(x=1\): \(4=A(3)\Rightarrow A=\frac{4}{3}\).
\(x=-2\): \(-5=B(-3)\Rightarrow B=\frac{5}{3}\).
Check: \(\frac{4/3}{x-1}+\frac{5/3}{x+2}=\frac{(4/3)(x+2)+(5/3)(x-1)}{(x-1)(x+2)}=\frac{\frac{4x+8+5x-5}{3}}{\cdots}=\frac{3x+1}{(x-1)(x+2)}\).

Example 11 — Three factors setup

\(\dfrac{1}{x(x-1)(x+1)}=\dfrac{A}{x}+\dfrac{B}{x-1}+\dfrac{C}{x+1}\).

Example 12 — Improper

\(\dfrac{x^2+1}{x-1}=x+1+\dfrac{2}{x-1}\) by division: \((x-1)(x+1)=x^2-1\), remainder \(2\).

Example 13 — LCD multi-factor

\(\dfrac{1}{x^2-1}+\dfrac{1}{x+1}=\dfrac{1}{(x-1)(x+1)}+\dfrac{1}{x+1}=\dfrac{1+(x-1)}{(x-1)(x+1)}=\dfrac{x}{(x-1)(x+1)}\).

Example 14 — Simplify nested

\(\dfrac{\dfrac{x}{y}-1}{\dfrac{x}{y}+1}=\dfrac{x-y}{x+y}\) (multiply by \(y/y\)).

Example 15 — Hole vs asymptote

\(\dfrac{x^2-1}{x^2-x}=\dfrac{(x-1)(x+1)}{x(x-1)}=\dfrac{x+1}{x}\) for \(x\neq 0,1\).
At \(x=1\): hole. At \(x=0\): still undefined after simplify (vertical asymptote of \(\frac{x+1}{x}\)).

Example 16 — Rational equation two candidates

\(\dfrac{x}{x-2}+\dfrac{2}{x+1}=1\). LCD \((x-2)(x+1)\).
\(x(x+1)+2(x-2)=(x-2)(x+1)\).
\(x^2+x+2x-4=x^2-x-2\).
\(3x-4=-x-2\). \(4x=2\). \(x=\frac12\).
Excluded: \(x\neq 2,-1\). Solution \(x=\frac12\) works.

Example 17 — Cover-up formula

For \(\dfrac{px+q}{(x-a)(x-b)}=\dfrac{A}{x-a}+\dfrac{B}{x-b}\),
\(A=\dfrac{pa+q}{a-b}\), \(B=\dfrac{pb+q}{b-a}\).
Apply: \(\dfrac{5x-1}{(x+1)(x-2)}\): \(A=\frac{5(-1)-1}{-1-2}=\frac{-6}{-3}=2\), \(B=\frac{10-1}{2-(-1)}=3\). So \(\frac{2}{x+1}+\frac{3}{x-2}\).

Example 18 — Difference for telescoping

\(\dfrac{1}{(k+1)(k+2)}=\dfrac{1}{k+1}-\dfrac{1}{k+2}\). Cover-up: \(A(k+2)+B(k+1)=1\); \(k=-1\): \(A=1\); \(k=-2\): \(B=-1\).

Example 19 — Domain of a sum after simplify

\(\dfrac{x}{x-1}-\dfrac{1}{x-1}=\dfrac{x-1}{x-1}=1\) for \(x\neq 1\) only—not the constant function \(1\) on all \(\mathbb{R}\).

Example 20 — LCD with powers

\(\dfrac{1}{x}+\dfrac{1}{x^2}=\dfrac{x+1}{x^2}\) (LCD \(x^2\); this is repeated linear factor—addition only today; full partial fractions for \(1/x^2\) later if needed).

Exercises

Easy

  1. Domain of \(\dfrac{x-3}{x^2-9}\).
  2. Simplify \(\dfrac{x^2-4}{x-2}\).
  3. Multiply \(\dfrac{3}{x+1}\cdot\dfrac{x^2-1}{6}\).
  4. Add \(\dfrac{1}{x}+\dfrac{1}{2}\).
  5. \(\dfrac{x}{5}\div\dfrac{x}{10}\).

Medium

  1. Simplify \(\dfrac{x^2+5x+6}{x^2-x-12}\) with domain notes.
  2. Compute \(\dfrac{x}{x-1}-\dfrac{x}{x+1}\); simplify.
  3. Simplify \(\dfrac{\frac{2}{x}-\frac{1}{x+1}}{\frac{3}{x}}\).
  4. Solve \(\dfrac{2}{x}+\dfrac{1}{x-1}=1\); check domain.
  5. Decompose \(\dfrac{5x-1}{(x+1)(x-2)}\) into partial fractions.
  6. Decompose \(\dfrac{2x+3}{x^2-x}\).
  7. Divide \(\dfrac{x^3+1}{x+1}\) as polynomials; write as polynomial + proper remainder if needed.
  8. \(\dfrac{1}{x-1}-\dfrac{2}{x}+\dfrac{1}{x+1}\); combine carefully.

Hard

  1. Prove that canceling a factor \((x-c)\) removes a potential root of the denominator and may introduce a removable discontinuity (hole) at \(x=c\).
  2. Set up partial fractions for \(\dfrac{x^2+1}{(x-1)(x-2)(x-3)}\) (find \(A,B,C\)).
  3. Explain why \(\dfrac{x-1}{x-1}=1\) is not an identity on all of \(\mathbb{R}\).
  4. Solve \(\dfrac{x+1}{x-1}=\dfrac{x-1}{x+1}\); check.
  5. If \(\dfrac{p(x)}{q(x)}\) is already simplified (\(\gcd(p,q)=1\)), show domain is exactly zeros of \(q\).
  6. Complex fraction: \(\dfrac{1}{1+\dfrac{1}{1+\dfrac{1}{x}}}\) simplify for \(x\neq 0,-1,\ldots\).
  7. Show addition formula using common denominator algebraically.

Challenge / CS-flavored

  1. Probability rational: \(\dfrac{n(n-1)}{n^2}\) simplify; limit intuition as \(n\to\infty\) (no formal limits required).
  2. Runtime ratio \(\dfrac{n^2+n}{2n^2}\); simplify and interpret for large \(n\).
  3. Partial fractions prep: why \(\dfrac{1}{k(k+1)}=\dfrac{1}{k}-\dfrac{1}{k+1}\) telescopes (Day 21).
  4. Hash load \(\dfrac{n}{m}\); keep symbolic—when is expression undefined?
  5. Extraneous roots in code: solving after multiplying by x-1 without checking x!=1.

Polynomial GCD (idea)

To reduce \(\frac{p}{q}\), cancel \(\gcd(p,q)\) in the polynomial ring (Euclidean algorithm with division). For hand work, factor both and cancel common polynomial factors.

Sign patterns and LCD

When denominators are \((x-1)(x+2)\) and \((x-1)\), LCD is \((x-1)(x+2)\). Keep factored form until the end when possible.

Partial fractions with three distinct lines

\(\frac{px^{2}+qx+r}{(x-a)(x-b)(x-c)}=\frac{A}{x-a}+\frac{B}{x-b}+\frac{C}{x-c}\) for proper numerator. Cover-up: \(A=\frac{p a^{2}+q a+r}{(a-b)(a-c)}\), etc.

Telescoping seed

\(\frac{1}{k(k+1)}=\frac{1}{k}-\frac{1}{k+1}\) is partial fractions on integers—Day 21 uses this heavily.

Extra exercises

  1. Simplify \(\frac{x^{3}-1}{x^{2}-1}\) with domain.
  2. Add \(\frac{1}{x^{2}-1}+\frac{1}{x^{2}+2x+1}\).
  3. Solve \(\frac{3}{x}+\frac{4}{x+1}=2\).
  4. Decompose \(\frac{2x}{(x-1)(x-2)(x-3)}\).
  5. Why is \(\frac{(x-1)^{2}}{x-1}\) not equal to \(x-1\) as functions on all \(\mathbb{R}\)?

CS connection

Simplifying rationals is like reducing fractions of big integers (Day 2) with polynomial gcd. Domain tracking is precondition checking. Partial fractions appear in summing series and solving linear recurrences. Removable discontinuities are “holes” analogous to optional values / undefined at a point.

Common pitfalls

Pitfall What to do instead
Canceling terms \(+\) Factor completely first
Losing excluded values after simplify State original domain
Adding denominators LCD / cross method
Extraneous solutions Always check
Partial fractions without proper form Divide first if improper
Forgetting factor multiplicity Distinct linear only today; repeated needs higher powers

Fully worked extra examples

E15 — LCD with three denominators.
\(\frac{1}{x}+\frac{1}{x+1}+\frac{1}{x-1}=\frac{(x+1)(x-1)+x(x-1)+x(x+1)}{x(x^{2}-1)}=\frac{x^{2}-1+x^{2}-x+x^{2}+x}{x(x^{2}-1)}=\frac{3x^{2}-1}{x(x^{2}-1)}\).

E16 — Extraneous root walkthrough.
\(\frac{2}{x-3}=\frac{x}{x-3}\). Multiply by \(x-3\): \(2=x\). But \(x=3\) is excluded and \(x=2\) works: \(\frac{2}{-1}=-2\) and \(\frac{2}{-1}=-2\). Wait check: for \(x=2\), both sides \(\frac{2}{-1}=-2\). Good. If equation were \(\frac{2}{x-3}=\frac{3}{x-3}\), then \(2=3\) never—empty.

E17 — Partial fractions three terms.
\(\frac{1}{x(x-1)(x+1)}=\frac{A}{x}+\frac{B}{x-1}+\frac{C}{x+1}\).
\(1=A(x^{2}-1)+Bx(x+1)+Cx(x-1)\).
\(x=0\): \(1=A(-1)\Rightarrow A=-1\).
\(x=1\): \(1=B(1)(2)\Rightarrow B=\frac12\).
\(x=-1\): \(1=C(-1)(-2)\Rightarrow C=\frac12\).
So \(-\frac{1}{x}+\frac{1/2}{x-1}+\frac{1/2}{x+1}\).

E18 — Improper then partial.
\(\frac{x^{2}+1}{x^{2}-1}=1+\frac{2}{x^{2}-1}=1+\frac{2}{(x-1)(x+1)}=1+\frac{1}{x-1}-\frac{1}{x+1}\) after partial fractions on \(\frac{2}{(x-1)(x+1)}\).

End-of-day synthesis problems

S1. Simplify \(\dfrac{x^{2}-5x+6}{x^{2}-9}\) with full domain notes from original.

S2. Compute \(\dfrac{x}{x+2}+\dfrac{3}{x-1}\) as a single fraction.

S3. Complex: \(\dfrac{1+\frac{2}{x}}{1-\frac{4}{x^{2}}}\) simplify.

S4. Solve \(\dfrac{x+1}{x-1}=\dfrac{2x}{x+1}\); check excluded values.

S5. Partial fractions \(\dfrac{4x}{(x-1)(x+3)}\).

S6. Polynomial divide \(\dfrac{x^{2}+0x+1}{x-1}\) to proper form.

S7. Why \(\dfrac{x-2}{x-2}=1\) fails at \(x=2\).

S8. Setup only: \(\dfrac{x^{2}+1}{(x-1)(x-2)(x-4)}=\frac{A}{x-1}+\frac{B}{x-2}+\frac{C}{x-4}\).

Deep dive — Extraneous roots catalog

Move Risk
Multiply by LCD that can be zero Introduce candidates outside domain
Cancel factor \((x-c)\) in equation May lose \(x=c\) if it was a solution of original (rare for rationals equal) or hide undefined
Square both sides (later abs) Extraneous possible
Take reciprocal of both sides Flip inequality direction; for equations need both nonzero and careful

Discipline: every time you multiply an equation by an expression, record “provided \(\ldots\neq 0\),” then check candidates against that list.

Synthesis

Rational expressions are polynomial ratios with domain hygiene. Arithmetic uses factor–cancel–LCD. Equations clear denominators then reject excluded values. Partial fractions reverse addition: they split a proper fraction into simple pole terms—seed for telescoping sums (Day 21) and recurrence closed forms later.

S9. Simplify \(\dfrac{x^3-8}{x^2-4}\) with full domain notes.

S10. Solve \(\dfrac{x+2}{x-3}=\dfrac{2x}{x+1}\); reject extraneous if any.

S11. Decompose \(\dfrac{x+5}{(x-1)(x+2)(x-3)}\) (find \(A,B,C\)).

S12. Explain hole vs asymptote for \(\dfrac{x^2-4}{x^2-5x+6}\).

Checkpoint

  • State domain from denominator zeros
  • Simplify, multiply, divide, add rational expressions
  • Simplify complex fractions
  • Solve a rational equation with extraneous check
  • Set up and solve partial fractions for two distinct linear factors
  • S1 and S5 exam-ready

Write two takeaways in your own words.

Quick reference card

Task Rule
Domain denominator \(\neq 0\) (original)
Simplify factor; cancel factors only
Multiply numerators \(\times\); dens \(\times\)
Divide multiply by reciprocal
Add LCD of dens
Partial fracs proper; distinct linear dens → sum \(A_i/(x-r_i)\)
Equations clear LCD; reject excluded roots

Tomorrow

Day 18 — Functions. Definition as rule/pairs; domain/range; vertical line test; piecewise; graph reading; even/odd; inverse existence idea.


Day 18 — Functions

Stage II · concept day
Goal: Define functions as rules and as sets of pairs; determine domain and range; apply the vertical line test; work with piecewise definitions; read graphs; identify even/odd functions; understand when inverses exist.

Why this matters

Functions are the central abstraction of mathematics and programming: input → unique output. Graphs, APIs, hash maps (partial functions), and complexity \(T(n)\) are all functions. Inverse existence is bijectivity—undoable computation on a domain.

Theory

Definition

A function \(f\) from set \(A\) to set \(B\), written \(f:A\to B\), assigns to each \(a\in A\) exactly one element \(f(a)\in B\).

  • \(A\) is the domain.
  • \(B\) is the codomain.
  • The range (image) is \(\{f(a):a\in A\}\subseteq B\).

As a set of pairs: \(f\subseteq A\times B\) such that for every \(a\in A\) there is unique \(b\) with \((a,b)\in f\), and we write \(b=f(a)\).

Not a function

A rule that assigns two outputs to one input fails.
Vertical line test (for graphs in the plane): a graph is a function \(y=f(x)\) iff every vertical line hits the graph at most once.

Common real functions

Polynomials, rationals (on their domains), \(x\mapsto |x|\), \(\sqrt{x}\) (domain \(x\ge 0\)), exponential, log.

Piecewise definitions

\[ f(x)=\begin{cases} x^2 & x<0\\ 2x & x\ge 0. \end{cases} \]

Evaluate by selecting the piece whose condition holds. Check consistency at boundaries if claimed continuous later.

Evaluating and algebra of functions

\((f+g)(x)=f(x)+g(x)\), \((fg)(x)=f(x)g(x)\), \((cf)(x)=c\,f(x)\) on common domain.
Composition: \((f\circ g)(x)=f(g(x))\) when \(g(x)\) in domain of \(f\).
Composition is not commutative in general: \(f\circ g\neq g\circ f\).

Even and odd functions

  • Even: \(f(-x)=f(x)\) for all \(x\) in domain (symmetric about \(y\)-axis). Example: \(x^2\), \(\cos\) (later).
  • Odd: \(f(-x)=-f(x)\) (rotational symmetry \(180^\circ\) about origin). Example: \(x^3\), \(x\).

Domain must be symmetric about \(0\) for the definitions to make sense globally.

Injective, surjective, bijective (for inverses)

  • Injective (one-to-one): \(f(a)=f(b)\Rightarrow a=b\). Horizontal line test: each horizontal line hits graph at most once.
  • Surjective (onto) \(A\to B\): range \(=B\).
  • Bijective: both → invertible.

Inverse functions

If \(f:A\to B\) is bijective, the inverse \(f^{-1}:B\to A\) satisfies \[f^{-1}(f(a))=a,\qquad f(f^{-1}(b))=b.\]

Graph of \(f^{-1}\) is reflection of graph of \(f\) across \(y=x\).
Finding formulas: set \(y=f(x)\), solve for \(x\) in terms of \(y\), swap names.

Not every function has an inverse on its full domain: \(f(x)=x^2\) on \(\mathbb{R}\) is not injective; restrict to \([0,\infty)\) to invert with \(\sqrt{\cdot}\).

Graph reading

From a graph: estimate \(f(a)\), solve \(f(x)=c\) as intersection with \(y=c\), read domain/range as projections on axes, identify increasing/decreasing intervals.

Operations and domains (detail)

Domains of sums/products: \(\mathrm{dom}(f+g)=\mathrm{dom}(f)\cap\mathrm{dom}(g)\).
Domain of quotient \(f/g\): same intersection minus zeros of \(g\).
Domain of \(f\circ g\): \(\{x\in\mathrm{dom}(g): g(x)\in\mathrm{dom}(f)\}\).

Inverse criterion (summary)

\(f:A\to B\) has inverse function \(B\to A\) iff \(f\) is bijective.
On intervals, continuous strictly monotonic \(\Rightarrow\) injective \(\Rightarrow\) invertible onto its image.
Finding \(f^{-1}\) algebraically: \(y=f(x)\) solve for \(x\); swap labels; state new domain = old range.

Even/odd decomposition (theorem)

If \(\mathrm{dom}(f)\) is symmetric about \(0\), define \[f_e(x)=\frac{f(x)+f(-x)}{2},\qquad f_o(x)=\frac{f(x)-f(-x)}{2}.\] Then \(f_e\) is even, \(f_o\) is odd, and \(f=f_e+f_o\). Unique such decomposition.

Worked examples

Example 1 — Function check

\(\{(1,2),(2,2),(3,4)\}\) is a function. \(\{(1,2),(1,3)\}\) is not.

Example 2 — Domain

\(f(x)=\sqrt{x-1}+\frac{1}{x-3}\): \(x\ge 1\) and \(x\neq 3\), so \([1,3)\cup(3,\infty)\).

Example 3 — Piecewise eval

\(f(x)=\begin{cases}-x&x<1\\ x^2&x\ge 1\end{cases}\): \(f(0)=0\), \(f(1)=1\), \(f(2)=4\).

Example 4 — Composition

\(f(x)=x+1\), \(g(x)=x^2\). \((f\circ g)(x)=x^2+1\), \((g\circ f)(x)=(x+1)^2\).

Example 5 — Even/odd

\(f(x)=x^4-2x^2\) even. \(g(x)=x^3-x\) odd. \(h(x)=x^2+x\) neither.

Example 6 — Inverse

\(f(x)=2x-3\) on \(\mathbb{R}\). \(y=2x-3\), \(x=\frac{y+3}{2}\), so \(f^{-1}(y)=\frac{y+3}{2}\).

Example 7 — Restrict for inverse

\(f(x)=x^2\) on \([0,\infty)\): \(f^{-1}(x)=\sqrt{x}\). On \(\mathbb{R}\) no inverse function.

Example 8 — Range

\(f(x)=x^2\) on \(\mathbb{R}\): range \([0,\infty)\). \(f(x)=\frac{1}{x}\) on \(\mathbb{R}\setminus\{0\}\): range \(\mathbb{R}\setminus\{0\}\).

Example 9 — Horizontal line

\(y=x^3\) passes horizontal line test (strictly increasing). Inverse \(\sqrt[3]{x}\).

Example 10 — API analogy

abs: R → R is a function, not injective. sqrt: [0,∞) → [0,∞) inverse of square on that domain.

Example 11 — Graph features

If graph passes through \((2,5)\), then \(f(2)=5\). If horizontal line \(y=5\) hits three times, three solutions to \(f(x)=5\), not injective.

Example 12 — Algebra of functions

\(f(x)=x+1\), \(g(x)=x-1\): \((fg)(x)=x^2-1\), \((f+g)(x)=2x\).

Example 13 — Codomain vs range

\(f:\mathbb{R}\to\mathbb{R}\), \(f(x)=e^x\) has range \((0,\infty)\neq\mathbb{R}\), so not surjective onto \(\mathbb{R}\). As \(f:\mathbb{R}\to(0,\infty)\) it is bijective.

Example 14 — Difference quotient idea

\(\frac{f(x+h)-f(x)}{h}\) for \(f(x)=x^2\): \(\frac{2xh+h^2}{h}=2x+h\) (\(h\neq 0\))—slope preview.

Example 15 — Domain of composition carefully

\(g(x)=\sqrt{x-1}\), \(f(x)=\ln x\) (or \(\log\) later): \((f\circ g)(x)=\log\sqrt{x-1}\) needs \(x\ge 1\) and \(\sqrt{x-1}>0\) so \(x>1\) if log domain is \((0,\infty)\). With only algebraic tools today: \(f(x)=1/x\), \((f\circ g)\) needs \(\sqrt{x-1}\neq 0\) so \(x>1\) and \(x\ge 1\)\(x>1\).

Example 16 — Prove injectivity from strictly increasing

If \(x_1<x_2\Rightarrow f(x_1)<f(x_2)\), then \(f(a)=f(b)\) forces \(a=b\) (else order contradicts). Hence injective. Example: \(f(x)=2x+1\).

Example 17 — Preimage vs inverse

\(f(x)=x^2\) on \(\mathbb{R}\). Preimage \(f^{-1}(\{4\})=\{-2,2\}\)—a set, not a single value. Inverse function does not exist on full \(\mathbb{R}\).

Example 18 — Piecewise inverse

\(f(x)=\begin{cases}x+1&x<0\\ 2x&x\ge 0\end{cases}\). Check injectivity: may fail or need care at pieces—\(f(-0.5)=0.5\), \(f(0.25)=0.5\) collision! Not injective, no inverse.

Example 19 — Even + odd = general

\(f(x)=e^x\) (preview): \(f_e=\cosh\) shape, \(f_o=\sinh\) shape—culture names later. Algebraically: \(f_e(x)=\frac{e^x+e^{-x}}{2}\).

Example 20 — Surjective by codomain choice

\(f:\mathbb{R}\to\mathbb{R}\), \(f(x)=x^2\) not surjective. Same rule \(f:\mathbb{R}\to[0,\infty)\) is surjective. Codomain is part of the function specification in typed mathematics.

Exercises

Easy

  1. Which are functions of \(x\)? \(y=x^2\), \(x=y^2\), \(y=\pm\sqrt{x}\).
  2. Domain of \(\dfrac{1}{x^2-1}\).
  3. If \(f(x)=3x-2\), find \(f(0)\), \(f(-1)\), \(f(a+1)\).
  4. Is \(f(x)=|x|\) even, odd, or neither?
  5. Evaluate piecewise: \(f(x)=1\) if \(x\ge 0\), else \(-1\) (sign-like); \(f(-2)\), \(f(0)\).

Medium

  1. Domain and range of \(f(x)=\sqrt{4-x^2}\) (think circle semicircle).
  2. Compute \(f\circ g\) and \(g\circ f\) for \(f(x)=1/x\), \(g(x)=x+1\) (note domains).
  3. Show \(f(x)=x^3+x\) is odd; is it injective on \(\mathbb{R}\)?
  4. Find inverse of \(f(x)=\frac{x-1}{x+1}\) (\(x\neq -1\)); give domain of inverse.
  5. Vertical line test: explain why a circle \(x^2+y^2=1\) is not \(y=f(x)\) as a whole.
  6. For \(f(x)=x^2-4x\), complete the square idea later—find vertex form optional; compute \(f(2)\).
  7. Graph reading (describe): if \(f\) increasing on \(\mathbb{R}\), can it have \(f(1)=f(2)\)?
  8. Codomain \(\{0,1\}\): give a surjective function from \(\mathbb{Z}\) (e.g. parity).

Hard / proof

  1. Prove: composition of two injective functions is injective.
  2. Prove: if \(f\) is invertible, its inverse is unique.
  3. Show \(f(x)=x^2\) is not injective on \(\mathbb{R}\) but is on \([0,\infty)\).
  4. Prove that if \(f\) is even and odd, then \(f(x)=0\) for all \(x\) in the (symmetric) domain.
  5. Define \(f:\{1,2,3\}\to\{a,b\}\) with \(f(1)=f(2)=a\), \(f(3)=b\). Image? Injective? Surjective?
  6. For \(f(x)=mx+b\) with \(m\neq 0\), prove bijective \(\mathbb{R}\to\mathbb{R}\) and find inverse.
  7. Explain horizontal line test from the definition of injectivity.

Challenge / CS-flavored

  1. Map dict keys to values: when is it a function? When injective?
  2. Hash function \(h:U\to\{0,\ldots,m-1\}\): typically not injective—collisions.
  3. clamp(x,a,b) piecewise; is it idempotent: \(\mathrm{clamp}(\mathrm{clamp}(x))=\)?
  4. Inverse of Celsius↔︎Fahrenheit functions—compose to identity.
  5. Complexity \(T(n)=n\log n\) as function \(\mathbb{Z}_{>0}\to\mathbb{R}\)—domain discrete.

Image and preimage

Image of \(S\subseteq A\): \(f(S)=\{f(s):s\in S\}\).
Preimage of \(T\subseteq B\): \(f^{-1}(T)=\{a\in A: f(a)\in T\}\) (defined even when \(f\) not invertible!).
Notation clash: \(f^{-1}\) for inverse function vs preimage—context decides.

Monotonicity

\(f\) increasing if \(x_1<x_2\Rightarrow f(x_1)\le f(x_2)\); strictly increasing with \(<\).
Strictly monotonic continuous functions on intervals are injective and invertible onto their images.

Piecewise continuity notes

Pieces may disagree at boundaries if not carefully defined—specify value at breakpoints. Example: \(f(x)=0\) for \(x<0\) and \(1\) for \(x\ge 0\) (Heaviside-like).

Composition associativity

\((f\circ g)\circ h=f\circ(g\circ h)\) when domains allow. Parentheses for order of application still read right-to-left inside \(\circ\) chains.

Extra exercises

  1. Prove: if \(f\) and \(g\) are surjective, so is \(f\circ g\) (when composable).
  2. Domain of \(\sqrt{1-x^{2}}+\log(x+2)\) (real).
  3. Is \(f(x)=x|x|\) even, odd, or neither?
  4. Find inverse of \(f(x)=\frac{2x+1}{x-3}\) (\(x\neq 3\)).
  5. Give a bijection from \(\mathbb{N}\) to \(\mathbb{Z}\) (formula or description).

CS connection

Pure functions, type signatures \(A\to B\), and partial functions (exceptions) match domain issues. Injectivity relates to uniqueness of decoding; surjectivity to covering all codes. Piecewise functions are if/else. Composition is pipelines.

Common pitfalls

Pitfall What to do instead
Confusing range and codomain Range = actual outputs
Inverse of \(x^2\) as \(\pm\sqrt{x}\) multi-valued Restrict domain for a function inverse
\(f^{-1}\) means \(1/f\) Reciprocal is \(1/f\); inverse is undo
Composition order \(f\circ g\) means apply \(g\) first
Even/odd without domain check Need \(x\) and \(-x\) in domain
Graph is “the function” Graph is a representation of the set of pairs

Fully worked extra examples

E15 — Inverse computation carefully.
\(f(x)=\frac{2x-3}{x+1}\), \(x\neq -1\). Set \(y=\frac{2x-3}{x+1}\). \(y(x+1)=2x-3\), \(yx+y=2x-3\), \(yx-2x=-3-y\), \(x(y-2)=-(3+y)\), \(x=\frac{3+y}{2-y}\) for \(y\neq 2\). So \(f^{-1}(y)=\frac{y+3}{2-y}\). Domain of inverse: \(y\neq 2\) (range of \(f\) excludes \(2\) because \(2x-3=2(x+1)\Rightarrow -3=2\) impossible).

E16 — Even/odd decomposition idea.
Any \(f\) defined on symmetric domain: \(f_{e}(x)=\frac{f(x)+f(-x)}{2}\) even, \(f_{o}(x)=\frac{f(x)-f(-x)}{2}\) odd, and \(f=f_e+f_o\).

E17 — Piecewise absolute value.
\(|x-2|=\begin{cases}2-x&x<2\\ x-2&x\ge 2\end{cases}\). Graph V-shape vertex \((2,0)\).

E18 — Composition domain.
\(g(x)=\sqrt{x}\), \(f(x)=\frac{1}{x-1}\). \((f\circ g)(x)=\frac{1}{\sqrt{x}-1}\) needs \(x\ge 0\) and \(\sqrt{x}\neq 1\) so \(x\neq 1\).

End-of-day synthesis problems

S1. Domain of \(f(x)=\dfrac{\sqrt{x+2}}{x-1}\).

S2. Piecewise \(f(x)=x^{2}\) (\(x<1\)), \(3x\) (\(x\ge 1\)): evaluate \(f(0),f(1),f(2)\); is \(f\) a function?

S3. \(f(x)=2x+1\), \(g(x)=x^{2}\): compute \(f\circ g\), \(g\circ f\), and \((f\circ g)(3)\).

S4. Show \(f(x)=x^{3}-x\) is odd; determine injectivity on \(\mathbb{R}\) by testing values or derivative monotony idea.

S5. Inverse of \(f(x)=\frac{x+2}{3x-1}\) (\(x\neq\frac13\)); domain of inverse.

S6. Why \(y^{2}=x\) fails vertical line test as \(y\) in terms of \(x\)?

S7. Range of \(f(x)=1-x^{2}\) on \(\mathbb{R}\).

S8. Prove composition of injectives is injective.

Deep dive — Functions as APIs

Math Programming
Domain Valid inputs (preconditions)
Codomain Declared return type
Range Values actually returned
Injectivity Distinct inputs → distinct outputs (invertible encoding)
Surjectivity Every codomain value hit
Composition Pipeline / middleware
Partial function Throws / Optional / partial map

Hash maps are partial functions from keys to values. Partial application and currying are composition patterns. Type checkers enforce codomain contracts; runtime asserts enforce domain.

Synthesis

A function is a single-valued assignment—set of pairs with unique second components per first. Domain, codomain, and range are three different sets. Invertibility is bijectivity; graphs give vertical/horizontal line tests. Composition is apply-inner-first; even/odd probe symmetry. Everything later in analysis and CS types builds on this vocabulary.

S9. Prove: composition of two surjections (when composable) is surjective.

S10. Domain of \(\sqrt{x-2}+\frac{1}{x-5}\).

S11. Find inverse of \(f(x)=\frac{3x-1}{x+2}\) (\(x\neq -2\)); state domain of inverse.

S12. Decompose \(f(x)=x^3+x^2\) into even and odd parts.

Checkpoint

  • Define function, domain, codomain, range
  • Apply vertical line test; evaluate piecewise
  • Compose functions; test even/odd
  • Find inverse formulas when bijective
  • Explain injectivity via horizontal line test
  • S5 fully worked with domain

Write two takeaways in your own words.

Quick reference card

Concept Test / meaning
Function unique output per input
Vertical line graph test for \(y=f(x)\)
Horizontal line injectivity on graph
Even / odd \(f(-x)=\pm f(x)\)
Inverse undo; needs bijective
Composition \((f\circ g)(x)=f(g(x))\)
Domain of compose \(g(x)\) in domain of \(f\)

Tomorrow

Day 19 — Linear & quadratic functions. Slope-intercept, point-slope, parallel/perp; quadratic vertex form, discriminant, graphs, completing the square.


Day 19 — Linear & quadratic functions

Stage II · concept day
Goal: Master slope-intercept and point-slope forms; use parallel/perpendicular slope conditions; analyze quadratics via vertex form, discriminant, and completing the square; read graph features.

Why this matters

Linear models are first-order approximations everywhere. Quadratics appear in free-fall idealization, parabolic trajectories, and optimization of \(ax^2+bx+c\). Completing the square unlocks vertex and the quadratic formula.

Theory

Slope of a line

Through points \((x_1,y_1)\), \((x_2,y_2)\) with \(x_1\neq x_2\): \[m=\frac{y_2-y_1}{x_2-x_1}.\]

  • \(m>0\) rising; \(m<0\) falling; \(m=0\) horizontal.
  • Vertical lines: \(x=\) constant; slope undefined (not a function \(y=f(x)\)).

Forms of a line

  • Slope-intercept: \(y=mx+b\) (\(b\) = \(y\)-intercept).
  • Point-slope: \(y-y_1=m(x-x_1)\).
  • Standard: \(Ax+By=C\).
  • Two-point: use slope then point-slope.

Parallel and perpendicular

  • Parallel lines: same slope \(m_1=m_2\) (and distinct intercepts if distinct lines).
  • Perpendicular lines (in plane with standard metric): \(m_1 m_2=-1\) if both slopes defined.
    (Horizontal \(\perp\) vertical.)

Proof sketch of perp condition. Direction vectors \((1,m_1)\), \((1,m_2)\) have dot product \(1+m_1 m_2=0\). \(\square\)

Quadratic functions

\[f(x)=ax^2+bx+c,\qquad a\neq 0.\]

  • Parabola graph; opens up if \(a>0\), down if \(a<0\).
  • Axis of symmetry: \(x=-\dfrac{b}{2a}\).
  • Vertex: \(\biggl(-\dfrac{b}{2a},\; f\biggl(-\dfrac{b}{2a}\biggr)\biggr)\).
  • \(y\)-intercept \(c\); \(x\)-intercepts = roots if real.

Completing the square

\[ \begin{align*} ax^2+bx+c&=a\biggl(x^2+\frac{b}{a}x\biggr)+c\\ &=a\biggl(x+\frac{b}{2a}\biggr)^2 - a\biggl(\frac{b}{2a}\biggr)^2 +c\\ &=a\biggl(x+\frac{b}{2a}\biggr)^2 + \biggl(c-\frac{b^2}{4a}\biggr). \end{align*} \]

Vertex form: \(f(x)=a(x-h)^2+k\) with vertex \((h,k)\).

Discriminant and quadratic formula

From completing the square (or formula derivation): \[x=\frac{-b\pm\sqrt{b^2-4ac}}{2a},\qquad \Delta=b^2-4ac.\]

\(\Delta\) Roots
\(>0\) two distinct real
\(=0\) one real (double)
\(<0\) no real roots (two complex)

Graph features checklist

Vertex, axis, intercepts, direction, max/min value \(k\) if vertex form.

Linear vs quadratic growth (preview)

Tables: linear has constant first differences; quadratic has constant second differences.

Derivation of the quadratic formula

Start from \(ax^2+bx+c=0\) with \(a\neq 0\): \[ x^2+\frac{b}{a}x=-\frac{c}{a}. \] Add \(\bigl(\frac{b}{2a}\bigr)^2\) to both sides: \[ \biggl(x+\frac{b}{2a}\biggr)^2=\frac{b^2}{4a^2}-\frac{c}{a}=\frac{b^2-4ac}{4a^2}. \] If \(\Delta=b^2-4ac\ge 0\), \[ x+\frac{b}{2a}=\pm\frac{\sqrt{\Delta}}{2a},\qquad x=\frac{-b\pm\sqrt{\Delta}}{2a}. \] If \(\Delta<0\), no real \(x\). This is the formula—not a separate magic spell.

Sum and product of roots

If roots \(r,s\) (real or complex), \(r+s=-\frac{b}{a}\) and \(rs=\frac{c}{a}\) for monic-normalized \(ax^2+bx+c\).
Proof. \(a(x-r)(x-s)=a(x^2-(r+s)x+rs)=ax^2+bx+c\). \(\square\)
Axis of symmetry \(x=\frac{r+s}{2}=-\frac{b}{2a}\) when roots real.

Section formula / midpoint

Midpoint of \((x_1,y_1)\) and \((x_2,y_2)\) is \(\bigl(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\bigr)\).
The axis \(x=-\frac{b}{2a}\) is the midpoint of the two real roots on the \(x\)-axis.

Worked examples

Example 1 — Slope

Through \((1,2)\) and \((4,8)\): \(m=\frac{6}{3}=2\). Equation \(y-2=2(x-1)\) i.e. \(y=2x\).

Example 2 — Parallel / perp

Line through \((0,1)\) parallel to \(y=3x-2\): \(y=3x+1\).
Perpendicular: slope \(-\frac{1}{3}\), \(y-1=-\frac{1}{3}(x-0)\).

Example 3 — Intercept form to graph

\(2x+3y=6\): \(x\)-intercept \(3\), \(y\)-intercept \(2\).

Example 4 — Vertex formula

\(f(x)=2x^2-8x+3\). \(h=\frac{8}{4}=2\), \(f(2)=8-16+3=-5\). Vertex \((2,-5)\).

Example 5 — Complete the square

\(x^2+6x+5=(x+3)^2-9+5=(x+3)^2-4\). Vertex \((-3,-4)\).

Example 6 — With \(a\neq 1\)

\(2x^2+8x+1=2(x^2+4x)+1=2(x+2)^2-8+1=2(x+2)^2-7\).

Example 7 — Discriminant

\(x^2-4x+4=0\): \(\Delta=0\), root \(x=2\).
\(x^2+x+1=0\): \(\Delta=1-4=-3<0\), no real roots.

Example 8 — Quadratic formula

\(2x^2-3x-2=0\): \(\Delta=9+16=25\), \(x=\frac{3\pm 5}{4}\). \(x=2\) or \(x=-\frac{1}{2}\).

Example 9 — Factored graph

\(f(x)=(x-1)(x-4)=x^2-5x+4\). Roots \(1,4\); vertex at \(x=2.5\), \(f(2.5)=-2.25\).

Example 10 — Max problem

Rectangular enclosure three sides fence \(L=20\), side \(x\), depth \(y\), \(2x+y=20\), area \(A=x(20-2x)=20x-2x^2\). Vertex \(x=5\), \(A=50\).

Example 11 — Linear table

\(x=1,2,3,4\); \(y=3,5,7,9\): first differences \(2,2,2\) → linear slope \(2\).

Example 12 — Quadratic table

\(y=1,4,9,16\): first diff \(3,5,7\); second \(2,2\) → quadratic.

Example 13 — Perp check

Slopes \(2\) and \(-\frac{1}{2}\): product \(-1\). ✓

Example 14 — From vertex

Vertex \((1,-2)\), passes through \((3,6)\), \(a>0\): \(y=a(x-1)^2-2\). \(6=a\cdot 4-2\Rightarrow 4a=8\), \(a=2\). \(y=2(x-1)^2-2\).

Example 15 — Full quadratic formula derivation numeric

\(2x^2-4x-6=0\). Divide by 2: \(x^2-2x-3=0\). \((x-1)^2=4\), \(x-1=\pm 2\), \(x=3\) or \(x=-1\). Formula: \(\Delta=16+48=64\), \(x=\frac{4\pm 8}{4}\).

Example 16 — Sum/product of roots

\(x^2-5x+6=0\): roots \(2,3\); sum \(5=-(-5)\); product \(6\). Useful check after solving.

Example 17 — No real intersection line-parabola

\(y=x^2\) and \(y=-x-1\): \(x^2+x+1=0\), \(\Delta=-3<0\)—no real intersection.

Example 18 — Horizontal and vertical

Through \((3,-2)\): horizontal \(y=-2\) (slope \(0\)); vertical \(x=3\) (undefined slope, not \(y=f(x)\)).

Example 19 — Second differences proof sketch

\(f(n)=an^2+bn+c\). First difference \(\Delta f(n)=f(n+1)-f(n)=a(2n+1)+b\). Second \(\Delta^2 f(n)=\Delta f(n+1)-\Delta f(n)=2a\). Constant \(2a\).

Example 20 — Optimizing a quadratic profit

\(P(x)=-x^2+12x-20\) (toy). Vertex at \(x=6\), \(P(6)=16\). Domain if \(x\) is quantity in \([0,12]\): max at vertex inside interval.

Exercises

Easy

  1. Slope through \((0,0)\) and \((5,10)\).
  2. Equation: slope \(-3\), \(y\)-intercept \(4\).
  3. Vertex of \(y=x^2-4x+1\) using \(-b/(2a)\).
  4. Discriminant of \(x^2+2x+5\).
  5. Parallel to \(y=-x+1\) through \((2,3)\).

Medium

  1. Point-slope then slope-intercept: through \((-1,4)\) and \((3,2)\).
  2. Perpendicular to \(y=\frac{2}{3}x-1\) through \((0,0)\).
  3. Complete the square: \(x^2-5x+6\); find vertex form.
  4. Complete the square: \(3x^2-12x+5\).
  5. Solve \(x^2-2x-15=0\) by formula and by factoring.
  6. Find max/min of \(f(x)=-2x^2+8x-1\).
  7. \(x\)-intercepts of \(f(x)=x^2-3x-10\).
  8. Write equation of vertical and horizontal lines through \((2,-5)\).

Hard / proof

  1. Derive the quadratic formula by completing the square for \(ax^2+bx+c=0\).
  2. Prove that vertex \(x\)-coordinate is \(-b/(2a)\) using axis of symmetry or calculus-free: average of roots when \(\Delta\ge 0\), or complete square.
  3. Prove: lines with slopes \(m\) and \(-\frac{1}{m}\) (\(m\neq 0\)) are perpendicular via direction vectors.
  4. Show constant second differences for \(f(n)=an^2+bn+c\) on integers \(n\).
  5. For \(f(x)=ax^2+bx+c\) with \(a>0\), prove \(f(x)\ge f\bigl(-\frac{b}{2a}\bigr)\) for all \(x\).
  6. Find all lines through \((1,2)\) with slope \(\pm 1\); equations.
  7. Relate \(\Delta\) to factoring over reals.

Challenge / CS-flavored

  1. Linear interpolation between points \((x_0,y_0)\), \((x_1,y_1)\): write \(y\) as function of \(x\).
  2. Complexity: \(T(n)=an+b\) vs \(S(n)=cn^2\)—for large \(n\), which dominates? (qualitative)
  3. Screen coordinates: line from pixel \((0,0)\) to \((w,h)\); slope.
  4. Projectile height \(h(t)=-5t^2+20t+2\): max height and time.
  5. Fit: uniquely determine \(y=mx+b\) from two distinct points—why unique?

Intercept form of a line

If \(x\)-intercept \(a\neq 0\) and \(y\)-intercept \(b\neq 0\): \(\frac{x}{a}+\frac{y}{b}=1\).

Distance from point to line (formula stated)

For line \(Ax+By+C=0\) and point \((x_0,y_0)\): \[\mathrm{dist}=\frac{|Ax_0+By_0+C|}{\sqrt{A^{2}+B^{2}}}.\] Useful for geometry checks; derive later via projection if desired.

Vertex as optimization

For \(a>0\), vertex is global minimizer; \(a<0\) maximizer. Business “profit quadratic” word problems use this.

Extra exercises

  1. Derive slope-intercept form from two points algebraically.
  2. Complete the square for \(5x^{2}-20x+6\).
  3. Find \(k\) so \(x^{2}+kx+9\) is a perfect square trinomial.
  4. Equation of line parallel to \(3x-y=2\) with \(y\)-intercept \(-4\).
  5. Show the axis of symmetry is midway between real roots when \(\Delta>0\).

CS connection

Linear regression is fitting lines; quadratic forms appear in optimization objectives. Bresenham-style line drawing uses slopes. Discriminant decides existence of real intersection. Vertex form is “change of coordinates” to center a feature.

Common pitfalls

Pitfall What to do instead
Slope \(\frac{x_2-x_1}{y_2-y_1}\) Rise over run: \(\Delta y/\Delta x\)
Forgetting \(a\) when completing square Factor \(a\) out of \(x\) terms first
\(\Delta\) formula wrong \(b^2-4ac\)
Parallel vs equal lines Same slope, check intercepts
\(m_1 m_2=1\) for perp Product \(-1\)
Vertical line as \(y=mx+b\) Cannot; \(x=\) const

Fully worked extra examples

E15 — Complete the square with \(a\neq 1\) fully.
\(3x^{2}-12x+7=3(x^{2}-4x)+7=3(x^{2}-4x+4-4)+7=3((x-2)^{2}-4)+7=3(x-2)^{2}-12+7=3(x-2)^{2}-5\).
Vertex \((2,-5)\); opens up; min \(-5\).

E16 — Quadratic formula numeric.
\(x^{2}-x-1=0\): \(\Delta=5\), \(x=\frac{1\pm\sqrt{5}}{2}\). Golden ratio \(\varphi=\frac{1+\sqrt{5}}{2}\).

E17 — Parallel through a point.
Line \(2x-3y=6\) has slope \(\frac{2}{3}\) (rewrite \(y=\frac{2}{3}x-2\)). Through \((3,1)\): \(y-1=\frac{2}{3}(x-3)\).

E18 — Intercept form.
Intercepts \(4\) and \(-2\): \(\frac{x}{4}+\frac{y}{-2}=1\Rightarrow \frac{x}{4}-\frac{y}{2}=1\). Multiply by \(4\): \(x-2y=4\).

End-of-day synthesis problems

S1. Line through \((2,-1)\) and \((-4,5)\): slope, point-slope, slope-intercept.

S2. Line through \((0,3)\) perpendicular to \(y=\frac{1}{2}x-1\).

S3. Complete the square: \(f(x)=2x^{2}-12x+5\); vertex and min value.

S4. Derive quadratic formula from \(ax^{2}+bx+c=0\) by completing the square (full writeup).

S5. Discriminant cases for \(x^{2}+kx+1=0\) as \(k\) varies.

S6. Graph features of \(f(x)=-(x-2)^{2}+3\): vertex, direction, intercepts.

S7. Fence problem: three sides, total \(30\) m, maximize area; optimal dimensions.

S8. Show second differences of \(n^{2}\) equal \(2\) for consecutive integers \(n\).

Deep dive — Geometry of \(ax^2+bx+c\)

Completing the square is a translation of the graph: \(y-k=a(x-h)^2\) shifts the basic parabola \(y=ax^2\) so the vertex sits at \((h,k)\). Stretch \(|a|\) and reflect if \(a<0\). Linear functions are degenerate “parabolas with \(a=0\)”—constant first differences, infinite “vertex” nowhere. Parallel lines never meet; perpendicular slopes multiply to \(-1\) because direction vectors are orthogonal under the dot product.

Synthesis

Lines: slope, intercepts, parallel/perp. Quadratics: complete the square → vertex form; discriminant → number of real roots; formula is completed square solved for \(x\). Optimization of \(ax^2+bx+c\) on \(\mathbb{R}\) is reading the vertex. Tables: first differences linear, second quadratic.

S9. Derive \(x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\) for \(a=3\), \(b=-6\), \(c=0\) both by factoring and by formula.

S10. Line through \((1,1)\) perpendicular to \(2x+y=4\); slope-intercept form.

S11. For \(f(x)=x^2-6x+5\), give vertex, roots, and \(y\)-intercept without a calculator.

S12. Prove: if \(\Delta>0\), axis of symmetry is midpoint of the two roots.

Checkpoint

  • Write line equations from slope/points
  • Use parallel and perpendicular conditions
  • Convert quadratic to vertex form by completing the square
  • Use discriminant and quadratic formula
  • Identify vertex, intercepts, max/min
  • S4 proof-level derivation once

Write two takeaways in your own words.

Quick reference card

Topic Formula
Slope \(m=\frac{y_2-y_1}{x_2-x_1}\)
Line \(y=mx+b\) or \(y-y_1=m(x-x_1)\)
Parallel \(m_1=m_2\)
Perpendicular \(m_1 m_2=-1\)
Vertex \(x\) \(-b/(2a)\)
Vertex form \(a(x-h)^{2}+k\)
Discriminant \(\Delta=b^{2}-4ac\)
Quadratic formula \(\frac{-b\pm\sqrt{\Delta}}{2a}\)

Tomorrow

Day 20 — Exponential growth. \(a^x\) growth; half-life/doubling; linear vs exp tables; compound interest; logs as inverse of exp.