Calculus › Section A · Preparing for calculus › Topic A.3

Functions and their graphs

Calculus is the study of functions: what they accept, what they produce, and how their graphs behave. This topic gathers the vocabulary and the visual toolkit everything else stands on.

A function is a reliable machine

A function is a rule that takes each allowed input \(x\) and returns exactly one output \(f(x)\). "Exactly one" is the whole point: a function is reliable. If \(f(x) = x^2 + 1\), then \(f(3) = 10\), every time, and \(f(-3) = 10\) as well, because different inputs may share an output, but one input may never give two outputs. Some functions change their rule by region; a piecewise function uses different formulas on different parts of its input range, and you simply pick the piece that matches your input. Calculus then asks sharper questions of this machine: how fast its output changes and how much it accumulates.

Domain and range

The domain is the set of inputs a function accepts; the range is the set of outputs it actually produces. Two features quietly forbid inputs. Division by zero is impossible, so any \(x\) that makes a denominator \(0\) is excluded. Even roots of negative numbers are not real, so whatever sits under \(\sqrt{\ }\) must be greater than or equal to \(0\). Everything else usually passes. The range is often easiest to read from the graph: which heights does the curve actually reach? For \(f(x) = x^2\), the domain is all real numbers, and the range is \(y \ge 0\), because squares are never negative.

Worked example: finding a domain

Find the domain of \(f(x) = \dfrac{\sqrt{x + 2}}{x - 5}\). Two conditions must hold. The root needs \(x + 2 \ge 0\), which means \(x \ge -2\). The denominator needs \(x - 5 \ne 0\), which means \(x \ne 5\). Both must be true at once, so the domain is \([-2, 5) \cup (5, \infty)\): every \(x\) from \(-2\) upward, with \(5\) carved out. A quick self-check: \(f(-2) = 0\), fine; \(f(-3)\) asks for \(\sqrt{-1}\), not real; \(f(5)\) divides by \(0\). The excluded and included edges both behave exactly as the answer claims.

The graph and the vertical line test

The graph of \(f\) is the set of all points \((x, f(x))\): a picture of the machine's complete behaviour, with the domain spread along the horizontal axis and the range climbing the vertical one. Since one input gives one output, every vertical line meets a function's graph at most once. That observation works backwards as the vertical line test: if some vertical line crosses a curve twice, the curve is not the graph of any function. A circle fails, since every vertical line through its interior crosses it twice, so \(x^2 + y^2 = 25\) quietly splits into two functions, the top and bottom semicircles \(y = \sqrt{25 - x^2}\) and \(y = -\sqrt{25 - x^2}\).

A library of basic graphs

Six functions earn their keep so often that their shapes should be automatic. The identity \(y = x\) is the diagonal. The squaring function \(y = x^2\) is the upward cup; \(y = x^3\) is the S-curve that flattens through the origin. The square root \(y = \sqrt{x}\) starts at the origin and rises, flattening as it goes. The absolute value \(y = |x|\) is the V with its point at the origin. The reciprocal \(y = \frac{1}{x}\) lives in two branches, hugging the axes but never touching them. Recognising these on sight turns every transformation and every later calculus picture into a variation on a theme you already know.

Transformations: shifts and reflections

You rarely need to plot a new graph from scratch; most graphs are old friends in disguise. Adding outside the function moves vertically: \(y = f(x) + c\) shifts the graph up by \(c\). Adding inside moves horizontally, and in the opposite direction to instinct: \(y = f(x - c)\) shifts right by \(c\), while \(y = f(x + c)\) shifts left. A minus sign outside reflects in the x-axis: \(y = -f(x)\) turns the graph upside down. A minus sign inside reflects in the y-axis: \(y = f(-x)\) swaps left and right. The rule of thumb: outside changes act on the output exactly as written; inside changes act on the input backwards.

Worked example: a transformed square root

