Skip to main content
Back to Limits, Continuity & Differentiability
JEE Main 2021
Limits, Continuity & Differentiability
Limits, Continuity and Differentiability
Medium

Question

Let f : R \to R and g : R \to R be defined as f(x) = \left\{ {\matrix{ {x + a,} & {x < 0} \cr {|x - 1|,} & {x \ge 0} \cr } } \right. and g(x) = \left\{ {\matrix{ {x + 1,} & {x < 0} \cr {{{(x - 1)}^2} + b,} & {x \ge 0} \cr } } \right., where a, b are non-negative real numbers. If (gof) (x) is continuous for all x \in R, then a + b is equal to ____________.

Answer: 1

Solution

Key Concepts and Formulas

  • Composition of Functions: For two functions ff and gg, the composite function (gf)(x)(g \circ f)(x) is defined as g(f(x))g(f(x)).
  • Continuity of a Function: A function h(x)h(x) is continuous at a point cc if limxch(x)=limxc+h(x)=h(c)\lim_{x \to c^-} h(x) = \lim_{x \to c^+} h(x) = h(c). For a function to be continuous over an interval, it must be continuous at every point in that interval.
  • Piecewise Functions: When dealing with piecewise functions, especially in compositions and continuity checks, it's crucial to analyze the behavior of the function in each interval defined by the pieces and at the transition points.

Step-by-Step Solution

Step 1: Define the composite function (gf)(x)(g \circ f)(x). We are given f(x)f(x) and g(x)g(x). To find (gf)(x)=g(f(x))(g \circ f)(x) = g(f(x)), we substitute f(x)f(x) into the definition of g(x)g(x). The definition of g(y)g(y) is: g(y) = \left\{ {\matrix{ {y + 1,} & {y < 0} \cr {{{(y - 1)}^2} + b,} & {y \ge 0} \cr } } \right. Replacing yy with f(x)f(x), we get: g(f(x)) = \left\{ {\matrix{ {f(x) + 1,} & {f(x) < 0} \cr {{{(f(x) - 1)}^2} + b,} & {f(x) \ge 0} \cr } } \right.

Step 2: Determine the conditions on xx for each case of f(x)f(x). We need to analyze the conditions f(x)<0f(x) < 0 and f(x)0f(x) \ge 0 based on the definition of f(x)f(x). f(x) = \left\{ {\matrix{ {x + a,} & {x < 0} \cr {|x - 1|,} & {x \ge 0} \cr } } \right. Since a0a \ge 0:

  • Case 1: x<0x < 0. Here, f(x)=x+af(x) = x + a.
    • f(x)<0    x+a<0    x<af(x) < 0 \implies x + a < 0 \implies x < -a.
    • f(x)0    x+a0    xaf(x) \ge 0 \implies x + a \ge 0 \implies x \ge -a. So, for x<0x < 0, we have two sub-cases:
    • If x<ax < -a (and x<0x < 0), then f(x)<0f(x) < 0.
    • If ax<0-a \le x < 0, then f(x)0f(x) \ge 0.
  • Case 2: x0x \ge 0. Here, f(x)=x1f(x) = |x - 1|.
    • Since x10|x - 1| \ge 0 for all xx, the condition f(x)0f(x) \ge 0 is always true for x0x \ge 0.
    • The condition f(x)<0f(x) < 0 is never true for x0x \ge 0.

Step 3: Substitute f(x)f(x) into the definition of g(f(x))g(f(x)) and simplify based on the conditions on xx. We combine the information from Step 1 and Step 2.

  • Sub-case 2.1: x<0x < 0 and f(x)<0f(x) < 0. This occurs when x<ax < -a. In this case, g(f(x))=f(x)+1=(x+a)+1=x+a+1g(f(x)) = f(x) + 1 = (x + a) + 1 = x + a + 1. So, for x<ax < -a, (gf)(x)=x+a+1(g \circ f)(x) = x + a + 1.

  • Sub-case 2.2: x<0x < 0 and f(x)0f(x) \ge 0. This occurs when ax<0-a \le x < 0. In this case, g(f(x))=(f(x)1)2+b=((x+a)1)2+b=(x+a1)2+bg(f(x)) = (f(x) - 1)^2 + b = ((x + a) - 1)^2 + b = (x + a - 1)^2 + b. So, for ax<0-a \le x < 0, (gf)(x)=(x+a1)2+b(g \circ f)(x) = (x + a - 1)^2 + b.

  • Sub-case 2.3: x0x \ge 0 and f(x)0f(x) \ge 0. This occurs for all x0x \ge 0. In this case, g(f(x))=(f(x)1)2+b=(x11)2+bg(f(x)) = (f(x) - 1)^2 + b = (|x - 1| - 1)^2 + b. So, for x0x \ge 0, (gf)(x)=(x11)2+b(g \circ f)(x) = (|x - 1| - 1)^2 + b.

  • Sub-case 2.4: x0x \ge 0 and f(x)<0f(x) < 0. This case never happens as f(x)=x10f(x) = |x-1| \ge 0 for x0x \ge 0.

Thus, the composite function (gf)(x)(g \circ f)(x) can be written as: g(f(x)) = \left\{ {\matrix{ {x + a + 1,} & {x < -a} \cr {{(x + a - 1)}^2 + b,} & {-a \le x < 0} \cr {{(|x - 1| - 1)}^2 + b,} & {x \ge 0} \cr } } \right.

Step 4: Apply the condition of continuity for (gf)(x)(g \circ f)(x) at the transition points. For (gf)(x)(g \circ f)(x) to be continuous for all xRx \in \mathbb{R}, it must be continuous at the points where the definition changes, which are x=ax = -a and x=0x = 0.

  • Continuity at x=ax = -a: The left-hand limit (LHL) as xax \to -a^- is given by the first piece: limxa(gf)(x)=limxa(x+a+1)=a+a+1=1\lim_{x \to -a^-} (g \circ f)(x) = \lim_{x \to -a^-} (x + a + 1) = -a + a + 1 = 1. The right-hand limit (RHL) as xa+x \to -a^+ is given by the second piece: limxa+(gf)(x)=limxa+((x+a1)2+b)=(a+a1)2+b=(1)2+b=1+b\lim_{x \to -a^+} (g \circ f)(x) = \lim_{x \to -a^+} ((x + a - 1)^2 + b) = (-a + a - 1)^2 + b = (-1)^2 + b = 1 + b. The value of the function at x=ax = -a is given by the second piece: (gf)(a)=(a+a1)2+b=1+b(g \circ f)(-a) = (-a + a - 1)^2 + b = 1 + b. For continuity at x=ax = -a, LHL = RHL = f(a)f(-a): 1=1+b1 = 1 + b. This implies b=0b = 0.

  • Continuity at x=0x = 0: The left-hand limit (LHL) as x0x \to 0^- is given by the second piece: limx0(gf)(x)=limx0((x+a1)2+b)=(0+a1)2+b=(a1)2+b\lim_{x \to 0^-} (g \circ f)(x) = \lim_{x \to 0^-} ((x + a - 1)^2 + b) = (0 + a - 1)^2 + b = (a - 1)^2 + b. The right-hand limit (RHL) as x0+x \to 0^+ is given by the third piece: limx0+(gf)(x)=limx0+((x11)2+b)=(011)2+b=(11)2+b=(11)2+b=02+b=b\lim_{x \to 0^+} (g \circ f)(x) = \lim_{x \to 0^+} ((|x - 1| - 1)^2 + b) = (|0 - 1| - 1)^2 + b = (|-1| - 1)^2 + b = (1 - 1)^2 + b = 0^2 + b = b. The value of the function at x=0x = 0 is given by the third piece: (gf)(0)=(011)2+b=b(g \circ f)(0) = (|0 - 1| - 1)^2 + b = b. For continuity at x=0x = 0, LHL = RHL = f(0)f(0): (a1)2+b=b(a - 1)^2 + b = b. This implies (a1)2=0(a - 1)^2 = 0, which means a1=0a - 1 = 0, so a=1a = 1.

Step 5: Calculate a+ba + b. From Step 4, we found b=0b = 0 and a=1a = 1. Therefore, a+b=1+0=1a + b = 1 + 0 = 1.

Common Mistakes & Tips

  • Careless handling of absolute values: Ensure the definition of x1|x-1| is correctly used for x0x \ge 0. For x0x \ge 0, x1|x-1| is 1x1-x for 0x<10 \le x < 1 and x1x-1 for x1x \ge 1. However, in the continuity check at x=0x=0, we only need the value at x=0x=0, where 01=1|0-1|=1.
  • Incorrectly combining intervals: When defining the composite function, pay close attention to the intersection of the conditions on xx and the conditions on f(x)f(x). For example, the case x<0x < 0 must be further split based on whether x+a<0x+a < 0 or x+a0x+a \ge 0.
  • Missing continuity checks: Ensure continuity is checked at all points where the definition of the composite function changes. In this problem, these points are x=ax = -a and x=0x = 0.

Summary

To find the value of a+ba+b, we first constructed the composite function g(f(x))g(f(x)) by substituting f(x)f(x) into g(x)g(x) and carefully considering the intervals defined by f(x)f(x). We then used the condition that g(f(x))g(f(x)) is continuous for all xRx \in \mathbb{R}. This required checking continuity at the transition points of the piecewise defined composite function, which are x=ax = -a and x=0x = 0. By equating the left-hand limits, right-hand limits, and function values at these points, we derived two equations involving aa and bb. Solving these equations yielded a=1a=1 and b=0b=0, leading to a+b=1a+b=1.

The final answer is 1\boxed{1}.

Practice More Limits, Continuity & Differentiability Questions

View All Questions