<< Chapter < Page Chapter >> Page >

f = { 1,2 , 2,3 , 3,4 , 4,5 }

g = { 2,4 , 3,2 , 4,3 , 5,1 }

Check whether “gof” and “fog” exit for the given functions?

Solution : Here,

Domain of “f” = { 1,2,3,4 }

Range of “f” = { 2,3,4,5 }

Domain of “g” = { 2,3,4,5 }

Range of “g” = { 4,2,3,1 } = { 1,2,3,4 }

Hence,

Range of “f” Domain of “g”

and

Range of “g” Domain of “f”

It means that both compositions “gof” and “fog” exist for the given sets.

Domain of composition

Composition of two functions results in new rule for the new composite function. The expression of new rule may prohibit certain elements of the original domain set. For example, consider the function,

f x = 1 1 - x when x 1

Clearly, the domain of function is R – {1}. Let us now see the expression of composition of function with itself,

f o f = f f x = 1 1 1 1 x = 1 x 1 x 1

f o f = x 1 x

This expression is valid for real values of “x” when x 0 . Thus, we see that new rule has changed the domain of resulting function. The domain of the composition fof(x) is "R - {0,1}".

If functions “f” and “g” having different intervals of real numbers are involved in the composition, then we consider both the intervals and determine the domain of the composition by meeting requirement of both intervals (common interval). This aspect is illustrated in the examples given in the next section.

Algorithm for finding interval of composition

The most important aspect of working with composition of function is to combine intervals i.e. domains of two functions. Consider for example the function given by :

f x = x + 1 ; 0 x 2

g x = | x | ; 0 x 3

Here, "|x|" is modulus function, which returns non-negative number for all real values of "x". We are required to find fog(x). What would be the domain of the resulting composition? Let us have a closer look at the definition of composition,

f o g x = f g x = f | x |

In plain words, it means that argument of the function “f” is the function “g” itself. The function “f” is defined in the domain "0 ≤ x ≤ 2", whereas function “g” is defined in "0≤x≤3". From the expression of composition as above, it is clear that we need to ensure that value of “x” should lie in the domain interval of function “g”. Hence,

f o g x = f g x = f | x | ; 0 x 3

But function “f” is defined for values of “x”, which lie in its interval “0≤x≤2”. So when we expand the composition in accordance with the rule of function “f”, we should ensure that value of its argument – note that it is not the value of independent variable “x” - lies in the interval specified by its domain.

f o g x = | x | + 1 ; 0 | x | 2 and 0 x 3

Note that interval of function “f” is written with respect to function “g” i.e. “|x|” – not “x”. Since requirements of both functions are required to be met simultaneously, the domain of the resulting composition is intersection of two domains. It is this reason that we use either “and” or a comma “,” to combine two intervals.

Now, we interpret the interval of modulus function “0≤ |x| ≤2”. We see that part of the interval, "|x| ≥0", is always true for all values of “x”. Whereas part of the interval, "|x| ≤2", means (we shall learn about interpreting modulus inequality in a separate module) :

- 2 x 2

Combining intervals of two parts of the interval “0≤ |x| ≤2”, we conclude that it is equal to :

- 2 x 2

Hence,

f o g x = | x | + 1 ; - 2 x 2 and 0 x 3

f o g x = | x | + 1 ; 0 x 2

Examples

Problem 3: Consider the function as given here :

f x = x + 1 ; 0 x 2

Determine fof(x).

Solution : The composition of the function with itself is :

f o f x = f f x = f x + 1 ; 0 x 2

f o f x = x + 1 + 1 ; 0 x + 1 2 and 0 x 2

f o f x = x + 2 ; - 1 x 1 and 0 x 2

f o f x = x + 2 ; 0 x 1

Problem 4: A function is defined for real values by :

f x = 1 1 - x for all real values except x = 1

Determine f[f{f(x)}] and draw the graph of resulting composition.

Solution : This is composition triplet. We have already seen that :

f o f = f { f x } = x - 1 x when x 0 , 1

Compositing again with f(x), we have :

f [ f { f x } ] = 1 1 x 1 x = x x x + 1 when x 0 , 1

y = f [ f { f x } ] = x when x 0 , 1

The graph of the composition is as shown here :

Plot of compostion

The plot is a straight line with two undefined points.

Problem 5: A function is defined for real values by :

| 1 + x ; 0 ≤ x ≤ 2 f(x) = || 3 – x ; 2<x ≤ 3

Determine f(f(x)).

Solution : The function “f(x)” is combined with itself. Here,

