Derivatives - Definition and Differentiation Rules
In questa pagina 12
Prerequisites: limits of functions, little-o notation, continuity.
The derivative measures how fast a function changes at a point.
Definition
Definition (derivative). Let f:(a,b)→R and x0∈]a,b[ (an interior point).
The difference quotient of f at x0 is
ΔxΔf=x−x0f(x)−f(x0),x=x0
If the limit
f′(x0)=x→x0limx−x0f(x)−f(x0)
exists and is finite, f is said to be differentiable at x0 and f′(x0) is the derivative of f at x0.
With the substitution h=x−x0 this becomes
f′(x0)=h→0limhf(x0+h)−f(x0)
Example.f(x)=x2 at x0=3: h(3+h)2−9=h6h+h2=6+h→6, so f′(3)=6. With h=0.1 the quotient is 6.1, with h=0.01 it is 6.01.
Other notations: f˙(x0), dxdf(x0), Df(x0).
Physical meaning. If s(t) is the position of a point on a line, t−t0s(t)−s(t0) is the average velocity and its limit s˙(t0) is the instantaneous velocity.
Geometric meaning. If f is differentiable at x0, the tangent line to the graph at P0=(x0,f(x0)) is
y=f(x0)+f′(x0)(x−x0)
so f′(x0) is its slope. Indeed the secant through P0 and Ph=(x0+h,f(x0+h)) is y=f(x0)+hf(x0+h)−f(x0)(x−x0), and as h→0 its slope tends to f′(x0). Example: x2 at 3: y=9+6(x−3)=6x−9.
Characterisation of differentiability
Theorem.f is differentiable at x0 if and only if there is a number f′(x0) such that, as h→0,
f(x0+h)=f(x0)+f′(x0)h+o(h)
Proof.f is differentiable at x0 iff
x→x0limx−x0f(x)−f(x0)=f′(x0)⟺x→x0limx−x0f(x)−f(x0)−f′(x0)(x−x0)=0,
and by the definition of little-o the last condition says f(x)−f(x0)−f′(x0)(x−x0)=o(x−x0). ■
So near x0 a differentiable function is approximated by its tangent line, with an error that is o(x−x0). For instance Dsinx=cosx gives the tangent y=x at 0, and sinx=x+o(x) is the standard limit xsinx→1: the standard limits are in fact derivatives.
Differentiable implies continuous
Theorem. If f is differentiable at x0, then f is continuous at x0.
Proof. From f(x)=f(x0)+f′(x0)(x−x0)+o(x−x0), letting x→x0 both f′(x0)(x−x0) and o(x−x0) tend to 0, so f(x)→f(x0). ■
The converse is false: ∣x∣ is continuous at 0 but not differentiable.
One-sided derivatives and non-differentiability points
Definition (non-differentiability points). Let f be continuous but not differentiable at x0. Then x0 is
a corner if f′(x0±) exist, are finite and differ;
an inflection point with vertical tangent if f′(x0−)=f′(x0+)=+∞ or =−∞;
a cusp if f′(x0−)=−∞ and f′(x0+)=+∞, or vice versa.
Examples at 0: ∣x∣ is a corner, 3x an inflection with vertical tangent, ∣x∣ a cusp. Useful: if f is odd, f′ is even; if f is even, f′ is odd; so it suffices to compute f′(0+).
Derivatives of the elementary functions
D(c)=0: the quotient is hc−c=0 for every h=0.
D(x)=1: h(x+h)−x=1.
D(sinx)=cosx, D(cosx)=−sinx on R. For the sine, sin(x+h)−sinx=2sin2hcos(x+2h), so
hsin(x+h)−sinx=2hsin2h⋅cos(x+2h)→1⋅cosx.
D(ax)=axloga, D(ex)=ex (a>0, a=1): hax+h−ax=axhah−1→axloga by the standard limit. For a=e, ex equals its own derivative.
D(logax)=x1logae, D(logx)=x1 for x>0: hloga(1+h/x)=h/xloga(1+h/x)⋅x1→logae⋅x1.
Reciprocal and quotient, if g(x0)=0:
D(g1)=−g2g′,D(gf)=g2f′g−fg′.
Proof of the product rule. Add and subtract f(x0)g(x0+h) in the numerator:
hf(x0+h)g(x0+h)−f(x0)g(x0)=hf(x0+h)−f(x0)g(x0+h)+f(x0)hg(x0+h)−g(x0).
As h→0 the quotients tend to f′(x0) and g′(x0), and g(x0+h)→g(x0) because g, being differentiable, is continuous. ■
Tangent.D(tanx)=cos2xcos2x+sin2x=cos2x1=1+tan2x for x=2π+kπ.
Chain rule
Theorem. If g is differentiable at x0 and f is differentiable at g(x0), then f∘g is differentiable at x0 and
(f∘g)′(x0)=f′(g(x0))⋅g′(x0).
One differentiates from the outside inwards, multiplying by the derivative of what is inside. Example: D(sin(x2))=2xcos(x2).
Three layers.f(x)=e3tan(e−x+cos2x):
f′(x)=e3tan(e−x+cos2x)⋅cos2(e−x+cos2x)3⋅(−e−x−2sin2x).
Proof. Near y0=g(x0), f(y)=f(y0)+f′(y0)(y−y0)+(y−y0)o(1) with o(1)→0. Since g is continuous, y=g(x0+h)→y0, and substituting and dividing by h:
hf(g(x0+h))−f(g(x0))=f′(g(x0))hg(x0+h)−g(x0)+hg(x0+h)−g(x0)o(1)→f′(g(x0))g′(x0)+g′(x0)⋅0.■
Logarithm of the absolute value: Dlog∣x∣=x1 for x=0, hence Dlog∣f∣=ff′ where f=0.
Variable base and exponent. If f>0, write fg=eglogf:
D(fg)=fg[g′logf+gff′].
For example D(xx)=xx(logx+1) for x>0, and D(xα)=αxα−1 for x>0, any α∈R.
Derivative of the inverse function
Theorem. Let f be continuous and invertible on an interval, differentiable at x0 with f′(x0)=0. Then f−1 is differentiable at y0=f(x0) and
(f−1)′(y0)=f′(x0)1.
Example.f(x)=x3, f−1(y)=3y: at y0=8 (x0=2), (f−1)′(8)=121.
Proof. A continuous invertible function on an interval is strictly monotone and its inverse is continuous, so x=f−1(y)→x0 as y→y0 (with x=x0 since f−1 is injective). Changing variable,
y→y0limy−y0f−1(y)−f−1(y0)=x→x0limf(x)−f(x0)x−x0=f′(x0)1.■
If f′(x0)=0, f−1 is never differentiable at y0: x3 has f′(0)=0 and 3y has a vertical tangent at 0.
Inverse trigonometric and hyperbolic functions.D(arcsinx)=1−x21,D(arccosx)=−1−x21(∣x∣<1),D(arctanx)=1+x21D(arsinhx)=x2+11,D(arcoshx)=x2−11(x>1),D(artanhx)=1−x21(∣x∣<1)
Proof for arcsin. With y=arcsinx, D(arcsinx)=cosy1. From cos2y+sin2y=1 and cosy>0 for y∈]−2π,2π[, cosy=1−x2. At x=±1 the arcsine has a vertical tangent. The arctangent is analogous with Dtany=1+tan2y; for arcosh use cosh2y−sinh2y=1 and sinhy>0 for y>0.
Summary table
f(x)
f′(x)
where
xα
αxα−1
x>0
ex
ex
R
ax
axloga
R
logx
x1
x>0
log∣x∣
x1
x=0
sinx
cosx
R
cosx
−sinx
R
tanx
cos2x1
x=2π+kπ
sinhx
coshx
R
coshx
sinhx
R
tanhx
cosh2x1
R
arcsinx
1−x21
−1<x<1
arccosx
−1−x21
−1<x<1
arctanx
1+x21
R
Higher-order derivatives and the classes Cn
If f is differentiable, f′ is a function and may be differentiated again.
Definition. If f is differentiable n−1 times in a neighbourhood of x0 and f(n−1) is differentiable at x0, the n-th derivative is
f(n)(x0)=x→x0limx−x0f(n−1)(x)−f(n−1)(x0).
Notations: f′′, f(2), dxndnf, Dnf; by convention f(0)=f. A neighbourhood is needed because the difference quotient of f(n−1) uses its values near x0.
Existence and continuity. If f(n)(x0) exists, then f,f′,…,f(n−1) are continuous at x0 (each is differentiable there or in a neighbourhood). Nothing can be said about the continuity of f(n) itself. This is used in the proof of Taylor's formula with Peano remainder.
Definition (class Cn). For an interval I,
Cn(I)={f:I→R:f is n times differentiable on I and f(n) is continuous}.
C0 are the continuous functions; C∞(I) is the intersection of all Cn(I) (polynomials, ex, sinx, cosx on R; logx on ]0,+∞[). The inclusions are strict:
Cn(I)⊊Cn−1(I)⊊⋯⊊C1(I)⊊C0(I).
Example: x∣x∣ has derivative 2∣x∣, continuous but not differentiable at 0, so it is in C1(R) but not in C2(R). Likewise ∣x∣3 has f′=3x∣x∣, f′′=6∣x∣, so it is in C2 but not C3.
Common mistakes
Thinking continuous implies differentiable (∣x∣ is the counterexample).
Computing f′(x0±) as limf′(x) without checking continuity at x0.
Differentiating a product as f′g′: it is f′g+fg′.
Forgetting the inner derivative: Dsin2x=2cos2x.
Differentiating xx as a power or as an exponential: use exlogx, giving xx(logx+1).
Reversing the quotient numerator: it is f′g−fg′.
Computing f′′(x0) by differentiating the number f′(x0): first find the function f′(x), then differentiate it.
Versione ripasso
Definition.f′(x0)=limh→0hf(x0+h)−f(x0), finite. Tangent: y=f(x0)+f′(x0)(x−x0). Example: x2 at 3 gives 6+h→6.
Characterisation. Differentiable at x0⟺f(x0+h)=f(x0)+f′(x0)h+o(h). Hence differentiable ⇒ continuous; the converse fails (∣x∣).
One-sided derivatives. Differentiable ⟺f′(x0−)=f′(x0+)∈R. Types (with f continuous): corner (finite, different), vertical-tangent inflection (±∞ both sides, same sign: 3x), cusp (opposite infinities: ∣x∣). In general f′(x0±)=limf′(x) without continuity.
Higher derivatives.f(n)=(f(n−1))′, needs f(n−1) on a neighbourhood. If f(n)(x0) exists, f,…,f(n−1) are continuous at x0. Cn(I): n times differentiable with f(n) continuous; Cn⊊Cn−1 (e.g. x∣x∣∈C1∖C2).
Typical mistakes.D(fg)=f′g′; missing inner derivative; swapped quotient numerator; differentiating f′(x0) as a number.