Showing posts with label functions. Show all posts
Showing posts with label functions. Show all posts

Composition of Functions: Definition, Illustration, Examples, and Solutions

Composition of Functions - Definition, Illustration, Example, Solution

Introduction to Composition of Functions

When a car driver depresses the accelerator pedal, it controls the flow of fuel which in turn influences the speed of the car. Likewise, the composition of two functions is a kind of ‘chain reaction’, where the functions act upon one after another.

Fig 1.40 - Chain reaction concept of function composition
Fig. 1.40

We can explain this further with the concept that a function is a ‘process’. If f and g are two functions then the composition g(f (x)) is formed in two steps.

  1. Feed an input (say x) to f;
  2. Feed the output f(x) to g to get g(f (x)) and call it gf(x).
Fig 1.41 - Process diagram for g(f(x))
Fig. 1.41

Illustration

Consider the set A of all students, who appeared in class X of Board Examination. Each student appearing in the Board Examination is assigned a roll number. In order to have confidentiality, the Board arranges to deface the roll number of each student and assigns a code number to each roll number.

Let A be the set of all students appearing for the board exam. BN be the set all roll numbers and CN be the set of all code numbers. This gives rise to two functions f: AB and g: BC given by b = f (a) be the roll number assigned to student a, c = g(b) be the code number assigned to roll number b, where aA , bB and cC.

We can write c = g(b) = g(f (a)).

Thus, by the combination of these two functions, each student is eventually attached a code number. This idea leads to the following definition.

Definition

Let f : AB and g : BC be two functions (Fig.1.42). Then the composition of f and g denoted by g o f is defined as the function g o f (x ) = g( f (x )) for all xA.

Fig 1.42 - Definition of composition of functions g o f
Fig. 1.42

Example 1.20

Find f o g and g o f when f (x) = 2x + 1 and g(x) = x2 – 2

Solution

f (x) = 2x + 1 , g(x) = x2 – 2

f o g(x) = f (g(x)) = f (x2 − 2) = 2(x2 − 2) + 1 = 2x2 – 3

g o f (x) = g(f (x)) = g(2x + 1) = (2x + 1)2 − 2 = 4x2 + 4x – 1

Thus f o g = 2x2 − 3, g o f = 4x2 + 4x − 1. From the above, we see that f o gg o f .

Note

Generally, f o gg o f for any two functions f and g. So, composition of functions is not commutative.

Example 1.21

Represent the function f(x) = √(2x² − 5x + 3) as a composition of two functions.

Solution

We set f₁(x) = 2x² − 5x + 3 and f₂(x) = √x

Then,

Equation showing the composition of two functions to form the square root function

Example 1.22

If f (x) = 3x − 2 , g(x) = 2x + k and if f o g = g o f , then find the value of k.

Solution

f(x) = 3x − 2 , g(x) = 2x + k

f o g(x) = f (g(x)) = f (2x + k) = 3(2x + k) − 2 = 6x + 3k – 2

Thus, f o g(x) = 6x + 3k – 2.

g o f (x) = g(3x − 2) = 2(3x − 2) + k

Thus, g o f (x) = 6x − 4 + k.

Given that f o g = g o f

Therefore, 6x + 3k − 2 = 6x − 4 + k

6x − 6x + 3kk = −4 + 2 ⇒ 2k = −2 ⇒ k = −1

Example 1.23

Find k if f o f (k) = 5 where f (k) = 2k – 1.

Solution

f o f (k) = f (f (k))

= 2(2k − 1) − 1 = 4k − 3

Thus, f o f (k) = 4k – 3

But, it is given that f o f (k) = 5

Therefore 4k - 3 = 5 ⇒ 4k = 8 ⇒ k = 2.

Composition of three functions

Let A, B, C, D be four sets and let f : AB , g : BC and h : CD be three functions (Fig.1.43). Using composite functions f o g and g o h, we get two new functions like (f o g) o h and f o (g o h).

Fig 1.43 - Diagram showing composition of three functions f, g, and h
Fig. 1.43

We observed that the composition of functions is not commutative. The natural question is about the associativity of the operation.

Note

Composition of three functions is always associative. That is, f o (g o h) = (f o g) o h

