Functions — Diagnostic Tests
Unit Tests
Tests edge cases, boundary conditions, and common misconceptions for functions.
UT-1: Domain of Composite f ∘ g f \circ g f ∘ g
Question:
Let f ( x ) = x − 1 f(x) = \sqrt{x - 1} f ( x ) = x − 1 and g ( x ) = 1 x + 2 g(x) = \dfrac{1}{x + 2} g ( x ) = x + 2 1 .
Find the domain of f ∘ g f \circ g f ∘ g .
Solution:
We need the range of g g g to fall within the domain of f f f .
d o m ( g ) = x ∈ ′ { ′ R ′ } ′ : x ≠ − 2 \mathrm{dom}(g) = \\{x \in \mathbb{'\{'}R{'\}'} : x \neq -2\\} dom ( g ) = x ∈ ′ { ′ R ′ } ′ : x = − 2 .
r a n ( g ) = y ∈ ′ { ′ R ′ } ′ : y ≠ 0 \mathrm{ran}(g) = \\{y \in \mathbb{'\{'}R{'\}'} : y \neq 0\\} ran ( g ) = y ∈ ′ { ′ R ′ } ′ : y = 0 since g ( x ) = 1 x + 2 g(x) = \dfrac{1}{x+2} g ( x ) = x + 2 1 can take any non-zero real value.
d o m ( f ) = x ∈ ′ { ′ R ′ } ′ : x ≥ 1 \mathrm{dom}(f) = \\{x \in \mathbb{'\{'}R{'\}'} : x \geq 1\\} dom ( f ) = x ∈ ′ { ′ R ′ } ′ : x ≥ 1 .
For f ∘ g f \circ g f ∘ g to be defined, we need g ( x ) ≥ 1 g(x) \geq 1 g ( x ) ≥ 1 :
1 x + 2 ≥ 1 \frac{1}{x+2} \geq 1 x + 2 1 ≥ 1
Case 1: x + 2 > 0 x + 2 > 0 x + 2 > 0 (i.e. x > − 2 x > -2 x > − 2 ):
1 ≥ x + 2 ⟹ x ≤ − 1 1 \geq x + 2 \implies x \leq -1 1 ≥ x + 2 ⟹ x ≤ − 1
Combined with x > − 2 x > -2 x > − 2 : − 2 < x ≤ − 1 -2 < x \leq -1 − 2 < x ≤ − 1 .
Case 2: x + 2 < 0 x + 2 < 0 x + 2 < 0 (i.e. x < − 2 x < -2 x < − 2 ):
1 ≤ x + 2 ⟹ x ≥ − 1 1 \leq x + 2 \implies x \geq -1 1 ≤ x + 2 ⟹ x ≥ − 1
This contradicts x < − 2 x < -2 x < − 2 . No solutions in this case.
Therefore d o m ( f ∘ g ) = ( − 2 , − 1 ] \mathrm{dom}(f \circ g) = (-2,\; -1] dom ( f ∘ g ) = ( − 2 , − 1 ] .
UT-2: Inverse is Not Reciprocal
Question:
Let f ( x ) = 2 x + 3 x − 1 f(x) = \dfrac{2x + 3}{x - 1} f ( x ) = x − 1 2 x + 3 , x ≠ 1 x \neq 1 x = 1 . Which of the following equals f − 1 ( 5 ) f^{-1}(5) f − 1 ( 5 ) ?
(A) 1 f ( 5 ) (B) f ( 5 ) (C) Neither \text{(A)}\; \frac{1}{f(5)} \qquad \text{(B)}\; f(5) \qquad \text{(C)}\; \text{Neither} (A) f ( 5 ) 1 (B) f ( 5 ) (C) Neither
Find the correct value.
Solution:
f − 1 ( 5 ) f^{-1}(5) f − 1 ( 5 ) is the value of x x x such that f ( x ) = 5 f(x) = 5 f ( x ) = 5 :
2 x + 3 x − 1 = 5 \frac{2x + 3}{x - 1} = 5 x − 1 2 x + 3 = 5
2 x + 3 = 5 x − 5 2x + 3 = 5x - 5 2 x + 3 = 5 x − 5
3 x = 8 3x = 8 3 x = 8
x = 8 3 x = \frac{8}{3} x = 3 8
Check option (A): 1 f ( 5 ) = 1 13 4 = 4 13 ≠ 8 3 \dfrac{1}{f(5)} = \dfrac{1}{\frac{13}{4}} = \dfrac{4}{13} \neq \dfrac{8}{3} f ( 5 ) 1 = 4 13 1 = 13 4 = 3 8 .
Check option (B): f ( 5 ) = 13 4 ≠ 8 3 f(5) = \dfrac{13}{4} \neq \dfrac{8}{3} f ( 5 ) = 4 13 = 3 8 .
The answer is (C) Neither . The inverse function evaluated at a point is NOT the reciprocal of the function at that point, nor is it the function itself. f − 1 ( 5 ) = 8 3 f^{-1}(5) = \dfrac{8}{3} f − 1 ( 5 ) = 3 8 .
UT-3: Horizontal Shift Direction
Question:
The graph of y = f ( x ) y = f(x) y = f ( x ) passes through the point ( 2 , 7 ) (2, 7) ( 2 , 7 ) . Which transformation maps this point to ( 5 , 7 ) (5, 7) ( 5 , 7 ) ?
(A) y = f ( x + 3 ) (B) y = f ( x − 3 ) \text{(A)}\; y = f(x + 3) \qquad \text{(B)}\; y = f(x - 3) (A) y = f ( x + 3 ) (B) y = f ( x − 3 )
Solution:
For y = f ( x − 3 ) y = f(x - 3) y = f ( x − 3 ) , the graph shifts right by 3 units. The point ( 2 , 7 ) (2, 7) ( 2 , 7 ) on y = f ( x ) y = f(x) y = f ( x ) moves to ( 5 , 7 ) (5, 7) ( 5 , 7 ) .
For y = f ( x + 3 ) y = f(x + 3) y = f ( x + 3 ) , the graph shifts left by 3 units. The point ( 2 , 7 ) (2, 7) ( 2 , 7 ) moves to ( − 1 , 7 ) (-1, 7) ( − 1 , 7 ) .
The answer is (B) .
A common mistake is choosing (A) because "+ 3 +3 + 3 looks like moving in the positive direction." In fact, replacing x x x with x − h x - h x − h shifts the graph right by h h h , which is the opposite direction to the sign.
UT-4: Injectivity and Inverse Existence
Question:
Let f ( x ) = x 2 − 4 x + 3 f(x) = x^2 - 4x + 3 f ( x ) = x 2 − 4 x + 3 , x ∈ ′ { ′ R ′ } ′ x \in \mathbb{'\{'}R{'\}'} x ∈ ′ { ′ R ′ } ′ .
(a) Show that f f f is not injective.
(b) Restrict the domain so that f − 1 f^{-1} f − 1 exists and find f − 1 ( x ) f^{-1}(x) f − 1 ( x ) .
Solution:
(a) f ( 0 ) = 3 f(0) = 3 f ( 0 ) = 3 and f ( 4 ) = 3 f(4) = 3 f ( 4 ) = 3 . Since f ( 0 ) = f ( 4 ) f(0) = f(4) f ( 0 ) = f ( 4 ) but 0 ≠ 4 0 \neq 4 0 = 4 , f f f is not injective.
(b) We need to restrict to a domain where f f f is strictly monotonic.
f ( x ) = ( x − 2 ) 2 − 1 f(x) = (x - 2)^2 - 1 f ( x ) = ( x − 2 ) 2 − 1 has vertex at ( 2 , − 1 ) (2, -1) ( 2 , − 1 ) , opening upward.
Restricting to d o m ( f ) = [ 2 , ∞ ) \mathrm{dom}(f) = [2,\; \infty) dom ( f ) = [ 2 , ∞ ) makes f f f strictly increasing.
For y = ( x − 2 ) 2 − 1 y = (x - 2)^2 - 1 y = ( x − 2 ) 2 − 1 :
y + 1 = ( x − 2 ) 2 y + 1 = (x - 2)^2 y + 1 = ( x − 2 ) 2
x − 2 = y + 1 ( since x ≥ 2 ) x - 2 = \sqrt{y + 1} \quad (\text{since } x \geq 2) x − 2 = y + 1 ( since x ≥ 2 )
x = 2 + y + 1 x = 2 + \sqrt{y + 1} x = 2 + y + 1
Therefore f − 1 ( x ) = 2 + x + 1 f^{-1}(x) = 2 + \sqrt{x + 1} f − 1 ( x ) = 2 + x + 1 with d o m ( f − 1 ) = [ − 1 , ∞ ) \mathrm{dom}(f^{-1}) = [-1,\; \infty) dom ( f − 1 ) = [ − 1 , ∞ ) .
UT-5: Range of a Composite with Quadratic Inner Function
Question:
Let f ( x ) = 2 x − 1 f(x) = 2x - 1 f ( x ) = 2 x − 1 and g ( x ) = x 2 + 4 x + 5 g(x) = x^2 + 4x + 5 g ( x ) = x 2 + 4 x + 5 . Find the range of g ∘ f g \circ f g ∘ f .
Solution:
g ∘ f = g ( f ( x ) ) = ( 2 x − 1 ) 2 + 4 ( 2 x − 1 ) + 5 g \circ f = g(f(x)) = (2x - 1)^2 + 4(2x - 1) + 5 g ∘ f = g ( f ( x )) = ( 2 x − 1 ) 2 + 4 ( 2 x − 1 ) + 5 .
Expanding:
= 4 x 2 − 4 x + 1 + 8 x − 4 + 5 = 4 x 2 + 4 x + 2 = 4x^2 - 4x + 1 + 8x - 4 + 5 = 4x^2 + 4x + 2 = 4 x 2 − 4 x + 1 + 8 x − 4 + 5 = 4 x 2 + 4 x + 2
Complete the square:
= 4 ( x 2 + x ) + 2 = 4 ( x + 1 2 ) 2 − 1 + 2 = 4 ( x + 1 2 ) 2 + 1 = 4\left(x^2 + x\right) + 2 = 4\left(x + \tfrac{1}{2}\right)^2 - 1 + 2 = 4\left(x + \tfrac{1}{2}\right)^2 + 1 = 4 ( x 2 + x ) + 2 = 4 ( x + 2 1 ) 2 − 1 + 2 = 4 ( x + 2 1 ) 2 + 1
Since 4 ( x + 1 2 ) 2 ≥ 0 4\left(x + \tfrac{1}{2}\right)^2 \geq 0 4 ( x + 2 1 ) 2 ≥ 0 for all x ∈ ′ { ′ R ′ } ′ x \in \mathbb{'\{'}R{'\}'} x ∈ ′ { ′ R ′ } ′ :
r a n ( g ∘ f ) = [ 1 , ∞ ) \mathrm{ran}(g \circ f) = [1,\; \infty) ran ( g ∘ f ) = [ 1 , ∞ )
Integration Tests
Tests synthesis of functions with other topics.
IT-1: Functions and Quadratics (with Quadratics)
Question:
Let f ( x ) = a x 2 + b x + c f(x) = ax^2 + bx + c f ( x ) = a x 2 + b x + c where a > 0 a > 0 a > 0 . The function f f f has a minimum value of − 5 -5 − 5 at x = 3 x = 3 x = 3 . Given that f ( 1 ) = 3 f(1) = 3 f ( 1 ) = 3 , find a a a , b b b , and c c c , and hence find the range of f − 1 f^{-1} f − 1 .
Solution:
Since the minimum is − 5 -5 − 5 at x = 3 x = 3 x = 3 , we can write:
f ( x ) = a ( x − 3 ) 2 − 5 f(x) = a(x - 3)^2 - 5 f ( x ) = a ( x − 3 ) 2 − 5
Using f ( 1 ) = 3 f(1) = 3 f ( 1 ) = 3 :
a ( 1 − 3 ) 2 − 5 = 3 a(1 - 3)^2 - 5 = 3 a ( 1 − 3 ) 2 − 5 = 3
4 a − 5 = 3 ⟹ a = 2 4a - 5 = 3 \implies a = 2 4 a − 5 = 3 ⟹ a = 2
So f ( x ) = 2 ( x − 3 ) 2 − 5 = 2 x 2 − 12 x + 13 f(x) = 2(x - 3)^2 - 5 = 2x^2 - 12x + 13 f ( x ) = 2 ( x − 3 ) 2 − 5 = 2 x 2 − 12 x + 13 .
Therefore a = 2 a = 2 a = 2 , b = − 12 b = -12 b = − 12 , c = 13 c = 13 c = 13 .
Since f f f has minimum value − 5 -5 − 5 and opens upward, r a n ( f ) = [ − 5 , ∞ ) \mathrm{ran}(f) = [-5,\; \infty) ran ( f ) = [ − 5 , ∞ ) .
Therefore d o m ( f − 1 ) = [ − 5 , ∞ ) \mathrm{dom}(f^{-1}) = [-5,\; \infty) dom ( f − 1 ) = [ − 5 , ∞ ) , and so r a n ( f − 1 ) = [ 3 , ∞ ) \mathrm{ran}(f^{-1}) = [3,\; \infty) ran ( f − 1 ) = [ 3 , ∞ ) (the restricted domain where f f f is injective, to the right of the vertex).
IT-2: Functions and Logarithms (with Logarithms)
Question:
Let f ( x ) = log 2 ( x + 1 ) f(x) = \log_2(x + 1) f ( x ) = log 2 ( x + 1 ) , x > − 1 x > -1 x > − 1 . Find f − 1 ( x ) f^{-1}(x) f − 1 ( x ) and solve f ( x ) = f − 1 ( x ) f(x) = f^{-1}(x) f ( x ) = f − 1 ( x ) .
Solution:
y = log 2 ( x + 1 ) ⟹ 2 y = x + 1 ⟹ x = 2 y − 1 y = \log_2(x + 1) \implies 2^y = x + 1 \implies x = 2^y - 1 y = log 2 ( x + 1 ) ⟹ 2 y = x + 1 ⟹ x = 2 y − 1 .
So f − 1 ( x ) = 2 x − 1 f^{-1}(x) = 2^x - 1 f − 1 ( x ) = 2 x − 1 with d o m ( f − 1 ) = ′ { ′ R ′ } ′ \mathrm{dom}(f^{-1}) = \mathbb{'\{'}R{'\}'} dom ( f − 1 ) = ′ { ′ R ′ } ′ .
Solving f ( x ) = f − 1 ( x ) f(x) = f^{-1}(x) f ( x ) = f − 1 ( x ) :
log 2 ( x + 1 ) = 2 x − 1 \log_2(x + 1) = 2^x - 1 log 2 ( x + 1 ) = 2 x − 1
Let y = x + 1 y = x + 1 y = x + 1 (so y > 0 y > 0 y > 0 ):
log 2 y = 2 y − 1 − 1 \log_2 y = 2^{y-1} - 1 log 2 y = 2 y − 1 − 1
By inspection: y = 2 y = 2 y = 2 gives log 2 2 = 1 \log_2 2 = 1 log 2 2 = 1 and 2 1 − 1 = 1 2^{1} - 1 = 1 2 1 − 1 = 1 . Check.
So x + 1 = 2 ⟹ x = 1 x + 1 = 2 \implies x = 1 x + 1 = 2 ⟹ x = 1 .
Also y = 1 y = 1 y = 1 gives log 2 1 = 0 \log_2 1 = 0 log 2 1 = 0 and 2 0 − 1 = 0 2^{0} - 1 = 0 2 0 − 1 = 0 . Check.
So x + 1 = 1 ⟹ x = 0 x + 1 = 1 \implies x = 0 x + 1 = 1 ⟹ x = 0 .
The solutions are x = 0 x = 0 x = 0 and x = 1 x = 1 x = 1 .
IT-3: Functions and Coordinate Geometry (with Coordinate Geometry)
Question:
The function f ( x ) = k x f(x) = \dfrac{k}{x} f ( x ) = x k , x > 0 x > 0 x > 0 , represents a rectangular hyperbola. The line y = m x + c y = mx + c y = m x + c is tangent to the curve at the point ( 2 , 4 ) (2,\; 4) ( 2 , 4 ) . Find k k k , m m m , and c c c .
Solution:
Since ( 2 , 4 ) (2, 4) ( 2 , 4 ) lies on the hyperbola:
4 = k 2 ⟹ k = 8 4 = \frac{k}{2} \implies k = 8 4 = 2 k ⟹ k = 8
So f ( x ) = 8 x f(x) = \dfrac{8}{x} f ( x ) = x 8 .
Since ( 2 , 4 ) (2, 4) ( 2 , 4 ) lies on the tangent line:
4 = 2m + c \tag{1}
The tangent has the same gradient as the curve at x = 2 x = 2 x = 2 :
f ′ ( x ) = − 8 x 2 ⟹ f ′ ( 2 ) = − 8 4 = − 2 f'(x) = -\frac{8}{x^2} \implies f'(2) = -\frac{8}{4} = -2 f ′ ( x ) = − x 2 8 ⟹ f ′ ( 2 ) = − 4 8 = − 2
So m = − 2 m = -2 m = − 2 .
From equation (1): c = 4 − 2 ( − 2 ) = 8 c = 4 - 2(-2) = 8 c = 4 − 2 ( − 2 ) = 8 .
Therefore k = 8 k = 8 k = 8 , m = − 2 m = -2 m = − 2 , c = 8 c = 8 c = 8 , and the tangent line is y = − 2 x + 8 y = -2x + 8 y = − 2 x + 8 .
Worked Examples
WE-1: Domain and Range of a Rational Function
Question:
Find the domain and range of f ( x ) = 2 x 2 + 1 f(x) = \dfrac{2}{x^2 + 1} f ( x ) = x 2 + 1 2 .
Solution:
Domain: x 2 + 1 ≠ 0 x^2 + 1 \neq 0 x 2 + 1 = 0 for all real x x x (since x 2 ≥ 0 x^2 \geq 0 x 2 ≥ 0 ).
d o m ( f ) = ′ { ′ R ′ } ′ \mathrm{dom}(f) = \mathbb{'\{'}R{'\}'} dom ( f ) = ′ { ′ R ′ } ′
Range: x 2 + 1 ≥ 1 x^2 + 1 \geq 1 x 2 + 1 ≥ 1 for all x x x , so 0 < 2 x 2 + 1 ≤ 2 0 < \dfrac{2}{x^2 + 1} \leq 2 0 < x 2 + 1 2 ≤ 2 .
Maximum value 2 2 2 occurs at x = 0 x = 0 x = 0 . The function approaches 0 0 0 as ∣ x ∣ → ∞ |x| \to \infty ∣ x ∣ → ∞ .
r a n ( f ) = ( 0 , 2 ] \mathrm{ran}(f) = (0,\; 2] ran ( f ) = ( 0 , 2 ]
WE-2: Composite Function Evaluation
Question:
Let f ( x ) = 2 x + 1 f(x) = 2x + 1 f ( x ) = 2 x + 1 and g ( x ) = x 2 − 3 g(x) = x^2 - 3 g ( x ) = x 2 − 3 . Find:
(a) f ∘ g ( 2 ) f \circ g(2) f ∘ g ( 2 )
(b) g ∘ f ( 2 ) g \circ f(2) g ∘ f ( 2 )
(c) f ∘ f ( x ) f \circ f(x) f ∘ f ( x )
Solution:
(a) g ( 2 ) = 4 − 3 = 1 g(2) = 4 - 3 = 1 g ( 2 ) = 4 − 3 = 1 . f ∘ g ( 2 ) = f ( 1 ) = 3 f \circ g(2) = f(1) = 3 f ∘ g ( 2 ) = f ( 1 ) = 3 .
(b) f ( 2 ) = 5 f(2) = 5 f ( 2 ) = 5 . g ∘ f ( 2 ) = g ( 5 ) = 25 − 3 = 22 g \circ f(2) = g(5) = 25 - 3 = 22 g ∘ f ( 2 ) = g ( 5 ) = 25 − 3 = 22 .
Note: f ∘ g ( 2 ) ≠ g ∘ f ( 2 ) f \circ g(2) \neq g \circ f(2) f ∘ g ( 2 ) = g ∘ f ( 2 ) , confirming that composition is not commutative.
(c) f ∘ f ( x ) = f ( f ( x ) ) = f ( 2 x + 1 ) = 2 ( 2 x + 1 ) + 1 = 4 x + 3 f \circ f(x) = f(f(x)) = f(2x + 1) = 2(2x + 1) + 1 = 4x + 3 f ∘ f ( x ) = f ( f ( x )) = f ( 2 x + 1 ) = 2 ( 2 x + 1 ) + 1 = 4 x + 3 .
WE-3: Finding the Inverse of a Quadratic
Question:
Let f ( x ) = 2 x 2 + 4 x − 1 f(x) = 2x^2 + 4x - 1 f ( x ) = 2 x 2 + 4 x − 1 for x ≥ − 1 x \geq -1 x ≥ − 1 . Find f − 1 ( x ) f^{-1}(x) f − 1 ( x ) .
Solution:
y = 2 x 2 + 4 x − 1 = 2 ( x 2 + 2 x ) − 1 = 2 ( x + 1 ) 2 − 2 − 1 = 2 ( x + 1 ) 2 − 3 y = 2x^2 + 4x - 1 = 2(x^2 + 2x) - 1 = 2(x + 1)^2 - 2 - 1 = 2(x + 1)^2 - 3 y = 2 x 2 + 4 x − 1 = 2 ( x 2 + 2 x ) − 1 = 2 ( x + 1 ) 2 − 2 − 1 = 2 ( x + 1 ) 2 − 3 .
For x ≥ − 1 x \geq -1 x ≥ − 1 : y + 3 = 2 ( x + 1 ) 2 ≥ 0 y + 3 = 2(x + 1)^2 \geq 0 y + 3 = 2 ( x + 1 ) 2 ≥ 0 .
x + 1 = y + 3 2 x + 1 = \sqrt{\frac{y + 3}{2}} x + 1 = 2 y + 3
x = y + 3 2 − 1 x = \sqrt{\frac{y + 3}{2}} - 1 x = 2 y + 3 − 1
f − 1 ( x ) = x + 3 2 − 1 f^{-1}(x) = \sqrt{\frac{x + 3}{2}} - 1 f − 1 ( x ) = 2 x + 3 − 1
d o m ( f − 1 ) = r a n ( f ) = [ − 3 , ∞ ) \mathrm{dom}(f^{-1}) = \mathrm{ran}(f) = [-3,\; \infty) dom ( f − 1 ) = ran ( f ) = [ − 3 , ∞ ) .
r a n ( f − 1 ) = d o m ( f ) = [ − 1 , ∞ ) \mathrm{ran}(f^{-1}) = \mathrm{dom}(f) = [-1,\; \infty) ran ( f − 1 ) = dom ( f ) = [ − 1 , ∞ ) .
Question:
The graph of y = f ( x ) y = f(x) y = f ( x ) passes through ( 2 , 5 ) (2, 5) ( 2 , 5 ) and has a minimum at ( 3 , 1 ) (3, 1) ( 3 , 1 ) . State the corresponding points on the graph of:
(a) y = f ( 2 x ) y = f(2x) y = f ( 2 x )
(b) y = − f ( x ) + 3 y = -f(x) + 3 y = − f ( x ) + 3
(c) y = f ( x − 1 ) + 2 y = f(x - 1) + 2 y = f ( x − 1 ) + 2
Solution:
(a) y = f ( 2 x ) y = f(2x) y = f ( 2 x ) : horizontal compression by factor 1 2 \dfrac{1}{2} 2 1 .
( 2 , 5 ) → ( 1 , 5 ) (2, 5) \to (1, 5) ( 2 , 5 ) → ( 1 , 5 ) and ( 3 , 1 ) → ( 3 2 , 1 ) (3, 1) \to \left(\dfrac{3}{2},\; 1\right) ( 3 , 1 ) → ( 2 3 , 1 ) .
(b) y = − f ( x ) + 3 y = -f(x) + 3 y = − f ( x ) + 3 : reflection in x x x -axis, then shift up 3.
( 2 , 5 ) → ( 2 , − 5 ) → ( 2 , − 2 ) (2, 5) \to (2, -5) \to (2, -2) ( 2 , 5 ) → ( 2 , − 5 ) → ( 2 , − 2 ) and ( 3 , 1 ) → ( 3 , − 1 ) → ( 3 , 2 ) (3, 1) \to (3, -1) \to (3, 2) ( 3 , 1 ) → ( 3 , − 1 ) → ( 3 , 2 ) .
(c) y = f ( x − 1 ) + 2 y = f(x - 1) + 2 y = f ( x − 1 ) + 2 : shift right 1, then up 2.
( 2 , 5 ) → ( 3 , 7 ) (2, 5) \to (3, 7) ( 2 , 5 ) → ( 3 , 7 ) and ( 3 , 1 ) → ( 4 , 3 ) (3, 1) \to (4, 3) ( 3 , 1 ) → ( 4 , 3 ) .
WE-5: Piecewise Function
Question:
Define f ( x ) = { x 2 if x < 0 2 x + 1 if 0 ≤ x ≤ 3 7 if x > 3 f(x) = \begin{cases} x^2 & \text{if } x < 0 \\ 2x + 1 & \text{if } 0 \leq x \leq 3 \\ 7 & \text{if } x > 3 \end{cases} f ( x ) = ⎩ ⎨ ⎧ x 2 2 x + 1 7 if x < 0 if 0 ≤ x ≤ 3 if x > 3 .
Find f ( − 2 ) f(-2) f ( − 2 ) , f ( 0 ) f(0) f ( 0 ) , f ( 3 ) f(3) f ( 3 ) , and f ( 5 ) f(5) f ( 5 ) .
Solution:
f ( − 2 ) = ( − 2 ) 2 = 4 f(-2) = (-2)^2 = 4 f ( − 2 ) = ( − 2 ) 2 = 4 .
f ( 0 ) = 2 ( 0 ) + 1 = 1 f(0) = 2(0) + 1 = 1 f ( 0 ) = 2 ( 0 ) + 1 = 1 .
f ( 3 ) = 2 ( 3 ) + 1 = 7 f(3) = 2(3) + 1 = 7 f ( 3 ) = 2 ( 3 ) + 1 = 7 .
f ( 5 ) = 7 f(5) = 7 f ( 5 ) = 7 .
WE-6: Even and Odd Functions
Question:
Determine whether each function is even, odd, or neither:
(a) f ( x ) = x 3 − x f(x) = x^3 - x f ( x ) = x 3 − x
(b) g ( x ) = x 4 + 2 x 2 g(x) = x^4 + 2x^2 g ( x ) = x 4 + 2 x 2
(c) h ( x ) = x 3 + 1 h(x) = x^3 + 1 h ( x ) = x 3 + 1
Solution:
(a) f ( − x ) = ( − x ) 3 − ( − x ) = − x 3 + x = − ( x 3 − x ) = − f ( x ) f(-x) = (-x)^3 - (-x) = -x^3 + x = -(x^3 - x) = -f(x) f ( − x ) = ( − x ) 3 − ( − x ) = − x 3 + x = − ( x 3 − x ) = − f ( x ) . Odd.
(b) g ( − x ) = ( − x ) 4 + 2 ( − x ) 2 = x 4 + 2 x 2 = g ( x ) g(-x) = (-x)^4 + 2(-x)^2 = x^4 + 2x^2 = g(x) g ( − x ) = ( − x ) 4 + 2 ( − x ) 2 = x 4 + 2 x 2 = g ( x ) . Even.
(c) h ( − x ) = ( − x ) 3 + 1 = − x 3 + 1 ≠ h ( x ) h(-x) = (-x)^3 + 1 = -x^3 + 1 \neq h(x) h ( − x ) = ( − x ) 3 + 1 = − x 3 + 1 = h ( x ) and h ( − x ) ≠ − h ( x ) h(-x) \neq -h(x) h ( − x ) = − h ( x ) . Neither.
WE-7: Function Composition with Domain Restrictions
Question:
Let f ( x ) = x f(x) = \sqrt{x} f ( x ) = x and g ( x ) = x − 4 g(x) = x - 4 g ( x ) = x − 4 . Find f ∘ g f \circ g f ∘ g and its domain.
Solution:
f ∘ g ( x ) = f ( g ( x ) ) = f ( x − 4 ) = x − 4 f \circ g(x) = f(g(x)) = f(x - 4) = \sqrt{x - 4} f ∘ g ( x ) = f ( g ( x )) = f ( x − 4 ) = x − 4 .
Domain of f ∘ g f \circ g f ∘ g : we need x − 4 ≥ 0 x - 4 \geq 0 x − 4 ≥ 0 , i.e. x ≥ 4 x \geq 4 x ≥ 4 .
d o m ( f ∘ g ) = [ 4 , ∞ ) \mathrm{dom}(f \circ g) = [4,\; \infty) dom ( f ∘ g ) = [ 4 , ∞ )
Note: g ( x ) = x − 4 g(x) = x - 4 g ( x ) = x − 4 is defined for all x ∈ ′ { ′ R ′ } ′ x \in \mathbb{'\{'}R{'\}'} x ∈ ′ { ′ R ′ } ′ , but the range of g g g must fall within the domain of f f f (which is [ 0 , ∞ ) [0, \infty) [ 0 , ∞ ) ), so g ( x ) ≥ 0 ⟹ x ≥ 4 g(x) \geq 0 \implies x \geq 4 g ( x ) ≥ 0 ⟹ x ≥ 4 .
WE-8: Injectivity Test
Question:
Determine whether f ( x ) = 2 x + 3 x − 1 f(x) = \dfrac{2x + 3}{x - 1} f ( x ) = x − 1 2 x + 3 is injective.
Solution:
Suppose f ( a ) = f ( b ) f(a) = f(b) f ( a ) = f ( b ) :
2 a + 3 a − 1 = 2 b + 3 b − 1 \frac{2a + 3}{a - 1} = \frac{2b + 3}{b - 1} a − 1 2 a + 3 = b − 1 2 b + 3
( 2 a + 3 ) ( b − 1 ) = ( 2 b + 3 ) ( a − 1 ) (2a + 3)(b - 1) = (2b + 3)(a - 1) ( 2 a + 3 ) ( b − 1 ) = ( 2 b + 3 ) ( a − 1 )
2 a b − 2 a + 3 b − 3 = 2 a b − 2 b + 3 a − 3 2ab - 2a + 3b - 3 = 2ab - 2b + 3a - 3 2 ab − 2 a + 3 b − 3 = 2 ab − 2 b + 3 a − 3
− 2 a + 3 b = − 2 b + 3 a -2a + 3b = -2b + 3a − 2 a + 3 b = − 2 b + 3 a
5 b = 5 a 5b = 5a 5 b = 5 a
a = b a = b a = b
Since f ( a ) = f ( b ) ⟹ a = b f(a) = f(b) \implies a = b f ( a ) = f ( b ) ⟹ a = b , the function is injective .
Common Pitfalls
Confusing f − 1 f^{-1} f − 1 with the reciprocal 1 f \dfrac{1}{f} f 1 . The notation f − 1 f^{-1} f − 1 denotes the inverse function, NOT the reciprocal. f − 1 ( x ) f^{-1}(x) f − 1 ( x ) is the value of y y y such that f ( y ) = x f(y) = x f ( y ) = x , which is completely different from 1 f ( x ) \dfrac{1}{f(x)} f ( x ) 1 .
Incorrect domain of composite functions. The domain of f ∘ g f \circ g f ∘ g is NOT simply d o m ( g ) \mathrm{dom}(g) dom ( g ) . It is the set of all x x x in d o m ( g ) \mathrm{dom}(g) dom ( g ) such that g ( x ) ∈ d o m ( f ) g(x) \in \mathrm{dom}(f) g ( x ) ∈ dom ( f ) . You must check both conditions.
Wrong direction for horizontal shifts. f ( x − h ) f(x - h) f ( x − h ) shifts the graph RIGHT by h h h units, not left. The transformation is counterintuitive: replacing x x x with x − h x - h x − h moves the graph in the positive x x x -direction.
Forgetting to restrict the domain when finding the inverse of a non-injective function. If f f f is not one-to-one on its entire domain, you must restrict the domain before finding the inverse. Always state the restricted domain explicitly.
Assuming f ∘ g = g ∘ f f \circ g = g \circ f f ∘ g = g ∘ f . Function composition is generally NOT commutative. Always compute f ∘ g f \circ g f ∘ g and g ∘ f g \circ f g ∘ f separately unless you have proven they are equal.
DSE Exam-Style Questions
DSE-1
Let f ( x ) = 3 x − 1 x + 2 f(x) = \dfrac{3x - 1}{x + 2} f ( x ) = x + 2 3 x − 1 , x ≠ − 2 x \neq -2 x = − 2 .
(a) Find f − 1 ( x ) f^{-1}(x) f − 1 ( x ) . (3 marks)
(b) Find the domain and range of f − 1 f^{-1} f − 1 . (2 marks)
(c) Solve f ( x ) = x f(x) = x f ( x ) = x . (3 marks)
Solution:
(a) y = 3 x − 1 x + 2 y = \dfrac{3x - 1}{x + 2} y = x + 2 3 x − 1 .
y ( x + 2 ) = 3 x − 1 ⟹ y x + 2 y = 3 x − 1 ⟹ y x − 3 x = − 1 − 2 y y(x + 2) = 3x - 1 \implies yx + 2y = 3x - 1 \implies yx - 3x = -1 - 2y y ( x + 2 ) = 3 x − 1 ⟹ y x + 2 y = 3 x − 1 ⟹ y x − 3 x = − 1 − 2 y .
x ( y − 3 ) = − 1 − 2 y x(y - 3) = -1 - 2y x ( y − 3 ) = − 1 − 2 y .
x = − 1 − 2 y y − 3 = 2 y + 1 3 − y x = \dfrac{-1 - 2y}{y - 3} = \dfrac{2y + 1}{3 - y} x = y − 3 − 1 − 2 y = 3 − y 2 y + 1 .
f − 1 ( x ) = 2 x + 1 3 − x f^{-1}(x) = \frac{2x + 1}{3 - x} f − 1 ( x ) = 3 − x 2 x + 1
(b) d o m ( f − 1 ) = r a n ( f ) \mathrm{dom}(f^{-1}) = \mathrm{ran}(f) dom ( f − 1 ) = ran ( f ) . Since f ( x ) = 3 x − 1 x + 2 = 3 − 7 x + 2 f(x) = \dfrac{3x - 1}{x + 2} = 3 - \dfrac{7}{x + 2} f ( x ) = x + 2 3 x − 1 = 3 − x + 2 7 and 7 x + 2 \dfrac{7}{x+2} x + 2 7 takes all non-zero real values, r a n ( f ) = ′ { ′ R ′ } ′ ∖ { 3 } \mathrm{ran}(f) = \mathbb{'\{'}R{'\}'} \setminus \{3\} ran ( f ) = ′ { ′ R ′ } ′ ∖ { 3 } .
d o m ( f − 1 ) = { x ∈ ′ { ′ R ′ } ′ : x ≠ 3 } \mathrm{dom}(f^{-1}) = \{x \in \mathbb{'\{'}R{'\}'} : x \neq 3\} dom ( f − 1 ) = { x ∈ ′ { ′ R ′ } ′ : x = 3 } .
r a n ( f − 1 ) = d o m ( f ) = { x ∈ ′ { ′ R ′ } ′ : x ≠ − 2 } \mathrm{ran}(f^{-1}) = \mathrm{dom}(f) = \{x \in \mathbb{'\{'}R{'\}'} : x \neq -2\} ran ( f − 1 ) = dom ( f ) = { x ∈ ′ { ′ R ′ } ′ : x = − 2 } .
(c) 3 x − 1 x + 2 = x ⟹ 3 x − 1 = x 2 + 2 x ⟹ x 2 − x + 1 = 0 \dfrac{3x - 1}{x + 2} = x \implies 3x - 1 = x^2 + 2x \implies x^2 - x + 1 = 0 x + 2 3 x − 1 = x ⟹ 3 x − 1 = x 2 + 2 x ⟹ x 2 − x + 1 = 0 .
Δ = 1 − 4 = − 3 < 0 \Delta = 1 - 4 = -3 < 0 Δ = 1 − 4 = − 3 < 0 . No real solutions.
DSE-2
Let f ( x ) = x 2 − 6 x + 5 f(x) = x^2 - 6x + 5 f ( x ) = x 2 − 6 x + 5 and g ( x ) = 2 x − 3 g(x) = 2x - 3 g ( x ) = 2 x − 3 .
(a) Express f ( x ) f(x) f ( x ) in the form ( x − a ) 2 + b (x - a)^2 + b ( x − a ) 2 + b . (2 marks)
(b) Find the range of f f f . (1 mark)
(c) Find f ∘ g ( x ) f \circ g(x) f ∘ g ( x ) and g ∘ f ( x ) g \circ f(x) g ∘ f ( x ) . (4 marks)
(d) Solve f ∘ g ( x ) = 0 f \circ g(x) = 0 f ∘ g ( x ) = 0 . (2 marks)
Solution:
(a) f ( x ) = ( x − 3 ) 2 − 9 + 5 = ( x − 3 ) 2 − 4 f(x) = (x - 3)^2 - 9 + 5 = (x - 3)^2 - 4 f ( x ) = ( x − 3 ) 2 − 9 + 5 = ( x − 3 ) 2 − 4 .
(b) Since ( x − 3 ) 2 ≥ 0 (x - 3)^2 \geq 0 ( x − 3 ) 2 ≥ 0 : r a n ( f ) = [ − 4 , ∞ ) \mathrm{ran}(f) = [-4,\; \infty) ran ( f ) = [ − 4 , ∞ ) .
(c) f ∘ g ( x ) = f ( 2 x − 3 ) = ( 2 x − 3 − 3 ) 2 − 4 = ( 2 x − 6 ) 2 − 4 = 4 x 2 − 24 x + 36 − 4 = 4 x 2 − 24 x + 32 f \circ g(x) = f(2x - 3) = (2x - 3 - 3)^2 - 4 = (2x - 6)^2 - 4 = 4x^2 - 24x + 36 - 4 = 4x^2 - 24x + 32 f ∘ g ( x ) = f ( 2 x − 3 ) = ( 2 x − 3 − 3 ) 2 − 4 = ( 2 x − 6 ) 2 − 4 = 4 x 2 − 24 x + 36 − 4 = 4 x 2 − 24 x + 32 .
g ∘ f ( x ) = g ( x 2 − 6 x + 5 ) = 2 ( x 2 − 6 x + 5 ) − 3 = 2 x 2 − 12 x + 7 g \circ f(x) = g(x^2 - 6x + 5) = 2(x^2 - 6x + 5) - 3 = 2x^2 - 12x + 7 g ∘ f ( x ) = g ( x 2 − 6 x + 5 ) = 2 ( x 2 − 6 x + 5 ) − 3 = 2 x 2 − 12 x + 7 .
(d) 4 x 2 − 24 x + 32 = 0 ⟹ x 2 − 6 x + 8 = 0 ⟹ ( x − 2 ) ( x − 4 ) = 0 ⟹ x = 2 4x^2 - 24x + 32 = 0 \implies x^2 - 6x + 8 = 0 \implies (x-2)(x-4) = 0 \implies x = 2 4 x 2 − 24 x + 32 = 0 ⟹ x 2 − 6 x + 8 = 0 ⟹ ( x − 2 ) ( x − 4 ) = 0 ⟹ x = 2 or x = 4 x = 4 x = 4 .
DSE-3
The function f f f is defined by f ( x ) = 1 x 2 − 4 f(x) = \dfrac{1}{x^2 - 4} f ( x ) = x 2 − 4 1 .
(a) Find the domain of f f f . (1 mark)
(b) Find the range of f f f . (3 marks)
(c) Solve f ( x ) = 1 5 f(x) = \dfrac{1}{5} f ( x ) = 5 1 . (2 marks)
Solution:
(a) x 2 − 4 ≠ 0 ⟹ x ≠ ± 2 x^2 - 4 \neq 0 \implies x \neq \pm 2 x 2 − 4 = 0 ⟹ x = ± 2 .
d o m ( f ) = { x ∈ ′ { ′ R ′ } ′ : x ≠ − 2 and x ≠ 2 } \mathrm{dom}(f) = \{x \in \mathbb{'\{'}R{'\}'} : x \neq -2 \text{ and } x \neq 2\} dom ( f ) = { x ∈ ′ { ′ R ′ } ′ : x = − 2 and x = 2 }
(b) Let y = 1 x 2 − 4 y = \dfrac{1}{x^2 - 4} y = x 2 − 4 1 . Then x 2 − 4 = 1 y x^2 - 4 = \dfrac{1}{y} x 2 − 4 = y 1 , so x 2 = 4 + 1 y = 4 y + 1 y x^2 = 4 + \dfrac{1}{y} = \dfrac{4y + 1}{y} x 2 = 4 + y 1 = y 4 y + 1 .
For x 2 ≥ 0 x^2 \geq 0 x 2 ≥ 0 : 4 y + 1 y ≥ 0 \dfrac{4y + 1}{y} \geq 0 y 4 y + 1 ≥ 0 .
Critical values: y = 0 y = 0 y = 0 (asymptote) and y = − 1 4 y = -\dfrac{1}{4} y = − 4 1 .
4 y + 1 y ≥ 0 ⟹ y < − 1 4 \dfrac{4y + 1}{y} \geq 0 \implies y < -\dfrac{1}{4} y 4 y + 1 ≥ 0 ⟹ y < − 4 1 or y > 0 y > 0 y > 0 .
r a n ( f ) = ( − ∞ , − 1 4 ) ∪ ( 0 , ∞ ) \mathrm{ran}(f) = \left(-\infty,\; -\dfrac{1}{4}\right) \cup (0,\; \infty) ran ( f ) = ( − ∞ , − 4 1 ) ∪ ( 0 , ∞ )
(c) 1 x 2 − 4 = 1 5 ⟹ x 2 − 4 = 5 ⟹ x 2 = 9 ⟹ x = ± 3 \dfrac{1}{x^2 - 4} = \dfrac{1}{5} \implies x^2 - 4 = 5 \implies x^2 = 9 \implies x = \pm 3 x 2 − 4 1 = 5 1 ⟹ x 2 − 4 = 5 ⟹ x 2 = 9 ⟹ x = ± 3 .
DSE-4
Let f ( x ) = 2 x f(x) = 2^x f ( x ) = 2 x and g ( x ) = log 2 x g(x) = \log_2 x g ( x ) = log 2 x .
(a) Find f ∘ g ( x ) f \circ g(x) f ∘ g ( x ) and simplify. (2 marks)
(b) Find g ∘ f ( x ) g \circ f(x) g ∘ f ( x ) and simplify. (2 marks)
(c) Explain the relationship between f f f and g g g . (1 mark)
Solution:
(a) f ∘ g ( x ) = f ( log 2 x ) = 2 log 2 x = x f \circ g(x) = f(\log_2 x) = 2^{\log_2 x} = x f ∘ g ( x ) = f ( log 2 x ) = 2 l o g 2 x = x , for x > 0 x > 0 x > 0 .
(b) g ∘ f ( x ) = g ( 2 x ) = log 2 ( 2 x ) = x g \circ f(x) = g(2^x) = \log_2(2^x) = x g ∘ f ( x ) = g ( 2 x ) = log 2 ( 2 x ) = x , for all x ∈ ′ { ′ R ′ } ′ x \in \mathbb{'\{'}R{'\}'} x ∈ ′ { ′ R ′ } ′ .
(c) f f f and g g g are inverse functions of each other. f ∘ g = i d f \circ g = \mathrm{id} f ∘ g = id on ( 0 , ∞ ) (0, \infty) ( 0 , ∞ ) and g ∘ f = i d g \circ f = \mathrm{id} g ∘ f = id on ′ { ′ R ′ } ′ \mathbb{'\{'}R{'\}'} ′ { ′ R ′ } ′ .
DSE-5
The graph of y = f ( x ) y = f(x) y = f ( x ) is shown. It passes through ( − 2 , 0 ) (-2, 0) ( − 2 , 0 ) , ( 0 , 4 ) (0, 4) ( 0 , 4 ) , ( 2 , 0 ) (2, 0) ( 2 , 0 ) , and has a maximum at ( 0 , 4 ) (0, 4) ( 0 , 4 ) .
(a) Sketch the graph of y = f ( x + 1 ) y = f(x + 1) y = f ( x + 1 ) . (2 marks)
(b) Sketch the graph of y = f ( − x ) y = f(-x) y = f ( − x ) . (2 marks)
(c) The graph of y = f ( x ) y = f(x) y = f ( x ) is transformed to the graph of y = − f ( x ) + 2 y = -f(x) + 2 y = − f ( x ) + 2 . Describe this transformation in words. (2 marks)
Solution:
(a) y = f ( x + 1 ) y = f(x + 1) y = f ( x + 1 ) shifts the graph left by 1 unit. New key points: ( − 3 , 0 ) (-3, 0) ( − 3 , 0 ) , ( − 1 , 4 ) (-1, 4) ( − 1 , 4 ) , ( 1 , 0 ) (1, 0) ( 1 , 0 ) . Maximum at ( − 1 , 4 ) (-1, 4) ( − 1 , 4 ) .
(b) y = f ( − x ) y = f(-x) y = f ( − x ) reflects the graph in the y y y -axis. New key points: ( 2 , 0 ) (2, 0) ( 2 , 0 ) , ( 0 , 4 ) (0, 4) ( 0 , 4 ) , ( − 2 , 0 ) (-2, 0) ( − 2 , 0 ) . Maximum at ( 0 , 4 ) (0, 4) ( 0 , 4 ) .
(c) y = − f ( x ) + 2 y = -f(x) + 2 y = − f ( x ) + 2 : reflect in the x x x -axis (all y y y -values change sign), then translate up by 2 units. New maximum at ( 0 , − 4 + 2 ) = ( 0 , − 2 ) (0, -4 + 2) = (0, -2) ( 0 , − 4 + 2 ) = ( 0 , − 2 ) . New x x x -intercepts at ( − 2 , 2 ) (-2, 2) ( − 2 , 2 ) and ( 2 , 2 ) (2, 2) ( 2 , 2 ) (which are not on the x x x -axis anymore).