Composite Functions | Examples

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:

  1. You start with an input x ๐Ÿ”ข.
  2. You first apply the inner function g to x, which gives you g(x) (the first transformation).
  3. Then, you take that result, g(x), and use it as the input for the outer function f, which finally gives you f(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:

  1. Rule 1: The initial input x must be acceptable to the inner function g โš ๏ธ. If your x is not in the domain of g (x โˆ‰ Domain(g)), then g(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.

  2. Rule 2: The output of the inner function g(x) must be acceptable to the outer function f โš ๏ธ. You must exclude any x values for which the output g(x) falls outside the domain of f (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)):

    1. First, g(x) gives us xยฒ.
    2. Then, we substitute xยฒ into f(x) wherever x appears: f(xยฒ) = 3(xยฒ) - 4 = **3xยฒ - 4**.
  • (g โ—ฆ f)(x) = g(f(x)):

    1. First, f(x) gives us 3x - 4.
    2. Then, we substitute 3x - 4 into g(x) wherever x appears: g(3x - 4) = (3x - 4)ยฒ = **9xยฒ - 24x + 16**.

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)):

  1. f(x) (15% off) is applied first.
  2. The result, f(x), is then fed into g(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)):

    1. Substitute g(x) into f(x): f(3/x) = 2 / ( (3/x) - 1 ).
    2. Simplify the complex fraction: 2 / ( (3-x)/x ) = **2x / (3-x)**.
  • Domain of (f โ—ฆ g)(x) ๐ŸŒ:

    1. Rule 1 (Domain of g): The inner function g(x) = 3/x is undefined if the denominator is zero. So, x โ‰  0.
    2. Rule 2 (Output of g in domain of f): The outer function f(x) = 2/(x-1) is undefined if its denominator is zero, i.e., x - 1 = 0, which means its input cannot be 1. Therefore, the output of g(x) cannot be 1. Set g(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}).


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:

  1. Collection Function (C(P)) ๐Ÿ’ก: The charity collects ยฃ25 per participant. C(P) = 25P.

  2. Event Cost Function (E(c)) ๐Ÿ’ก: A flat ยฃ500 event cost is deducted from the collected amount. E(c) = c - 500 (Here c is the total collected amount, which will be the input to E).

  3. 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 for E(c). This is **(E โ—ฆ C)(P) = E(C(P))**. Substitute C(P) into E(c): E(C(P)) = E(25P) = (25P) - 500 So, the total donation function is **D(P) = 25P - 500** โœ….

  4. 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:

  1. Rule 1: Domain of g(x) โš ๏ธ The function g(x) = 1/(x - 5) is defined for all real numbers except where its denominator is zero. So, x - 5 โ‰  0 โžก๏ธ x โ‰  5.

  2. Rule 2: Output of g(x) must be in the domain of f(x) โš ๏ธ The function f(x) = โˆš(x + 3) is defined only when its input (x) is greater than or equal to 0. So, x + 3 โ‰ฅ 0 implies x โ‰ฅ -3. This means the output of g(x) must be greater than or equal to -3: g(x) โ‰ฅ -3. Substitute g(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 Since 14/3 is approximately 4.67, this condition x โ‰ฅ 14/3 combined with x > 5 means x > 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 Combining x < 5 and x โ‰ค 14/3 means x โ‰ค 14/3.

    So, the values of x for which g(x) โˆˆ Domain(f) are x โ‰ค 14/3 OR x > 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, โˆž )** ๐ŸŒ.