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

To ensure that f(x) is continuous at x = 2, the left-hand limit (LHL), right-hand limit (RHL), and the value of the function at x = 2 must be equal.

1. Left-hand limit (LHL):

For x < 2, \[ f(x) = \frac{x - 2}{|x - 2|} + a \] Since \( x - 2 < 0 \), we have \( |x - 2| = -(x - 2) \). Thus, \[ f(x) = \frac{x - 2}{-(x - 2)} + a = -1 + a \] Hence, \[ \text{LHL} = -1 + a \]

2. Right-hand limit (RHL):

For x > 2, \[ f(x) = \frac{x - 2}{|x - 2|} + b \] Since \( x - 2 > 0 \), we have \( |x - 2| = x - 2 \). Thus, \[ f(x) = \frac{x - 2}{x - 2} + b = 1 + b \] Hence, \[ \text{RHL} = 1 + b \]

3. Value at \( x = 2 \):

\[ f(2) = a + b \]

4. Continuity condition:

For continuity, \[ \text{LHL} = \text{RHL} = f(2) \] Substituting the values: \[ -1 + a = 1 + b = a + b \]

From \( -1 + a = a + b \), we get: \[ b = -1 \]

From \( 1 + b = a + b \), we get: \[ a = 1 \]

Final Answer:

\[ \boxed{a = 1,\; b = -1} \]

Was this answer helpful?
0