Grade 12 Calculus · Lesson P355 min

Functions and Their Graphs

Function notation and evaluation, the difference quotient, domain, combining and composing functions, and even, odd, and piecewise functions.

Choose a section to read or explore.

Lesson overview

Functions are the language of calculus. In this lesson you'll pin down exactly what a function is, evaluate it with function notation, find where it is defined, and learn to build new functions by combining and composing old ones — then classify functions by their symmetry and handle piecewise, absolute-value, and step functions.

Explanation
Learning objectives

By the end of this lesson you should be able to:

  • Decide whether a relation is a function, including from a graph via the Vertical Line Test.
  • Use function notation to evaluate a function at numbers and at algebraic expressions.
  • Form and simplify the difference quotient f(x+Δx)−f(x)Δx\dfrac{f(x + \Delta x) - f(x)}{\Delta x}.
  • Find the domain of a function involving radicals, rational expressions, and absolute values.
  • Combine functions by sum, difference, product, and quotient, and form composite functions.
  • Test a function for even or odd symmetry, and work with piecewise, absolute-value, and greatest-integer functions.

Before you start

  • Sketching graphs, intercepts, and symmetry (Lesson P1).
  • Factoring, and solving linear and quadratic equations and inequalities.
  • Interval notation for describing sets of real numbers.

Relations and functions

A relation is any set of ordered pairs (x,y)(x, y). A function is a special relation: it pairs each input with exactly one output.

Definition

Function

A function ff from a set AA to a set BB is a rule that assigns to each element xx in the domain AA exactly one element yy in BB. Every function is a relation, but not every relation is a function.

So {(1,2),(2,3),(4,7)}\{(1, 2), (2, 3), (4, 7)\} is a function — each input appears once — while {(1,2),(1,4),(2,6)}\{(1, 2), (1, 4), (2, 6)\} is not, because the input 11 is paired with both 22 and 44.

Vertical Line Test
A graph represents yy as a function of xx exactly when no vertical line crosses it more than once. The parabola y=x2−1y = x^2 - 1 passes: every vertical line meets it once. A sideways parabola such as x=y2x = y^2 fails, since a vertical line can meet it twice.
Interactive lab
x-axis: y = 0y-axis: x = 0-3-2-1123-2-1123456
  • y = x² − 1

Your turn

Which set of ordered pairs represents a function?

Function notation and the difference quotient

Function notation names the rule and its input at once. Writing f(x)=x2+2x−3f(x) = x^2 + 2x - 3 means “the function ff takes an input xx and returns x2+2x−3x^2 + 2x - 3.” The symbol xx is just a placeholder — you can substitute a number or an entire expression.

Worked example
For f(x)=x2+2x−3f(x) = x^2 + 2x - 3: f(0)=−3f(0) = -3, f(−1)=1−2−3=−4f(-1) = 1 - 2 - 3 = -4, and substituting an expression, f(x+2)=(x+2)2+2(x+2)−3=x2+6x+5f(x + 2) = (x + 2)^2 + 2(x + 2) - 3 = x^2 + 6x + 5.
Interactive lab
x-axis: y = 0y-axis: x = 0-5-4-3-2-1123-5-4-3-2-1123456(0, −3)(1, 0)(−3, 0)
  • f(x) = x² + 2x − 3

Substituting an expression powers the difference quotient — the average rate of change of ff over a step of width Δx\Delta x. It is the algebraic engine behind the derivative you'll meet later.

f(x+Δx)−f(x)Δx,Δx≠0\frac{f(x + \Delta x) - f(x)}{\Delta x}, \quad \Delta x \neq 0

Worked example · Build the difference quotient

f(x)=x2,f(x+Δx)−f(x)Δx,Δx≠0f(x)=x^2,\qquad\frac{f(x+\Delta x)-f(x)}{\Delta x},\quad\Delta x\ne0

Expand carefully before cancelling the common factor.

Predict before you reveal

What is f(x+Δx)f(x+\Delta x) for f(x)=x2f(x)=x^2?
Common mistake. You may only cancel the common factor of Δx\Delta x after fully expanding and simplifying the numerator. Cancelling too early — or forgetting that (x+Δx)2≠x2+(Δx)2(x + \Delta x)^2 \neq x^2 + (\Delta x)^2 — is the most common error.

Your turn

Question 1 of 2
For f(x)=x2+2x−3f(x)=x^2+2x-3, what is f(−1)f(-1)?

Finding the domain of a function

The domain is the set of all inputs for which the function is defined. Unless a domain is stated, assume the implied domain: all real numbers that produce a real output. Two situations create restrictions:

  • Even roots: the radicand must be ≥0\ge 0. For x−3\sqrt{x - 3} require x−3≥0x - 3 \ge 0, so the domain is [3,∞)[3, \infty).
  • Denominators: never zero. For 1x−2\dfrac{1}{x - 2} exclude x=2x = 2.

