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, โ )**
๐.