Functions and their graphs
What a function is, domain and range, the standard functions (lines, parabolas, rational, trigonometric, exponential and logarithmic), composition, graph transformations, inverse functions, conic sections and the first economic functions: demand, supply and equilibrium.
Syllabus: Syllabus ch. 4 · Sessions: Lectures 4 and 5, WPO 3 and 4 · About 60 minutes
What is a function?Important
A function f from a set A to a set B assigns to every element x of A exactly one element f(x) of B. Modern notation: f : A → B : x ↦ f(x). A graph in the plane belongs to a function of x exactly when every vertical line meets it at most once (vertical line test); a circle fails it.
The domain is the set of inputs for which f(x) is defined; the range (image) is the set of outputs. For real formulas the domain follows from three conditions:
| Expression | Condition | Example |
|---|---|---|
| Fraction N/D | D ≠ 0 | dom 1/(x − 2) = ℝ \ {2} |
| Even root √g | g ≥ 0 | dom √(4 − x) = ]−∞, 4] |
| Logarithm ln g | g > 0 | dom ln(x + 3) = ]−3, +∞[ |
Domain of f(x) = √(x + 1) / ln(3 − x)
Combine every condition.
Root
Logarithm
Denominator
dom f = [−1, 2[ ∪ ]2, 3[.
A function is even if f(−x) = f(x) (symmetric in the y-axis) and odd if f(−x) = −f(x) (symmetric in the origin). Most functions are neither.
Lines and parabolasImportant
The slope of the line through (x1, y1) and (x2, y2) is m = (y2 − y1) / (x2 − x1), the change in y per unit change in x.
| Form | Equation | Use when you know |
|---|---|---|
| Slope-intercept | y = mx + q | the slope and the y-intercept |
| Point-slope | y − y1 = m(x − x1) | one point and the slope (tangent lines) |
| Two-point | y − y1 = ((y2 − y1)/(x2 − x1))(x − x1) | two points |
Parallel lines have equal slopes; perpendicular lines have slopes whose product is −1.
A quadratic function f(x) = ax2 + bx + c is a parabola that opens upward if a > 0 and downward if a < 0. Its vertex lies at x = −b/2a, where f has its minimum (a > 0) or maximum (a < 0). Completing the square gives the vertex form f(x) = a(x − h)2 + k with vertex (h, k).
Rational, exponential, logarithmic and trigonometric functionsImportant
A rational function is a quotient of polynomials, N(x)/D(x). It is undefined at the roots of D, where it usually has vertical asymptotes (chapter 4).
| Function | Domain | Range | Key facts |
|---|---|---|---|
| ex | ℝ | ]0, +∞[ | always positive, increasing, e0 = 1, horizontal asymptote y = 0 on the left |
| ax (a > 0, a ≠ 1) | ℝ | ]0, +∞[ | increasing if a > 1, decreasing if 0 < a < 1 |
| ln x | ]0, +∞[ | ℝ | inverse of ex, ln 1 = 0, vertical asymptote x = 0 |
| sin x, cos x | ℝ | [−1, 1] | period 2π |
| tan x = sin x / cos x | cos x ≠ 0 | ℝ | period π, asymptotes at x = π/2 + kπ |
Angles in calculus are measured in radians: a full turn is 2π, so 180° = π. On the unit circle a point at angle t is (cos t, sin t), which gives the basic identity sin2 t + cos2 t = 1.
| Angle | 0 | π/6 | π/4 | π/3 | π/2 |
|---|---|---|---|---|---|
| sin | 0 | 1/2 | √2/2 | √3/2 | 1 |
| cos | 1 | √3/2 | √2/2 | 1/2 | 0 |
| tan | 0 | √3/3 | 1 | √3 | undefined |
Also useful: sin(2x) = 2 sin x cos x and cos(2x) = cos2 x − sin2 x.
Combining functions: composition and inversesImportant
Functions can be added, subtracted, multiplied and divided pointwise, on the intersection of their domains (and, for division, where the denominator is not 0). The composition (f ∘ g)(x) = f(g(x)) applies g first and then f; in general f ∘ g ≠ g ∘ f.
Compose f(x) = √x and g(x) = x2 − 4
Order matters.
f(g(x))
g(f(x))
The domain of a composition keeps the restrictions of the inner function: g(f(x)) is not simply x − 4 on all of ℝ.
A function is one-to-one (injective) if different inputs always give different outputs; graphically, every horizontal line meets the graph at most once. Only then does an inverse f−1 exist, with f−1(f(x)) = x. To find it: write y = f(x), solve for x, then swap the names x and y. The graph of f−1 is the mirror image of f in the line y = x.
Inverse of f(x) = (2x + 1)/(x − 3)
Solve y = (2x + 1)/(x − 3) for x.
Multiply out
Factor x
Swap names
Domain of f−1 = range of f = ℝ \ {2}.
Graph transformationsImportant
Every exam has a question that shows a graph of f and asks which other graph is, for example, f(−3x)/2 − 6. The rule of thumb: changes inside the brackets act on x (horizontally, in the opposite direction), changes outside act on y (vertically, as written).
| New function | Effect on the graph of f |
|---|---|
| f(x) + d | shift up by d (down if d < 0) |
| f(x − c) | shift right by c (left if c < 0) |
| a f(x) | vertical stretch by |a|; reflect in the x-axis if a < 0 |
| f(bx) | horizontal compression by |b| (stretch if |b| < 1); reflect in the y-axis if b < 0 |
| −f(x) | mirror in the x-axis |
| f(−x) | mirror in the y-axis |
| |f(x)| | parts below the x-axis flip up |
Read g(x) = f(−3x)/2 − 6
Work from the inside out.
−3x inside
Divide by 2
Minus 6
Track one or two clear points of f (a root, a peak) through the steps and look for the graph that contains them.
Conic sectionsNeutral
Conic sections are curves of second degree in x and y. They are not functions of x as a whole, but they appear in the exercise sessions and in budget and production problems.
| Curve | Standard equation | Reading the equation |
|---|---|---|
| Circle | (x − a)2 + (y − b)2 = r2 | centre (a, b), radius r |
| Ellipse | (x − a)2/p2 + (y − b)2/q2 = 1 | centre (a, b), half-axes p and q |
| Parabola | y = ax2 + bx + c or x = ay2 + by + c | opens up/down or right/left |
| Hyperbola | x2/p2 − y2/q2 = 1 or xy = k | two branches with asymptotes |
To recognise a circle from x2 + y2 − 4x + 6y − 3 = 0, complete the squares: (x − 2)2 + (y + 3)2 = 16, a circle with centre (2, −3) and radius 4. When x2 and y2 have equal positive coefficients you get a circle; different positive coefficients give an ellipse; opposite signs a hyperbola.
Economic functions: demand, supply and equilibriumImportant
A demand function links price and quantity demanded and usually slopes downward; a supply function usually slopes upward. Economists often write the price as a function of quantity, p = D(q), and plot q on the horizontal axis. The market equilibrium is the intersection: demand price equals supply price.
A unit tax t paid by producers shifts the supply curve up by t: p = S(q) + t. A percentage tax r multiplies the supply price: p = (1 + r)S(q). The new equilibrium shows how the tax is shared: consumers pay more, producers keep less, and the split depends on the slopes (worked out in chapter 7).
Equilibrium before and after a unit tax
Demand p = 30 − 2q, supply p = 3 + q, unit tax t = 6 on producers.
Without tax
With tax
Producer price
Consumers pay 4 more and producers receive 2 less: the steeper demand curve makes consumers carry two thirds of the tax.
Key takeaways
- Domain: denominators not 0, even-root arguments ≥ 0, log arguments > 0.
- Point-slope form y − y1 = m(x − x1) is the workhorse for tangent lines.
- Inside the brackets acts on x and backwards; outside acts on y as written.
- Only a one-to-one function has an inverse; its graph mirrors in y = x.
- Complete the square to read a circle or a parabola vertex.
- Equilibrium is where demand meets supply; a unit tax shifts supply up by t.
Multiple choice (10)
The domain of f(x) = √(x − 1)/(x − 4) is...
Which function is odd?
The graph of f(x + 2) − 3 is the graph of f shifted...
The inverse of f(x) = 3x − 6 is...
If f(x) = x2 and g(x) = x + 1, then f(g(2)) equals...
The vertex of f(x) = −2x2 + 8x − 3 is...
tan(π/4) equals...
x2 + y2 + 2x − 8 = 0 is a circle with...
Demand p = 40 − q and supply p = 10 + 2q meet at...
Which statement about y = ln x is FALSE?
Exam-style open questions (3)
Domain and inverse
Let f(x) = ln(2x − 4). Give the domain and range, find f−1, and check f−1(f(3)) = 3.
Show the worked outline
- Domain: 2x − 4 > 0, so x > 2; range ℝ.
- y = ln(2x − 4) gives ey = 2x − 4, so x = (ey + 4)/2.
- f−1(x) = (ex + 4)/2 with domain ℝ and range ]2, +∞[.
- f(3) = ln 2 and f−1(ln 2) = (2 + 4)/2 = 3.
Transformations
Starting from f(x) = √x, describe step by step how to obtain g(x) = −2√(x + 1) + 3 and give the domain and range of g.
Show the worked outline
- Shift 1 to the left: √(x + 1).
- Stretch vertically by 2 and mirror in the x-axis: −2√(x + 1).
- Shift up 3.
- Domain [−1, +∞[, range ]−∞, 3].
Percentage tax
Demand p = 100 − q, supply p = 20 + q. The government levies a 25% tax on the supply price. Find the new equilibrium.
Show the worked outline
- Taxed supply: p = 1.25(20 + q) = 25 + 1.25q.
- 100 − q = 25 + 1.25q gives q = 75/2.25 ≈ 33.33.
- Consumer price ≈ 66.67; producers receive 20 + 33.33 ≈ 53.33.
- Without tax: q = 40, p = 60.
LabGraph transformation lab
Matches the exam question with eight candidate graphs: try the default f(−3x)/2 − 6.
LabFunction explorer
Supports +, −, *, /, ^, brackets and sqrt, ln, exp, sin, cos, tan, abs, pi and e.
LabFunction property sorter
Two sorting games with explanations.