Absolute values and odd roots accept every real input to those operations. Any restrictions inside their input expressions still apply.

Interactive lab
x-axis: y = 0y-axis: x = 0246810-1-0.50.511.522.533.54x = 3
  • f(x) = √(x − 3)
Interactive lab
x-axis: y = 0y-axis: x = 0-4-22468-6-4-2246
  • f(x) = 1 / (x − 2)
Common mistake. Do not simplify before finding the domain. For f(x)=x2−9x−3f(x) = \dfrac{x^2 - 9}{x - 3} the domain still excludes x=3x = 3, even though the expression “simplifies” to x+3x + 3. The original denominator decides the domain.

Your turn

What is the domain of g(x)=6xg(x)=\sqrt{6x}?

Combining and composing functions

Two functions can be combined arithmetically. For ff and gg, the sum, difference, product, and quotient are defined pointwise, and the domain of each is the intersection of the domains of ff and gg (the quotient also excludes any input where g(x)=0g(x) = 0).

(f+g)(x)=f(x)+g(x),(fg)(x)=f(x)g(x), g(x)≠0(f + g)(x) = f(x) + g(x), \qquad \left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)},\ g(x) \neq 0

A more powerful combination is composition, which feeds the output of one function into another.

Definition

Composite function

The composition of ff with gg is (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)). Its domain is the set of all xx in the domain of gg such that g(x)g(x) is in the domain of ff.

Worked example · Respect the order of composition

f(x)=x2,g(x)=x−1f(x)=x^2,\qquad g(x)=x-1

Identify the inner function before substituting.

Predict before you reveal

Which expression is (f∘g)(x)(f\circ g)(x)?

Your turn

Let f(u)=uf(u)=\sqrt{u} and g(x)=x−1g(x)=x-1. What is the domain of (f∘g)(x)(f\circ g)(x)?

Even and odd functions

On a domain symmetric about zero, symmetry of a graph corresponds to an algebraic test on f(−x)f(-x).

  • Even: f(−x)=f(x)f(-x) = f(x) — the graph is symmetric about the yy-axis (e.g. x2−2x^2 - 2).
  • Odd: f(−x)=−f(x)f(-x) = -f(x) — the graph is symmetric about the origin (e.g. x3−3xx^3 - 3x).
Interactive lab
x-axis: y = 0y-axis: x = 0-4-3-2-11234-3-2-112345678
  • f(x) = x² − 2
Interactive lab
x-axis: y = 0y-axis: x = 0-3-2-1123-6-4-2246
  • f(x) = x³ − 3x
Worked example
Test f(x)=x3−3xf(x) = x^3 - 3x: f(−x)=(−x)3−3(−x)=−x3+3x=−(x3−3x)=−f(x)f(-x) = (-x)^3 - 3(-x) = -x^3 + 3x = -(x^3 - 3x) = -f(x). Since f(−x)=−f(x)f(-x) = -f(x), the function is odd.

Your turn

Is f(x)=x3−4xf(x)=x^3-4x even, odd, or neither?
Given question graphGraph of the information given in the question. Open circles exclude endpoints; filled circles include points. x horizontal axis; y vertical axis.-3-2-10123-6-4-20246xy

Piecewise, absolute-value, and greatest-integer functions

A piecewise function applies different rules on different parts of its domain. The absolute-value function is the classic example — it is really two linear pieces joined at the point where the inside expression changes sign.

∣x−1∣={x−1x≥1−(x−1)x<1|x - 1| = \begin{cases} x - 1 & x \ge 1 \\ -(x - 1) & x < 1 \end{cases}
Interactive lab
x-axis: y = 0y-axis: x = 0-4-3-2-1123456-112345(1, 0)
  • f(x) = |x − 1|
Interactive lab
x-axis: y = 0y-axis: x = 0-3-2-11234-3-2-11234
  • f(x) = ⟦x⟧

The greatest-integer (or floor) function f(x)=⌊x⌋f(x) = \lfloor x \rfloor returns the greatest integer less than or equal to xx, producing a staircase of horizontal steps — for example ⌊2.7⌋=2\lfloor 2.7 \rfloor = 2 and ⌊−1.2⌋=−2\lfloor -1.2 \rfloor = -2.

Common mistake. For negative inputs the floor rounds down, not toward zero: ⌊−1.2⌋=−2\lfloor -1.2 \rfloor = -2, not −1-1.

Your turn

Question 1 of 2
Using the piecewise rule for ∣x−1∣|x-1|, which expression applies at x=0x=0?

Keep your unfinished answers?

You have answers you have not submitted. A saved draft stays in this browser only; it is not a submitted result.