DIFFERENTIATION - WEEK 5
1. The derivative and the tangent line
Video links
• Explaining the concept
• The tangent line
• Non-differentiable functions
Let A = a, f (a) be a point on the graph of a function f . We want to find the
slope s of the tangent line at A.
We start by choosing another point B = b, f (b) on the graph of f . If we choose
B close to the point A, then the straight line L through A and B is almost the
tangent line. We set ∆x = b − a and ∆y = f (b) − f (a), the distance (with a sign!)
between the x-coordinates of A and B, respectively the y-coordinates. Then the
∆y
slope of the line L is ∆x . Since b = a + ∆x we have f (b) = f (a + ∆x). So we find
the following expression for the slope of the line L:
∆y f (a + ∆x) − f (a)
= .
∆x ∆x
If we take a very small value for ∆x, i.e. we take B very close to A, we get a good
approximation of the slope s of the tangent line T , so
f (a + ∆x) − f (a)
s≈ .
∆x
B
f (b)
∆y B
f (b)
A A ∆y f (b) AB
f (a) f (a) f (a)
∆x ∆x
a b a b ab
Figure 1. The line through A and B (orange) approximates the
tangent line (green) as ∆x tends to 0.
We find the slope s by letting ∆x tend to 0:
f (a + ∆x) − f (a)
s = lim .
∆x→0 ∆x
This number s is called the derivative of f at the point a. We usually denote this
df
number by f 0 (a) or dx (a). So we have the following definition for f 0 (a), where a is
a point in the domain of the function f .
1
2 DIFFERENTIATION - WEEK 5
Definition of derivative
The derivative of f at the point a is defined by
f (a + ∆x) − f (a)
f 0 (a) = lim .
∆x→0 ∆x
The above limit might not exist! If the limit exists, we say that f is differentiable
at a.
If a function f is differentiable in every point a in an interval (c, d), we can make
a function f 0 : (c, d) → R mapping each a in (c, d) to f 0 (a). This function f 0 is
df
called the derivative function of f . We also use the notation dx for the derivative
function of f .
If we know the derivative of a function f at a, we can immediately write down
an equation of the tangent line at (a, f 0 (a)). The tangent line is a straight line,
with slope equal to f 0 (a). On the other hand, if we take an arbitrary point (x, y)
∆y
on the tangent line, then the slope is equal to ∆x , see figure.
y = f (x)
y
∆y
f (a)
∆x
a x
So we get the identity
∆y y − f (a)
f 0 (a) =
= .
∆x x−a
Solving for y gives us the following equation of the tangent line.
Equation of tangent line
The equation of the tangent line to the graph of f at a, f (a) is
y = f (a) + f 0 (a)(x − a).
DIFFERENTIATION - WEEK 5 3
2. Derivatives of the standard functions and rules for
differentiation
Video links
• Rules of calculation: background
• Rules of calculation part 1
• Rules of calculation part 2
• Derivatives of power functions and polynomials
• Standard derivatives: the sine
• Standard derivatives: ax and xp
In order to differentiate functions that are composed of standard functions,
e.g. f (x) = x2 e2x+1 + sin(x), we need to know derivatives of standard functions
and rules for differentiation. These are given in Tables 1 and 2.
Table 1. Derivatives of standard functions
f (x) f 0 (x)
c 0
xa axa−1 a 6= 0
sin(x) cos(x)
cos(x) − sin(x)
1
tan(x) = 1 + tan2 (x)
cos2 (x)
ex ex
ax ax ln(a) a>0
1
ln(x)
x
1
loga (x) a > 0, a 6= 1
x ln(a)
Example 2.1. We calculate the derivative function of f (x) = x2 e2x+1 + sin(x)
using Tables 1 and 2:
d 2 2x+1 d
f 0 (x) = x e + sin(x) sum rule
dx dx
d d 2x+1
x2 · e2x+1 + x2 ·
= e + cos(x) product rule
dx dx
d
= 2x · e2x+1 + x2 · e2x+1 · (2x + 1) + cos(x) chain rule
dx
= 2xe2x+1 + x2 · e2x+1 · 2 + cos(x)
= (2x + 2x2 )e2x+1 + cos(x).
4 DIFFERENTIATION - WEEK 5
Table 2. Rules for differentiation
F (x) F 0 (x)
cf (x) cf 0 (x)
f (x) + g(x) f 0 (x) + g 0 (x) sum rule
f (x)g(x) f 0 (x)g(x) + f (x)g 0 (x) product rule
f (x) f 0 (x)g(x) − f (x)g 0 (x)
quotient rule
g(x) g(x)2
f 0 g(x) g 0 (x)
f g(x) chain rule
DIFFERENTIATION - WEEK 5 5
3. Extreme values
Video links
• Finding minima and maxima
The derivative of a function f is very useful for finding extreme values (minima
and maxima) of f . We distinguish between two types of extreme values of function:
global and local extreme values. Suppose f has domain D, then
• f has a global maximum in x = a if f (a) ≥ f (x) for all x ∈ D
• f has a global minimum in x = b if f (b) ≤ f (x) for all x ∈ D
• f has a local maximum at x = c if there exists an open interval I such that
c ∈ I and f (c) ≥ f (x) for all x ∈ I ∩ D
• f has a local minimum at x = d if there exists an open interval J such that
d ∈ J and f (d) ≤ f (x) for all x ∈ J ∩ D.
Note that a global extreme value is also a local extreme value.
Example 3.1. Here you see the graph of a function f .
y = f (x)
x0 x1 x2 x3 x4 x5
f has local maxima at x0 , x2 and x4 , and f has local minima at x1 , x3 and x5 .
Furthermore, f has a global maximum at x2 and a global minimum at x5 .
If a is not a boundary point of the domain of f and f 0 (a) 6= 0, then on a small
interval around a the function f is either increasing (f 0 (a) > 0), or decreasing
(f 0 (a) < 0), so f does not have an extreme value at x = a. This implies the
following theorem.
Local extreme values
If f has a local extreme value at x = a, then one of the following statements
holds:
• a is a critical point of f , i.e. f 0 (a) = 0
• a is a singular point of f , i.e. f 0 (a) does not exist
• a is a boundary point of the domain of f
To find the extreme values of a functions f we first determine all the critical
points, singular points or boundary points. But it is not guaranteed that f has an
extreme value at one of these points. For example, f (x) = x3 has a critical point
at x = 0, because f 0 (x) = 3x2 is equal to 0 at x = 0, but f has no extreme value
at x = 0.
6 DIFFERENTIATION - WEEK 5
y = x3
If a computer or calculator is not available to draw that graph of the function, a
sign chart of f 0 is very useful to determine whether a critical point, singular point
or boundary point is a local extreme value. This is illustrated in the following
example.
Example 3.2. We determine all the extreme values of f (x) = x4 − 43 x3 on the
interal [−1, 2].
First we determine the critical points, so we need the derivative of f :
f 0 (x) = 4x3 − 4x2 = 4x2 (x − 1).
The solutions of the equation f 0 (x) = 0 are x = 0 and x = 1, so these are the
critical points of f . Now f may attain extreme values at
• the critical points: x = 0 and x = 1
• the singular points: there are none
• the boundary points: x = −1 and x = 2.
Next we make a sign chart of f 0 in which we indicate the critical points, the singular
points (there are none), and the boundary points. Between such points f 0 (x) is
either positive or negative, because f 0 can only change sign at a critical point or at
a singular point. In this case we have
f 0 (− 12 ) = 4 · 1 1 3
4 · (− 2 − 1) = − 2 < 0,
f 0 ( 12 ) = 4 · 14 · ( 21 − 1) = − 21 < 0,
f 0 ( 32 ) = 4 · 94 · ( 32 − 1) = 92 > 0,
0
and then the sign chart of f is as follows:
− − 0 − − 0 + +
−1 0 1 2
0
Now we see that f is negative on (−1, 0), so f is decreasing on this interval. This
implies that f has a local maximum at the boundary point x = −1. On (0, 1) f 0
is also negative, so f has no extreme value at the critical point x = 0. On the
interval (1, 2) f 0 is positive, so f is increasing. This means that at the critical
point x = 1 the functions f goes from decreasing to increasing, meaning that f
has local minimum at x = 1. Finally, at the boundary point x = 2 f has a local
maximum.