Login

Concepts

Read through concept notes with worked explanations and diagrams, chapter by chapter.

Concept 05 / 10Sets, Relations and Functions

Functions: Definition, Domain and Range Techniques

A function as a relation giving every input exactly one output, the vertical line test, when two functions are equal, the rules for finding domains (denominators, even roots, logarithms, inverse trigonometric functions) and the standard methods for finding ranges.

Figure 1
A function f:A→Bf : A \to B is a relation from AA to BB in which every element of AA is related to exactly one element of BB. Two conditions are packed into that sentence: every element of AA must have an image (no element is left out), and no element may have two images. The set AA is the domain, BB is the codomain, and the set of images actually attained, f(A)={f(x):x∈A}f(A) = \{f(x) : x \in A\}, is the range. It is allowed for two inputs to share an output, and it is allowed for elements of BB to be unused. For a real function drawn as a graph, 'exactly one output per input' becomes the vertical line test: a curve is the graph of a function of xx if and only if every vertical line meets it at most once. The parabola y=x2y = x^{2} passes the test, while the circle x2+y2=4x^{2} + y^{2} = 4 fails it, because the vertical line x=1x = 1 meets it at (1,±3)(1, \pm\sqrt{3}). The circle can be split into two functions, y=4−x2y = \sqrt{4 - x^{2}} and y=−4−x2y = -\sqrt{4 - x^{2}}, which is precisely what happens when you solve an equation for yy and have to choose a sign. Two functions are equal only if they have the same domain and give the same value at every point of that domain. The formula alone is not the function. So f(x)=xf(x) = x and g(x)=x2xg(x) = \frac{x^{2}}{x} are not equal, because 00 is in the domain of ff but not of gg. Likewise ln⁡(x2)\ln(x^{2}) and 2ln⁡x2\ln x differ: the first is defined for all x≠0x \neq 0 and equals 2ln⁡∣x∣2\ln|x|, the second only for x>0x > 0. Finding the domain. When a function is given only by a formula, its domain is taken to be the largest set of real xx for which the formula produces a real number. Collect the conditions from every part of the expression and intersect them. Denominator: must not be 00. Even root u2k\sqrt[2k]{u}: requires u≥0u \ge 0 (and u>0u > 0 if the root is also in a denominator). Logarithm log⁡bu\log_{b} u: requires u>0u > 0, b>0b > 0 and b≠1b \neq 1. sin⁡−1u\sin^{-1} u and cos⁡−1u\cos^{-1} u: require −1≤u≤1-1 \le u \le 1. tan⁡u\tan u and sec⁡u\sec u: require u≠(2k+1)π2u \neq (2k + 1)\frac{\pi}{2}; cot⁡u\cot u and csc⁡u\csc u: u≠kπu \neq k\pi. uvu^{v} with a variable exponent: usually requires u>0u > 0. A nested expression is handled from the outside in. For log⁡1/2(x−1)\sqrt{\log_{1/2}(x - 1)}, the logarithm needs x−1>0x - 1 > 0 and the square root needs log⁡1/2(x−1)≥0\log_{1/2}(x - 1) \ge 0. Because the base 12\frac{1}{2} is less than 11, the logarithm is decreasing, so log⁡1/2(x−1)≥0  ⟺  x−1≤1\log_{1/2}(x - 1) \ge 0 \iff x - 1 \le 1. The domain is (1,2](1, 2]. Forgetting that a base between 00 and 11 reverses inequalities is the classic error here. Finding the range. There is no single method; choose according to the form. Method 1, solve for xx: write y=f(x)y = f(x), solve for xx in terms of yy, and find the yy for which a valid xx exists in the domain. For y=2x+1x−3y = \frac{2x + 1}{x - 3}, we get x=3y+1y−2x = \frac{3y + 1}{y - 2}, valid for every y≠2y \neq 2, so the range is R−{2}\mathbb{R} - \{2\}. Method 2, the discriminant method for y=quadraticquadraticy = \frac{\text{quadratic}}{\text{quadratic}}: cross-multiply to a quadratic in xx whose coefficients involve yy, and demand a real root, so the discriminant is ≥0\ge 0. Check separately the value of yy at which the x2x^{2} coefficient vanishes, and check that the xx found does not make the original denominator zero. Method 3, monotonicity: a continuous function that is increasing on [a,b][a, b] has range [f(a),f(b)][f(a), f(b)]. Use limits at open ends. Method 4, completing the square or a known bound: x2−4x+7=(x−2)2+3≥3x^{2} - 4x + 7 = (x - 2)^{2} + 3 \ge 3; asin⁡x+bcos⁡x∈[−a2+b2,a2+b2]a\sin x + b\cos x \in [-\sqrt{a^{2} + b^{2}}, \sqrt{a^{2} + b^{2}}]; and AM-GM gives x+1x≥2x + \frac{1}{x} \ge 2 for x>0x > 0. Method 5, substitution: set t=t = a sub-expression, find the range of tt first, then the range of the outer function on that set of tt. Key Takeaways: - Every element of the domain has exactly one image; codomain elements may be used many times or not at all. - Range ⊆\subseteq codomain. - Vertical line test: a graph represents a function of xx if and only if every vertical line meets it at most once. - Equal functions need equal domains, not just matching formulas. - Domain rules: denominator ≠0\neq 0, even root argument ≥0\ge 0, log argument >0> 0 with base >0> 0 and ≠1\neq 1, ∣u∣≤1|u| \le 1 for sin⁡−1\sin^{-1} and cos⁡−1\cos^{-1}. - With a log base between 00 and 11, taking antilogs reverses the inequality. - For quadratic over quadratic, use the discriminant in xx, then check the excluded values. - Pitfall: 'simplifying' before finding the domain, for example cancelling (x−1)(x - 1) in x2−1x−1\frac{x^{2} - 1}{x - 1} and wrongly including x=1x = 1. Brain-Teaser 1: Find the range of f(x)=x2+x+1x2−x+1f(x) = \frac{x^{2} + x + 1}{x^{2} - x + 1}. Solution: The denominator x2−x+1=(x−12)2+34x^{2} - x + 1 = (x - \frac{1}{2})^{2} + \frac{3}{4} is never 00, so the domain is R\mathbb{R}. Set y=f(x)y = f(x) and cross-multiply: (y−1)x2−(y+1)x+(y−1)=0(y - 1)x^{2} - (y + 1)x + (y - 1) = 0. If y≠1y \neq 1, this quadratic in xx has a real root if and only if (y+1)2−4(y−1)2≥0(y + 1)^{2} - 4(y - 1)^{2} \ge 0. Factorising the difference of squares gives (3−y)(3y−1)≥0(3 - y)(3y - 1) \ge 0, so 13≤y≤3\frac{1}{3} \le y \le 3. The value y=1y = 1 is attained at x=0x = 0. So the range is [13,3][\frac{1}{3}, 3], with the maximum 33 at x=1x = 1 and the minimum 13\frac{1}{3} at x=−1x = -1. The logic: a value yy is in the range exactly when the equation f(x)=yf(x) = y has a solution, and the discriminant is simply the condition for that. Brain-Teaser 2: Are f(x)=x−1x−2f(x) = \sqrt{x - 1}\sqrt{x - 2} and g(x)=(x−1)(x−2)g(x) = \sqrt{(x - 1)(x - 2)} the same function? Solution: No. For ff, both roots must be real, so x≥1x \ge 1 and x≥2x \ge 2, giving domain [2,∞)[2, \infty). For gg, only the product must be non-negative, so (x−1)(x−2)≥0(x - 1)(x - 2) \ge 0, giving (−∞,1]∪[2,∞)(-\infty, 1] \cup [2, \infty). The two agree on [2,∞)[2, \infty), but gg is also defined on (−∞,1](-\infty, 1] while ff is not. The identity ab=ab\sqrt{a}\sqrt{b} = \sqrt{ab} holds only when a,b≥0a, b \ge 0; for negative aa and bb the left side is not even real. Many 'find the domain' traps are hidden applications of algebraic rules outside the range where they hold. Brain-Teaser 3: Find the range of f(x)=12−sin⁡3xf(x) = \frac{1}{2 - \sin 3x}. Solution: Use substitution. Let t=sin⁡3xt = \sin 3x, which takes every value in [−1,1][-1, 1]. Then 2−t2 - t takes every value in [1,3][1, 3], and since u↦1uu \mapsto \frac{1}{u} is decreasing for u>0u > 0, 12−t\frac{1}{2 - t} takes every value in [13,1][\frac{1}{3}, 1]. So the range is [13,1][\frac{1}{3}, 1]. The inner factor 33 only changes how fast sin⁡3x\sin 3x runs through its values, not which values it attains, so it has no effect on the range. Recognising which features affect the set of values, and which only affect how quickly they are traced out, is the conceptual point.