Example 1.24

If f(x) = 2x + 3, g(x) = 1 − 2x and h(x) = 3x. Prove that f o (g o h) = (f o g) o h

Solution

f(x) = 2x + 3 , g(x) = 1 − 2x , h(x) = 3x

Now, (f o g)(x) = f (g(x)) = f (1 − 2x) = 2(1 − 2x) + 3 = 5 − 4x

Then, (f o g) o h(x) = (f o g)(h(x)) = (f o g)(3x) = 5 − 4(3x) = 5 − 12x ……… (1)

(g o h)(x) = g(h(x)) = g(3x) = 1 − 2(3x) = 1 − 6x

So, f o (g o h)(x) = f (1 − 6x) = 2(1 − 6x ) + 3 = 5 − 12x ……… (2)

From (1) and (2), we get (f o g) o h = f o (g o h)

Example 1.25

Find x if gff(x) = fgg(x), given f (x) = 3x + 1 and g(x) = x + 3.

Solution

gff(x) = g [f {f (x)}] (This means “g of f of f of x”)

= g [ f (3x +1)] = g [ 3(3x +1)+1] = g (9x + 4)

g (9x + 4) = [ (9x + 4) + 3] = 9x + 7

fgg(x) = f [g {g (x)}] (This means “f of g of g of x”)

= f [ g (x + 3)] = f [ (x + 3) + 3] = f (x + 6)

f (x + 6) = [ 3(x + 6) + 1 ] = 3x + 19

These two quantities being equal, we get 9x + 7 = 3x + 19. Solving this equation we obtain x = 2.

Understanding Special Functions in Mathematics: Constant, Identity, and Real-Valued Functions

Special Cases of Function

Special cases of function

There are some special cases of a function which will be very useful. We discuss some of them below:

  • (i) Constant function
  • (ii) Identity function
  • (iii) Real – valued function

(i) Constant function

A function \(f : A \to B\) is called a constant function if the range of \(f\) contains only one element. That is, \(f(x) = c\), for all \(x \in A\) and for some fixed \(c \in B\).

Illustration 16

From Fig.1.37, \(A = \{a,b,c,d\}\) and \(B = \{1, 2, 3\}\) and \(f = \{(a, 3),(b, 3),(c, 3),(d, 3)\}\). Since, \(f(x) = 3\) for every \(x \in A\), Range of \(f = \{3\}\), \(f\) is a constant function.

Illustration of a constant function where all elements from set A map to a single element in set B.

(ii) Identity function

Let \(A\) be a non–empty set. Then the function \(f: A \to A\) defined by \(f(x) = x\) for all \(x \in A\) is called an identity function on \(A\) and is denoted by \(I_A\).

Illustration of an identity function where each element maps to itself.

Illustration 17

If \(A = \{a,b,c\}\) then \(f=I_A = \{(a,a),(b,b),(c,c)\}\) is an identity function on \(A\).

(iii) Real valued function

A function \(f: A \to B\) is called a real valued function if the range of \(f\) is a subset of the set of all real numbers \(\mathbb{R}\). That is, \(f(A) \subseteq \mathbb{R}\).

Example 1.17

Let \(f\) be a function from \(\mathbb{R}\) to \(\mathbb{R}\) defined by \(f(x) = 3x - 5\). Find the values of \(a\) and \(b\) given that \((a, 4)\) and \((1, b)\) belong to \(f\).

Solution

\(f(x) = 3x – 5\) can be written as \(f = \{(x, 3x – 5) | x \in \mathbb{R}\}\)

\((a, 4)\) means the image of \(a\) is 4. That is, \(f(a) = 4\)

\(3a – 5 = 4 \implies a = 3\)

\((1, b)\) means the image of 1 is \(b\).

That is, \(f(1) = b \implies 3(1) – 5 = b \implies b = -2\)

Example 1.18

The distance \(S\) (in kms) travelled by a particle in time ‘\(t\)’ hours is given by \(S(t) = \frac{t^2 + t}{2}\). Find the distance travelled by the particle after

(i) three and half hours.

(ii) eight hours and fifteen minutes.

Solution

