Differentiability

The derivative of ff at a point cc of its domain is

f′(c)=lim⁡h→0f(c+h)−f(c)hf'(c) = \lim_{h \to 0} \frac{f(c + h) - f(c)}{h}

provided this limit exists — and that proviso is the whole subject of this section. When the limit exists, ff is differentiable at cc; when it exists at every point, the function f′(x)f'(x) (also written dydx\frac{dy}{dx} or y′y') is the derivative of ff, and finding it is differentiation.

The algebra of derivatives from Class 11 carries over: (u±v)′=u′±v′(u \pm v)' = u' \pm v', the product rule (uv)′=u′v+uv′(uv)' = u'v + uv', and the quotient rule (uv)′=u′v−uv′v2\left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2} where v≠0v \neq 0; with the standard table ddxxn=nxn−1\frac{d}{dx}x^n = nx^{n-1}, ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x, ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x, ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x.

The one-way theorem

Theorem. If ff is differentiable at cc, then ff is continuous at cc.

Proof idea: write f(x)−f(c)=f(x)−f(c)x−c⋅(x−c)f(x) - f(c) = \frac{f(x) - f(c)}{x - c} \cdot (x - c); as x→cx \to c the first factor tends to f′(c)f'(c) and the second to 00, so f(x)→f(c)f(x) \to f(c). ∎

The converse fails. f(x)=∣x∣f(x) = \vert x \vert is continuous everywhere, but at 00: LHD=lim⁡h→0−∣h∣−0h=−hh=−1,RHD=lim⁡h→0+hh=1\text{LHD} = \lim_{h \to 0^-}\frac{\vert h \vert - 0}{h} = \frac{-h}{h} = -1, \qquad \text{RHD} = \lim_{h \to 0^+}\frac{h}{h} = 1 The one-sided derivatives disagree, so no derivative exists at 00 — the graph has a corner.

Smooth curve with one tangent versus modulus corner with two slopes

So the hierarchy runs one way only: differentiable ⇒\Rightarrow continuous, never backwards. Two standing counterexamples for exams: ∣x−a∣\vert x - a \vert (corner at aa) and [x][x] (not even continuous at integers, hence certainly not differentiable there).

The chain rule

For a composite f=v∘uf = v \circ u — that is, f(x)=v(u(x))f(x) = v(u(x)) — set t=u(x)t = u(x). If dtdx\frac{dt}{dx} and dvdt\frac{dv}{dt} both exist, then

  dfdx=dvdt⋅dtdx  \boxed{\;\frac{df}{dx} = \frac{dv}{dt} \cdot \frac{dt}{dx}\;}

— differentiate the outer function at the inner value, then multiply by the derivative of the inner function. It extends to longer chains: for w∘v∘uw \circ v \circ u, multiply three links.

Worked pattern: f(x)=(2x+1)3f(x) = (2x + 1)^3. Outer: cube; inner: t=2x+1t = 2x + 1. Then dfdx=3t2⋅2=6(2x+1)2\frac{df}{dx} = 3t^2 \cdot 2 = 6(2x + 1)^2 — no expansion of the cube needed. Similarly ddxsin⁡(x2)=cos⁡(x2)⋅2x\frac{d}{dx}\sin(x^2) = \cos(x^2) \cdot 2x.

The chain rule is the workhorse of this entire chapter — implicit, logarithmic and parametric differentiation are all the chain rule wearing different costumes.

Solved Examples

Example 1 — Modulus is not differentiable at its corner

Prove that f(x)=∣x−1∣f(x) = \vert x - 1 \vert is not differentiable at x=1x = 1.

Step 1 — left hand derivative: for h<0h < 0: f(1+h)−f(1)h=∣h∣h=−hh=−1\frac{f(1 + h) - f(1)}{h} = \frac{\vert h \vert}{h} = \frac{-h}{h} = -1.

Step 2 — right hand derivative: for h>0h > 0: ∣h∣h=1\frac{\vert h \vert}{h} = 1.

Answer: LHD =−1≠1== -1 \neq 1 = RHD, so the defining limit does not exist — not differentiable at x=1x = 1 (though perfectly continuous there). Every ∣x−a∣\vert x - a \vert has exactly this corner at x=ax = a.

Differentiate sin⁡(x2+5)\sin(x^2 + 5) with respect to xx.

Step 1 — name the layers: outer sin⁡\sin, inner t=x2+5t = x^2 + 5.

Step 2 — multiply the links: dydx=cos⁡(x2+5)⋅(2x)\frac{dy}{dx} = \cos(x^2 + 5) \cdot (2x).

Answer: 2xcos⁡(x2+5)2x\cos(x^2 + 5).

Example 3 — Chain rule with a trig inner function

Differentiate cos⁡(sin⁡x)\cos(\sin x) with respect to xx.

Step 1 — layers: outer cos⁡\cos, inner t=sin⁡xt = \sin x.

Step 2 — multiply: dydx=−sin⁡(sin⁡x)⋅cos⁡x\frac{dy}{dx} = -\sin(\sin x) \cdot \cos x.

Answer: −cos⁡xsin⁡(sin⁡x)-\cos x \sin(\sin x) — the inner derivative cos⁡x\cos x must not be forgotten; leaving it off is the classic chain-rule slip.

Example 4 — A three-link chain

Differentiate sec⁡(tan⁡x)\sec\left(\tan\sqrt{x}\right) with respect to xx.

Step 1 — three layers: outermost sec⁡\sec, middle tan⁡\tan, innermost x\sqrt{x}.

Step 2 — multiply all three links: dydx=sec⁡(tan⁡x)tan⁡(tan⁡x)⋅sec⁡2x⋅12x\frac{dy}{dx} = \sec(\tan\sqrt{x})\tan(\tan\sqrt{x}) \cdot \sec^2\sqrt{x} \cdot \frac{1}{2\sqrt{x}}

Answer: as displayed — work outside-in, one derivative per layer, and multiply everything.

Example 5 — Square root outer layer

Differentiate cos⁡(x)\cos(\sqrt{x}) with respect to xx.

Step 1 — layers: outer cos⁡\cos, inner x\sqrt{x} with derivative 12x\frac{1}{2\sqrt{x}}.

Step 2 — multiply: dydx=−sin⁡(x)⋅12x\frac{dy}{dx} = -\sin(\sqrt{x}) \cdot \frac{1}{2\sqrt{x}}.

Answer: −sin⁡x2x-\dfrac{\sin\sqrt{x}}{2\sqrt{x}}, valid for x>0x > 0.

Example 6 — The greatest integer function fails twice over

Prove that f(x)=[x]f(x) = [x], 0<x<30 < x < 3, is not differentiable at x=1x = 1 and x=2x = 2.

Step 1 — the fast route: at x=1x = 1 and x=2x = 2 the function is not even continuous (unit jumps), and differentiability implies continuity.

Step 2 — conclude by contraposition: not continuous at a point ⇒\Rightarrow not differentiable there.

Answer: ff is not differentiable at x=1x = 1 or x=2x = 2. ∎ The one-way theorem used backwards — discontinuity is an instant differentiability disqualifier — saves computing any difference quotients.