| f(1 + x) ; 0 ≤ x ≤ 2 f(f(x)) = || f(3 - x) ; 2<x ≤ 3

We need to evaluate function for each of the above two intervals :

f(1 + x) ; 0 ≤ x ≤ 2

| 1 + (1+x) ; 0 ≤ 1+ x ≤ 2 and 0 ≤ x ≤ 2 = || 3 – (1+x); 2<1+ x ≤ 3 and 0 ≤ x ≤ 2

| 2 + x ; -1 ≤ x ≤ 1 and 0 ≤ x ≤ 2 = || 2 – x ; 1<x ≤ 2 and 0 ≤ x ≤ 2

| 2 + x ; 0 ≤ x ≤ 1 = || 2 – x ; 1<x ≤ 2

Similarly,

f(3 - x) ; 2<x ≤ 3

| 1 + (3-x) ; 0 ≤ 3- x ≤ 2 and 2<x ≤ 3 = || 3 – (3-x) ; 2<3- x ≤3 and 2<x ≤3

| 4 - x ; -3 ≤ x ≤ -1 and 2<x ≤ 3 = || x ; -1<x ≤ 0 and 2<x ≤ 3

| 4 - x ; 1 ≤ x ≤ 3 and 2<x ≤ 3 = || x ; 0<x ≤ 1 and 2<x ≤ 3

| 4 - x ; 2<x ≤ 3 = || x ; No common interval

= | 4 - x ; 2<x ≤ 3

Putting the results in the expression of “fof”, we have :

| 2 + x ; 0 ≤ x ≤1 f(f(x)) = | 2 – x ; 1<x ≤ 2 | 4 - x ; 2<x ≤ 3

Properties of composition

The composition is generally not commutative except for some special functions.

g o f x f o g x

On the other hand, composition among three functions is independent of parentheses and hence is associative.

g o f o h = g o f o h

Questions & Answers

how to create a software using Android phone
Wiseman Reply
how
basra
what is the difference between C and C++.
Yan Reply
what is software
Sami Reply
software is a instructions like programs
Shambhu
what is the difference between C and C++.
Yan
yes, how?
Hayder
what is software engineering
Ahmad
software engineering is a the branch of computer science deals with the design,development, testing and maintenance of software applications.
Hayder
who is best bw software engineering and cyber security
Ahmad
Both software engineering and cybersecurity offer exciting career prospects, but your choice ultimately depends on your interests and skills. If you enjoy problem-solving, programming, and designing software syste
Hayder
what's software processes
Ntege Reply
I haven't started reading yet. by device (hardware) or for improving design Lol? Here. Requirement, Design, Implementation, Verification, Maintenance.
Vernon
I can give you a more valid answer by 5:00 By the way gm.
Vernon
it is all about designing,developing, testing, implementing and maintaining of software systems.
Ehenew
hello assalamualaikum
Sami
My name M Sami I m 2nd year student
Sami
what is the specific IDE for flutter programs?
Mwami Reply
jegudgdtgd my Name my Name is M and I have been talking about iey my papa john's university of washington post I tagged I will be in
Mwaqas Reply
yes
usman
how disign photo
atul Reply
hlo
Navya
hi
Michael
yes
Subhan
Show the necessary steps with description in resource monitoring process (CPU,memory,disk and network)
samuel Reply
What is software engineering
Tafadzwa Reply
Software engineering is a branch of computer science directed to writing programs to develop Softwares that can drive or enable the functionality of some hardwares like phone , automobile and others
kelvin
if any requirement engineer is gathering requirements from client and after getting he/she Analyze them this process is called
Alqa Reply
The following text is encoded in base 64. Ik5ldmVyIHRydXN0IGEgY29tcHV0ZXIgeW91IGNhbid0IHRocm93IG91dCBhIHdpbmRvdyIgLSBTdGV2ZSBXb3puaWFr Decode it, and paste the decoded text here
Julian Reply
what to do you mean
Vincent
hello
ALI
how are you ?
ALI
What is the command to list the contents of a directory in Unix and Unix-like operating systems
George Reply
how can i make my own software free of cost
Faizan Reply
like how
usman
hi
Hayder
The name of the author of our software engineering book is Ian Sommerville.
Doha Reply
what is software
Sampson Reply
the set of intruction given to the computer to perform a task
Noor
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Functions. OpenStax CNX. Sep 23, 2008 Download for free at http://cnx.org/content/col10464/1.64
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Functions' conversation and receive update notifications?

Ask