The distance travelled by the particle in time \(t\) hours is given by \(S(t) = \frac{t^2 + t}{2}\).

(i) \(t = 3.5\) hours. Therefore, the distance travelled in 3.5 hours is 7.875 kms.

(ii) \(t = 8.25\) hours. Therefore, the distance travelled in 8.25 hours is 38.16 kms, approximately.

Example 1.19

If the function \(f : \mathbb{R} \to \mathbb{R}\) is defined by:

Piecewise function definition for f(x).

then find the values of:

(i) \(f(4)\)

(ii) \(f(-2)\)

(iii) \(f(4) + 2f(1)\)

(iv) \(\frac{f(1) + 3f(4)}{f(-3)}\)

Solution

The function \(f\) is defined by three values in intervals I, II, III as shown by the side:

Number line showing the intervals for the piecewise function.

For a given value of \(x = a\), find out the interval at which the point \(a\) is located, there after find \(f(a)\) using the particular value defined in that interval.

(i) First, we see that, \(x = 4\) lie in the third interval.
Therefore, \(f(x) = 3x - 2\); \(f(4) = 3(4) – 2 = 10\)

(ii) \(x = -2\) lies in the second interval.
Therefore, \(f(x) = x^2 – 2\); \(f(-2) = (-2)^2 – 2 = 2\)

(iii) From (i), \(f(4) = 10\).
To find \(f(1)\), first we see that \(x = 1\) lies in the second interval.
Therefore, \(f(x) = x^2 – 2 \implies f(1) = 1^2 – 2 = -1\)
So, \(f(4) + 2f(1) = 10 + 2(-1) = 8\)

(iv) We know that \(f(1) = -1\) and \(f(4) = 10\).
For finding \(f(-3)\), we see that \(x = -3\), lies in the first interval.
Therefore, \(f(x) = 2x + 7\); thus, \(f(-3) = 2(-3) + 7 = 1\)

Hence,

Final calculation for the fourth part of the example.

10th Maths Exercise 1.3: Functions | Problems, Answers & Solutions

Exercise 1.3: Functions - Problem Questions with Answer, Solution

Maths Book back answers and solution for Exercise questions - Mathematics : Function: Exercise Questions with Answer

Question 1

Let $f = \{(x,y) | x,y \in \mathbf{N} \text{ and } y = 2x\}$ be a relation on N. Find the domain, co-domain and range. Is this relation a function?

Question 2

Let $X = \{3, 4, 6, 8\}$. Determine whether the relation $R = \{(x, f(x)) | x \in X, f(x) = x^2 + 1\}$ is a function from $X$ to $\mathbf{N}$?

Question 3

Given the function $f : x \to x^2 - 5x + 6$, evaluate

  • (i) $f(-1)$
  • (ii) $f(2a)$
  • (iii) $f(2)$
  • (iv) $f(x-1)$

Question 4

A graph representing the function $f(x)$ is given in Fig.1.16 it is clear that $f(9) = 2$.

(i) Find the following values of the function

  • (a) $f(0)$
  • (b) $f(7)$
  • (c) $f(2)$
  • (d) $f(10)$

(ii) For what value of $x$ is $f(x) = 1$?

(iii) Describe the following (i) Domain (ii) Range

(iv) What is the image of 6 under $f$?

Question 5

Let $f(x) = 2x+5$. If $x \neq 0$ then find

Expression for Question 5

$\frac{f(x+2) - f(2)}{x}$

Question 6

A function $f$ is defined by $f(x) = 2x - 3$

  • (i) find $\frac{f(0) + f(1)}{2}$
  • (ii) find $x$ such that $f(x) = 0$
  • (iii) find $x$ such that $f(x) = x$
  • (iv) find $x$ such that $f(x) = f(1 - x)$

Question 7

An open box is to be made from a square piece of material, 24 cm on a side, by cutting equal squares from the corners and turning up the sides as shown (Fig.1.17). Express the volume $V$ of the box as a function of $x$.

Question 8

A function $f$ is defined by $f(x) = 3 - 2x$. Find $x$ such that $f(x^2) = (f(x))^2$.

Question 9

A plane is flying at a speed of 500 km per hour. Express the distance $d$ travelled by the plane as function of time $t$ in hours.

