Question
Question: If \[f:R \to R\] is given by \(f\left( x \right)=\left\\{ \begin{matrix} 1,\text{ if }x\text{ is r...
If f:R→R is given by f\left( x \right)=\left\\{ \begin{matrix}
1,\text{ if }x\text{ is rational} \\\
0,\text{ if }x\text{ is irrational} \\\
\end{matrix} \right., Then (fof)(5)=
(A) 1
(B) −1
(C) 3
(D) 0
Solution
We have to find the value of (fof)(5) To solve this problem, we should know that (fof)(x)=f(f(x)) Thus it means that we can put the value of f(x) inside the input of f(x) to find the required value. So according to our question (fof)(5)=f(f(5)) Now first we will consider x=5 and find the value of f(5) which will be equal to 0 according to the given condition. Then we will consider x=0 and find the value of f(0) and hence we will get our required answer.
Complete answer:
It is given that,
f:R→R given by f\left( x \right)=\left\\{ \begin{matrix}
1,\text{ if }x\text{ is rational} \\\
0,\text{ if }x\text{ is irrational} \\\
\end{matrix} \right.
This statement means that f is a function from real numbers to real numbers defined as the value of f(x) is 1 if x is a rational number and the value of f(x) is 0 if x is an irrational number.
And we are asked to find the value of (fof)(5) .
Now, let us consider x=5
So, f(x)=f(5)=0 −−−(a)
(Because 5 is an irrational number.)
Now, we know that
(fof)(x)=f(f(x))
∴(fof)(5)=f(f(5)) −−−(1)
Now substitute the value of f(5) from (a) in equation (1) we get
(fof)(5)=f(0) −−−(2)
Now, let us consider x=0
So, f(x)=f(0)=1 −−−(b)
(Because 0 is a rational number.)
Now substitute the value of f(0) from (b) in equation (2) we get
(fof)(5)=1
which is the required result.
Hence, the value of (fof)(5) is 1
Hence, option (A) is correct.
Note:
The given function f(x) is known as Dirichlet’s function and it is discontinuous for every value of x because between every two rational numbers there will be irrational numbers and vice versa. There will be no point of continuity.
Also, it is important to note that the composition of a function is only defined if the range of the first is contained in the domain of the second function. And the order in the composition of a function is important because sometimes two functions f(x) and g(x) are given and the value of (fog)(x) is not same as (gof)(x) .