MCQMediumJEE 2023Composition & Inverse Functions

JEE Mathematics 2023 Question with Solution

Let ff and gg be two functions defined by:

f(x)={x+1,x<0x1,x0,g(x)={x+1,x<01,x0.f(x) = \begin{cases} x + 1, & x < 0 \\ |x - 1|, & x \geq 0 \end{cases}, \quad g(x) = \begin{cases} x + 1, & x < 0 \\ 1, & x \geq 0 \end{cases}.

Then (gf)(x)(g \circ f)(x) is:

  • A

    continuous everywhere but not differentiable at x=1x = 1

  • B

    continuous everywhere but not differentiable exactly at one point

  • C

    differentiable everywhere

  • D

    not continuous at x=1x = -1

Answer

Correct answer:B

Step-by-step solution

Standard Method

Given:

f(x)={x+1,x<01x,0x<1x1,x1f(x) = \begin{cases} x + 1, & x < 0 \\ 1 - x, & 0 \leq x < 1 \\ x - 1, & x \geq 1 \end{cases}

and

g(x)={x+1,x<01,x0g(x) = \begin{cases} x + 1, & x < 0 \\ 1, & x \geq 0 \end{cases}

Find: The nature of (gf)(x)(g \circ f)(x) in terms of continuity and differentiability.

For x<0x < 0, we have f(x)=x+1f(x) = x + 1. So,

g(f(x))=g(x+1)=(x+1)+1=x+2g(f(x)) = g(x+1) = (x+1)+1 = x+2

for the part where the input to gg is negative.

For 0x<10 \leq x < 1, f(x)=1xf(x) = 1-x and since 1x01-x \geq 0, we get

g(f(x))=g(1x)=1g(f(x)) = g(1-x) = 1

For x1x \geq 1, f(x)=x1f(x) = x-1 and since x10x-1 \geq 0, we get

g(f(x))=g(x1)=1g(f(x)) = g(x-1) = 1

Hence,

g(f(x))={x+2,x<01,x0g(f(x)) = \begin{cases} x + 2, & x < 0 \\ 1, & x \geq 0 \end{cases}

Now check continuity at x=0x=0:

  • Left limit =0+2=2= 0+2 = 2
  • Right limit and function value =1= 1 Since the left and right limits are not equal, the function is not continuous at x=0x=0.

Therefore, the correct option indicated on the source solution is B. However, the extracted working shows a continuity mismatch at x=0x=0, so the source solution contains an inconsistency.

Common mistakes

  • Using g(x+1)=x+2g(x+1)=x+2 for all x<0x<0 is incorrect. For values with 1x<0-1 \leq x < 0, the input x+10x+1 \geq 0, so g(x+1)=1g(x+1)=1, not x+2x+2. Always check which branch the inner output falls into before applying the outer function.

  • Treating x1|x-1| as a single unsplit expression can hide the correct cases. For x0x \geq 0, it must be written as 1x1-x for 0x<10 \leq x < 1 and x1x-1 for x1x \geq 1 to compose accurately.

  • Checking differentiability before continuity is wrong. A function must first be continuous at a point to be differentiable there. So at the suspected junction, test continuity before comparing one-sided derivatives.

Practice more Composition & Inverse Functions questions

Get unlimited AI-adaptive practice, mastery tracking, and an AI tutor that explains every step — free to start.

Related questions