AP Calculus AB: Functions
Before calculus can ask how fast something is changing, it needs a solid working vocabulary of functions themselves. This isn't material tested directly on the AP exam, but every derivative, limit, and integral you'll compute rests on it. This free, complete lesson reviews domain and range, combining, composing, and inverting functions, odd and even functions, special functions (absolute value and the greatest integer function), polynomial and rational functions, trigonometric functions, and exponential and logarithmic functions. Each idea is followed by a fully worked example, and then a set of original practice problems with instant feedback and full explanations. Everything here is free, and you can keep practicing afterward with the full AP Calculus AB Question Bank linked below.
1. Domain and Range
A function f associates each element of a set called the domain with exactly one element of a set called the range, written f(a) = b. Geometrically, a vertical line crosses the graph of a function in at most one point. Two domain restrictions come up constantly: a denominator can never equal zero, and the expression under an even root can never be negative.
Worked Example: Find the domain of h(x) = √(7 − x)x.
The radicand must be non-negative: 7 − x ≥ 0, so x ≤ 7. The denominator can't be zero: x ≠ 0.
Domain: x ≤ 7, x ≠ 0
1. Find the domain of f(x) = 6x − 4.
Explanation: The denominator cannot equal 0: x − 4 ≠ 0, so x ≠ 4.
2. Find the domain of g(x) = xx² − 25.
Explanation: x² − 25 ≠ 0, so x² ≠ 25, giving x ≠ 5 and x ≠ −5.
3. Find the domain of h(x) = √(7 − x)x.
Explanation: Need 7 − x ≥ 0 (so x ≤ 7) and x ≠ 0 (the denominator).
4. What is the range of f(x) = x² + 3 for all real x?
Explanation: Since x² ≥ 0 for all x, the minimum value of x² + 3 is 3, occurring at x = 0. Range: y ≥ 3.
2. Combining, Composing, and Inverting Functions
Two functions can be added, subtracted, multiplied, or divided: (f + g)(x), (f − g)(x), (fg)(x), and (f/g)(x), the last defined wherever g(x) ≠ 0. The composition f(g(x)), read "f of g of x," replaces every x in f's formula with g(x); its domain is the set of x in g's domain for which g(x) lies in f's domain. In general, f(g(x)) ≠ g(f(x)). If f is one-to-one, it has an inverse f⁻¹, found by swapping x and y in y = f(x) and solving for the new y.
Worked Example: If f(x) = x² − 9x and g(x) = x + 2, find g(x)f(x) and its domain.
g(x)f(x) = x + 2x² − 9x = x + 2x(x − 9)
Domain: x ≠ 0, 9.
1. If f(x) = x² − 4x and g(x) = x + 3, find f(x)g(x) and its domain.
Explanation: f(x)g(x) = x² − 4xx + 3, defined wherever the denominator isn't 0: x ≠ −3.
2. If f(x) = 3x − 2 and g(x) = x², does f(g(x)) = g(f(x))?
Explanation: f(g(x)) = 3x² − 2, while g(f(x)) = (3x − 2)² = 9x² − 12x + 4. These are different expressions, so composition is not commutative in general.
3. If f(x) = 2x² − 1 and g(x) = √x, find f(g(x)).
Explanation: f(g(x)) = f(√x) = 2(√x)² − 1 = 2x − 1, restricted to x ≥ 0 since that's the domain of g.
4. Find the inverse of the one-to-one function f(x) = x³ + 2.
Explanation: Interchange x and y: x = y³ + 2. Solve for y: y³ = x − 2, so y = ∛(x − 2).
5. If f(x) = 4x − 7, find f⁻¹(x).
Explanation: Let y = 4x − 7. Swap: x = 4y − 7. Solve for y: 4y = x + 7, so y = x + 74.
3. Odd and Even Functions, Special Functions
A function f is odd if f(−x) = −f(x) for every x in its domain; its graph is symmetric about the origin. A function f is even if f(−x) = f(x); its graph is symmetric about the y-axis. Two special functions worth knowing: the absolute value function f(x) = |x|, and the greatest integer function g(x) = ⌊x⌋, which returns the greatest integer not greater than x.
Worked Example: Is f(x) = x⁴ − 3x² even, odd, or neither?
f(−x) = (−x)⁴ − 3(−x)² = x⁴ − 3x² = f(x)
Since f(−x) = f(x), the function is even.
1. Is f(x) = x³ − 2x an even function, an odd function, or neither?
Explanation: f(−x) = (−x)³ − 2(−x) = −x³ + 2x = −(x³ − 2x) = −f(x), so the function is odd.
2. For the absolute value function f(x) = |x|, what is f(−6)?
Explanation: |−6| = 6, since absolute value returns distance from 0, which is never negative.
3. The greatest integer function g(x) = ⌊x⌋ gives the greatest integer not greater than x. What is g(3.7)?
Explanation: The greatest integer not greater than 3.7 is 3 (rounding up to 4 would overshoot).
4. If f is an odd function and f(5) = 8, what is f(−5)?
Explanation: By definition of odd, f(−x) = −f(x), so f(−5) = −f(5) = −8.
4. Polynomial, Rational, and Trigonometric Functions
A polynomial function has the form f(x) = anxn + … + a₁x + a₀, and its domain is always the set of all real numbers. A rational function f(x) = P(x)/Q(x) has domain equal to all reals for which Q(x) ≠ 0. The trigonometric functions are periodic: sin x, cos x, csc x, and sec x have period 2π; tan x and cot x have period π. The function f(x) = A sin(bx) has amplitude |A| and period 2π/|b|. Since the trig functions aren't one-to-one over their full domains, their inverses (arcsin, arccos, arctan) are defined only over restricted domains: arcsin x has domain −1 ≤ x ≤ 1.
Worked Example: Consider f(x) = 1kcos(kx). For what value of k does f have period 6, and what is the amplitude for that k?
The period of cos(kx) is 2πk. Setting this equal to 6: 2πk = 6, so k = π3.
The amplitude, 1k, is then 3π.
1. What is the domain of every polynomial function?
Explanation: There's no value of x that could ever make a polynomial expression undefined, so the domain is always all real numbers.
2. For the rational function f(x) = x + 5x² − 4, what is the domain?
Explanation: x² − 4 ≠ 0, so x ≠ 2 and x ≠ −2.
3. Consider f(x) = 1ksin(kx). For what value of k does f have period 4?
Explanation: The period of sin(kx) is 2πk. Setting this equal to 4: 2πk = 4, so k = 2π4 = π2.
4. Using the value of k from the previous problem, what is the amplitude of f?
Explanation: The amplitude is 1k = 1π/2 = 2π.
5. What is the domain of y = sin⁻¹(x) (arcsin x)?
Explanation: Since sin x only ever outputs values between −1 and 1, its inverse can only accept inputs in that same range.
5. Exponential and Logarithmic Functions
The exponential function f(x) = ax (a > 0, a ≠ 1) is defined for all real x, with range the set of positive reals. Since f(x) = ax is one-to-one, it has an inverse, the logarithmic function f⁻¹(x) = logax, defined by y = logax if and only if ay = x. Its domain is the positive reals; its range is all reals. The base-e logarithm has its own notation: logex = ln x.
| Property | Formula |
|---|---|
| Product rule | loga(mn) = logam + logan |
| Quotient rule | loga(m/n) = logam − logan |
| Power rule | loga(xm) = m · logax |
Worked Example: Simplify ln(e⁵).
Since ln and ex are inverse functions, ln(ex) = x for any x.
ln(e⁵) = 5
1. Simplify: a⁵ · a⁻² (a > 0)
Explanation: am · an = am+n, so a⁵ · a⁻² = a⁵⁻² = a³.
2. What is the domain of f(x) = logax (a > 0, a ≠ 1)?
Explanation: Since ax only ever outputs positive numbers, its inverse (logax) can only accept positive inputs.
3. Simplify: ln(e⁶)
Explanation: Since ln and ex are inverse functions, ln(e⁶) = 6.
4. Using log properties, simplify: loga(m³n)
Explanation: The quotient rule gives loga(m³) − logan, and the power rule then rewrites loga(m³) as 3 logam.
Common Mistakes to Avoid
- Forgetting to restrict the domain of a composite function. f(g(x)) may simplify to something that looks like it has a wider domain than it actually does, always check the domain of g first.
- Assuming f(g(x)) and g(f(x)) are the same. Composition is generally not commutative, work through both orders separately before assuming they match.
- Forgetting to swap x and y when finding an inverse. Skipping this step just returns the original function instead of its inverse.
- Confusing which axis an even or odd function is symmetric about. Even functions mirror across the y-axis; odd functions have 180° rotational symmetry about the origin, not a mirror-line symmetry.
- Treating loga(m + n) as logam + logan. There is no rule for the log of a sum, only for the log of a product, quotient, or power. This is one of the most common algebra slips going into calculus.
Frequently Asked Questions
Why does a precalculus review chapter matter for the AP exam if it isn't tested directly?
Nearly every calculus technique assumes fluency with these ideas already in place. Struggling to find a domain or simplify a composite function slows down every derivative and integral problem that builds on it, even though the review itself won't appear as its own question.
How can I quickly check if a function is one-to-one before finding its inverse?
Graphically, check whether any horizontal line crosses the graph more than once (the horizontal line test). Algebraically, a function that is strictly increasing or strictly decreasing across its whole domain is automatically one-to-one.
Do I need to memorize the periods of every trig function?
Yes, this comes up constantly once derivatives of trigonometric functions enter the picture. Sine, cosine, cosecant, and secant repeat every 2π; tangent and cotangent repeat every π.
Where can I practice more problems like these?
The Functions quizzes in the AP Calculus AB Question Bank include additional original problems on this topic, along with quizzes covering every other topic tested throughout the course.