banner
home icon
 

 

Composition of Function | Step by Step

 

In this lesson, I will go over eight (8) worked examples to illustrate the process involved in function composition.

If we are given two functions, it is possible to create or generate a "new" function by composing one into the other. The step involved is similar when a function is being evaluated for a given value. For instance, evaluate the function...

 

Evaluate x=-3 in the function f(x)=4x^2-2x+5 for x=-3

 

It is obvious that I need to replace each "x" by the value provided, and simplify.

 

f(-3) = 4(-3)^2-2(-3)+5=47

 

The key idea in function composition is that the input of the function is not a numerical value, instead the input is also another function.

 

Composition of Function

Suppose the two given functions are f(x) and g(x), the composition of compose function f with function g, in symbol, fog is defined by

f ο g=f[g(x)]

Also, the composition of g o fis defined by

g ο f =g [f(x)]

 

Few notes about the symbolic "formula" above.

 

  • The order in function composition matters! You always compose functions from right to left. Therefore, given a function, its input is always the one to its right side. In other words, the right function goes inside the left function.

 

function composition is always from right to left (start with the innermost function)

 

  • Notice in f o g = f[g(x)], the input or "inner function" is function g because it is to the right of function f, which is the main or "outer function".
  • In terms of the order of composition, do you see the same pattern in g o f = g [f(x)]? That's right! The function f is the inner function of the outer function g.

 


Let us go over a few examples to see how function composition works. You will realize later that it is simply an exercise of algebraic substitution and simplification.

Direction: Perform the indicated composition of function.

Example 1: f(x) = 2x^2-3x-1 and g(x)=-x+5, find  f o g or f [g(x)] See solution
Example 2: f(x)=-10x^2+6x-4 and g(x)=(1/2)x+2, find g o f or g[f(x)] See solution
Example 3: f(x)=4x^2-4 and g(x)=√(-5x+1), find fog or f[g(x)] See solution
Example 4: f(x)=9√(x-1) and g(x)=√x, find gof or g[f(x)] See solution
Example 5: f(x)=-3x^2-7x+4, find fof or f[f(x)] See solution
Example 6: f(x)=2/(x+3) and g(x)=(-3x-2)/x, find fog or f[g(x)] See Solution
Example 7: f(x)=(3x+2)/(x-1) and g(x)=(x+2)/(x-3), find gof or g[f(x)] See Solution
Example 8: f(x)=1/(x+1), g(x)=√(x-1)/x, and h(x)=x^2+1, find fogoh or f[g[h(x)]] See Solution

 


Example 1: Perform the indicated function composition: example 1:f(x) = 2x^2-3x-1 and g(x)=-x+5, find  f o g or f [g(x)].

The order of composition is important. Notice that in function composition notation: fog, we want function g(x)to be the input of the main function f(x). It should look like this: inner function is g(x).

I start by writing down the main or outer function f(x), and in every instance of "x", I will substitute the full value of g(x). Then, I'll do whatever is needed to simplify the expressions such as squaring the binomial, applying the distributive property, and combining like terms. Other than that, there's really nothing much to it.

Let me show you what I meant by that.

solution to example 1: f(x) = 2x^2-3x-1, fog=f[g(x)]=2x^2-17x+34

 


Example 2: Perform the indicated function composition: example 2: f(x)=-10x^2+6x-4 and g(x)=(1/2)x+2, find g o f or g[f(x)].

I need to find the composite function gof which means function " f " is the input of function " g ".

 

gof=g[f(x)]=-5x^2+3x

 


Example 3: Perform the indicated function composition: example 3: f(x)=4x^2-4 and g(x)=√(-5x+1), find fog or f[g(x)].

This is an example of function composition where the input is a square root function. Let's see how it works out.

Again, in fog we want to evaluate function " g " into the function " f ".

solution to example 3: fog=f[g(x)]=-20x

 


Example 4: Perform the indicated function composition: example 4: f(x)=9√(x-1) and g(x)=√x, find gof or g[f(x)].

This composition of function is quite interesting. You can maybe see that we will have a situation where a square root function goes inside another square root function.

The key to correctly compose this function is to recognize that the square root symbol can be expressed as an exponential expression with fractional exponent equaling to 1/2. Thus, we have √(x-1)=(x-1)^1/2  and  √(x)=x^1/2 .

solution to example 4: gof=g[f(x)]=3*(x-1)^1/4

 

 


Example 5: Perform the indicated function composition: example 5:f(x)=-3x^2-7x+4, find fof or f[f(x)].

So far in our previous examples, we have performed function compositions using two distinct functions. However, it is also possible to compose a function with itself.

solutio to example 5: fof=f[f(x)]=-27x^4-126x^3-54x^2+217x-72

 


Example 6: Perform the indicated function composition: example 6:f(x)=2/(x+3) and g(x)=(-3x-2)/x, find fog or f[g(x)].

Let us work out an example of function composition that deals with rational functions. The algebra involved is a bit tedious, however, you should be okay as long as you are careful in simplifying the expressions in every step of the way.

In this example, you will apply the procedures on how to add or subtract rational expressions, and also on how to multiply rational expressions.

Here we go...

solution to example 6: fog=f[g(x)]=-x

That wasn't too bad, right?


Example 7: Perform the indicated function composition: example 7: f(x)=(3x+2)/(x-1) and g(x)=(x+2)/(x-3), find gof or g[f(x)].

If you think the last example on rational functions composition was messy, wait till you see this next example. It can be a bit messier but still very manageable. So don't fret! Always have that "laser" focus in every simplification process in order to successfully work this out correctly.

The input function " f " will be substituted into every "x" of the main function " g ".

solution to example 7: gof=g[f(x)]=x

That was easy, wasn't it?

For more practice, I suggest that you try reversing the order of function composition. In other words, findfog.

Do you also get fog=f[g(x)]=x? ?

If that's the case where g o f = f o g = x, then we conclude that functions " g " and " f " are inverses of each other. I have a separate tutorial on how to prove or verify if two functions are inverse of each other.

 


Example 8: Find the composite function: example 8: f(x)=1/(x+1), g(x)=√(x-1)/x, and h(x)=x^2+1, find fogoh or f[g[h(x)]].

In this example, we are going to compose three functions. Observing the notation of the desired composite function fog, we are going to work it out from right to left.

I first need to substitute and simplify function " h " into function " g ", [ g(h)= something ], to get some new function.

The output from previous step will be substituted further into the main function " f " , [ f (something) = desired function ] to obtain the final answer. Symbolically, it looks like this...

 

fogoh=f[g(h)]

Here we go...

I will start by solving the composition goh=g(h).

g[h(x)]= x/(x^2+1)

The result of g(h)=x/(x^2+1) becomes the input of f(x).

 

solution to example 8: fogoh=f[g(h)]=(x^2+1)/(x^2+x+1)

 


 

Practice Problems with Answers
Worksheet 1 Worksheet 2

 

Top of Page
 
JUMP TO:
Algebra Lessons
Algebra Lessons (A-Z)
Algebra Worksheets
Free Math Solver
 
 

 

Liquid Web Managed Word Press 

 

 

 

HOME   |   PRIVACY POLICY   |   CONTACT US   |   DONATE

Copyright 2011-2017   ChiliMath  All Rights Reserved

Powered by Liquid Web