Login

Concepts

Read through concept notes with worked explanations and diagrams, chapter by chapter.

Concept 04 / 12Limits, Continuity and Differentiability

Differentiability: Definition, Left and Right Derivatives and Relation to Continuity

The derivative as a limit of difference quotients, left-hand and right-hand derivatives, why differentiability implies continuity but not conversely, corners, cusps and vertical tangents, and testing differentiability of piecewise, modulus and greatest-integer functions.

Figure 1
The derivative of ff at aa is f′(a)=lim⁡h→0f(a+h)−f(a)hf'(a) = \lim_{h \to 0}\frac{f(a + h) - f(a)}{h}, if this limit exists and is finite. Geometrically it is the slope of the tangent line, the limiting position of secant lines through (a,f(a))(a, f(a)); physically it is an instantaneous rate of change. As with any limit, it has two one-sided versions: Right-hand derivative: Rf′(a)=lim⁡h→0+f(a+h)−f(a)hRf'(a) = \lim_{h \to 0^{+}}\frac{f(a + h) - f(a)}{h}. Left-hand derivative: Lf′(a)=lim⁡h→0+f(a−h)−f(a)−hLf'(a) = \lim_{h \to 0^{+}}\frac{f(a - h) - f(a)}{-h}. ff is differentiable at aa if and only if both exist, are finite and are equal. Differentiability implies continuity. If f′(a)f'(a) exists, then f(a+h)−f(a)=f(a+h)−f(a)h⋅h→f′(a)⋅0=0f(a + h) - f(a) = \frac{f(a + h) - f(a)}{h} \cdot h \to f'(a) \cdot 0 = 0, so f(a+h)→f(a)f(a + h) \to f(a). The contrapositive is the quickest test: a function that is discontinuous at aa cannot be differentiable there. The converse is false. A continuous function can fail to be differentiable in three ways, shown in the figure. Corner: finite but unequal one-sided derivatives. ∣x∣|x| at 00 has Lf′(0)=−1Lf'(0) = -1 and Rf′(0)=1Rf'(0) = 1. Vertical tangent: the difference quotient tends to ±∞\pm\infty. x1/3x^{1/3} at 00 has h1/3h=h−2/3→∞\frac{h^{1/3}}{h} = h^{-2/3} \to \infty. Cusp: one-sided derivatives are infinite with opposite signs. x2/3x^{2/3} at 00. Oscillation: xsin⁡1xx\sin\frac{1}{x} (with value 00 at 00) is continuous at 00, but its difference quotient sin⁡1h\sin\frac{1}{h} has no limit. By contrast, x2sin⁡1xx^{2}\sin\frac{1}{x} is differentiable at 00 with derivative 00, because its quotient hsin⁡1h→0h\sin\frac{1}{h} \to 0. Each extra factor of xx buys one more level of smoothness. Testing differentiability of piecewise functions. At a junction point aa: Step 1: check continuity. If it fails, stop: not differentiable. Step 2: compute the one-sided derivatives. For pieces that are differentiable formulas, Lf′(a)Lf'(a) equals the limit of the left piece's derivative as x→a−x \to a^{-}, and similarly on the right, provided the function is continuous at aa. Otherwise use the first-principles definition. Step 3: compare. Modulus functions. ∣f(x)∣|f(x)| can fail to be differentiable only where f(x)=0f(x) = 0. If ff has a simple root at aa (crosses zero with non-zero slope), then ∣f∣|f| has a corner there. If f(a)=0f(a) = 0 and f′(a)=0f'(a) = 0 (a repeated root, like x2x^{2} or x∣x∣x|x|), then ∣f∣|f| is differentiable at aa. So ∣x3∣|x^{3}| is differentiable at 00 while ∣x∣|x| is not, and ∣(x−1)(x−2)2∣|(x - 1)(x - 2)^{2}| is not differentiable only at x=1x = 1. Greatest integer and fractional part. [x][x] and {x}\{x\} are discontinuous at integers, hence not differentiable there; elsewhere their derivatives are 00 and 11. For [f(x)][f(x)], check continuity first at the points where f(x)f(x) is an integer. Algebra of differentiability. Sums, products, quotients (non-zero denominator) and compositions of differentiable functions are differentiable. But a sum of a differentiable and a non-differentiable function is non-differentiable, while two non-differentiable functions can sum to a differentiable one (∣x∣+(−∣x∣)=0|x| + (-|x|) = 0). A product can be differentiable even if one factor is not: x∣x∣x|x| is differentiable at 00. Key Takeaways: - f′(a)=lim⁡h→0f(a+h)−f(a)hf'(a) = \lim_{h \to 0}\frac{f(a + h) - f(a)}{h}; differentiable iff Lf′(a)=Rf′(a)Lf'(a) = Rf'(a), finite. - Differentiable ⇒\Rightarrow continuous; continuous ⇏\not\Rightarrow differentiable. - Failure types: corner, cusp, vertical tangent, oscillation. - ∣f(x)∣|f(x)| is non-differentiable at simple roots of ff only. - xnsin⁡1xx^{n}\sin\frac{1}{x} (value 00 at 00): continuous for n≥1n \ge 1, differentiable for n≥2n \ge 2. - Check continuity before computing one-sided derivatives. - Pitfall: equating the limits of the piece derivatives without checking that the function is continuous at the junction. Brain-Teaser 1: Find a,ba, b so that f(x)={x2+ax+b,x<13x−1,x≥1f(x) = \begin{cases} x^{2} + ax + b, & x < 1 \\ 3x - 1, & x \ge 1 \end{cases} is differentiable at x=1x = 1. Solution: Continuity at 11: 1+a+b=21 + a + b = 2, so a+b=1a + b = 1. Derivatives: the left piece has derivative 2x+a→2+a2x + a \to 2 + a, the right piece has derivative 33. So 2+a=32 + a = 3, a=1a = 1, and then b=0b = 0. With these values the left piece is x2+xx^{2} + x, which meets 3x−13x - 1 at (1,2)(1, 2) with matching slope 33: the two graphs are tangent there. Differentiability at a junction is 'same point and same slope'. Brain-Teaser 2: Where is f(x)=∣x2−3x+2∣+∣x−1∣3f(x) = |x^{2} - 3x + 2| + |x - 1|^{3} not differentiable? Solution: ∣x−1∣3|x - 1|^{3} is differentiable everywhere, since ∣x−1∣3|x - 1|^{3} behaves like a cube near 11 and its derivative 3∣x−1∣(x−1)3|x - 1|(x - 1) is continuous. The first term ∣(x−1)(x−2)∣|(x - 1)(x - 2)| has simple roots at x=1x = 1 and x=2x = 2, so it has corners at both. Adding a differentiable function does not remove a corner. So ff is not differentiable at x=1x = 1 and x=2x = 2 only. Treating each modulus term separately, and checking whether the inside has a simple or repeated root, gives the answer without any limits. Brain-Teaser 3: Let f(x)=x2sin⁡1xf(x) = x^{2}\sin\frac{1}{x} for x≠0x \neq 0 and f(0)=0f(0) = 0. Show that f′(0)f'(0) exists but f′f' is not continuous at 00. Solution: f′(0)=lim⁡h→0h2sin⁡(1/h)h=lim⁡hsin⁡1h=0f'(0) = \lim_{h \to 0}\frac{h^{2}\sin(1/h)}{h} = \lim h\sin\frac{1}{h} = 0 by the squeeze theorem. For x≠0x \neq 0, f′(x)=2xsin⁡1x−cos⁡1xf'(x) = 2x\sin\frac{1}{x} - \cos\frac{1}{x}. As x→0x \to 0, the first term tends to 00 but cos⁡1x\cos\frac{1}{x} oscillates between −1-1 and 11, so lim⁡x→0f′(x)\lim_{x \to 0}f'(x) does not exist. Hence ff is differentiable everywhere, but its derivative is discontinuous at 00. This is why, at a junction, matching the limits of the piece derivatives is only a shortcut: the true definition of f′(a)f'(a) is the limit of the difference quotient.