Continuity & Differentiability: Diagram-Based Questions (3)

hard 3 min read

Question

Consider the function

f(x)={ax+bif x1x2+2if x>1f(x) = \begin{cases} ax + b & \text{if } x \le 1 \\ x^2 + 2 & \text{if } x > 1 \end{cases}

Find the values of aa and bb such that ff is differentiable at x=1x = 1. Sketch the resulting function near x=1x = 1.

Solution — Step by Step

Differentiability requires continuity. So we first need:

limx1f(x)=limx1+f(x)=f(1)\lim_{x \to 1^-} f(x) = \lim_{x \to 1^+} f(x) = f(1)

Left limit: a(1)+b=a+ba(1) + b = a + b. Right limit: (1)2+2=3(1)^2 + 2 = 3. Setting equal:

a+b=3...(i)a + b = 3 \quad \text{...(i)}

Compute one-sided derivatives.

Left: f(x)=af'(x) = a for x1x \le 1, so f(1)=af'(1^-) = a.

Right: f(x)=2xf'(x) = 2x for x>1x > 1, so f(1+)=2f'(1^+) = 2.

For differentiability, a=2a = 2 … (ii).

From (ii), a=2a = 2. From (i), b=32=1b = 3 - 2 = 1.

Resulting function:

f(x)={2x+1x1x2+2x>1f(x) = \begin{cases} 2x + 1 & x \le 1 \\ x^2 + 2 & x > 1 \end{cases}

At x=1x = 1: f(1)=3f(1) = 3 from both sides ✓. Slope is 2 on both sides ✓. The graph shows a straight line of slope 2 meeting a parabola of slope 2 — they kiss tangentially at (1,3)(1, 3).

a=2a = 2, b=1b = 1.

Why This Works

A piecewise function is differentiable at a junction if and only if (1) both pieces agree in value (continuity) and (2) both pieces agree in derivative (smoothness). Visually, the two curves must meet and share the same tangent line at the meeting point.

If only continuity holds but slopes differ, you get a “corner” (like x|x| at x=0x = 0) — continuous but not differentiable. If continuity itself fails, there’s a jump and neither continuity nor differentiability holds.

Alternative Method

Use the limit definition of derivative directly:

f(1)=limh0f(1+h)f(1)hf'(1) = \lim_{h \to 0} \frac{f(1+h) - f(1)}{h}

Compute from the left (h<0h < 0): get aa. From the right (h>0h > 0): get 21=22 \cdot 1 = 2. Setting equal gives a=2a = 2. Same constraint.

Common Mistake

Students sometimes only enforce continuity and stop, ignoring differentiability. They get one equation in two unknowns and either guess or report "b=3ab = 3 - a" without realising another equation comes from matching derivatives. Always remember: differentiability gives two conditions, not one.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next