Composite Functions | Examples
Let’s make understanding Composite Functions as easy as pie! 🥧✨
Imagine you have a couple of magical machines 🤖⚙️.
- Machine G (the inner function
g
): Takes your initial idea (x
) and transforms it into something new (g(x)
). - Machine F (the outer function
f
): Takes what Machine G made (g(x)
) and transforms that into a final product (f(g(x))
).
That’s precisely what a composite function is! It’s when the output of one function becomes the input of another function 🔗.
What is a Composite Function? 🤔
A composite function is effectively a “function of a function”. If you have two functions, say f
and g
, the composition of f
and g
is typically written as f ◦ g
(read as “f of g”). This is formally defined by the equation:
(f ◦ g)(x) = f(g(x))
To break it down:
- You start with an input
x
🔢. - You first apply the inner function
g
tox
, which gives youg(x)
(the first transformation). - Then, you take that result,
g(x)
, and use it as the input for the outer functionf
, which finally gives youf(g(x))
(the second transformation leading to the final product).
The order matters significantly! (f ◦ g)(x)
is generally not the same as (g ◦ f)(x)
. It’s a chain reaction! ⛓️➡️
Determining the Domain of a Composite Function 🌍
When you’re trying to figure out which x
values are allowed for a composite function like (f ◦ g)(x) = f(g(x))
, there are two crucial rules to remember to ensure the function is properly defined:
Rule 1: The initial input
x
must be acceptable to the inner functiong
⚠️. If yourx
is not in the domain ofg
(x ∉ Domain(g)
), theng(x)
won’t exist, and thus(f ◦ g)(x)
cannot exist either. So,x
cannot be in the domain of(f ◦ g)
. Think of it as the first machine needing to be able to process the raw material.Rule 2: The output of the inner function
g(x)
must be acceptable to the outer functionf
⚠️. You must exclude anyx
values for which the outputg(x)
falls outside the domain off
(g(x) ∉ Domain(f)
). This means the output from the first machine must be something the second machine can actually use as its input, otherwise the entire process breaks down.
Examples from the Sources 💡
Let’s look at some illustrative examples:
Example 1: Basic Composition
If f(x) = 3x - 4
and g(x) = x²
:
(f ◦ g)(x) = f(g(x))
:- First,
g(x)
gives usx²
. - Then, we substitute
x²
intof(x)
whereverx
appears:f(x²) = 3(x²) - 4 = **3x² - 4**
.
- First,
(g ◦ f)(x) = g(f(x))
:- First,
f(x)
gives us3x - 4
. - Then, we substitute
3x - 4
intog(x)
whereverx
appears:g(3x - 4) = (3x - 4)² = **9x² - 24x + 16**
.
- First,
As you can see, the results are different, highlighting that the order of composition matters! 🔄
Example 2: Shop Discounts (Real-World Application) 🛍️💰 A shop offers two discounts on a product with a Manufacturer’s Recommended Price (MRP) of £14,000.
- First discount (
f(x)
): 15% off the MRP. This means you pay 85% of the price. So,f(x) = 0.85x
. - Second discount (
g(x)
): A flat £3,000 discount. So,g(x) = x - 3000
.
If both discounts are applied, with the first discount applied then the second, this can be represented as a composite function h(x) = g(f(x))
:
f(x)
(15% off) is applied first.- The result,
f(x)
, is then fed intog(x)
(the flat £3,000 discount).h(x) = g(f(x)) = 0.85x - 3000
.
For an MRP of £14,000:
h(14000) = 0.85(14000) - 3000 = 11900 - 3000 = **£8,900**
.
This demonstrates how composition helps model sequential operations in real life! 📈
Example 3: Composition with Domain Restrictions 🌍
Let f(x) = 2/(x-1)
and g(x) = 3/x
. Let’s find (f ◦ g)(x)
and its domain.
(f ◦ g)(x) = f(g(x))
:- Substitute
g(x)
intof(x)
:f(3/x) = 2 / ( (3/x) - 1 )
. - Simplify the complex fraction:
2 / ( (3-x)/x ) = **2x / (3-x)**
.
- Substitute
Domain of
(f ◦ g)(x)
🌍:- Rule 1 (Domain of
g
): The inner functiong(x) = 3/x
is undefined if the denominator is zero. So,x ≠ 0
. - Rule 2 (Output of
g
in domain off
): The outer functionf(x) = 2/(x-1)
is undefined if its denominator is zero, i.e.,x - 1 = 0
, which means its input cannot be1
. Therefore, the output ofg(x)
cannot be1
. Setg(x) = 1
:3/x = 1
➡️x = 3
. So,x ≠ 3
.
Therefore, the domain of
(f ◦ g)(x)
is all real numbers except 0 and 3 (R \ {0, 3}
).- Rule 1 (Domain of
Practice Questions with Solutions 📝
Question 1: Given h(x) = x - 7
and k(x) = x² + 3
.
Find:
(a) (h ◦ k)(x)
🤔
(b) (k ◦ h)(x)
🤔
Solution:
(a) (h ◦ k)(x) = h(k(x))
💡
1. Substitute k(x)
into h(x)
: h(x² + 3)
.
2. Replace x
in h(x)
with x² + 3
: (x² + 3) - 7
.
3. Simplify: **x² - 4**
✅
(b) (k ◦ h)(x) = k(h(x))
💡
1. Substitute h(x)
into k(x)
: k(x - 7)
.
2. Replace x
in k(x)
with x - 7
: (x - 7)² + 3
.
3. Simplify: (x² - 14x + 49) + 3 = **x² - 14x + 52**
✅
Question 2: A charity organises a fundraising event. They initially collect £25 per participant (C(p)
). After collecting the money, they deduct a flat £500 event cost (E(c)
) before donating the remainder to their cause.
If P
is the number of participants, write the composite function that represents the total amount donated to the cause, and calculate the donation if there are 100 participants. 💖💰
Solution:
Collection Function (
C(P)
) 💡: The charity collects £25 per participant.C(P) = 25P
.Event Cost Function (
E(c)
) 💡: A flat £500 event cost is deducted from the collected amount.E(c) = c - 500
(Herec
is the total collected amount, which will be the input toE
).Composite Function for Total Donation 🔗: Since the money is collected first, and then the event cost is deducted, the output of
C(P)
becomes the input forE(c)
. This is**(E ◦ C)(P) = E(C(P))**
. SubstituteC(P)
intoE(c)
:E(C(P)) = E(25P) = (25P) - 500
So, the total donation function is**D(P) = 25P - 500**
✅.Calculate Donation for P = 100 participants 📈:
D(100) = 25(100) - 500
D(100) = 2500 - 500
D(100) = **£2,000**
✅.
Question 3: Let f(x) = √(x + 3)
and g(x) = 1/(x - 5)
. Find the domain of (f ◦ g)(x)
. 🌍🤔
Solution:
To find the domain of (f ◦ g)(x) = f(g(x))
, we apply the two rules for domains:
Rule 1: Domain of
g(x)
⚠️ The functiong(x) = 1/(x - 5)
is defined for all real numbers except where its denominator is zero. So,x - 5 ≠ 0
➡️x ≠ 5
.Rule 2: Output of
g(x)
must be in the domain off(x)
⚠️ The functionf(x) = √(x + 3)
is defined only when its input (x
) is greater than or equal to 0. So,x + 3 ≥ 0
impliesx ≥ -3
. This means the output ofg(x)
must be greater than or equal to -3:g(x) ≥ -3
. Substituteg(x) = 1/(x - 5)
:1/(x - 5) ≥ -3
.Now, we need to solve
1/(x - 5) ≥ -3
. We can split this into two cases based on the sign of(x - 5)
:Case A:
x - 5 > 0
(i.e.,x > 5
) Multiply both sides by(x - 5)
(which is positive):1 ≥ -3(x - 5)
1 ≥ -3x + 15
3x ≥ 14
x ≥ 14/3
Since14/3
is approximately4.67
, this conditionx ≥ 14/3
combined withx > 5
meansx > 5
.Case B:
x - 5 < 0
(i.e.,x < 5
) Multiply both sides by(x - 5)
(which is negative), reversing the inequality sign:1 ≤ -3(x - 5)
1 ≤ -3x + 15
3x ≤ 14
x ≤ 14/3
Combiningx < 5
andx ≤ 14/3
meansx ≤ 14/3
.
So, the values of
x
for whichg(x) ∈ Domain(f)
arex ≤ 14/3
ORx > 5
.
Combining the result from Rule 1 (x ≠ 5
) and Rule 2 (x ≤ 14/3
OR x > 5
):
Since 14/3 ≈ 4.67
, x=5
falls within x > 14/3
. The conditions x ≤ 14/3
and x > 5
(while also considering x ≠ 5
) cover all valid inputs.
Therefore, the domain of (f ◦ g)(x)
is x ≤ 14/3
or x > 5
.
In interval notation, this is **( -∞, 14/3 ] ∪ ( 5, ∞ )**
🌍.