Sketch \(y = -\sqrt{x - 2} + 3\) by transforming \(y = \sqrt{x}\). Work from the inside out. The \(x - 2\) shifts the curve right by \(2\); the leading minus reflects it in the x-axis, so it now falls instead of rises; the \(+3\) lifts everything up by \(3\). Track the start point \((0, 0)\) of the original root: it moves right to \((2, 0)\), reflection leaves it put, and the lift carries it to \((2, 3)\). Track a second point \((1, 1)\): right to \((3, 1)\), reflected to \((3, -1)\), lifted to \((3, 2)\). Check by substitution: \(y(3) = -\sqrt{1} + 3 = 2\), as plotted. The graph falls gently rightward from its anchor \((2, 3)\).

Combining functions

New functions are built from old ones by arithmetic, \((f + g)(x)\), \((fg)(x)\), \(\left(\frac{f}{g}\right)(x)\), and by composition:

(f \circ g)(x) = f(g(x))

In a composition, the inner function \(g\) runs first and feeds its output into \(f\). The domain needs care from both directions: an input must be legal for \(g\), and the value \(g(x)\) it produces must be legal for \(f\). Composition is how nearly every applied model is assembled. A cooling coffee is an exponential wrapped around a linear input.

Worked example: order matters in composition

Let \(f(x) = \sqrt{x}\) and \(g(x) = x^2\). Then \((f \circ g)(x) = f(x^2) = \sqrt{x^2} = |x|\). Not \(x\): squaring destroys the sign, and the root cannot give it back, so \(\sqrt{x^2}\) is the absolute value. Going the other way, \((g \circ f)(x) = \left(\sqrt{x}\right)^2 = x\), but only for \(x \ge 0\), because the square root refuses negative inputs. So the two composites are different functions on different domains, and neither is the identity over all real numbers. Whenever a problem composes functions, compute both orders separately and state the domain of each.

Even and odd functions

Some functions carry symmetry you can test in one line. If \(f(-x) = f(x)\) for every input, the function is even, and its graph is mirrored in the y-axis; \(x^2\) and \(\cos x\) are even. If \(f(-x) = -f(x)\), the function is odd, and its graph has origin symmetry, meaning a half-turn about the origin leaves it unchanged; \(x^3\) and \(\sin x\) are odd. Most functions are neither: for \(f(x) = x^2 + x\), you get \(f(-x) = x^2 - x\), which matches neither \(f(x)\) nor \(-f(x)\). Symmetry is practical: an even function's behaviour on the right of the axis tells you the left for free.

Common mistakes to avoid

The classic slips: writing \(\sqrt{x^2} = x\) when it is \(|x|\); treating \(f(x + c)\) as a rightward shift when it shifts left; assuming a composition \((f \circ g)(x)\) means \(f(x) \cdot g(x)\), when it means \(f(g(x))\); forgetting that a domain can be limited from two directions at once, as the square root and denominator example showed; and calling every function that fails the even test odd, when most functions are neither. One more: plugging \(x\)-values into the wrong piece of a piecewise function. The piece is chosen by the input's region first, and only then evaluated.

Key takeaways

A function returns exactly one output per input. Its domain excludes division by zero and negative values under even roots; its range is the set of heights the graph reaches. The vertical line test decides whether a curve is a function's graph. Know the six basic shapes: \(x\), \(x^2\), \(x^3\), \(\sqrt{x}\), \(|x|\), \(\frac{1}{x}\). Transformations move them: inside shifts go against the sign, outside changes act as written. Composition \(f(g(x))\) runs the inner function first, and both orders and both domains deserve separate attention. Even functions mirror across the y-axis, odd functions survive a half-turn, and most functions are neither.

Flashcards

Flashcard

Function

A rule giving each input exactly one output

One x in, one y out.

Test your understanding

Question 1 of 5

What is the domain of f(x) = √(x − 2)?

Question 2 of 5

How does the graph of y = f(x + 4) differ from the graph of y = f(x)?

Question 3 of 5

If f(x) = √x and g(x) = x², what is (f ∘ g)(−3)?

Question 4 of 5

What does the vertical line test decide?

Question 5 of 5

Is f(x) = x³ − 4x even, odd, or neither?

Standards: Prerequisite

← Previous topicNext topic →