Question 10

The data in the adjacent table depicts the length of a woman’s forehand and her corresponding height. Based on this data, a student finds a relationship between the height ($y$) and the forehand length($x$) as $y = ax + b$, where $a, b$ are constants.

  • (i) Check if this relation is a function.
  • (ii) Find $a$ and $b$.
  • (iii) Find the height of a woman whose forehand length is 40 cm.
  • (iv) Find the length of forehand of a woman if her height is 53.3 inches.

Quick Answers

  1. {1, 2, 3, 4,...} , {1,2,3,4}, {2, 4, 6, 8,...} , yes.
  2. yes
  3. (i) 12 (ii) $4a^2 - 10a + 6$ (iii) 0 (iv) $x^2 - 7x + 12$
  4. (i) (a) 9 (b) 6 (c) 6 (d) 0 (ii) 9.5 (iii) (a) $\{x | 0 \le x \le 10, x \in R\}$ (b) $\{x | 0 \le x \le 9, x \in R\}$ (iv) 5
  5. 2
  6. (i) -2 (ii) 3/2 (iii) 3 (iv) 1/2
  7. $4x^3 - 96x^2 + 576x$
  8. 1
  9. 500t
  10. (i) Yes (ii) 0.9, 24.5 (iii) 60.5 inches (iv) 32 cms

Understanding Functions in Mathematics: Definitions, Illustrations, and Examples

Functions - Definition, Illustration, Example, Solution

Introduction to Functions

Among several relations that exist between two non-empty sets, some special relations are important for further exploration. Such relations are called “Functions”.

Illustration 8

A company has 5 employees in different categories. If we consider their salary distribution for a month as shown by arrow diagram in Fig.1.11, we see that there is only one salary associated for every employee of the company.

Arrow diagram showing employee salary distribution

Here are various real life situations illustrating some special relations:

  1. Consider the set A of all of your classmates; corresponding to each student, there is only one age.
  2. You go to a shop to buy a book. If you take out a book, there is only one price corresponding to it; it does not have two prices corresponding to it. (of course, many books may have the same price).
  3. You are aware of Boyle’s law. Corresponding to a given value of pressure P, there is only one value of volume V.
  4. In Economics, the quantity demanded can be expressed as \(Q = 360 - 4P\), where P is the price of the commodity. We see that for each value of P, there is only one value of Q. Thus the quantity demanded Q depend on the price P of the commodity.

We often come across certain relations, in which, for a given element of a set A, there is only one corresponding element of a set B. Such relations are called functions. We usually use the symbol f to denote a functional relation.

Definition

A relation f between two non-empty sets X and Y is called a function from X to Y if, for each \(x \in X\) there exists only one \(y \in Y\) such that \((x, y) \in f\).

That is, \(f = \{(x,y)| \text{ for all } x \in X, y \in Y \}\).

Diagram defining a function from set X to set Y

A function f from X to Y is written as \(f: X \to Y\).

Comparing the definitions of relation and function, we see that every function is a relation. Thus, functions are subsets of relations and relations are subsets of cartesian product.

A function f can be thought as a mechanism (or device), which gives a unique output \(f(x)\) to every input x.

Notes

If \(f: X \to Y\) is a function then

  • The set X is called the domain of the function f and the set Y is called its co-domain.
  • If \(f(a) = b\), then b is called ‘image’ of a under f and a is called a ‘pre-image’ of b.
  • The set of all images of the elements of X under f is called the ‘range’ of f.
  • \(f: X \to Y\) is a function only if
    1. every element in the domain of f has an image.
    2. the image is unique.
  • If A and B are finite sets such that \(n(A) = p\), \(n(B) = q\) then the total number of functions that exist between A and B is \(q^p\).
  • In this chapter we always consider f to be a real valued function.
  • Describing domain of a function
    1. Let \(f(x) = \frac{1}{x + 1}\). If \(x = -1\) then \(f(-1)\) is not defined. Hence f is defined for all real numbers except at \(x = -1\). So domain of f is \(\mathbf{R} - \{-1\}\).
    2. Let \(f(x) = \frac{1}{x^2 - 5x + 6}\). If \(x = 2, 3\) then \(f(2)\) and \(f(3)\) are not defined. Hence f is defined for all real numbers except at \(x = 2\) and \(3\). So domain of f = \(\mathbf{R} - \{2, 3\}\).

