Question:medium

Find the value of \( a \) and \( b \) so that the function \( f \) defined as: \[ f(x) = \begin{cases} \frac{x - 2}{|x - 2|} + a, & x < 2, \\ a + b, & x = 2, \\ \frac{x - 2}{|x - 2|} + b, & x > 2, \end{cases} \] is a continuous function.

Show Hint

For piecewise functions, equate LHL, RHL, and the value at the point to ensure continuity.
Updated On: Jan 13, 2026
Show Solution

Solution and Explanation

For \( f(x) \) to be continuous at \( x = 2 \), the left-hand limit (LHL), right-hand limit (RHL), and \( f(2) \) must be equal.
1. Left-hand limit (LHL): For \( x<2 \): \( f(x) = \frac{x - 2}{|x - 2|} + a \). Since \( x<2 \), \( |x - 2| = -(x - 2) \), so \( f(x) = \frac{x - 2}{-(x - 2)} + a = -1 + a \). Thus, as \( x \to 2^- \): \( {LHL} = -1 + a \).
2. Right-hand limit (RHL): For \( x>2 \): \( f(x) = \frac{x - 2}{|x - 2|} + b \). Since \( x>2 \), \( |x - 2| = x - 2 \), so \( f(x) = \frac{x - 2}{x - 2} + b = 1 + b \). Thus, as \( x \to 2^+ \): \( {RHL} = 1 + b \). 
3. Value at \( x = 2 \): \( f(2) = a + b \). 
4. Continuity condition: For continuity, \( {LHL} = {RHL} = f(2) \). Substituting the expressions: \( -1 + a = 1 + b = a + b \).
Equating \( -1 + a \) and \( a + b \): \( -1 + a = a + b \implies b = -1 \).
Equating \( 1 + b \) and \( a + b \): \( 1 + b = a + b \implies a = 1 \). 
Final Answer: \( \boxed{a = 1, b = -1} \)

Was this answer helpful?
0