Every idea in calculus is about a function: limits, derivatives and integrals all take a function and tell you something new about it. Before you start on limits, it pays to be fluent with function notation, domains, the shapes of the main function families, and especially expressions like f(x + h). This refresher covers exactly the function skills calculus uses, with worked examples, so the later lessons feel smooth instead of confusing.
In this lesson you will learn
- Function notation, and how to work out f(a), f(x + h) and f(g(x))
- How to find the domain of a function
- The graphs of the function families used most in calculus
- Piecewise functions and the absolute value function
- The average rate of change and the difference quotient
This lesson revises ideas from functions and relations, composite and inverse functions and transformations of graphs. Start with What Is Calculus? if you have not read it.
Function Notation
A function is a rule that gives exactly one output for each allowed input. We write f(x) = x² − 3x to mean “the rule f squares the input and subtracts three times the input”. The letter inside the brackets is just a placeholder: whatever goes in the brackets replaces x everywhere.
f(x) = x² − 3x
f(4) = 16 − 12 = 4
f(−1) = 1 + 3 = 4
f(a) = a² − 3a
f(x + h) = (x + h)² − 3(x + h)
= x² + 2xh + h² − 3x − 3h
The last line is the one calculus students get wrong most often. f(x + h) is not f(x) + h. You must put the whole of (x + h) into every x, then expand. You will do this in almost every derivative from first principles.
Domain and Range
The domain is the set of inputs a function accepts. The range is the set of outputs it produces. In calculus you usually find the domain by looking for things that are not allowed:
| Watch for | Rule | Example | Domain |
|---|---|---|---|
| Division | Denominator ≠ 0 | f(x) = 1/(x − 2) | All x except 2 |
| Even root | Inside ≥ 0 | f(x) = √(x + 3) | x ≥ −3 |
| Logarithm | Inside > 0 | f(x) = ln(5 − x) | x < 5 |
| Both | Inside > 0 | f(x) = 1/√x | x > 0 |
Why does this matter? A limit or derivative can only be found where the function makes sense. Points just outside the domain, like x = 2 for 1/(x − 2), are often exactly where the interesting behaviour happens.
The Function Families You Need
| Family | Example | Shape and key facts |
|---|---|---|
| Linear | y = 2x + 1 | Straight line; constant slope 2 |
| Quadratic | y = x² | Parabola; turning point at the vertex |
| Cubic | y = x³ − 3x | S-shape; can have two turning points |
| Reciprocal / rational | y = 1/x | Two branches; asymptotes x = 0 and y = 0 |
| Square root | y = √x | Starts at the origin, grows ever more slowly |
| Exponential | y = eˣ | Always positive; grows faster and faster; passes (0, 1) |
| Logarithmic | y = ln x | Only for x > 0; passes (1, 0); inverse of eˣ |
| Trigonometric | y = sin x | Wave between −1 and 1; repeats every 2π (x in radians) |
In calculus, angles are always in radians. The simple derivative formulas for sin x and cos x are only true in radians, so set your calculator to radian mode now.
Composite Functions
A composite function applies one function and then another. If f(x) = x² and g(x) = 3x + 1, then
f(g(x)) = f(3x + 1) = (3x + 1)² g first, then f
g(f(x)) = g(x²) = 3x² + 1 f first, then g
The order matters, and the two answers are different. Spotting the “inside” and “outside” function is the key skill for the chain rule, which differentiates composite functions. For example, √(1 + x²) is “square root” applied to the inside function 1 + x².
Piecewise Functions and Absolute Value
A piecewise function uses different rules on different parts of its domain:
⎧ x + 1 if x < 1
f(x) = ⎨
⎩ 3 − x if x ≥ 1
f(0) = 1, f(1) = 2, f(4) = −1
The absolute value function is the most famous piecewise function: |x| = x when x ≥ 0 and |x| = −x when x < 0. Its graph is a V with a sharp corner at the origin. Piecewise functions are where calculus gets interesting: at the joins you must check whether the pieces meet (continuity) and whether they meet smoothly (differentiability).
Average Rate of Change and the Difference Quotient
The average rate of change of f between x = a and x = b is the slope of the straight line, called a secant, joining the two points on the graph:
average rate of change = (f(b) − f(a)) / (b − a)
For f(x) = x² between x = 1 and x = 4: (16 − 1) / (4 − 1) = 15/3 = 5.
If the second point is a small step h away from x, the same idea gives the difference quotient:
(f(x + h) − f(x)) / h
For f(x) = x²:
= ((x + h)² − x²) / h
= (x² + 2xh + h² − x²) / h
= (2xh + h²) / h
= 2x + h (for h ≠ 0)
Why this one expression matters so much
The difference quotient is the average slope over a tiny step h. In the lesson on the derivative from first principles you will let h shrink towards 0. Then 2x + h becomes 2x, which is the derivative of x². Practise simplifying difference quotients now and that lesson will feel easy.
Common Mistakes
- Writing f(x + h) = f(x) + h. Replace every x with (x + h) and expand.
- Forgetting brackets with negatives. If f(x) = x², then f(−3) = (−3)² = 9, not −9.
- Mixing up f(g(x)) and g(f(x)). Work from the inside out.
- Using degrees in calculus. All calculus formulas for trigonometric functions assume radians.
- Cancelling h before simplifying. In (2xh + h²)/h you may cancel h only after it is a factor of every term on top.
Practice Exercises
Exercise 1. For f(x) = 2x² + 1, find f(3), f(−2) and f(x + h).
Show answer
f(3) = 19, f(−2) = 9, and f(x + h) = 2(x + h)² + 1 = 2x² + 4xh + 2h² + 1.
Exercise 2. Find the domain of f(x) = √(x − 1) / (x − 4).
Show answer
The root needs x − 1 ≥ 0, so x ≥ 1. The denominator needs x ≠ 4. Domain: x ≥ 1 with x ≠ 4.
Exercise 3. Simplify the difference quotient (f(x + h) − f(x)) / h for f(x) = 3x² − x.
Show answer
f(x + h) − f(x) = 3(2xh + h²) − h = 6xh + 3h² − h. Dividing by h gives 6x + 3h − 1.
Frequently Asked Questions
What is a difference quotient in calculus?
It is the expression (f(x + h) – f(x)) / h. It gives the average rate of change, or secant slope, of f over a small step h. Letting h approach zero turns it into the derivative.
Why must calculus use radians instead of degrees?
The basic results, such as the limit of sin x over x being 1 and the derivative of sin x being cos x, are only true when x is in radians. In degrees every trigonometric derivative would carry an extra factor of pi over 180.
Summary
- f(x + h) means replace every x with x + h, then expand.
- Find the domain by avoiding division by zero, negative even roots and logs of non-positive numbers.
- Know the shapes of linear, power, rational, root, exponential, log and trigonometric graphs.
- A composite function has an inside and an outside part; this is the basis of the chain rule.
- The difference quotient (f(x + h) − f(x))/h is the average slope over a step h.
Next: Introduction to Limits.
