Real functions: the vertical line test, piecewise rules, domains, operations and composition
الأسبوع 1 · الدوال الحقيقية: اختبار الخط الرأسي ومجال الدالة ومداها والدالة متعددة التعريف وإيجاد المجال من القاعدة والعمليات على الدوال وتركيبها · 3 دروس
3
Adding, subtracting, multiplying and dividing functions, and composing them: g after f
Pure Mathematics Sec 2 Term 1, Unit 1, Lesson 1
GoalCombine two functions by an operation or by composition, and find the domain of the result.
New words
composition · (g ∘ f)(x) = g(f(x)): apply f first, then gdomain of the result · the inputs where every function involved is defined
Explanation
Functions can be added, subtracted and multiplied value by value: (f + g)(x) = f(x) + g(x). The result exists only where both f and g exist, so its domain is the overlap of the two domains. For a quotient (f/g)(x) = f(x)/g(x) we also remove every x where g(x) = 0. Composition is different: (g ∘ f)(x) = g(f(x)) means that x goes into f first, and the output of f goes into g. A market stall sells oranges at 8 LE a kilogram, f(x) = 8x, and takes 5 LE off the bill, g(p) = p − 5. The bill for x kilograms is g(f(x)) = 8x − 5. For this to make sense the output of f must be an allowed input of g, so the range of f must meet the domain of g. In general g ∘ f and f ∘ g are different functions: order matters, like putting on socks and then shoes. In Arabic the names are العمليات على الدوال and تركيب الدوال.
xf→f(x)g→g(f(x))
Worked examples
f(x) = x² − 3x, g(x) = √(x + 5), h(x) = √(20 − x). Domains: f is R, g is [−5, ∞[, h is ]−∞, 20]. So g + h and g · h live on [−5, 20]. At x = 4: g(4) = 3, h(4) = 4, so (g + h)(4) = 7, (g · h)(4) = 12, (g − h)(4) = −1 and (h/g)(4) = 4/3. The quotient h/g also drops x = −5 (g = 0): domain ]−5, 20]. (g · h)(25) is not defined, since 25 is not in the domain of h.
With f(x) = 3x and g(x) = x² + 5: (g ∘ f)(2) = g(6) = 41, but (f ∘ g)(2) = f(9) = 27. The rules are (g ∘ f)(x) = 9x² + 5 and (f ∘ g)(x) = 3x² + 15, different. Solve (g ∘ f)(x) = 86: 9x² + 5 = 86, so x² = 9 and x = 3 or x = −3.
x
f(x) = x − 4
g(f(x)) = √(x − 4)
4
0
0
5
1
1
8
4
2
13
9
3
2
−2
not defined
f(x) = x − 4 and g(x) = √x. Then (g ∘ f)(x) = √(x − 4). The square root needs f(x) ≥ 0, that is x ≥ 4, so the domain is [4, ∞[. The table shows x = 2 fails: f(2) = −2 is outside the domain of g.
Class activity
Socks and shoes. Take f(x) = x + 3 and g(x) = 2x. Compute g ∘ f and f ∘ g for x = 1, 2, 3 in a table and see that they never agree.
Practice
1
For f(x) = x + 3 and g(x) = 2x, find the rules of g ∘ f and f ∘ g.