Chapter 3
Di↵erential calculus
3.1 Introduction
In this chapter we will remind ourselves of the derivative and some basic ideas from di↵erential
calculus. We will see several useful devices for calculating derivatives in certain situations
(implicit and logarithmic di↵erentiation, as well as methods for finding the derivative of the
inverse of a function for which we know the derivative). Finally we will introduce Taylor and
Maclaurin series and some efficient ways of calculating them.
3.2 The derivative
A real-valued function f of a real variable is said to be di↵erentiable at x if the limit
f (x + h) f (x)
lim
h!0 h
exists. In this case the value of the limit is denoted by f 0 (x) and called the derivative of f at x.
If f is di↵erentiable at all points of some set X ⇢ R, we say that f is di↵erentiable on X. The
derivative f 0 (a) denotes the slope of the tangent to the curve y = f (x) at x = a.
3.3 Integration and the Fundamental Theorem of Calculus
Let f be a continuous real-valued function on the interval [a, b]. If f (x) 0 for all x 2 [a, b]
then we denote the area of the region bounded by the curve y = f (x), the x-axis and the lines
x = a and x = b by
Z b
f (x) dx. (3.1)
a
This is the integral of f from a to b. This is often described as “the area under the graph of
f (x) between x = a and x = b.” If f (x) 0 for all x 2 [a, b] then the integral (3.1) denotes the
negative of the area of the region bounded by the curve y = f (x), the x-axis and the lines x = a
and x = b. If f (x) changes sign over the interval [a, b] then the integral (3.1) denotes the sum
of the areas bounded by the graph of f (x) and the x-axis when f (x) 0 minus the sum of the
areas bounded by the graph of f (x) and the x-axis when f (x) 0, between x = a and x = b.
We should of course be concerned at this point about what one means by the area of some
non-rectangular region in a mathematically precise sense. We will not be discussing this in
our module but you will see this in Analysis. Basically the idea is to approximate regions by
rectangles and use this to define a limiting process to get a sensible answer for the area.
28
CHAPTER 3. DIFFERENTIAL CALCULUS 29
Let Z x
A(x) = f (t) dt,
a
where t 2 (a, b). Observe that
Z x+h
A(x + h) A(x) = f (t) dt,
x
which is the (signed) area of the region under the graph of f between x and x + h. Since f
is continuous, all the values of f (t) for t 2 (x, x + h) can be made as close as we like to the
value f (x) by choosing h sufficiently small. So A(x + h) A(x) is approximately the area of the
rectangle with width h and height f (x) (at least when f (x) > 0). So
A(x + h) A(x) ⇡ hf (x).
Therefore
A(x + h) A(x)
A0 (x) = lim = f (x).
h!0 h
This leads to the following theorem.
The Fundamental Theorem of Calculus
Let f (x) be a continuous function on the interval [a, b] and choose c 2 [a, b]. Then for all
x 2 [a, b], Z x
d
f (t) dt = f (x).
dx c
The Fundamental Theorem of Calculus says that di↵erentiation undoes integration. Simi-
larly, integration (almost) undoes di↵erentiation. By
Z
F (x) = f (x) dx, (3.2)
we mean a function F (x) such that F 0 (x) = f (x). An integral of the form (3.2) is called an
indefinite integral while an integral of the form (3.1) is called a definite integral. Note that F is
only defined up to an additive constant. For example,
Z
1
x dx = x2 + C,
2
where C is an arbitrary constant. You should always include this constant when you evaluate
an indefinite integral. The definite integral (3.1) can be evaluated in terms of indefinite integral
F (x) in (3.2) as
Z b
f (x) dx = F (b) F (a).
a
In this case, any choice for the constant C can be made (usually “C = 0”) as it will cancel in
the final answer.
3.4 Inverse functions and their derivatives
For the trigonometric functions, such as sin x and cos x, we denote the inverse functions as either
arcsin x and arccos x or as sin 1 x and cos 1 x. Di↵erent authors use di↵erent notations (and
di↵erent lecturers in this department use di↵erent conventions), so I will sometimes use one
notation and sometimes the other.
CHAPTER 3. DIFFERENTIAL CALCULUS 30
d arcsin x
Example 3.1 Find .
dx
Let y = arcsin x. Then x = sin y. Di↵erentiating with respect to y gives
dx
= cos y
dy
and so
dy 1
= .
dx cos y
Of course we want dy/dx as a function of x, not y. Recall that x = sin y, so (cos y)2 = 1 x2 .
Therefore
dy 1 ±1
= =p .
dx cos y 1 x2
Now sin 1 x is an increasing function throughout its domain, so dy/dx 0, which means that
we must take the “+” sign:
d arcsin x dy 1 1
= = =p .
dx dx cos y 1 x2
This method works for all the inverse trigonometric functions.
3.5 Exponentials and logarithms
In this section we will introduce the exponential and logarithm functions, base e (Euler’s constant
e ⇠ 2.71828 · · · ), that play a central role in calculus. Perhaps we should start by asking ourselves
what the function ex means. In particular what does e⇡ mean? In fact, what does 2⇡ mean?
We know what it means to raise a positive real number to a rational power. For example 23/5
means the number x such that x5 = 23 , and we know what it means to raise a number to a
positive integer power. But what does it mean to raise 2 to an irrational power? We start by
introducing what turns out to be the inverse function, ln x, defined as an integral.
From the fact that
d (xn )
= nxn 1 ,
dx
we see that Z
1
xn dx = xn+1 + C, n 6= 1.
n+1
But what about the case n = 1? Define
Z x
dt
L(x) = .
1 t
You probably already know that L(x) = ln x but let us derive this fact systematically, so we
need to deduce all relveant properties from the definition. Clearly L is a well-defined function
for x > 0. We see from the Fundamental Theorem of Calculus that L(x) is di↵erentiable for all
x > 0 and L0 (x) = 1/x. We also see that L(1) = 0.
Let a > 0 be a constant. Then from the chain rule we have
d (L(ax)) 1 1
= a= .
dx ax x
Therefore
d (L(ax) L(x)) 1 1
= = 0,
dx x x
CHAPTER 3. DIFFERENTIAL CALCULUS 31
which gives L(ax) L(x) = C1 , where C1 is a constant (with respect to x). Evaluating at x = 1
we find that C1 = L(a) L(1) = L(a). So we have shown that
L(ax) = L(a) + L(x), (3.3)
for all positive x and all positive a.
Using the chain rule again we also see that for any rational number r,
d (L(xr ) 1 r
= r rxr 1
= .
dx x x
Therefore
d (L(xr ) rL(x) r 1
= r = 0.
dx x x
So L(xr ) = rL(x) + C2 , where C2 is a constant. Evaluating at x = 1 we find that
C2 = L(1) rL(1) = 0. So for all x > 0 and all rational r,
L(xr ) = rL(x).
From that fact that L0 (x) = 1/x > 0 for all x > 0, we see that L(x) is a strictly increasing
function (i.e. f (y) > f (x) whenever y > x > 0). In particular, L(2) > 0. Therefore, since
L(2n ) = nL(2),
lim L (2n ) = 1 and lim L (2n ) = 1.
n!1 n! 1
These facts are enough to determine the shape of the graph of L(x).
So L(x) maps the positive real numbers onto the whole real line. Since it is an increasing
function then y1 = L(x0 ) and y2 = L(x0 ) only if y1 = y2 . Therefore L has an inverse function
L 1 which maps the whole real line onto the positive real numbers. We call this function exp:
1
exp(x) := L (x). (3.4)
Since L(1) = 0, we see that exp(0) = L 1 (0) = 1.
Now for any real numbers a and b, let A = L 1 (a) = exp(a) and B = L 1 (b) = exp(b).
Then a = L(A) and b = L(B). It follows that
exp(a + b) = exp(L(A) + L(B)) = exp(L(AB)),
where we have used equation (3.3). Therefore, since exp is the inverse of L, we have
1
exp(a + b) = L (L(AB)) = AB = exp(a) exp(b).
Now we define the very important number e (Euler’s constant), one of the most important
numbers in all of mathematics, as
e := exp(1).
Recall that this is the same at e = L 1 (1). Therefore L(e) = 1. Now for any rational number r,
exp(r) = exp(r · 1) = exp(rL(e)) = exp (L (er )) ,
where we have used equation (3.4). It follows from the fact that exp is the inverse of L, that for
any integer r
exp(r) = er . (3.5)
We can now return to the question of the meaning of irrational powers of real numbers.
Observe that, although the right hand side of equation (3.5) is only defined for rational r, the
left hand side is defined for all real r. This means that we are free to turn equation (3.5) into a
definition of er when r is irrational.
CHAPTER 3. DIFFERENTIAL CALCULUS 32
Definition 3.2 For all real x, define
ex := exp(x).
Of course we recognise L(x) as the logarithm of x base e as it is the inverse function of
exp(x). So
L(x) = ln x = loge x = log x.
In this module we use “ln x” and “log x” interchangeably. For a mathematician, e is the most
natural base of a logarithm, not 10. If we ever mean “log base 10”, we’ll write log10 . We will
no longer use the notation L(x), this was just a device for understanding the properties of the
integral before concluding that it is in fact a logarithm. The notation ex and exp(x) are both
standard and are used interchangeably. The latter tends to be used more when we wish to
exponentiate a complicated expression so that it is easier to read or more aesthetically pleasing.
For example, an expression like ✓ 3 ◆
7x + 3x2 1
exp
4x4 2x2 + 1
is easier on the eye than ⇣ ⌘
7x3 +3x2 1
e 4x4 2x2 +1
Finally, we derive the most important property of the function ex , namely the fact that it is
its own derivative. To this end, let y = ex . Then
x = ln y.
Di↵erentiating both sides of this equation with respect to x gives
dx 1 dy
1= = ,
dx y dx
where we have used the chain rule. Hence
dy
= y,
dx
which is the same as
dex
= ex .
dx
We define exponentials and logarithms to other positive bases b 6= 1 by
log x
bx := ex log b and logb x := .
log b
3.6 Implicit di↵erentiation
Example 3.3 Find the slope of the tangent to the curve
y 7 + x4 y 3 10xy 2 + 3 = 0
at the point (2, 1).
CHAPTER 3. DIFFERENTIAL CALCULUS 33
We can check by substitution at (x, y) = (2, 1) lies on the curve. Naturally we are being asked to
calculate dy/dx when x = 2 and y = 1. Our first instinct might be to try to solve the equation
for y as a function of x and then di↵erentiate, but this is very difficult, messy and it is possible
that it can’t be done in any reasonable way at all. Instead, we use implicit di↵erentiation.
Rather than solving the equation, we just di↵erentiate it as it is. However, it is important to
remember that x and y are not independent of each other. We should think of the equation as
defining y as a function of x (although there might be several choices for y at a given value of x).
Therefore, when we di↵erentiate with respect to x we must remember that y is also a function
of x and so, for example, we have
d(x4 y 3 ) dx4 3 dy 3 dy 3 dy dy
= y + x4 = 4x3 y 3 + x4 = 4x3 y 3 + 3x4 y 2 .
dx dx dx dy dx dx
So di↵erentiating the equation y 7 + x4 y 3 10xy 2 + 3 = 0 with respect to x gives
⇢ ⇢
6 dy 3 3 4 2 dy dy
7y + 4x y + 3x y 10 y 2 + 2xy = 0.
dx dx dx
Rearranging we have
dy
7y 6 + 3x4 y 2 20xy + 4x3 y 3 10y 2 = 0.
dx
So evaluating at x = 2, y = 1, we have
dy
(7 + 48 40) + (32 10) = 0.
dx (x=2,y=1)
dy 22
Therefore the slope of the tangent at (2, 1) is = .
dx (x=2,y=1) 15
3.7 Logarithmic di↵erentiation
dxx
Example 3.4 Find .
dx
Let y = xx . Then ln y = x ln x. Di↵erentiating with respect to x gives
1 dy
= ln x + 1.
y dx
So
dxx dy
= = (ln x + 1)y = (ln x + 1)xx .
dx dx
3.8 Hyperbolic functions
Hyperbolic functions arise in many areas. Our motivation for introducing them now is that they
are good functions to use in the evaluation of certain integrals.
Recall that the ordinary trigonometric functions can be defined in terms of complex expo-
nentials by
1 1
cos x = (eix + e ix ), sin x = (eix e ix ).
2 2i
The hyperbolic functions are the “real analogues” of these definitions:
1 1
cosh x = (ex + e x
), sinh x = (ex e x
).
2 2
CHAPTER 3. DIFFERENTIAL CALCULUS 34
These are usually called the hyperbolic cosine and hyperbolic sine functions respectively, when
speaking we usually abbreviate these to “cosh” and “shine”, although in North America sinh
is often pronounced “sinch”. Notice that the “h” in “cosh” is part of the name, and not some
constant appearing in the argument!
Recall that a function f is called even if f ( x) = f (x) for all x in its domain and odd if
f ( x) = x. The functions cos and cosh are both even and the functions sin and sinh are both
odd. Most functions are neither even nor odd but every function defined on the real line (or any
domain symmetric about 0) can be written uniquely as the sum of an even and an odd function,
called the even and odd parts of the function. With this language we can say that cos and sin
are the even and odd parts of the function eix since
eix = cos x + i sin x
and cosh and sinh are the even and odd parts of the function ex since
ex = cosh x + sinh x.
Just like their usual trigonometric counterparts, the hyperbolic trigonometric functions satisfy
many identities. In particular
(cosh x)2 = 1 + (sinh x)2 .
This identity explains the origin of the term “hyperbolic”. The parametrisation x = cos t,
y = sin t is a parametrisation of the circle x2 + y 2 = 1 because (cos t)2 + (sin t)2 = 1. For
this reason these “ordinary” trigonometric functions are sometimes referred to as “circular”
trigonometric function. The parametrisation x = cos t, y = sinh t traces out the right side
(x > 0) of the hyperbola x2 y 2 = 1 because (cosh t)2 (sinh t)2 = 1.
It also follows immediately from the definition that
d sinh x d cosh x
= cosh x and = sinh x.
dx dx
Letting tanh x = sinh x/ cosh x, sech x = 1/ cosh x etc., we also have
d tanh x
= (sech x)2 .
dx
There are also analogues of the angle doubling formulas etc which di↵er from the familiar ones by
the sign of some coefficients. This is because the hyperbolic and circular trigonometric functions
are related as complex functions by
sinh x = i sin(ix) and cosh x = cos(ix).
CHAPTER 3. DIFFERENTIAL CALCULUS 35
3.9 Taylor and Maclaurin series
For all positive integers n define
sn (x) = 1 + x + · · · + xn .
Multiplying by x we obtain
xsn (x) = x + · · · + xn + xn+1 .
Taking the di↵erence between these two equations gives (1 x)sn (x) = 1 xn+1 . So for x 6= 1
we have
1 xn+1
sn (x) = .
1 x
CHAPTER 3. DIFFERENTIAL CALCULUS 36
Now if |x| < 1 then xn+1 ! 0 as n ! 1 and so
1
lim sn (x) = .
n!1 1 x
We write this as
1
X 1
xn = , |x| < 1. (3.6)
1 x
n=0
Equation (3.6) is an exact statement; there is no approximation here. However, we can use it
to approximate the function 1/(1 x) in terms of polynomials for small x by approximating the
series (the infinite sum) by a finite sum. For example, if we just keep the first couple of terms
in the sum we have the approximation
1
⇡ 1 + x,
1 x
for x near 0. In fact 1 + x is the linearisation of 1/(1 x) at x = 0. In other words, y = 1 + x is
the tangent to y = 1/(1 x) at x = 0. It is the best linear approximation. If we keep an extra
term in our series expansion we have 1 1 x ⇡ 1 + x + x2 . This is the best quadratic approximation
to y = 1/(1 x) at x = 0 in the sense that the value of the functions 1 1 x and 1 + x + x2 and
their first and second derivatives all agree at x = 0. In this way we can obtain an approximation
in terms of a polynomial of any degree.
We will now try to find similar series expansions and approximations for more general func-
tions. Suppose that there is a function f defined for all x “near” some point a such that f can
be expanded as a series of the form
1
X
f (x) = cn (x a)n = c0 + c1 (x a) + c2 (x a)2 + · · · cn (x a)n + · · · , (3.7)
n=0
for all x such that |x a| < r for some r > 0. Any series of the form of the right side of equation
(3.7) is called a power series with centre x = a. How can we determine the coefficients (the cn )
in (3.7)? Well c0 is easy. If we substitute x = a in (3.7) then we get c0 = f (a).
Next suppose that f is di↵erentiable at x = a. On di↵erentiating equation (3.7) it is tempting
to write
1
X
f 0 (x) = ncn (x a)n 1
= c1 + 2c2 (x a) + · · · ncn (x a)n 1
+ ··· , (3.8)
n=1
where we have started the sum at n = 1 because the n = 0 term is zero. We have actually
just done something highly nontrivial on the right side here. We di↵erentiated a sum and said
that it is the same as the sum of the derivatives. This is fine if the sum is finite but it really
needs to be justified for an infinite sum. We won’t be covering the details of such issues in
this modules, although perhaps we can do something in the “Above and Beyond” office hours,
forum or worksheets. Those of you doing Analysis will see this eventually. For now we will just
assume that we can di↵erentiate through the sum to motivate a definition of the Taylor series
of f . Substituting x = a in equation (3.8) gives c1 = f 0 (a).
Di↵erentiating again we have
1
X
f 0 (x) = (n 1)ncn (x a)n 2
= 2c2 + 2 ⇥ 3c3 (x a) + · · · (n 1)ncn (x a)n 1
+ ··· .
n=2
Substituting x = a gives 2cn = f 00 (a). Continuing in this way we see that n!cn = f (n) (a). (Note
that by definition 0! = 1.)
CHAPTER 3. DIFFERENTIAL CALCULUS 37
Motivated by this we define the Taylor series of f at x = a to be
1
X f (n) (a)
(x a)n .
n!
n=0
The Taylor series at x = 0 is also called the Maclaurin series of f :
1
X f (n) (0)
xn .
n!
n=0
Example 3.5 Find the Maclaurin series for ex .
Setting f (x) = ex , we have f (n) (x) = ex for n = 0, 1, . . . and so f (n) (0) = 1 for n = 0, 1, . . ..
Therefore the Maclaurin series for ex is
1
X 1
X
f (n) (0) xn
xn = .
n! n!
n=0 n=0
In fact, it can be shown that for all x,
1
X
x xn
e = .
n!
n=0
Example 3.6 (The Binomial Theorem). Find the Maclaurin series for (1 + x)↵ , for any real
↵.
Let f (x) = (1 + x)↵ . Then f 0 (x) = ↵(1 + x)↵ 1 , f 00 (x) = ↵(↵ 1)(1 + x)↵ 2 , . . .
(n)
f (x) = ↵(↵ 1) · · · (↵ n + 1)(1 + x) ↵ n . Therefore f (0) = 1 and for n > 0, we have
f (n) (0) = ↵(↵ 1) · · · (↵ n + 1).
So the Maclaurin series is
1
X 1
X
f (n) (0) ↵(↵ 1) · · · (↵ n + 1)
xn = 1 + xn .
n! n!
n=0 n=1
It can be shown that for all x such that 1 < x < 1 we have
X1 ✓ ◆ ✓ ◆ ✓ ◆
↵ ↵ r ↵ ↵ ↵(↵ 1) · · · (↵ r + 1)
(1 + x) = x , = 1 and = , r > 0.
r 0 r r!
r=0
Example 3.7 According to Einstein’s theory of special relativity, the energy E of a particle is
given by E = mc2 , where c is the speed of light and m is its relativistic mass with respect to
some observer. The relativistic mass is given by
m0
m= q ,
v2
1 c2
where m0 is the rest mass and v is the speed of the particle as measured by the observer. If the
speed v is much smaller than c, then
✓ ◆ 1/2 ✓ ✓ ◆ ◆
m0 c 2 v2 1 v2 1
E = mc2 = q = m0 c 2 1 = m0 c2 1 + ··· ⇡ m0 c2 + m0 v 2 .
1 vc2
2 c2 2 c2 2
CHAPTER 3. DIFFERENTIAL CALCULUS 38
Here are some other Maclaurin series (easy to verify):
1
X 1
X
( 1)k 2k ( 1)k 2k+1
cos x = x , sin x = x .
(2k)! (2k + 1)!
k=0 k=0
cos(x3 )
Example 3.8 Find the Maclaurin series (i.e. the Taylor series about x = 0) for
(1 + x6 )1/3
up to and including the x12 term.
Ans. Using the standard series
x2 x4 1/3 x ( 1/3)( 4/3) 2
cos x = 1 + + ··· and (1 + x) =1 + x + ··· ,
2 24 3 2
we have
✓ ◆✓ ◆ ✓ ◆ ✓ ◆
cos(x3 ) x6 x12 x6 2 12 1 1 6 2 1 1
= 1 + + ··· 1 + x + ··· =1 + x + + + x12 + · · ·
(1 + x6 )1/3 2 24 3 9 2 3 9 6 24
5 6 31 12
=1 x + x + ···
6 72