• Nakafa

    Nakafa

    Learn free and with quality.
Subject
    • Grade 10
    • Grade 11
    • Grade 12
Exercises
Holy
  • Quran
Articles
  • Politics
  • Community
  • About

Command Palette

Search for a command to run...

Function Composition and Inverse Function

Function Composition

Understanding Function Composition

Imagine you are shopping at a store that offers two attractive promos:

  1. Promo A: 20% discount, then another deduction of Rp25,000.00.
  2. Promo B: Price reduction of Rp25,000.00, then a 20% discount.

Do both promos result in the same final price? Which promo is more beneficial? To answer this, we need to understand the concept of function composition.

Definition of Function Composition

Function composition is the sequential combination of two or more functions to produce a new function.

If we have a function g:A→Bg: A \to Bg:A→B and a function f:B→Cf: B \to Cf:B→C, then their composition, written as (f∘g)(x)(f \circ g)(x)(f∘g)(x), is a new function that maps directly from the domain AAA to the codomain CCC.

This means we apply function ggg first, and then we input its result into function fff.

Mathematically, this is written as:

(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x))(f∘g)(x)=f(g(x))

Promo Calculation

Let's calculate the final price for an item worth Rp200,000.00 using both promos with the concept of functions.

Let xxx be the initial price of the item.

  • 20% discount function: d(x)=x−0.20x=0.80xd(x) = x - 0.20x = 0.80xd(x)=x−0.20x=0.80x
  • Rp25,000.00 reduction function: p(x)=x−25000p(x) = x - 25000p(x)=x−25000

Now let's compose these two functions according to the promo sequence:

  1. Promo A (Discount first, then price reduction): We are looking for (p∘d)(x)(p \circ d)(x)(p∘d)(x)

    (p∘d)(x)=p(d(x))=p(0.80x)=0.80x−25000(p \circ d)(x) = p(d(x)) = p(0.80x) = 0.80x - 25000(p∘d)(x)=p(d(x))=p(0.80x)=0.80x−25000

    For x=200000x = 200000x=200000:

    (p∘d)(200000)=0.80(200000)−25000=160000−25000=135000(p \circ d)(200000) = 0.80(200000) - 25000 = 160000 - 25000 = 135000(p∘d)(200000)=0.80(200000)−25000=160000−25000=135000

    So, the final price with Promo A is Rp135,000.00.

  2. Promo B (Price reduction first, then discount): We are looking for (d∘p)(x)(d \circ p)(x)(d∘p)(x)

    (d∘p)(x)=d(p(x))=d(x−25000)=0.80(x−25000)=0.80x−20000(d \circ p)(x) = d(p(x)) = d(x - 25000) = 0.80(x - 25000) = 0.80x - 20000(d∘p)(x)=d(p(x))=d(x−25000)=0.80(x−25000)=0.80x−20000

    For x=200000x = 200000x=200000:

    (d∘p)(200000)=0.80(200000)−20000=160000−20000=140000(d \circ p)(200000) = 0.80(200000) - 20000 = 160000 - 20000 = 140000(d∘p)(200000)=0.80(200000)−20000=160000−20000=140000

    So, the final price with Promo B is Rp140,000.00.

It turns out that the order of applying the functions (discount and price reduction) affects the final result. Promo A (p∘dp \circ dp∘d) is more beneficial for the buyer than Promo B (d∘pd \circ pd∘p) for an item priced at Rp200,000.00. This demonstrates that, generally, (f∘g)(x)≠(g∘f)(x)(f \circ g)(x) \neq (g \circ f)(x)(f∘g)(x)=(g∘f)(x).

Another Example

Suppose we have two functions:

f(x)=2x+1f(x) = 2x + 1f(x)=2x+1
g(x)=x2−3g(x) = x^2 - 3g(x)=x2−3

Determine (f∘g)(x)(f \circ g)(x)(f∘g)(x) and (g∘f)(x)(g \circ f)(x)(g∘f)(x).

Solution:

  1. Finding (f∘g)(x)(f \circ g)(x)(f∘g)(x):

    (f∘g)(x)=f(g(x))=f(x2−3)(f \circ g)(x) = f(g(x)) = f(x^2 - 3)(f∘g)(x)=f(g(x))=f(x2−3)

    Substitute xxx in f(x)f(x)f(x) with g(x)g(x)g(x):

    f(x2−3)=2(x2−3)+1=2x2−6+1=2x2−5f(x^2 - 3) = 2(x^2 - 3) + 1 = 2x^2 - 6 + 1 = 2x^2 - 5f(x2−3)=2(x2−3)+1=2x2−6+1=2x2−5

    So, (f∘g)(x)=2x2−5(f \circ g)(x) = 2x^2 - 5(f∘g)(x)=2x2−5.

  2. Finding (g∘f)(x)(g \circ f)(x)(g∘f)(x):

    (g∘f)(x)=g(f(x))=g(2x+1)(g \circ f)(x) = g(f(x)) = g(2x + 1)(g∘f)(x)=g(f(x))=g(2x+1)

    Substitute xxx in g(x)g(x)g(x) with f(x)f(x)f(x):

    g(2x+1)=(2x+1)2−3=(4x2+4x+1)−3=4x2+4x−2g(2x + 1) = (2x + 1)^2 - 3 = (4x^2 + 4x + 1) - 3 = 4x^2 + 4x - 2g(2x+1)=(2x+1)2−3=(4x2+4x+1)−3=4x2+4x−2

    So, (g∘f)(x)=4x2+4x−2(g \circ f)(x) = 4x^2 + 4x - 2(g∘f)(x)=4x2+4x−2.

Note that (f∘g)(x)≠(g∘f)(x)(f \circ g)(x) \neq (g \circ f)(x)(f∘g)(x)=(g∘f)(x), illustrating the non-commutative property.

Previous

Multiplication and Division of Functions

Next

Properties of Function Composition

  • Function CompositionMaster function composition (f∘g)(x) with real-world shopping examples. Learn sequential function application and non-commutative properties.
On this page
  • Understanding Function Composition
    • Definition of Function Composition
    • Promo Calculation
  • Another Example
  • Comments
  • Report
  • Source code