Illustration 9 - Testing for functions

Representation by Arrow diagram

Arrow diagrams illustrating functions vs. non-functions

Functions play very important role in the understanding of higher ideas in mathematics. They are basic tools to convert from one form to another form. In this sense, functions are widely applied in Engineering Sciences.

Note: The range of a function is a subset of it’s co-domain.

Example 1.6

Let \(X = \{1, 2, 3, 4\}\) and \(Y = \{2, 4, 6, 8,10\}\) and \(R = \{(1,2),(2,4),(3,6),(4,8)\}\). Show that R is a function and find its domain, co-domain and range?

Solution

Pictorial representation of R is given in Fig.1.14. From the diagram, we see that for each \(x \in X\), there exists only one \(y \in Y\). Thus all elements in X have only one image in Y. Therefore R is a function.

Arrow diagram for Example 1.6

Domain X = {1,2,3,4}; Co-domain Y = {2,3,6,8,10}; Range of f = {2,4,6,8}.

Example 1.7

A relation ‘f’ is defined by \(f(x) = x^2 - 2\) where, \(x \in \{-2, -1, 0, 3\}\)

(i) List the elements of f

(ii) Is f a function?

Solution

\(f(x) = x^2 - 2\) where \(x \in \{-2, -1, 0, 3\}\)

(i) \(f(-2) = (-2)^2 - 2 = 2\); \(f(-1) = (-1)^2 - 2 = -1\)

\(f(0) = (0)^2 - 2 = -2\); \(f(3) = (3)^2 - 2 = 7\)

Therefore, f = {(-2, 2), (-1,-1), (0,-2), (3, 7)}

(ii) We note that each element in the domain of f has a unique image. Therefore f is a function.

Example 1.8

If \(X = \{-5,1,3,4\}\) and \(Y = \{a,b,c\}\), then which of the following relations are functions from X to Y?

(i) \(R_1 = \{(-5,a), (1,a), (3,b)\}\)

(ii) \(R_2 = \{(-5,b), (1,b), (3,a),(4,c)\}\)

(iii) \(R_3 = \{(-5,a), (1,a), (3,b),(4,c),(1,b)\}\)

Solution

(i) \(R_1 = \{(-5,a), (1,a), (3,b)\}\)

We may represent the relation \(R_1\) in an arrow diagram (Fig.1.15(a)).

Arrow diagram for R1

\(R_1\) is not a function as \(4 \in X\) does not have an image in Y.

(ii) \(R_2 = \{(-5,b), (1,b), (3,a),(4,c)\}\)

Arrow diagram of R2 is shown in Fig.1.15(b).

Arrow diagram for R2

\(R_2\) is a function as each element of X has an unique image in Y.

(iii) \(R_3 = \{(-5,a), (1,a), (3,b),(4,c),(1,b)\}\)

Representing \(R_3\) in an arrow diagram (Fig.1.15(c)).

Arrow diagram for R3

\(R_3\) is not a function as \(1 \in X\) has two images \(a \in Y\) and \(b \in Y\).

Note that the image of an element should always be unique.

Example 1.9

Given \(f(x) = 2x - x^2\),

find (i) \(f(1)\) (ii) \(f(x+1)\) (iii) \(f(x) + f(1)\)

Solution

(i) Replacing x with 1, we get

\(f(1) = 2(1) - (1)^2 = 2 - 1 = 1\)

(ii) Replacing x with \(x+1\), we get

\(f(x+1) = 2(x + 1) - (x + 1)^2 = 2x + 2 - (x^2 + 2x + 1) = -x^2 + 1\)

(iii) \(f(x) + f(1) = (2x - x^2) + 1 = -x^2 + 2x + 1\)

[Note that \(f(x) + f(1) \neq f(x + 1)\). In general \(f(a + b)\) is not equal to \(f(a) + f(b)\)]

Shortcuts & Tricks for Functions of Management Answers Online

Shortcuts & Tricks for Functions of Management