Determine the values of p and q such that the following function is continuous on the entire real number line.

f(x) `{:(= x + 1",", "for" 1 < x < 3),(= x^2 + "p"x + "q"",", "for" |x - 2| ≥ 1):}`

#### Solution

|x – 2| = ± (x – 2) and |x – 2| ≥ 1

∴ x – 2 ≥ 1 or 2 – x ≥ 1

∴ x ≥ 3 or 1 ≥ x i.e., x ≤ 1

∴ the given function is

f(x) `{:(= x^2 + "p"x + "q","," "for" x ≤ 1),(= x + 1, "," "for" 1 < x < 3),(= x^2 + "p"x + "q", "," "for" x ≥ 3):}`

If f is continuous on the entire number line, then it is continuous at x = 1 and x = 3

**Continuity at x = 1**

Since f is continuous at x = 1,

`lim_(x -> 1^+) "f"(x) = "f"(1)`

∴ `lim_(x -> 1) (x + 1) = (x^2 + "p"x + "q")`

∴ 1 + 1 = 1 + p + q

∴ p + q = 1 ...(1)

**Continuity at x = 3**

Since f is continuous at x = 3,

`lim_(x -> 3^-) "f"(x)` = f(3)

∴ `lim_(x -> 3) (x + 1) = (x^2 + "p"x + "q")`

∴ 3 + 1 = 9 + 3p + q

∴ 3p + q = – 5

∴ 3p + (1 – p) = – 5 ...[By (1)]

∴ – 2p = – 6

∴ p = – 3

Substituting p = – 3 in (1), we get,

∴ – 3 + q = 1

∴ q = 4

Hence, p = – 3, q = 4.