Let f be a function defined by
f(x) = { x^2, if x <= 1
{ ax + b, if 1 < x <= 2
{ x + d, if x > 2
Find the values for the constants a, b, and d so that f is continuous and differentiable everywhere on the real line.
GATE 1996 · Engineering Mathematics · Continuity · medium
Answer: a = 2, b = -1, d = 1
Differentiability at x = 1: Left derivative at x=1: d/dx(x^2) = 2x, at x=1 gives 2. Right derivative of ax+b is a. Setting equal: a = 2.
Continuity at x = 1: Left limit = 1^2 = 1. Right limit = a(1) + b = 2 + b. Setting equal: 2 + b = 1, so b = -1.
Continuity and differentiability at x = 2: Left limit = 2(2) - 1 = 3. Right limit = 2 + d. Setting equal: 2 + d = 3, so d = 1. Check derivatives: slope of 2x-1 is 2, slope of x+d is 1. These are NOT equal, so differentiability at x=2 fails regardless of d.