JEE Main 2022 · 26 July · morning · Single correct · +4 / −1
If f(x) = { x + a, ,, x ≤ 0; |x - 4|, ,, x > 0 and g(x) = { x + 1, ,, x < 0; (x - 4)² + b, ,, x ≥ 0 are continuous on R, then (gof)(2) + (fog)( - 2) is equal to :
- (a) -10
- (b) 10
- (c) 8
- (d) -8
Answer and solution
Answer (d) -8
Solution
Maths sir · 5 steps
First fix a and b from continuity at 0, then evaluate the inner function before the outer one.
- Find a. Both pieces of f are continuous on their own, so only x = 0 needs checking. There f(0) = 0 + a = a, and the right-hand limit is |0 - 4| = 4. Continuity forces a = 4.
- Find b. For g, the left-hand limit at 0 is 0 + 1 = 1, and g(0) = (0 - 4)² + b = 16 + b. Setting 16 + b = 1 gives b = -15.
f(x) = x + 4, x ≤ 0 ; |x - 4|, x > 0 g(x) = x + 1, x < 0 ; (x - 4)² - 15, x ≥ 0
- Compute gof(2). Since 2 > 0, f(2) = |2 - 4| = 2. Then g(2) = (2 - 4)² - 15 = 4 - 15 = -11.
- Compute fog(-2). Since -2 < 0, g(-2) = -2 + 1 = -1. Then f(-1) = -1 + 4 = 3, because -1 ≤ 0.
- So. (g ° f)(2) + (f ° g)(-2) = -11 + 3 = -8, which is option (d).
The idea to keep. For a piecewise function, continuity on R only needs checking at the joining point: left limit = right limit = value. In a composition, check which piece applies at each stage.
Answer from the NTA final answer key. Solution by PrepWiser.