Download as pdf or txt
Download as pdf or txt
You are on page 1of 242

LIMITS AND CONTINUITY – Week4 Lect1

LIMITS are essential to the definition of derivative:


• Allows the calculation of tangent to a curve
• Instantaneous speed of a moving car
• Area under a curve – Definite integrals

sin x
EXAMPLE – Guess the value of lim .
x→0 x

sin x
The function is not defined at x = 0. However, we
x
only consider f (x) near x = 0 and not at x = 0.

sin x
y=
x

x ±0.5 ±0.3 ±0.1 ±0.01


sin x
0.958851 0.985067 0.998334 0.999983
x

sin x
From the table we guess that lim =1
x→0 x

1
2 MATH 1021 Calculus of One Variable

BASIC LIMIT LAWS

The basic limit laws let us calculate limits without using


the formal definition directly.

Sum and difference laws


 
lim f (x) ± g(x) = lim f (x) ± lim g(x).
x→c x→c x→c

The product law


     
lim f (x)×g(x) = lim f (x) × lim g(x) .
x→c x→c x→c

The quotient law


f (x) limx→c f (x)
lim = .
x→c g(x) limx→c g(x)

The power law


 n
 n
lim f (x) = lim f (x) n a positive integer.
x→c x→c

The root law


p q
n
lim f (x) = n lim f (x) n a positive integer.
x→c x→c

If n is even, we assume that limx→c f (x) > 0.


LIMITS AND CONTINUITY – Week4 Lect1 3

EXAMPLE – Use the limit laws to calculate limx→4 f (x)


if
2 + 3x − sin(x)
f (x) = .
x2 + 2

2 + 3x − sin(x)
lim f (x) = lim
x→4 x→4 x2 + 2

limx→4(2 + 3x − sin(x))
= ( quotient law)
limx→4 x2 + 2

limx→4 2 + limx→4 3x − limx→4 sin(x)


= 2
( sum law)
limx→4 x + limx→4 2

2 + limx→4 3 limx→4 x − sin(limx→4 x)


= 2
( product law)
(limx→4 x) + 2

2 + 3 · 4 − sin(4)
=
(4)2 + 2

14 − sin(4)
= .
18
4 MATH 1021 Calculus of One Variable

THE COMPARISON AND SQUEEZE LAWS

The comparison law


f (x) and g(x) are two functions such that
lim f (x) and lim g(x)
x→c x→c

both exist. If
f (x) ≤ g(x), for all x near c
then
lim f (x) ≤ lim g(x).
x→c x→c

The squeeze law


f (x) ≤ g(x) ≤ h(x), for all x near c, and

lim f (x) = ℓ and lim h(x) = ℓ.


x→c x→c
Then limx→c g(x) exists and,
lim g(x) = ℓ.
x→c
LIMITS AND CONTINUITY – Week4 Lect1 5

1

EXAMPLE – Calculate lim x sin .
x→0 x
1
Notice that x sin is not defined at x = 0.
x

1
y = x sin
x

Notice that for all x 6= 0,


1 1
−1 ≤ sin ≤ 1 =⇒ sin ≤ 1.
x x
Multiplying both sides by |x| gives
1 1
x sin ≤ |x| =⇒ −|x| ≤ x sin ≤ |x|.
x x
Since limx→0− |x| = 0 and lim |x| = 0, by the squeeze law
x→0+
 1
lim x sin = 0.
x→0 x
6 MATH 1021 Calculus of One Variable

ONE-SIDED LIMITS

EXAMPLE – Consider the function


(
1, if x ≥ 0,
f (x) =
−1, if x < 0,

1 bc

x
bc
-1

As x → 0+ (through values greater than 0), the limit is 1,


RIGHT-Hand Limit:
lim f (x) = 1.
x→0+

As x → 0− (through values less than 0), the limit is −1,


LEFT-Hand Limit:
lim f (x) = −1.
x→0−
LIMITS AND CONTINUITY – Week4 Lect2

Limits at Infinity – Horizontal Asymptotes

1
Looking at the graph of the function f (x) = below, it is
x
clear that
1 1
lim = lim = 0.
x→+∞ x x→−∞ x

y = 1x

1
The line y = 0 is a horizontal asymptote of y = .
x
Important
1) The basic limit laws we discussed also hold for limits at
infinity.
2) When calculating limits as x → ±∞ we always assume:
1 1
lim ex = 0, lim e−x = 0, lim = 0, lim = 0.
x→−∞ x→∞ x→∞ x x→−∞ x

1
2 MATH 1021 Calculus of One Variable

Infinite Limits

Consider the graph of y = x3 − x2 + 3x + 6:

y = x3 − x2 + 3x + 6

The function values become arbitrarily large in magnitude


(either positive or negative) as x → ±∞.
We say the function approaches infinity or approaches
minus infinity.

Vertical Asymptotes
1
Consider the function f (x) = .
x

y = 1x

The curve approaches +∞ as x → 0+ and


approaches −∞ as x → 0−.
The line x = 0 (the y-axis) is called a vertical asymptote.
LIMITS AND CONTINUITY – Week4 Lect2 3

Limits of Rational Functions


p(x)
Rational functions are ratios of the form f (x) =
q(x)
where p(x) and q(x) are both polynomials.

To find the limits of rational functions as x → ±∞,


divide top and bottom by the largest power of x appearing
in the denominator.

3x3 − 2
Example – Find lim 4 .
x→−∞ x + 4x2 − 1

The largest power of x appearing in the denominator is x4, therefore,


divide top and bottom by x4:
3x3 − 2 (3x3 − 2)/x4
lim = lim
x→−∞ x4 + 4x2 − 1 x→−∞ (x4 + 4x2 − 1)/x4

3 2
− 4
= lim x x
x→−∞ 4 1
1+ 2 − 4
x x
 
3 2
lim −
x→−∞ x x4
=  
4 1
lim 1 + 2 − 4
x→−∞ x x

0−0
= = 0.
1+0−0
4 MATH 1021 Calculus of One Variable

Continuous and Discontinuous Functions

Geometrically, a continuous function is one whose graph


can be drawn without lifting your pen from the paper.
The graph of a continuous function has no breaks or jumps
in it.

Formally, a function is continuous if:


a) f (c) is defined, that is, c is in the domain of f .
b) limx→c f (x) = L exists, that is, L is finite.
c) limx→c f (x) = f (c), that is, L = f (c).

Discontinuous functions
If the function f is not continuous at a point c we say that
f is discontinuous at c, or that f has a discontinuity at c.
LIMITS AND CONTINUITY – Week4 Lect2 5

Types of Discontinuities

Jump Discontinuity (
1, if x ≥ 1,
Consider the function f (x) =
−1, if x < 1,

Since limx→1+ f (x) = 1 and limx→1− f (x) = −1,


the ordinary limit does not exist and so f (x) is
not continuous at x = 1.

It has a jump discontinuity at x = 1.


6 MATH 1021 Calculus of One Variable

Infinite discontinuity

1, if x 6= 0,
Consider again the function f (x) = x
0, if x = 0,

1
y=
x
b

Since
lim 1/x = ±∞,
x→0±

f (x) is said to have an infinite discontinuity at x = 0.


LIMITS AND CONTINUITY – Week4 Lect2 7

Removable discontinuity

sin x
The function f (x) = is undefined at x = 0 and there-
x
fore is discontinuous at x = 0.

sin x
However, we showed earlier that lim = 1.
x→0 x

sin x
y=
x

Since the limit exists and is finite, it is possible to define a


new function

 sin x , if x 6= 0,
g(x) = x
1, if x = 0,
which is continuous for all real values of x.
Because we were able to eliminate the discontinuity
at x = 0, f (x) is said to have a Removable Discontinuity
at that point.
Differentiation – Week5 Lect1

The gradient or slope of a tangent line to a function f at


x = a is given by the rise over the run:
y
rise
f (a) b

run

y = f (x)

x
a

1
2 MATH 1021 Calculus of One Variable

RECALL – In High School we learnt that the slope of the


tangent to a function f at the point (a, f (a)) is given by the
derivative of the function at x = a.

Example If f (x) = x2 −2x−1 =⇒ f ′(x) = 2x−2.


Therefore, the slope of the tangent at the point (3, 2) is
2 × 3 − 2 = 4.
y

f (a) b

y = f (x)

x
a
Differentiation – Week5 Lect1 3

Definition of Derivative
Consider points P(a, f (a) and Q(a + h, f (a + h))
on a function f .
y
P Qb

f (a) b

y = f (x)
a x
a+h

The tangent line at P is the limiting position of the secant


line PQ as h approaches 0.

The slope of the secant PQ is the “rise over run”, ie.


f (a + h) − f (a)
Slope of PQ =
h
Then
The derivative of a function f at a point a
is defined as
′ f (a + h) − f (a)
f (a) = lim ,
h→0 h
provided this limit exists.

Note that in this definition f ′(a) is just a number.


4 MATH 1021 Calculus of One Variable

It is important to emphasize that the limit must exist.

Example A function without a derivative at a point is the


absolute value function f (x) = |x| defined by

(
x if x ≥ 0,
f (x) = |x| =
−x if x < 0,
y

This function does not have a derivative at x = 0, for


f (0 + h) − f (0) |h|
f ′(0) = lim = lim ,
h→0 h h→0 h

and this limit does not exist.


Differentiation – Week5 Lect1 5

Example
|h|
Explain informally why limh→0 does not exist.
h
Since (
h if h ≥ 0,
|h| =
−h if h < 0,
it follows that
(
|h| 1 if h ≥ 0,
=
h −1 if h < 0,

1 bc

h
bc
-1

If we approach x = 0 from the right, the limit is 1

If we approach x = 0 from the left, the limit is -1

Since limx→0− 6= limx→0+ , the derivative of f (x) = |x|


does not exist at x = 0.
6 MATH 1021 Calculus of One Variable

The derivative as a function

In the previous definition of derivative of f at a fixed point


x = a, the answer is a real number.
We now replace the number a by the variable x and we ob-
tain a function:

The derivative of f is the function


f (x + h) − f (x)
f ′(x) = lim ,
h→0 h
provided the limit exists.

The new function f ′ is called the derivative of f .


df
An alternative notation is: f ′(x) =
dx

Differentiable function
If the derivative f ′(x) is defined for all x in
an open interval I, we say f is differentiable
on I.
Differentiation – Week5 Lect1 7

Example – Use the definition of derivative as a function to


find f ′(x) if f (x) = x2 − x.
Applying the definition:
′ f (x + h) − f (x)
f (x) = lim
h→0  h   2 
2
(x + h) − (x + h) − x − x
= lim
h→0 h
x2 + 2hx + h2 − x − h − x2 + x
= lim
h→0 h
h(2x − 1) + h2
= lim
h→0
 h 
= lim (2x − 1) + h
h→0
= (2x − 1).
This is the same answer we would get if we used the basic
rules of differentiation that we are revising below.

Alternative notation
If we use ∆x = h and define ∆y = f (x + ∆x) − f (x), the
definition of derivative of f becomes
f (x + ∆x) − f (x) ∆y
f ′(x) = lim = lim .
h→0 h ∆x→0 ∆x

∆x = increment of x and

∆y = the increment of y.
8 MATH 1021 Calculus of One Variable

The properties of continuity and differentiability are re-


lated as follows:

Theorem
If a function f is differentiable at a point a,
then f is also continuous at a.

The converse of this theorem is not true.

Example – The function f (x) = |x| is continuous at x = 0


because

lim f (x) = lim |x| = 0 = f (0).


x→0 x→0

However, f is not differentiable at x = 0 because of the


cusp or corner of the curve at x = 0.
y

x
Differentiation – Week5 Lect1 9

Second and higher order derivatives

If f and f ′ are differentiable, we may define the


second derivative by
′ ′
 d2 f
′′
f = f = 2.
dx
In general, the nth derivative of f is is obtained from f by
differentiating n times and denoted by
(n) d ny
f = n.
dx

Example – Find the third derivatives of the functions


a) f (x) = 3x4 + x2
f (x) = 3x4 + x2, f ′(x) = 12x3 + 2x,
f ′′(x) = 36x2 + 2, f ′′′(x) = 72x.

b) g(x) = sin x
g(x) = sin x, g′(x) = cos x,
g′′(x) = − sin x, g′′′(x) = − cos x.
10 MATH 1021 Calculus of One Variable

Basic rules of differentiation

The constant rule (k f )′ = k f ′


(8 sin x)′ = 8(sin x)′ = 8 cos x

The sum rule ( f + g)′ = f ′ + g′


(x + sin x)′ = (x)′ + (sin x)′ = 1 + cos x

The product rule ( f g)′ = f ′g + f g′

(xex)′ = (x)′ex + x(ex)′


= 1ex + xex
= ex + xex

 f ′ f ′ g − f g′
The quotient rule =
g g2
!′
ex
(ex)′ sin x − ex(sin x)′
=
sin x sin2 x
ex sin x − ex cos x
=
sin2 x
Differentiation – Week5 Lect1 11

The power rule (xa)′ = a xa−1

(x3 + x2)′ = 3x2 + 2x

The chain rule


Given a function of a function y = f (u), u = u(x),
the derivative is
dy dy du
=
dx du dx

Examples

d
cos(ex) = − sin(ex) × ex = −ex sin(ex)
dx
d cos x
(e ) = ecos x × (− sin x) = − sin x ecos x
dx
d 3
(x − 1)100 = 100(x3 − 1)99(3x2) = 300 x2(x3 − 1)99
dx

We are not proving these results here. However, these rules


are a direct consequence of the limit laws introduced in
Chapter 4.
12 MATH 1021 Calculus of One Variable

Implicit differentiation
Consider the following relations
x2 + y2 − 9 = 0 or x2y2 + x sin y − 4 = 0.
The first equation represents a circle and it is possible to
make y the subject to obtain the two explicit functions
p p
y = 9 − x and y = − 9 − x2.
2

dy
We can now find the derivative using ordinary differen-
dx
tiation.

The second relation cannot be expressed in explicit form


y = f (x).
However, it is possible to calculate the derivative using the
method of implicit differentiation.

Example – Use implicit differentiation to find the deriva-


dy
tive if F(x, y) = 0 is the circle x2 + y2 − 9 = 0. Find the
dx √
equation of the tangent at (x, y) = ( 5, 2).
Differentiation – Week5 Lect1 13

Differentiate both sides of x2 + y2 − 9 = 0 with respect to x


to give
d 2 2
 d 
x +y −9 = 0 ,
dx dx
d 2 d 2 d  d 
x + y − 9 = 0 ,
dx dx dx dx
dy
2x + 2y − 0 = 0,
dx
dy
x + y = 0.
dx
dy dy x
Making the subject gives =− .
dx dx y

Implicit differentiation consists of differen-


tiating both sides of the relation F(x, y) = 0
with respect to x and then solving the result-
dy
ing equation for .
dx
Differentiation – Week5 Lect2

Logarithmic differentiation
Sometimes, the calculation of derivatives of functions in-
volving products, quotients or powers can be simplified
by:
a) Taking the natural logarithm of both sides of the equa-
tion,
b) And using implicit differentiation.
 3
1/4
x +1
Example – Differentiate the function y =
x7/9
First take the natural logarithm of both sides:
 3 1/4  3 
x +1 1 x +1
ln y = ln = ln
x7/9 4 x7/9
1 7
= ln(x3 + 1) − ln x.
4 36
We now differentiate implicitly:
1 dy 3x2 7
= −
y dx 4(x3 + 1) 36x
or
1/4
3x2
  3
3x2
 
dy 7 x +1 7
=y − = −
dx 4(x3 + 1) 36x x 7/9 4(x 3 + 1) 36x
1
2 MATH 1021 Calculus of One Variable

Hyperbolic functions

ex + e−x ex − e−x
cosh x = sinh x =
2 2

y = cosh x y = sinh x
They have many properties similar to the trigonometric
sine and cosine functions.

cosh(−x) = cosh x =⇒ cosh x is an even function


(graph is symmetric about the y-axis like cos x).

sinh(−x) = − sinh x =⇒ sinh x is an odd function


(graph is skew-symmetric about the y-axis like sin x).
Differentiation – Week5 Lect2 3

Some identities
cosh2 x − sinh2 x = 1
sinh(x + y) = sinh x cosh y + cosh x sinh y
cosh(x + y) = cosh x cosh y + sinh x sinh y
For example,
 x −x
2  x −x
2
2 2 e +e e −e
cosh x − sinh x = −
2 2

2x −2x 2x −2x
   
e +2+e e −2+e
= −
4 4

4
= =1
4

Squaring and adding x = cost and y = sint, gives the equa-


tion of the circle x2 + y2 = 1
(circular functions).
Squaring and adding x = cosht and y = sinht, gives the
equation of the hyperbola x2 − y2 = 1
(hyperbolic functions).
4 MATH 1021 Calculus of One Variable

Derivatives
d x
Since (e ) = ex we can easily show that:
dx

d d
(cosh x) = sinh x (sinh x) = cosh x
dx dx

We may also define


sinh x cosh x
tanh x = coth x =
cosh x sinh x
1 1
sech x = cosech x =
cosh x sinh x
Differentiation – Week5 Lect2 5

Injective and inverse functions

The property of a function that guarantees the existence


of an inverse is "injectivity".

A function f : A → B is said to be injective or one-to-one


on the domain A if distinct elements in A are mapped to
distinct elements in B.

That is, f is injective if


f (x1) = f (x2) =⇒ x1 = x2
for all x1, x2 ∈ A.

The arrow diagram on the left represents an injective func-


tion, but that on the right does not.
6 MATH 1021 Calculus of One Variable

The "horizontal line test" is a simple way to determine


whether or not the function is injective:

The horizontal line test


A function f : R → R is injective if
no horizontal line intersects its graph more
than once.

a) y = sinh x is injective on R.
Any horizontal line intersects its graph exactly once.

b) y = cosh x is not injective on R.


There are horizontal lines which intersect the graph
twice.

y = cosh x y = sinh x
Differentiation – Week5 Lect2 7

Inverse functions
Suppose that the function f : A → B is injective in A.
Then we may define an inverse function f −1 : B → A with
domain B and range A.

Property of the inverse function


f −1( f (x)) = x for all x ∈ A and
f ( f −1(x)) = x for all x ∈ B.

The graph of a function and its inverse are always symmet-


ric about the line y = x.
y = ex
y=x

y = ln x

Warning
The notation f −1 always means the inverse function. It
1
does not denote the reciprocal .
f (x)
8 MATH 1021 Calculus of One Variable

Calculating inverse functions

a) If a function f is not injective on its natural domain,


restrict the domain to some subset A on which f is in-
jective.
b) Rearrange the equation y = f (x) to make x the subject,
x = f −1(y).
c) Finally, swap x and y to get the inverse in standard no-
tation with x the independent variable and y the depen-
dent variables.

Example – Find the inverse of f (x) = 4x − 1.

a) the function f is injective on R, since it is a straight


line.
y+1
b) Write y = 4x − 1 and make x the subject, so x = .
4
c) Swap x and y to give the inverse function in standard
notation:
x+1
y=
4
or
−1 x+1
f (x) = .
4
Differentiation – Week5 Lect2 9

Example – The function f (x) = x2 is not injective on its


natural domain.

However, if we restrict the domain to some subset of R on


which the function is injective, then we can find an inverse.

a) A = {x ∈ R | x ≥ 0}
b) S = {x ∈ R | x ≤ 0}
c) (2, 4).

2 4
f :A→A f (x)=x2 f :S→A f (x)=x2 f :(2, 4)→(4, 16) f (x)=x2

The corresponding inverse functions are shown below:

4 16
√ √ √
f −1 (x)= x f −1 (x)=− x f −1 (x)= x
10 MATH 1021 Calculus of One Variable

Inverse sinh function


From the graph we see that f (x) = sinh x is injective on R.

y = sinh x y = sinh−1 x

Therefore it has an inverse sinh−1.


The graph of sinh−1 x is obtained by reflecting the graph of
sinh x about the line y = x.

Formula for sinh−1(x)


ex − e−x
y = sinh x = ⇒ 2y = ex − e−x
2
e2x − 1
⇒ 2y =
ex
⇒ e2x − 2yex − 1 = 0.
This is a quadratic in ex with solution
p
x 2y ± 4y2 + 4
e =
p2
2y ± 2 y2 + 1
=
p2
= y ± y2 + 1.
Differentiation – Week5 Lect2 11

Since ex is always positive, we take the + sign to give


p
x
e = y + y2 + 1
Taking natural log on both sides gives
p
x = ln(y + y2 + 1).
Swapping x ↔ y gives
p
y = ln(x + x2 + 1).
This is the formula for the inverse hyperbolic sine function
p
−1
sinh (x) = ln(x + x2 + 1).
12 MATH 1021 Calculus of One Variable

Inverse cosh function


From the graph, the function f (x) = cosh x is clearly not
injective on R.

1
y = cosh x 1−1
y = cosh x
However, choosing just the right hand half of the curve will
give an injective function.

The inverse f −1 : [1, ∞) → [0, ∞) is the


"inverse hyperbolic cosine function" written as cosh−1.

For x ≥ 0, cosh−1 y = x if and only if y = cosh x.

As an exercise, show that with domain [0, ∞) for the cosh


function, the formula for cosh−1 is given by
p
−1
cosh (x) = ln(x + x2 − 1)
for all x ∈ [1, ∞). What would the formula be if we choose
the domain of cosh to be (−∞, 0]?
Applications of Differentiation – Week6 Lect1

Optimizing functions of one variable


In everyday language, problem optimization means finding
the optimal or best way of solving a problem.

We might be interested in minimizing the cost of manu-


facturing a certain item or in maximizing the profit in per-
forming certain transactions, and so on.

Mathematically, these problems can be reduced to finding


the extrema of a function f (x).

This means identifying the maximum or minimum values


of the function in some part of its domain.

1
2 MATH 1021 Calculus of One Variable

There are two types of extrema, local and global:

Local extrema

A function f has a local or relative maximum at a


if f (a) ≥ f (x) when x is near a.

f has a local or relative minimum at a


if f (a) ≤ f (x) when x is near the point a.

When we say x near the point a we mean that the inequal-


ities are valid for all x in some open interval containing
a.

Local maximum Local minimum


Applications of Differentiation – Week6 Lect1 3

Global extrema

A function f has a global or absolute maximum at a


if f (a) ≥ f (x) for all x in its domain.

f (a) is called the maximum value of f on its domain.

f has a global or absolute minimum at a


if f (a) ≤ f (x) for all x in its domain.

f (a) is called the minimum value of f on its domain.

Example – By inspecting the graph below, identify local


and global extrema:
y
4
3
2
1
x
−5−4−3−2−1 1 2 3 4
4 MATH 1021 Calculus of One Variable

Important result that guarantees the existence of global ex-


trema for functions defined on closed intervals:

The Extreme Value Theorem


If f is continuous on a closed interval [a, b], then f attains
a global maximum value f (c) and
a global minimum value f (d),
where c and d are some real numbers on [a, b].

If a function is discontinuous inside a closed interval or is


defined on an open interval of the form (a, b) where the
end-points are excluded, it need not have global maxima
and minima.
1
Consider the function f (x) =
x

y = 1x

There is no global maximum or minimum.


Applications of Differentiation – Week6 Lect1 5

However if we restrict the domain to [1, 2],

y = 1x
b

1 2

1
the global maximum is 1 and the global minimum is .
2
There are no local maxima or minima in either case.
6 MATH 1021 Calculus of One Variable

Critical points

A critical point of f is a number c where either f ′(c) = 0


or where f ′(c) does not exist.

Property of critical points


If f is differentiable at the point c and has a local maximum
or minimum at c, then f ′(c) = 0.

The converse of this property is not always true:


if f ′(c) = 0 it is not always true that c is
a maximum or minimum point.
Consider the cubic function f (x) = x3

y = x3

The point x = 0 is a critical point because f ′(0) = 0 and


yet the origin is neither a minimum nor a maximum.
It is a point of inflection
Applications of Differentiation – Week6 Lect1 7

Calculation of global extrema

a) Find the values of f at the critical points on [a, b].


b) Calculate the values of f at the endpoints of the inter-
val. That is, calculate f (a) and f (b).
c) Compare all the numbers obtained in the first two steps.
The largest of all the values is the global maximum
and the smallest is the global minimum.

Example
Find the global maximum and minimum values of
f (x) = x3 − 3x2 − 9x − 5
1) on the interval [0, 4]
2) on the interval [−2, 4].

f ′(x) = 3x2 − 6x − 9 = 3(x + 1)(x − 3)


f ′(x) = 0 =⇒ critical points at x = −1 or x = 3.
8 MATH 1021 Calculus of One Variable

CASE 1)

Consider f on the interval [0, 4].

x = −1 is outside [0, 4], therefore ignore.

a) The value of f at the critical point x = 3 inside [0, 4] is


f (3) = −32.
b) The values of f at the endpoints of the interval are
f (0) = −5 and f (4) = −25.
c) Comparing these three numbers gives the global maxi-
mum f (0) = −5 and the global minimum f (3) = −32.

40 y = x3 − 3x2 − 9x − 5
30
20
10
−2−10
−1 1 2 3 4 5
−20
−30
−40
−50
Applications of Differentiation – Week6 Lect1 9

CASE 2)

Now consider f on the interval [−2, 4].

a) Both critical points are now inside the interval [−2, 4]


so we get f (−1) = 0 and f (3) = −32.
b) The values of f at the endpoints of the interval are
f (−2) = −7 and f (4) = −25.
c) Comparing these four numbers shows that in this case
the global maximum is
f (−1) = 0 and the global minimum is still f (3) = −32.

When the domain is R, f has no global maximum or min-


imum because
lim f (x) = −∞ and lim f (x) = ∞.
x→−∞ x→∞
10 MATH 1021 Calculus of One Variable

Increasing and decreasing functions


Recall that f ′(x) tells us the direction of the curve at the
point x.
Therefore, it tells us whether it increases or decreases near
the point.

Increasing/Decreasing test

a) If f ′(x) > 0 on an interval, then f is increasing on that


interval.
b) If f ′(x) < 0 on an interval, then f is decreasing on the
interval.

max
f′ > 0 f′ < 0 f′ < 0 f′ > 0
min

First Derivative Test

a) If f ′ changes from positive to negative at c, then f has


a local maximum at c.
b) If f ′ changes from negative to positive at c, then f has
a local minimum at c.
c) If f ′ does not change sign at c, then f has no local max-
imum or minimum at c.
Applications of Differentiation – Week6 Lect1 11

Example – Let f (x) = x2 ex.


a) Find the critical points.
b) Use a sign diagram to indicate the regions where f (x)
increases or decreases.
c) Identifying the critical points as local maxima or local
minima.
d) Draw a sketck of f (x).

The natural domain of f is −∞ < x < ∞.


Differentiating gives
f ′(x) = x2ex + ex 2x = x(x + 2)ex
=⇒ critical points at x = 0 and x = −2.

Draw a sign diagram for f ′(x) as follows:

x < −2 x = −2 −2 < x < 0 x=0 x>0


f ′ (x) +ve 0 −ve 0 +ve
slope ր −→ ց ր
−→
Table 1

The graph increases to a local maximum at (−2, 4e−2),


then down to a local minimum at x = 0, then up again after
that.
NOTE: f (x) = x2ex ≥ 0 for all x,
limx→−∞ = 0 and limx→∞ = ∞.
12 MATH 1021 Calculus of One Variable

We now have enough information at our disposal to be able


to sketch the graph:
y
4
3
2
1
x
−5−4−3−2−1 1 2 3 4

The point (0, 0) is a global minimum.


There is no global maximum.

Maxima and minima when the derivative is undefined

f ′ undefined
f ′ undefined
f′ > 0
f′ > 0 f′ < 0
f′ < 0 f′ > 0

f ′ undefined f′ > 0

The absolute value function


(
x if x ≥ 0,
f (x) = |x| =
−x if x < 0,
has a V-shape with a cusp at the origin.
Applications of Differentiation – Week6 Lect1 13

Concavity

a) If the graph of f lies above the tangent line for all points
close to (c, f (c)) the graph is concave upward at this
point.
b) If the graph lies below the tangent line at all points
close to (c, f (c)) then the graph is concave downward
at this point.

f (x) f (x)

f (c) f (c)

c x c x
concave upward concave downward

Concavity Test

a) If f ′′(x) > 0 for all x in an interval I, then the graph of


f is concave upwards on I.
b) if f ′′(x) < 0 for all x in an interval I, then the graph of
f is concave downwards on I.
14 MATH 1021 Calculus of One Variable

Points of Inflection

A point at which the concavity changes from upward to


downward (or vice versa) is called a point of inflection.

concave upward
f ′′ = 0
1 { point of inflection 1
f ′′ < 0
(c, f (c))=(0,0.5)
f (c) concave downward
f ′′ < 0
horizontal tangent

concave upward ′′
f undefined
point of inflection } 1
c
1 2 concave downward

f (x) = x3 − 3x2 + 2x + 0.5 f (x) = 0.5 −


3√x5

The fact that (c, f (c)) is a point of inflection means that the
graph actually crosses the tangent at (c, f (c)).
Applications of Differentiation – Week6 Lect1 15

Second Derivative Test

If f and f ′ are differentiable functions and f ′(c) = 0 (that


is, x = c is a critical point of f ), then

a) If f ′′(c) > 0, there is a local minimum of f at x = c,


b) if f ′′(c) < 0, there is a local maximum of f at x = c,
and
c) if f ′′(c) = 0, we cannot draw any conclusions without
further work.

f ′′ > 0
max

min
f ′′ < 0

y = x3

In this case f ′(0) = 0 and f ′′(0) = 0


=⇒ No conclusion.
16 MATH 1021 Calculus of One Variable

SUMMARY OF CURVE SKETCHING


a) Domain – Find the set of values of x for which the function f (x)
is defined.

b) Intercepts – Find the y-intercept from y = f (0) and


the x-intercepts f (x) = 0.

c) Horizontal asymptotes – If limx→∞ f (x) = L and


limx→−∞ f (x) = L, then y = L is a horizontal asymptote

d) Vertical asymptotes – If limx→a+ f (x) = ±∞ or


limx→a− f (x) = ±∞ then x = a is a vertical asymptote.

e) Critical points –Points c where f ′(c) = 0 or f ′(c) does not exist.

f) Intervals of increase or decrease – Draw a sign diagram to find


the intervals on which f ′(x) > 0 ( f increasing)
and f ′(x) < 0 ( f decreasing)

g) Concavity and points of inflection – Solve f ′′(x) = 0.


Find the intervals on which f ′′(x) > 0 ( f concave upwards) and
the intervals on which f ′′(x) < 0 ( f concave downwards)

h) Sketch the curve – Put together the information obtained above


to draw the graph of f
Applications of Differentiation – Week6 Lect2

L’Hôpital’s rule
f (x)
Suppose we want to calculate limx→c .
g(x)

The quotient law states that


f (x) limx→c f (x)
lim = .
x→c g(x) limx→c g(x)
If the limits of f (x) and g(x) are both 0 or both ∞, the
limit is said to be indeterminate and the value can be zero,
infinity or any real number, depending on the example.

Case 1 – When both, the numerator and denominator tend


to zero, we obtain what is known as an
0
indeterminate form of type .
0
Case 2 – Similarly, if both, the numerator and denominator
tend to infinity, we obtain what is called an

indeterminate form of type .

1
2 MATH 1021 Calculus of One Variable

Examples
The following are examples of indeterminate forms that
can be solved using other methods.

sin x x3 − x2 + 2x − 2
Consider limx→0 and limx→1 .
x x−1

The functions are undefined at x = 0 and x = 1, respec-


tively, so we cannot substitute the values to find the limits.
0
They are both indeterminate forms of type
0

sin x
In Chapter 4 we proved that limx→0 = 1.
x
Here we see that eliminating the common factor we get
x3 − x2 + 2x − 2 (x2 + 2)(x − 1)
lim = lim = lim(x2 +2) = 3.
x→1 x−1 x→1 x−1 x→1
Applications of Differentiation – Week6 Lect2 3

l’Hôpital’s rule provides a powerful method for calculating


the limits of these two types of indeterminate forms.


L’Hôpital’s rule 00 form
Suppose that limx→c f (x) = 0, limx→c g(x) = 0 and that
f ′(x)
limx→c ′ exists. Then
g (x)
f (x) f ′(x)
lim = lim ′ .
x→c g(x) x→c g (x)

 ±∞ 
L’Hôpital’s rule form
±∞
Suppose that limx→c f (x) = ±∞, limx→c g(x) = ±∞ and
f ′(x)
that limx→c ′
g (x)
exists. Then
f (x) f ′(x)
lim = lim ′ .
x→c g(x) x→c g (x)

Important
When applying the rule more than once to the same ex-
pression, is important to ensure that the conditions are
satisfied at each step or we will get the wrong answer.
4 MATH 1021 Calculus of One Variable

Examples

ex
a) We calculate limx→∞ .
x ∞
As x → ∞ this expression has the form

Therefore may apply l’Hôpital’s rule
ex ex
lim = lim = ∞.
x→∞ x x→∞ 1

The function y = ex grows much more quickly than the


function y = x

ex
b) Find limx→∞ 2 .
x
Here we must use l’Hôpital’s rule twice;
ex ex ex
lim = lim = lim = ∞.
x→∞ x2 x→∞ 2x x→∞ 2

Therefore ex dominates x2 as x becomes very large.


Applications of Differentiation – Week6 Lect2 5

6x2 + 2x − 6
c) Calculate limx→∞ 2
2x − 7x + 4
Applying l’Hôpital’s rule twice we find that
6x2 + 2x − 6 12x + 2 12
lim = lim = lim = 3.
x→∞ 2x2 − 7x + 4 x→∞ 4x − 7 x→∞ 4
Of course, we could also evaluate this limit by dividing
both the numerator and the denominator by x2.

d) Harder example. Calculate limx→0+ x ln x.

x ln x is not in the form of a fraction f (x)/g(x).


1
However, x ln x = (ln x)/ .
x
1
Since limx→0+ ln x = −∞ and limx→0+ = ∞
x
l’Hôpital’s rule can be used:
ln x
lim (x ln x) = lim 1
x→0+ x→0+
x

1
x
= lim 1
x→0+ − 2
x

−x2
= lim = lim −x = 0.
x→0 + x x→0+
6 MATH 1021 Calculus of One Variable

e) Finally, the following calculation contains a mistake;


find it.
x3 − x2 + 2x − 1 3x2 − 2x + 2 6x − 2
lim = lim = lim = 2.
x→1 x2 − 2x − 2 x→1 2x − 2 x→1 2
What is the actual value of this limit?

Linear approximations
Close to a point x = a, a differentiable function f (x) can
be approximated by the tangent to the curve at that point.

The tangent line is y = f (a) + f ′(a)(x − a)

which can be written as the linear function


L(x) = f (a) + f ′(a)(x − a).

L(x) is called the linearisation of the function f at a.

L(x) can be used to approximate the function f near x = a,


that is,
f (x) ≈ L(x) near x = a.
Applications of Differentiation – Week6 Lect2 7

Example
Find the linearisation of the function

f (x) = x + 3 at x =√1 and use it√to calculate approxima-
tions of the numbers 3.98 and 4.05.

We first need to choose a point near x = 1 to evaluate the


function.

Writing 3.98 = 0.98 + 3 gives us the clue that we need to


choose x = 0.98.

Similarly, writing 4.05 = 1.05 + 3 means that x = 1.05.

Now, the linearisation of f at x = 1 is


L(x) = f (1) + f ′(1)(x − 1)
1
= 2 + (x − 1)
4
7 x
= + .
4 4
8 MATH 1021 Calculus of One Variable

So we can approximate f (x) as follows:


√ 7 x
f (x) = x + 3 ≈ + when x is near 1.
4 4
Therefore,
√ √ 7 0.98
3.98 = 0.98 + 3 ≈ + = 1.995
4 4
and
√ √ 7 1.05
4.05 = 1.05 + 3 ≈ + = 2.0125.
4 4

Because x = 0.98 and x = 1.05 are near x = 1, the approx-


imations are reasonably good.

If fact, using a calculator we get the exact values


√ √
3.98 = 1.99499 and 4.05 = 2.01246
which, after rounding to four decimal places, coincide with
the approximate values.
Applications of Differentiation – Week6 Lect2 9

Differentials
Recall the definition of derivative in terms of the incre-
ments ∆x and ∆y,
∆y
f ′(x) = lim where ∆y = f (x + ∆x) − f (x).
∆x→0 ∆x
If ∆x is “small”,
∆y
≈ f ′(x) =⇒ ∆y ≈ f ′(x) ∆x.
∆x

That is, if x changes by a small amount ∆x, then y will


change by approximately ∆y ≈ f ′(x) ∆x.

This motivates the introduction of the concept of


differential.

Let y = f (x) where f is a differentiable function and let ∆x


be any nonzero real number. Then
a) The differential dx is a variable given by dx = ∆x.
b) The differential dy of the function f is another function
given by
dy = f ′(x) dx with alternative notation d f = f ′(x) dx.
10 MATH 1021 Calculus of One Variable

The differential of a function of one variable is itself a


function of two variables; both x and dx are needed to eval-
uate the differential.

dy
We can now treat the notation for the derivative as a
dx
“ratio”, since in terms of differentials we have
dy f ′(x) dx
= = f ′(x).
dx dx

Example
Calculate the differential d f of the function
f (x) = x3 + 5x2.
Since f ′(x) = (3x2 + 10x) then
d f = f ′(x)dx = (3x2 + 10x)dx

Example
Write down the differential d f of
f (x) = 2x cos x and find an expression for the differen-
tial in terms of dx when x = 0.

Since f ′(x) = 2 cos x − 2x sin x =⇒




d f = f (x)dx = 2 cos x − 2x sin x dx.

When x = 0 the differential becomes d f = 2dx.


Applications of Differentiation – Week6 Lect2 11

Relationship between the increment ∆y


and the differential dy

y
y = f (x)
f (x0 + ∆x)
∆y ∆y
dy
f (x0)
dx = ∆x

x
x0 x0 + ∆x
Observe carefully in the diagram that
∆y = f (x0 + ∆x) − f (x0) changes along the curve
while dy changes along the tangent line.
Therefore,when dx = ∆x is small, we can say that
∆y ≈ dy.

Since f (x0 + ∆x) − f (x0) = ∆y ≈ dy,


we obtain
f (x0 + ∆x) = f (x0) + ∆y ≈ f (x0) + dy.
That is,
f (x0 + ∆x) ≈ f (x0) + dy.
Therefore, to find an approximate value at a nearby point
x0 + ∆x we can use the simpler equation of the tangent line.
12 MATH 1021 Calculus of One Variable

Example

Given the function f (x) = 3x + 4, use differentials to find
an approximate value for f (7.1).

We first need to choose a point to evaluate the differential.


We can see that f (7) is easy to evaluate since f (7) = 5,
therefore a sensible choice is x0 = 7. Then the differential
in x is dx = ∆x = 7.1 − 7 = 0.1 and the derivative
3 3
f ′(x) = √ and so f ′(7) = = 0.3.
2 3x + 4 10
Hence
dy = f ′(x0)dx = 0.3 × 0.1 = 0.03.

This differential is the approximate change in f (x) be-


tween x = 7 and x = 7.1 and so an approximation for
f (7.1) is
f (7.1) = f (x0 + ∆x)
= f (7 + 0.1)
≈ f (7) + dy
= 5 + 0.03 = 5.03.

Using a calculator gives f (7.1) = 5.02991 to six signifi-


cant figures and so the approximation using differentials is
accurate to three significant figures.
Applications of Differentiation – Week6 Lect2 13

Example
The volume of a sphere is given by V = 34 π r3 where r is
the radius of the sphere. By approximately how much is
the volume of a sphere reduced if its radius is decreased
from 6cm to 5.75cm?

Here we seek to find the differential of V at r = 6.

The differential in r is dr = −0.25, since we reduce the


radius from 6 to 5.75.

dV
The differential in V is dV = dr where the derivative is
dr
evaluated at r = 6:
dV
= 4π r2 = 4π 62 = 144π .
dr
So
dV = 144π × −0.25 = −36π ≈ −113.1
Therefore the volume of the sphere is reduced by approxi-
mately 113.1 cm3
14 MATH 1021 Calculus of One Variable

Example
Find the approximate error in the area of a circle of radius
30, if there is an error of ±0.2 cm in the measurement of
its radius.

Let A = π r2 be the area of the circle, where r is its radius.

The error is approximated by the differential of A

dA
dA = dr = 2π rdr
dr
Here r = 30 and |dr| = 0.2.

We use the absolute value of dr here because it is possible


that the measurement is underestimated (dr < 0) or over-
estimated (dr > 0).

The magnitude of the error in A and so we seek |dA|.


dA dA
|dA| = dr = |dr| = 60π × 0.2 = 12π ≈ 37.7
dr dr
Therefore the estimated maximum error in the area of the
circle is 38 cm2.
1

TAYLOR POLYNOMIALS – Introduction

Recall that a polynomial is a function of the form


f (x) = a0 + a1x + a2x2 + · · · + anxn,
where the ak are constants and n is a non-negative integer.
Taylor polynomials are special polynomials which are
used to approximate other types of functions.

WHY?
Because it is useful to be able to approximate a given func-
tion by simpler functions, like polynomials.

Polynomials are easy to evaluate, requiring only addition


and multiplication.

Other functions, like the trigonometric or logarithmic func-


tions, are very difficult to evaluate exactly.

This week we learn how to construct Taylor polynomials


that approximate functions.

We also determine how good the approximation is.


2 MATH 1021 Calculus of One Variable

An approximation for ex
Suppose we want to construct a polynomial of degree 3
(cubic)
p(x) = a0 + a1x + a2x2 + a3x3,
to approximate f (x) = ex near the point x = 0.

a) Firstly, we want the graphs to have the same value at


x = 0. That is, we want p(0) = f (0).
Since p(0) = a0 and f (0) = e0 = 1
=⇒ a0 = 1
and thus
p(x) = 1 + a1x + a2x2 + a3x3

b) Next, we would like the graphs of p(x) and ex to have


the same slope at x = 0.
That is, we want p′(0) = f ′(0).
f ′(x) = ex =⇒ f ′(0) = e0 = 1 while
p′(x) = a1 + 2a2x + 3a3x2 =⇒ p′(0) = a1
Therefore a1 = 1 and
p(x) = 1 + x + a2x2 + a3x3
3

c) If we make the second derivatives the same, the graphs


would then have the same concavity at x = 0.
f ′′(x) = ex =⇒ f ′′(0) = e0 = 1

p′′(x) = 2a2 + 6a3x =⇒ p′′(0) = 2a2


1
Therefore 2 a2 = 1 =⇒ a2 = and
2
x2
p(x) = 1 + x + + a3x3
2

d) Now let’s match up the third derivatives also. f ′′′(x) =


ex =⇒ f ′′′(0) = e0 = 1

p′′′(x) = 6a3 =⇒ p′′′(0) = 6a3


1
Therefore 6 a3 = 1 =⇒ a3 = and
6
x2 x3
p(x) = 1 + x + +
2 6

The graph below shows that p(x) does indeed match ex


very closely near x = 0.
ex
10 2 3
1 + x + x2 + x6
−3 −2 −1 1 2 3
4 MATH 1021 Calculus of One Variable

We now use the same idea to construct a polynomial of


degree n (with n > 3)
Pn(x) = a0 + a1x + a2x2 + · · · + anxn
The first few derivatives of Pn(x) are:
Pn(x) = a0 + a1x + a2x2 + · · · + anxn
Pn′ (x) = a1 + 2a2x + 3a3x2 + · · · + nanxn−1
Pn′′(x) = 2a2 + 2 · 3a3x + 3 · 4a4x2 + · · · + (n − 1)nanxn−2
Pn′′′(x) = 2 · 3a3 + 2 · 3 · 4a4x + 3 · 4 · 5a5x2 + · · · + (n − 2)(n − 1)nan xn−3
Pn(4)(x) = 2 · 3 · 4a4 + 2 · 3 · 4 · 5a5x + · · · + (n − 3)(n − 2)(n − 1)nan xn−4

Substituting x = 0 into the equations above, we find:


Pn(0) = a0 = 1
Pn′ (0) = a1 = 1
1
Pn′′(0) = 2a2 = 1, =⇒ a2 =
2
1
Pn(3)(0) = 3!a3 = 1, =⇒ a3 =
3!
.. .. ..
1
Pn(k)(0) = k!ak = 1, =⇒ ak =
k!
.. .. ..
1
Pn(n)(0) = n!an = 1, =⇒ an =
n!
5

Hence the polynomial


x2 x3 xn
Pn(x) = 1 + x + + + · · · +
2! 3! n!
is equal to ex at x = 0, and each of its first n derivatives is
equal to the corresponding derivative of ex at x = 0.

The following diagrams show the graphs of P6(x) and P7(x)


superimposed on the graph of ex.

ex
P7(x)

P6(x)
100
−7 −6 −5 −4 −3 −2 −1 1 2 3 4 5 6

We see that the polynomials of degree 6 and degree 7 look


virtually identical with ex for −2.5 ≤ x ≤ 2.5.
6 MATH 1021 Calculus of One Variable

Taking higher values of n makes


x2 x3 xn
Pn(x) = 1 + x + + + · · · +
2! 3! n!
a better approximation to ex in the sense that it matches the
exponential function over a larger interval.

Here is the graph of P10(x), superimposed on the graph of


ex.

ex

P10(x)

1000

−9−8−7−6−5−4−3−2−1 1 2 3 4 5 6 7 8

It is somewhat surprising that the polynomial is a good


match for ex for −6 ≤ x ≤ 6 since we set out to find an
approximation to ex around x = 0.
7

What is even more surprising is that if we let n become


infinitely big, then the “infinite polynomial”
x2 x3
Pn(x) = 1 + x + + + · · ·
2! 3!
is exactly equal to ex for all values of x.

This “infinite polynomial” is more correctly known as a


"power series". We will deal with series in the next chap-
ter.

Taylor polynomials about x = 0

In general given a differentiable function f (x),


the nth order "Taylor polynomial" of f about x = 0 is
′ f ′′(0) 2 f (3)(0) 3 f (n)(0) n
Pn(x) = f (0)+ f (0)x+ x + x +· · ·+ x.
2! 3! n!
nf (k)(0) k
In sigma notation: Pn(x) = ∑ x
k=0 k!
Taylor polynomials about x = 0 are known as Maclaurin
polynomials

You should memorise this formula.


8 MATH 1021 Calculus of One Variable

Example

Find the Taylor polynomial of order 7 about x = 0 of


f (x) = sin x:

f (x) = sin x f (0) = 0


f ′(x) = cos x f ′(0) = 1
f ′′(x) = − sin x f ′′(0) = 0
f (3)(x) = − cos x f (3)(0) = −1
f (4)(x) = sin x f (4)(0) = 0
f (5)(x) = cos x f (5)(0) = 1
f (6)(x) = − sin x f (6)(0) = 0
f (7)(x) = − cos x f (7)(0) = −1
Therefore the Taylor polynomial of order 7 for f (x) = sin x,
about x = 0, is
x3 x5 x7
P7(x) = x − + − .
3! 5! 7!

The general polynomial, of order 2n + 1, (n = 0, 1, 2, . . .)


for the sine function, is
x3 x5 x7 n x
2n+1
x − + − + · · · + (−1) .
3! 5! 7! (2n + 1)!
Try to find a pattern in the values of derivatives when cal-
culating Taylor polynomials, since finding a pattern allows
us to write down an expression for the general polynomial.
9

The following diagram compares the graph of sin x with


those of the Taylor polynomials of order 7, and order 9.

3 5 7 9
x − x3! + x5! − x7! + x9!
sin x
x3 x5 x7
x − 3! + 5! − 7!

Both polynomials are very good approximations over the


interval [−π , π ], although they both eventually diverge dra-
matically from sin x.

Of course, if we know sin x for −π ≤ x ≤ π , we can cal-


culate it for any value of x using the periodicity of the sine
function.
10 MATH 1021 Calculus of One Variable

Example
1
Let f (x) = . Then:
1−x
1
f (x) = f (0) = 1
1−x
1
f ′(x) = f ′(0) = 1
(1 − x)2
2
f ′′(x) = f ′′(0) = 2
(1 − x)3
(3) 3·2
f (x) = f (3)(0) = 3!
(1 − x)4
(4) 4·3·2
f (x) = f (4)(0) = 4!
(1 − x)5
(5) 5·4·3·2
f (x) = f (5)(0) = 5!
(1 − x)6
(n) n! (n)
The pattern is clear; f (x) = n+1
, and f (0) = n!.
(1 − x)
1
The Taylor polynomial of order n for is therefore
1−x
2 3! 4! n!
Pn(x) = 1 + x + x2 + x3 + x4 + · · · + xn
2! 3! 4! n!

= 1 + x + x2 + x3 + x4 + · · · + xn .
11

Example
Find the Taylor polynomial of order 3 for the function
f (x) = x3 − 7x2 + 4x − 2.
You should find that it is precisely x3 − 7x2 + 4x − 2.

What about the Taylor polynomial of order 4?


The 4th derivative of f is 0, so the 4th order Taylor polyno-
mial is also x3 − 7x2 + 4x − 2
(as, indeed, is any Taylor polynomial of higher degree).

In general, if f is a polynomial of degree n, then its Taylor


polynomial of order n or higher is equal to f .
1

Taylor polynomials – Week7-Lect2

To be able to find a Taylor polynomial about x = 0, we


must have a function f (x) which not only exists at x = 0,
but is also differentiable n times at x = 0.
The function f (x) = ln x is not even defined at x = 0.
Therefore to approximate ln x we need to be able to find
Taylor polynomials about values other than zero.

Taylor polynomial about x = a


The nth order "Taylor polynomial" of a function f about
x = a is
f ′′(a) 2 f (3)(a)

Pn(x) = f (a) + f (a)(x − a) + (x − a) + (x − a)3 + · · ·
2! 3!
f (n)(a)
···+ (x − a)n
n!
n
f (k)(a)
= ∑ (x − a)k .
k=0 k!

To use this formula the function f must exist at a and be


differentiable n times at a.
Note that the Taylor polynomial about 0 is just a special
case with a = 0.
2 MATH 1021 Calculus of One Variable

Example
Find the Taylor polynomial for f (x) = ln x about a = 1.
f (x) = ln x f (1) =0
f ′(x) = 1/x f ′(1) =1
f ′′(x) = −1/x2 f ′′(1) = −1
f (3)(x) = 2/x3 f (3)(1) =2
f (4)(x) = −3!/x4 f (4)(1) = −3!
f (5)(x) = 4!/x5 f (5)(1) = 4!
.. .. .. ..
f (n)(x) = (−1)n+1(n − 1)!/xn f (n)(1) = (−1)n+1(n − 1)!
The Taylor polynomial of order n for ln x about x = 1 is:
−1 2 −3! (−1)n+1 (n − 1)!
Pn (x) = (x − 1) + (x − 1)2 + (x − 1)3 + (x − 1)4 + · · · + (x − 1)n
2 3! 4! n!

(x − 1)2 (x − 1)3 (x − 1)4 (x − 1)n


= (x − 1) − + − + · · · + (−1)n+1
2 3 4 n

A more user-friendly expression is obtained by letting


t = x − 1. Then x = 1 +t, and we have the following Taylor
polynomial for ln(1 + t), about t = 0 :
t2 t3 t4 n+1 t
n
t − + − + · · · + (−1) .
2 3 4 n
3

Calculating the error


If we approximate the value of a function by a value of its
Taylor polynomial, then it is important that we are able to
say what the error in the approximation might be.
We do this by looking at the "remainder term".

Remainder term
Given a function f (x) and its Taylor polynomial Pn(x) of
order n, the "remainder term" is
Rn(x) = f (x) − Pn(x).

Rearranging this expression we obtain the alternative form


f (x) = Pn(x) + Rn(x).
In our discussion of the remainder term we will restrict our
attention to Taylor polynomials about x = 0.

The following expression for Rn(x) is called the


Lagrange form of the remainder.
f (n+1)(c) n+1
Rn(x) = x for some c between 0 and x.
(n + 1)!
There are other forms of the remainder which will not
concern us here.
4 MATH 1021 Calculus of One Variable

Note that Lagrange form of the remainder term Rn(x) is


easy to remember
It is the same as the last term of Pn+1(x),
with 0 replaced by c.
You will need to memorise this formula and be able to
use it to estimate errors in various Taylor approximations.

Taylor’s formula
If we substitute the Lagrange form of Rn(x) into
f (x) = Pn(x) + Rn(x)
we obtain
′ f ′′ (0) 2 f (3)(0) 3 f (n)(0) n f (n+1)(c) n+1
f (x) = f (0)+ f (0)x+ x + x +· · ·+ x + x
2! 3! n! (n + 1)!
for some c between 0 and x.

This is known as Taylor’s formula.

Note that Taylor’s formula does not tell us how to find the
value of c, and it is almost always impossible to do so.

We cannot expect to find an exact value for the remainder.


Often, however, we can find a bound on the value of the
remainder, as in the next example.
5

Example
Estimate the value of cos(1) using P4(1),
where P4(x) is the Taylor polynomial of order 4 for cos x
about x = 0. How accurate is this estimate?

The fourth order polynomial is


x2 x4
P4(x) = 1 − + ,
2! 4!
so the approximation we are using for cos(1) is
1 1
1− + (= 0.541666 . . .)
2! 4!

Now, by Taylor’s formula


x2 x4
cos x = P4(x) + R4(x) = 1 − + + R4(x),
2! 4!
x5
where R4(x) = (− sin c) for some c between 0 and x.
5!
Note that − sin c is the fifth derivative of cos x at x = c.
1
So R4(1) = (− sin c) for some c between 0 and 1, and
5!
1 1 sin c
cos(1) = 1 − + − for some c between 0 and 1.
2! 4! 5!
6 MATH 1021 Calculus of One Variable

Since we know that −1 ≤ sin c ≤ 1 for any value of c,


1 − sin c 1
we know that − ≤ ≤ .
5! 5! 5!
1 1
Since = < 0.01, we have
5! 120
1 1
cos(1) = 1 − + ± 0.01
2! 4!
or equivalently
0.53166 < cos(1) < 0.55166.

The exact value from a calculator is cos(1) = 0.540302.

Estimating Definite Integrals


Taylor polynomials are also useful in calculating approx-
imate values of definite integrals in cases where standard
methods of finding anti-derivatives fail.

Polynomials are easy to integrate, and we can use the re-


mainder term to estimate the maximum possible error in
the approximation.
7

Example Z 1
x2
Estimate the value of the definite integral e dx using a
0
Taylor polynomial.
Note that there is no simple function which is an anti-
2
derivative of ex ,
and so it is not possible to evaluate this integral by anti-
differentiation.

The Taylor polynomial of degree 5 for ex is


x2 x3 x4 x5
1+x+ + + +
2! 3! 4! 5!
so Taylor’s Formula gives
x x2 x3 x4 x5
e = 1 + x + + + + + R5(x),
2! 3! 4! 5!
6
c x
where R5(x) = e for 0 < c < x.
6!
This is an identity, true for all values of x, and so we can
replace x by x2 to obtain
4 6 8 10
x2 x x x x
e = 1 + x2 + + + + + R5(x2),
2! 3! 4! 5!
12
x
and R5(x2) = ec for 0 < c < x2.
6!
8 MATH 1021 Calculus of One Variable

Integrating both sides of this equation we have

x4 x6 x8 x10
Z 1 Z 1 
x2 2 2
e dx = 1+x + + + + + R5 (x ) dx
0 0 2! 3! 4! 5!

1 Z 1
x3 x5 x7 x9 x11

= x+ + + + + + R5 (x2 ) dx
3 5 × 2! 7 × 3! 9 × 4! 11 × 5! 0 0

Z 1
1 1 1 1 1
= 1+ + + + + + R5 (x2 ) dx
3 10 42 216 1320 0

Z 1
= 1.46253 . . . + R5 (x2 ) dx.
0

Z 1
Now, what can be said about the value of R5(x2) dx?
0

2 x12
We know that R5(x ) = e c
for 0 < c < x2.
6!

Since we are integrating from 0 to 1,

=⇒ 0 < x < 1 and therefore 0 < x2 < 1

=⇒ 0 < c < x2 < 1 =⇒ 0 < c < 1,

and hence 1 = e0 < ec < e1 < 3.


9

x12 x12
2 c x12
Therefore < R5(x ) = e <3 .
6! 6! 6!

Integrating with respect to x between 0 and 1, gives


Z 1 x12 Z 1 Z 1 x12
dx < R5(x2) dx < 3 dx,
0 6! 0 0 6!
and so
 13
1 1
 13
1
x x
Z
< R5(x2) dx < 3
13 × 6! 0 0 13 × 6! 0
Z 1
0.0001 < R5(x2) dx < 0.0004.
0

Z 1 Z 1
x2
Since e dx = 1.46253 . . . + R5(x2) dx
0 0
Z 1 2
=⇒ 1.46253 . . .+0.0001 < ex dx < 1.46253 . . .+0.0004
0
Z 1
x2
=⇒ 1.4626 < e dx < 1.4629.
0
Z 1
x2
We may therefore conclude that e dx = 1.463
0
correct to 3 decimal places.
1

Taylor Series – Week8-Lect1

Revision of Infinite series


An "infinite sequence" is an infinite list of numbers
a0 , a1 , a 2 , . . . , an , . . .
If we add up the terms in such a sequence we obtain

a0 + a1 + a2 + . . . + an + . . . = ∑ an .
n=0

We call this expression an infinite series.

A familiar example is the geometric series


1 1 1 1
1+ + + + +··· .
2 4 8 16
In school we found that its sum is equal 2.
If we start adding up the terms, we quickly obtain a number
close to 2, but never reach 2 exactly.
So what do we mean, exactly, when we say
1 1 1 1
1+ + + + +··· = 2?
2 4 8 16
We need a proper definition, and for this purpose, the idea
of partial sums.
2 MATH 1021 Calculus of One Variable

Partial sum of an infinite series


We define the following sequence,
S 0 = a0
S 1 = a0 + a 1
S 2 = a0 + a 1 + a 2
..
k
S k = a0 + a 1 + a 2 + . . . + a k = ∑ an ,
n=0

called the sequence of partial sums.

The sum of an infinite series

The sum of the infinite series is defined as the limit, as


k → ∞, of the partial sums Sk , provided this limit exists,
that is,
∞ k
∑ an = k→∞
lim Sk = lim ∑ an.
k→∞
n=0 n=0

If the limit exists and is equal to l, we say that the series


converges to l and write

∑ an = l
n=0
3

Geometric Series
The series 1+r +r2 +r3 +· · · is called the geometric series
with common ratio r.
The kth partial sum of this series is the geometric progres-
sion
k
(0.0a) Sk = ∑ rn = 1 + r + r2 + r3 + · · · + rk .
n=0

Now, multiply both sides by r:


(0.0b) r Sk = r + r2 + r3 + · · · + rk + rk+1,
and subtract (0.0b) from (0.0a).
Note that all terms except the first and the last cancel,
Sk − r Sk = 1 − rk+1.
Finally, solving for Sk gives the expression for the sum of
the first k terms as
1 − rk+1
Sk = .
1−r
4 MATH 1021 Calculus of One Variable

When r is a real number such that


−1 < r < 1, rk+1 → 0 as k→∞
and so
1 + r + r2 + r3 + · · · = lim Sk
k→∞
1 − rk+1 1
= lim = .
k→∞ 1 − r 1−r

However, if |r| > 1, the magnitude of rk+1 increases with-


1 − rk+1
out bound as k increases, and lim does not exist.
k→∞ 1 − r

When r = 1, the series is the divergent series 1+1+1+· · · .

When r = −1, we have the series 1−1+1−1+1−1+· · · .


Consideration of the partial sums in this case should con-
vince you that this series diverges.

So the geometric series 1 + r + r2 + r3 + · · · converges to


1
if |r| < 1
1−r
and diverges otherwise.
5

Example
1 1 1
Show that the series 1 + + + + . . . converges to 2.
2 4 8
The series may be written in the form
1  1 2  1 3
1+ + + +...
2 2 2
which shows that it is a geometric series with common ra-
1
tio r = .
2
1 1
Therefore its sum is S = = = 2.
1 − r 1 − 1/2
Warning:
It is tempting to think that a series will converge if the
terms in the series approach zero.
In general, this is not true.
For example, the infinite series

1 1 1 1
∑ n = 1+ 2 + 3 + 4 +···
n=1
diverges, that is, we can make the sum as large as we like
by taking a sufficiently large number of terms even though
1
lim = 0
n→∞ n
6 MATH 1021 Calculus of One Variable

Taylor series
We have been considering series of numbers, which when
they converge, sum to a real number.
We now look at series of functions, which if they converge,
sum to another function.

Example
We saw earlier the formula for the sum of a geometric se-
ries:
1
= 1 + r + r2 + r3 + r4 · · · for |r| < 1.
1−r
Now think of r as a variable and replace r by x, so we have
1
= 1 + x + x2 + x3 + x4 · · · for |x| < 1.
1−x
Now we have a power series,
1 + x + x2 + x3 + x4 · · ·
1
which is equal to the function for |x| < 1.
1−x
Notice that this power series is precisely the series we
would obtain by extending indefinitely the Taylor polyno-
1
mial of .
1−x
1
That is, it is the Taylor series of .
1−x
7

The Taylor series for a function f about x = 0 is



′ f ′′(0) 2 f ′′′(0) 3 f (k)(0) k
f (0) + f (0)x + x + x +······ = ∑ x
2! 3! k=0 k!

Taylor series about x = 0 are known as Maclaurin series

Examples
These examples use the polynomials we found in the pre-
vious chapter. All the series are about the point x = 0.
x2 x4 x6
a) The Taylor series for cos x: 1 − + − + · · · .
2! 4! 6!
x3 x5 x7
b) The Taylor series for sin x: x − + − + · · · .
3! 5! 7!
x x2 x3 x4
c) The Taylor series for e : 1 + x + + + + · · · .
2! 3! 4!
Try differentiating, term-by-term, each of the series
above. What do you notice?
1
d) The Taylor series for : 1+x +x2 +x3 +x4 +· · · .
1−x
Try multiplying (1 − x) by 1 + x + x2 + x3 + x4 + · · · .
What do you find?
8 MATH 1021 Calculus of One Variable

x2 x3 x4
e) The Taylor series for ln(1+x): x− + − +· · · .
2 3 4
x2 x4 x6
f) The Taylor series for cosh x: 1+ + + +···.
2! 4! 6!
x3 x5 x7
g) The Taylor series for sinh x: x+ + + +···.
3! 5! 7!

Convergence of Taylor series


Simply knowing the Taylor series of a function f is not
particularly useful.
We need to know the values of x for which the series con-
verges to f (x).
In order to see this, we consider the behaviour of the re-
mainder term, Rn(x), as n → ∞.

Recall that f (x) = Pn(x) + Rn(x).


Consider x fixed and take the limit as n → ∞:

f (x) = lim Pn(x) + lim Rn(x).


n→∞ n→∞

Hence, if lim Rn(x) = 0, then


n→∞

f (x) = lim Pn(x)


n→∞
9

But, lim Pn(x) is the Taylor series of f , and so we


n→∞
have the following

Important result:
If lim Rn(x) = 0 for a particular value of x, then the Taylor
n→∞
series of f converges to f at that point.

Example
f (n+1)(c) n+1
Recall that the remainder term Rn(x) is equal to x
(n + 1)!
for some c between 0 and x.
For the function f (x) = sin x, every derivative is one of
sin x, cos x, − sin x or − cos x. Therefore, no matter what
the value of c, or of n, −1 ≤ f (n+1)(c) ≤ 1, or | f (n+1)(c)| ≤
1. Hence, the remainder term for f (x) = sin x is such that
xn+1
|Rn(x)| ≤ .
(n + 1)!

xn+1
Now, lim = 0 for any real number x (see the tech-
n→∞ (n + 1)!
nical aside below). It follows (by the squeeze law) that
lim Rn(x) = 0, and so
n→∞

x3 x5 x7
sin x = x − + − + · · · for all x ∈ R .
3! 5! 7!
10 MATH 1021 Calculus of One Variable

Precisely the same argument applies to the function cos x,


and
x2 x4 x6
cos x = 1 − + − + · · · for all x ∈ R .
2! 4! 6!

Example
Show that the remainder of the expansion about x = 0 of
the function f (x) = ex tends to zero as n → ∞.

Since any derivative of ex is ex, we have


ecxn+1
Rn(x) = for some c between 0 and x.
(n + 1)!
If x is negative, and c is between 0 and x, then 0 < ec < 1
|x|n+1
and 0 < |Rn(x)| < .
(n + 1)!
|x|n+1
Since lim = 0 =⇒ lim |Rn(x)| = 0.
n→∞ (n + 1)! n→∞

If x is positive, 1 < ec < ex (since ex is an increasing func-


ex|x|n+1
tion) and 0 < |Rn(x)| < .
(n + 1)!
ex|x|n+1 x |x|n+1
Now, lim = e lim = 0, and once again
n→∞ (n + 1)! n→∞ (n + 1)!
lim |Rn(x)| = 0.
n→∞
11

So the remainder term tends to zero as n → ∞, and hence


the Taylor series for ex converges to the function ex for all
x. That is,
∞ n
x x2 x3 x4 x
e = 1 + x + + + + · · · = ∑ for all real x.
2! 3! 4! n=0 n!

Substituting the number 1 for x we obtain a series of con-


stant terms for the number e itself:
Series for the number e

1 1 1 1
e = 1+1+ + + +··· = ∑
2! 3! 4! n=0 n!

The 10th partial sum gives


1 1 1
e ≈ 1+1+ + +···+ ≈ 2.7182818,
2! 3! 10!
which is accurate to the number of decimal places shown.
12 MATH 1021 Calculus of One Variable

The series representations of the functions ex, sin x and


cos x should be remembered. Here they are again:
Series of elementary functions

x x2 x3 x4
e = 1+x+ + + +···
2! 3! 4!
x3 x5 x7
sin x = x − + − + · · ·
3! 5! 7!
x2 x4 x6
cos x = 1 − + − + · · ·
2! 4! 6!
It is important to realise that these equations are identities
that hold for all values of x.
1

Taylor Series – Week8-Lect2

Here we are going to prove Euler’s formula


eiθ = cos θ + i sin θ
using Taylor series of complex numbers.

Series of complex numbers


The infinite series of complex numbers cn = an + ibn is de-
fined by
∞ ∞ ∞
∑ cn = ∑ an + i ∑ bn.
n=0 n=0 n=0
Provided the two series of real terms on the right-hand side
converge, we say that the series of complex terms con-
verges.

It can be shown that the exponential series


x x2 x3 x4
e = 1+x+ + + +···
2! 3! 4!
converges whenever the real number x is replaced by a
complex number x + iy.
2 MATH 1021 Calculus of One Variable

The complex exponential function


Therefore we can define the exponential function ez for
complex as well as real numbers, by the series:
2 3 4 ∞ n
z z z z z
e = 1+z+ + + +··· = ∑
2! 3! 4! n=0 n!

Substituting the purely imaginary number z = iθ


(where θ is real) into this infinite series formula for ez, and
using the fact that i2 = −1, we obtain
iθ (iθ )2 (iθ )3 (iθ )4
e = 1 + iθ + + + +···
2! 3! 4!
2 3 4
θ iθ θ iθ 5
= 1 + iθ − − + + +···
2! 3! 4! 5!
2 4 6 3 5 7
   
θ θ θ θ θ θ
= 1− + − +··· +i θ − + − +···
2! 4! 6! 3! 5! 7!

But for any real θ , we have seen that


θ2 θ4 θ6
cos θ = 1 − + − + · · · and
2! 4! 6!
θ3 θ5 θ7
sin θ = θ − + − + · · ·
3! 5! 7!
Hence we obtain Euler’s formula eiθ = cos θ + i sin θ
for all real θ .
3

The binomial series


The "binomial series" is the Taylor series of the function
(1 + x) p
where p is any real number.
It is a generalisation of the binomial theorem that we intro-
duced in Week 3.

To find the Taylor series, about 0, of (1 + x) p, we first list


the derivatives. and evaluate them at 0:
f (x) = (1 + x) p
f ′(x) = p(1 + x) p−1
f ′′(x) = p(p − 1)(1 + x) p−2
f ′′′(x) = p(p − 1)(p − 2)(1 + x) p−3
...

f (n)(x) = p(p − 1)(p − 2) · · · (p − n + 1)(1 + x) p−n

f (0) = 1
f ′(0) = p
f ′′(0) = p(p − 1)
f ′′′(0) = p(p − 1)(p − 2)
...

f (n)(0) = p(p − 1)(p − 2) · · · (p − n + 1)


4 MATH 1021 Calculus of One Variable

Therefore the Binomial series is

p(p − 1) 2 p(p − 1)(p − 2) 3


1 + px + x + x +······
2! 3!

p(p − 1)(p − 2) · · · (p − n + 1) n
= 1+ ∑ x
n=1 n!
The series converges to (1 + x) p whenever |x| < 1 for all
values of p.
However, it diverges if |x| > 1.

Example
When p = −1, we obtain the following series

1
(1 + x)−1 =
1+x

(−1)(−2) 2
=1 + (−1)x + x
2!
(−1)(−2)(−3) 3 (−1)(−2)(−3)(−4) 4
+ x + x +···
3! 4!

= 1 − x + x2 − x3 + x4 + · · ·

which is the same series we obtained before using the sum


of the geometric series.
5

Example
Another special case occurs when p is a positive integer.
In this case the factor (p − p) = 0 appears in the coefficient
of x p+1 and subsequent terms.

For example, with p = 3 the binomial series gives


3·2 2 3·2·1 3 3·2·1·0 4
(1 + x)3 = 1 + 3x + x + x + x +··· .
2! 3! 4!
The coefficient of x4 is zero, as are the coefficients of all
higher powers of x.
So we have the familiar binomial formula
(1 + x)3 = 1 + 3x + 3x2 + x3.

In general, the coefficient of xn in the Taylor series


for (1 + x) p is
p(p − 1)(p − 2) · · · (p − n + 1)
n!
and in the case that p is a positive integer this can also be
written as the binomial coefficient
 
p! p
= ,
n! × (p − n)! n
and the binomial series reduces to the binomial theorem:
p  
p n
(1 + x) p = ∑ x.
n=0 n
6 MATH 1021 Calculus of One Variable

A series for the inverse tan function


Suppose we want to find the Taylor series of tan−1 x.
The derivatives are going to be very messy after the third
derivative.
An alternative method of finding the Taylor series of
tan−1 x is to note that
d 1 1
Z
−1 −1
tan x = =⇒ dx = tan x +C,
dx 1 + x2 1 + x2
where C is an arbitrary constant.

In a previous example we saw that


1
= 1 − x + x2 − x3 + x4 − x5 + · · · for |x| < 1.
1+x
Replacing x by x2, we have
1 2 4 6 8 10
2
= 1 − x + x − x + x − x +··· for |x| < 1.
1+x

Now integrate this series term-by-term to obtain the fol-


lowing series for tan−1 x. We have
3 5 7 9 11
x x x x x
tan−1 x+C = x− + − + − +· · · for |x| < 1.
3 5 7 9 11
Substituting x = 0 into both sides gives C = 0.
7

Therefore, we get
−1 x3 x5 x7 x9 x11
tan x = x − + − + − +··· for |x| < 1.
3 5 7 9 11

We have integrated an infinite series term-by-term, and


claim that the resulting series converges to the integral of
1
for |x| < 1.
1 + x2

This result is not obvious at all and is proved in advanced


calculus courses.
However, the series shown above does converge to tan−1
for |x| ≤ 1.
π
A series for
4
Substituting x = 1 into the equation
−1 x3 x5 x7 x9 x11
tan x = x − + − + − +···
3 5 7 9 11
gives the remarkable formula:
π 1 1 1 1 1
tan−1 1 = = 1 − + − + − + · · · · · ·
4 3 5 7 9 11
This is very nice series for π /4.
However it converges very slowly and we need to take a
very large number of terms before π is calculated with any
degree of accuracy.
8 MATH 1021 Calculus of One Variable

Exercises
1) Show that the Taylor series for sinh x converges to sinh x
for all real x, by showing that the remainder term tends to
zero as n → ∞.

2) (a) Calculate the binomial series for the function


f (x) = (1 − x)−1/2
about x = 0.
(b) Hence find a series for (1 − x2)−1/2, and then a series
for sin−1 x by term-by-term integration.

Answer
(a)
(1 − x)−1/2 = 1 + 21 x + 3×1
4×2 x 2
+ 5×3×1 3
6×4×2 x + 7×5×3×1 4
8×6×4×2 x + · · · .

(b)
−1 1 x3 1.3 x5 1.3.5 x7
sin x = x+ + + 3 +···
2 3 22.2! 5 2 3! 7
1

The Riemann Integral – Week9-Lect2


Calculating Riemann sums

Why is it important?
It is important to become proficient at calculating Riemann
sums because they provide a basic method to calculate ap-
proximate values of definite integrals from which other,
more accurate techniques are derived.

General Riemann sums


In order to perform calculations, we now introduce a more
general idea of Riemann sum.
Then, the upper and lower Riemann sums introduced ear-
lier will appear as special cases of this construction.

As usual f (x) is a continuous function defined on the in-


terval [a, b] and introduce a partition of [a, b] of N equal
subintervals.
Let ci be any point in the ith subinterval, for 1 ≤ i ≤ N,
and form the sum of areas of rectangles of width ∆x and
height f (ci):
( f (c1) × ∆x)+( f (c2) × ∆x) + · · · + ( f (cN ) × ∆x)
N
= ∑ f (ci) × ∆x = SN
i=1
2 MATH 1021 Calculus of One Variable

Letting mi and Mi be the minimum and maximum values


of f on the ith subinterval, we certainly have
mi ≤ f (ci) ≤ Mi .

Now, multiplying by ∆x =⇒
mi ∆x ≤ f (ci) ∆x ≤ Mi ∆x ,
and adding up over all subintervals gives
N N N
∑ mi ∆x ≤ ∑ f (ci) ∆x ≤ ∑ Mi ∆x .
i=1 i=1 i=1

The sums ∑ mi∆x and ∑ Mi∆x are respectively the lower


and upper Riemann sums LN and UN , and therefore we get
the inequality:
N
LN ≤ ∑ f (ci)∆x ≤ UN .
i=1

The middle expression here is an example of a


General Riemann Sum for f (x) on the interval [a, b].
Its value obviously depends on the choice of the ci.

By taking N large enough, we can make LN and UN as close


as we like to the value of the definite integral.
3

Example
Use Riemann sums to estimate the integral
Z 2
sin x dx .
1
Use a partition of [1, 2] into 20 subintervals and calculate
the Riemann sum for each of the three cases:
a) ci is the left endpoint of the ith subinterval,
b) ci is the right endpoint of the ith subinterval,
c) ci is the midpoint of the ith subinterval.

Each subinterval has length 1/20 = 0.05, so the points


xi = 1.0 + 0.05 × i for 0 ≤ i ≤ 20,
will form a partition of the interval [1, 2].
The ith subinterval will then be the interval [xi−1, xi].

The three Riemann sums correspond to the choices


ci = xi−1, ci = xi, ci = xi−1 + 0.025 .
In each case we have to work out the sum
!
20 20
∑ sin(ci) ∆x = ∑ sin(ci) × 0.05 .
i=1 i=1
4 MATH 1021 Calculus of One Variable

This is quite easy with a programmable calculator or by


using a spreadsheet program like Excel.
Here is the resulting table, where the columns (1), (2), (3)
contain the values of sin(ci) for the three specified choices
of ci:
ci = xi−1 ci = xi ci = xi−1 + 0.025
i xi−1 (1) (2) (3)

1 1.000000 0.841471 0.867423 0.854714


2 1.050000 0.867423 0.891207 0.879590
3 1.100000 0.891207 0.912764 0.902268
4 1.150000 0.912764 0.932039 0.922690
5 1.200000 0.932039 0.948985 0.940806
6 1.250000 0.948985 0.963558 0.956570
7 1.300000 0.963558 0.975723 0.969944
8 1.350000 0.975723 0.985450 0.980893
9 1.400000 0.985450 0.992713 0.989391
10 1.450000 0.992713 0.997495 0.995415
11 1.500000 0.997495 0.999784 0.998952
12 1.550000 0.999784 0.999574 0.999991
13 1.600000 0.999574 0.996865 0.998531
14 1.650000 0.996865 0.991665 0.994576
15 1.700000 0.991665 0.983986 0.988134
16 1.750000 0.983986 0.973848 0.979223
17 1.800000 0.973848 0.961275 0.967864
18 1.850000 0.961275 0.946300 0.954086
19 1.900000 0.946300 0.928960 0.937923
20 1.950000 0.928960 0.909297 0.919416
0.954554 0.957946 0.956549

Once these numbers are entered, we can calculate the Rie-


mann sums by summing the columns and using the formula
!
20
∑ sin(ci) × 0.05 .
i=1

This gives the values shown in the bottom line of the table.
5

Note that in this example none of the three Riemann sums


give the lower or upper Riemann sum.

Sometimes the function is increasing and other times de-


creasing.
In some cases the maximum value of the function occurs
at the right of the subinterval, other times on the left, and
in one case (at π /2) inside the subinterval.

In this case it is easy to calculate this integral exactly:


Z 2 Z 2 d
sin x dx = (− cos x) dx
1 1 dx

= (− cos 2) − (− cos 1)

≈ 0.956449 .
6 MATH 1021 Calculus of One Variable

Properties of the Riemann integral


a) If m and M are the minimum and maximum values of f
on the interval [a, b], then
Z b
m × (b − a) ≤ f (x) dx ≤ M × (b − a) .
a
This is just the relation between the definite integral
and the upper and lower Riemann sums in the case
N = 1. There is a single interval equal to [a, b].

b) If c is a constant, then
Z b Z b
c f (x) dx = c f (x) dx .
a a
Let SN ( f ) and SN (c f ) be the corresponding Riemann
sums for the two functions f (x) and c f (x).
Then, from the definition of the Riemann sum that
SN (c f ) = cSN ( f ).
From the standard properties of limits,
Z b
c f (x) dx = lim SN (c f )
a N→∞
= lim cSN ( f )
N→∞
= c lim SN ( f )
N→∞
Z b
=c f (x) dx .
a
7

c) For functions f and g defined on the interval [a, b],


Z b Z b Z b
( f (x) + g(x)) dx = f (x) dx + g(x) dx .
a a a
let SN ( f ), SN (g) and SN ( f + g) be the corresponding
Riemann sums for f , g and f + g.

Therefore
N
SN ( f + g) = ∑ [ f (ci) + g(ci)] × ∆x
i=1 ! !
N N
= ∑ f (ci) × ∆x + ∑ g(ci) × ∆x
i=1 i=1
= SN ( f ) + SN (g) .

Then
Z b
( f (x) + g(x)) dx = lim SN ( f + g)
a N→∞
= lim (SN ( f ) + SN (g))
N→∞
= lim SN ( f ) + lim SN (g)
N→∞ N→∞
Z b Z b
= f (x) dx + g(x) dx .
a a
8 MATH 1021 Calculus of One Variable

d) If f is defined on the interval [a, c], and b is a point


between a and b, then
Z c Z b Z c
f (x) dx = f (x) dx + f (x) dx .
a a b
If we interpret the definite integral as an area, the fi-
nal formula is just the fact that the area over the inter-
val [a, c] is the sum of the areas over the two intervals
[a, b] and [b, c].
9

Reversing the Direction of Integration


Z b
So far we have only defined f (x) dx in the case where
a
a ≤ b.
We can easily extend the definition to the case a > b by
allowing ∆x = (b − a)/N to be negative.
From an algebraic point of view this has no effect on our
formulas.

Geometrically it means that in the Riemann sum areas of


rectangles above the axis are now negative, and areas be-
low become positive.
Since ∆x now has the opposite sign, the Riemann sum also
changes sign and in the limit as ∆x → 0 the same is true of
the definite integral.

We therefore conclude that


Z b Z a
f (x) dx = − f (x) dx .
a b
10 MATH 1021 Calculus of One Variable

One result of this is that the formula


Z c Z b Z c
f (x) dx = f (x) dx + f (x) dx
a a b
now holds whatever the order of the numbers a, b, c.

For example, starting with a ≤ b ≤ c and the relation


Z b Z c Z c
+ =
a b a
we can rearrange to get
Z b Z c Z c Z c Z b
= − = + .
a a b a c

This is essentially just


Z c Z b Z c
f (x) dx = f (x) dx + f (x) dx
a a b
again, except the point c no longer lies between a and b.
1

Fundamental Theorem of Calculus – Week10-Lect1

We now discuss the exact mathematical relation between


differentiation and integration. There are two parts to this
relation:
a) One part involves the derivative of an integral,
b) The other part deals with the integral of a derivative.
Together these make up the Fundamental Theorem of
Calculus.
We first consider the second part: what happens when we
integrate the derivative of a function?

The Fundamental Theorem of Calculus II


Let F(x) be a function defined on an interval [a, b] and sup-
pose that the derivative F ′(x) is continuous on [a, b]. Then
Z b
(0.0a) F ′(x) dx = F(b) − F(a) .
a

Recall that the definite integral of F ′(x) is the unique num-


ber which lies between the upper and lower Riemann sums
of F ′(x) for all subdivisions of the interval [a, b].
If we can show that the number F(b) − F(a) has the same
property, then (0.0a) is proved.
2 MATH 1021 Calculus of One Variable

For this we need the following theorem:

Mean Value Theorem


For a function F(x) defined on an interval [a, b] with con-
tinuous derivative F ′(x), there exists a point c somewhere
in the interval with the property that

′ F(b) − F(a)
F (c) = .
b−a
This picture illustrates its meaning:

f (b) b

f (a) b

a b

The dashed line is the secant line joining points (a, f (a))
and (b, f (b)).
In this graph there are two points c between a and b where
the tangent line has the same slope as the secant.
3

Proof of FTC 2
To prove formula (0.0a) we apply the MVT theorem as
follows:
Partition the interval [a, b] into N equal subintervals.
Label the division points as xi, with 0 ≤ i ≤ N, so that the
ith subinterval is [xi−1, xi] and
a = x0 ≤ x1 ≤ · · · ≤ xN−1 ≤ xN = b .

Let mi, Mi be the minimum and maximum values of F(x)


on this subinterval.
Let ∆x the length of the subintervals.

According to the Mean Value Theorem there exists a


point ci in the ith subinterval where

F(xi) − F(xi−1) = F ′(ci) × (xi − xi−1) = F ′(ci) × ∆x .

Adding up over the range 1 ≤ i ≤ N, the left side is

(F(x1) − F(x0)) + (F(x2) − F(x1)) + (F(x3) − F(x2)) + · · ·

· · · + (F(xN−1) − F(xN−2)) + (F(xN ) − F(xN−1)) .


4 MATH 1021 Calculus of One Variable

All the terms except F(x0) and F(xN ) appear twice, with
opposite signs. Therefore they cancel out, leaving only
F(xN ) − F(x0) = F(b) − F(a) .
Summing the right side just gives a Riemann sum for F ′(x)
over the interval [a, b]. We conclude that
N
∑ F ′(ci) × ∆x = F(b) − F(a) .
i=1

But any Riemann sum for the specified partition lies be-
tween the upper and lower Riemann sums, therefore
N
LN ≤ ∑ F ′(ci) × ∆x = F(b) − F(a) ≤ UN .
i=1

As N → ∞ both the upper and lower sums approach


Z b
the Riemann integral f (x) dx , and therefore
a
Z b
f (x) dx = F(b) − F(a) .
a

This completes the proof of Part 2 of the Fundamental The-


orem.
5

Notation
The change F(b) − F(a) of a function F over an interval is
often denoted by
F(b) − F(a) = [F(x)]ba .
The theorem then appears in the form
Z b
F ′(x) dx = [F(x)]ba .
a

The important thing about this result is that in order to eval-


uate the integral Z b
f (x) dx
a
we can look for a function F(x) with the property that
F ′(x) = f (x)
on the interval [a, b].

According to the fundamental theorem we then have


Z b Z b
f (x) dx = F ′(x) dx = F(b) − F(a).
a a
6 MATH 1021 Calculus of One Variable

The function F(x) is called an antiderivative of f (x).


The Fundamental Theorem of Calculus gives us a link be-
tween:
a) the area under the curve (in terms of Riemann sums)
and
b) reverse differentiation (finding an antiderivative).

Dependence on the endpoint


Let f be a continuous function defined on an interval [a, b]
of the real line.
For any point x in the interval we have the definite integral
Z x
(0.0b) F(x) = f (t) dt .
a
over the smaller interval [a, x], so we can think of it as a
function F(x) of x.

Notice that we have used t as the variable of integration.


This avoids confusion with the use of x as an endpoint of
the interval of integration.
7

The second part of the Fundamental Theorem tells us about


the result of integrating the derivative of a function.
We now look at what happens when we try to differentiate
an integral.

The Fundamental Theorem of Calculus Part I


Let f (x) be a continuous function defined on an inter-
val [a, b] of the real line and let F(x) be defined by
Z x
F(x) = f (t) dt .
a
Then F(x) is a differentiable function of x and
F ′(x) = f (x)
for all x in the interval.

Recall the definition of derivative of a function F at a


point x is the limit,
′ F(x + h) − F(x)
F (x) = lim
h→0 h
In this case
Z x+h
F(x + h) = f (t) dt
Za x Z x+h
= f (t) dt + f (t) dt
a x
Z x+h
= F(x) + f (t) dt ,
x
8 MATH 1021 Calculus of One Variable

so Z x+h
F(x + h) − F(x) = f (t) dt ...........(1)
x
Now assume h > 0 and let M and m be the maximum and
minimum of f (t) for t between x and x + h.
Then from the property (see Lecture 2, Week 9)
Z b
m × (b − a) ≤ f (x) dx ≤ M × (b − a) ,
a
we have Z x+h
m×h ≤ f (t) dt ≤ M × h .
x

Dividing by h and using equation (1), we get


F(x + h) − F(x)
m≤ ≤ M.
h
This inequality can be derived similarily in the case h < 0.
By the continuity of f both m and M must converge to f (x),
as h → 0.
But the middle term in the inequality is sandwiched be-
tween m and M.
So this must converge to f (x) also.
This shows that the limit exists, and F(x) is differentiable
with derivative f (x).
9

The first part of the Fundamental Theorem confirms that


differentiation and integration are inverse processes.
Differentiating an integral gives back the original function.
The standard notation for the antiderivative of a func-
tion f (x) is Z
f (x) dx .
In this form the antiderivative is also called the
indefinite integral of f .

Note that there is always an ambiguity in the choice of an-


tiderivative.
We can add an arbitrary constant without changing the fact
that the derivative is f (x).
For example, we write
Z
cos x dx = sin x +C ,

to indicate that any function of the form sin x + C is an


antiderivative for cos x.
10 MATH 1021 Calculus of One Variable

Example Z x
Sketch the graph of the function F(x) = sint dt on the
0
interval [0, 2π ].
The graph of sin x on this interval is shown as the solid line
in Figure 1.

F(x)

Area F(x) sin x


0 x

0 π 2π
Figure 1:

At x = 0 the interval of integration has zero length, so


F(0) = 0.
Since sin x is positive on [0, π ] the function F(x) is increas-
ing over this interval.
Similarly F(x) is decreasing on the interval [π , 2π ].
Together these facts show that F(x) attains a maximum at
x = π.
We conclude that the graph of F(x) has the general shape
shown by the broken line in Figure 1.
1

The natural logarithm and exponential functions


Week10-Lect2

Natural logarithm
The function f (x) = 1/x is defined and continuous on the
interval 0 < x < ∞.
According to the Fundamental Theorem of Calculus we
can define an antiderivative ln x of f (x) by the formula
Z x1
ln x = dt .
1 t
We take this as the definition of the natural logarithm.

This formula is valid for all x in the range 0 < x < ∞.


Figure 1 shows the graph of the function 1/x and its rela-
tion to ln x.

Area=ln x

1 x

Figure 1:
2 MATH 1021 Calculus of One Variable

Then ln x is the unique antiderivative of 1/x taking the


value 0 at x = 1.
Some of these properties are immediately obvious:
Z 1 1
• ln 1 = dt = 0.
1 t
• ln x > 0 if x > 1,

• ln x < 0 if 0 < x < 1.

NOTE
We know that ln x is an antiderivative for 1/x for x > 0.
If x < 0 then ln(−x) is defined, and the chain rule gives
  
d 1 d(−x) −1 1
ln(−x) = = = .
dx −x dx −x x
We can combine the cases x < 0 and x > 0 into a single
formula
d 1
ln |x| =
dx x
valid for all x 6= 0. Here we use the function |x|, where as
usual (
x, if x ≥ 0,
|x| =
−x, if x < 0.
3

Proof of ln(ax) = ln(a) + ln(x)

Define the function g(x) = ln(ax).


Then using the chain rule,
  
′ 1 d(ax) a 1
g (x) = = = .
ax dx ax x
This shows that g(x) is also an antiderivative of 1/x, and
hence differs from the function ln x itself by a constant:
ln(ax) = ln(x) +C
for all x.

By putting x = 1 we find that


ln(a) = ln(1) +C,
and, since ln(1) = 0 =⇒ C = ln(a).

Therefore ln(ax) = ln(a) + ln(x) ,

for all a, x > 0.


4 MATH 1021 Calculus of One Variable

Similarly, for any a > 0 and integer n ≥ 1 we also have


ln(an) = ln(a · a · · · · · a)

= ln a + ln a + · · · + ln a

= n ln a .

Next, we define a−n = 1/an therefore


ln(an) + ln(a−n)

= ln(an × a−n) = ln(1) = 0 .

Hence ln(a−n) = −n ln a.
5

The Inverse of ln x (the exponential function)


From the definition we have d(ln x)/dx = 1/x > 0 for all
x > 0, so ln x is an increasing function of x.
Therefore it is one-to-one on its domain of (0, ∞).

Also, the range of the function ln x is the whole real line,


so ln x can take any real value.
Therefore, the function x → ln x is a bijection and hence it
has an inverse function.

This inverse is known as the exponential function.


It is denoted by exp(x).
Its domain is R and its range is (0, ∞).
Recall that the graph of a function and its inverse are al-
ways symmetric about the line y = x.
y = ex
y=x

y = ln x
6 MATH 1021 Calculus of One Variable

Since exp and ln are inverse to each other, y = ln x if and


only if x = exp(y). Equivalently,
ln(exp(x)) = x for all x ∈ R

and

exp(ln(x)) = x for all x ∈ (0, ∞).

Recall the property ln(ax) = ln(a) + ln(x) .


Then,

ax = exp(ln(ax)) = exp ln(a)+ln(x) for all a, x ∈ (0, ∞).
Letting r = ln(a) and s = ln(x) then
a = exp(r) and x = exp(s),
and we get the well known property
exp(r) exp(s) = exp(r + s).
7

Derivative of exp(x)
Consider the identity x = ln(exp(x)) .
Using the chain rule we get
1 d exp(x)
1= ,
exp(x) dx
which is easily rearranged into the formula

d exp(x)
= exp(x) .
dx

NOTE This shows that the exponential function is a solu-


tion to the differential equation

d f (x)
= f (x) .
dx
The property that the derivative is the same as the
original function is said to be characteristic
of the exponential function.
8 MATH 1021 Calculus of One Variable

The General Exponential Function


We have already used the formula
ln(an) = n ln(a) ,
valid for any positive integer n and real number a > 0.

Applying the exponential function gives


an = exp(n ln(a)) .

In this formula we have assumed that n is a positive integer,


but the expression on the right is defined without any such
restriction:
n can be any real number.

This suggests that we use this formula to define ax for any


pair of real numbers a, x (with a > 0), so
ax = exp(x ln(a)) .
For fixed a this is a continuous and differentiable function
of x.
It also coincides with the usual definition of an when x is a
positive integer.
9

The number e
What is the unique number a with the property that
ln(a) = 1 ?

Since the exponential is inverse to the logarithm we see


that
a = exp(1).
This number is called e and has the approximate value
e ≈ 2.7182818284590452354 . . . .
In particular, we see that
ex = exp(x ln(e)) = exp(x) .
ex is the standard notation for the function exp(x).
10 MATH 1021 Calculus of One Variable

Example
Show that the definition of the general exponential function
still satisfies
(ab)c = acbc
for a, b > 0 and all c in R.

From the definition, we have


(ab)c = exp(c ln(ab)) (definition)

= exp(c(ln a + ln b)) ln(ax) = ln(a) + ln(x)

= exp(c ln a + c ln b) expand

= exp(c(ln a)) exp(c(ln b)) exp(r) exp(s) = exp(r + s)

= ac bc (definition).
11

Growth Rates
One important properties of a function f (x) is its relative
growth rate. We say:
a function f (x) grows faster than g(x) as x → ∞ if
f (x)
lim = ∞.
x→∞ g(x)

This is equivalent to the condition g(x)/ f (x) → 0 as x → ∞.

For example, if a > b then xa grows faster than xb, since


xa
lim b = lim xa−b = ∞
x→∞ x x→∞

(since a − b > 0).

The function ln x grows more slowly than any positive


power of x.
Figure 2 shows the graph of ln x along with the graphs of
xa for the cases a = 0.5 and a = 0.2.
3

x0.5 ln x
2

x0.2
1

0
0 2 4 6 8 10

Figure 2:
12 MATH 1021 Calculus of One Variable

At least up to x = 10 the logarithm seems to be grower


faster than x0.2.
But the power function eventually overtakes it, as the fol-
lowing Theorem states:

Theorem 1 The function ln x grows more slowly than any


positive power of x: for any a > 0 we have
ln x
lim = 0.
x→∞ xa
1

Integration Techniques – Week11-Lect2

Partial fractions
In many applications such as population growth, chemical
reactions, etc. we have to calculate integrals of the form
1
Z
dx .
(x − a)(x − b)
Functions such as
1
,
(x − a)(x − b)
are special cases of the so-called rational functions.

Rational functions are expressions of the form f (x)/g(x),


where f (x) and g(x) are polynomials. For example
2x2 − 1
.
x(x − 1)(x + 1)
First note that the degree of the denominator is 3, while the
degree of the numerator is 2.

Another example is
x4 + 2x + 2
.
x3 − x2 + x − 1
In this case the numerator has degree 4 and the denomina-
tor has degree 3.
2 MATH 1021 Calculus of One Variable

The method of partial fractions allows us to find constants


a and b such that
2x − 1 a b
= + .
(x − 1)(x + 1) x − 1 x + 1

Example
Find the common denominator by cross-multiplying
2x − 1 a(x + 1) + b(x − 1)
= .
(x − 1)(x + 1) (x − 1)(x + 1)
Now, the denominators in both expressions are the same,
therefore the numerators must also be the same,
2x − 1 = a(x + 1) + b(x − 1)
for all values of x.

Collecting terms on the left side, gives


2x−1 = (a+b)x+(a−b) =⇒ a+b = 2, a−b = −1.
Solving simultaneously gives a = 1/2 and b = 3/2. There-
fore
2x − 1 1/2 3/2
= + .
(x − 1)(x + 1) x − 1 x + 1
3

We can now calculate the integral


2x − 1 1/2 3/2
Z Z Z
dx = dx + dx
(x − 1)(x + 1) x−1 x+1
1 3
= ln(x − 1) + ln(x + 1) +C.
2 2

There is a handy shortcut method, as follows. Once we


equate the two numerators,
2x − 1 = a(x + 1) + b(x − 1) ,
to find a, put x = 1.
Then the term (x − 1) vanishes and we get
2(1) − 1 = a(2) which gives a = 1/2.
To find b, put x = −1, the term (x + 1) vanishes and we get
2(−1) − 1 = b(−2) which gives b = 3/2, same as before.

The method of partial fractions only applies to rational


functions
where the degree of the numerator is strictly less than
the degree of the denominator.
If this is not the case, we must divide the numerator by the
denominator (using polynomial division).
4 MATH 1021 Calculus of One Variable

Example
Find the partial fraction expansion of
x4 + 2x + 2
.
x3 − x2 + x − 1

Using long division, gives


x + 1
x3 − x2 + x − 1 x4 + 2x + 2
x4 − x3 + x2 − x
x3 − x2 + 3x + 2
x3 − x2 + x − 1
2x + 3
The process stops when the remainder has degree less than
the degree of the denominator.

In this case the quotient is x + 1 and the remainder 2x + 3.


That is, we have shown that
x4 + 2x + 2 = (x + 1) × (x3 − x2 + x − 1) + (2x + 3)
or equivalently,
x4 + 2x + 2 2x + 3
= x+1+ 3 .
x3 − x2 + x − 1 x − x2 + x − 1
5

Now we can use partial fractions on the rational function.


First factorise the denominator,
2x + 3 2x + 3
= .
x3 − x2 + x − 1 (x2 + 1)(x − 1)
Because of the quadratic term x2 + 1, the partial fraction
expansion is now
2x + 3 ax + b c
2
= 2
+ .
(x + 1)(x − 1) x + 1 x − 1

Multiplying through by (x2 + 1)(x − 1) gives


2x + 3 =(ax + b)(x − 1) + c(x2 + 1)
=(a + c)x2 + (b − a)x + (c − b),
and we deduce that a + c = 0, b − a = 2 and c − b = 3.
Solving simultaneously we find that
a = − 52 , b = − 21 and c = 25 .
6 MATH 1021 Calculus of One Variable

Therefore
2x + 3 − 25 x − 12 5
2
= + .
(x2 + 1)(x − 1) x2 + 1 x−1

x4 + 2x + 2
Z
dx
x3 − x2 + x − 1

5 x 1 1 5 dx
Z Z Z Z
= x + 1 dx − dx + dx + .
2 x2 + 1 2 x2 + 1 2 x−1

The second integral on the right hand side is a standard


integral, tan−1(x).
The third is easily found (after the straightforward substi-
tution u = x − 1) to be ln |x − 1|.
The first requires the substitution v = x2 + 1, after which
the answer is found to be 12 ln(x2 + 1).
7

Partial fractions can be used with any number of linear fac-


tors in the denominator.
Example

2x2 − 1
.
x(x − 1)(x + 1)
First note that the degree of the denominator is 3, while the
degree of the numerator is 2.
We can therefore apply partial fractions:
2x2 − 1 a b c
= + + .
x(x − 1)(x + 1) x x − 1 x + 1

Equating the numerators,


2x2 − 1 = a(x − 1)(x + 1) + bx(x + 1) + cx(x − 1).
To find a, put x = 0. Then two of the terms on the righthand
side vanish, giving a = 1.
To find b, put x = 1 and we find that b = 12 .
To find c we put x = −1 and we find c = 12 .
So we have
1 1
2x2 − 1 1 2 2
= + + .
x(x − 1)(x + 1) x x − 1 x + 1
8 MATH 1021 Calculus of One Variable

Reduction formulas
In a previous example, we found an antiderivative for the
function x3 sin x by repeated application of integration by
parts.
Sometimes it is useful to make this process more system-
atic. For example, if we want to evaluate
Z
x10ex dx

we can use integration by parts ten times but this is very


tedious.

We can reduce the effort by performing the integration for


a general power xn of x. For n ≥ 1 set
Z
In = xnex dx.

Integration by parts with u = xn and dv/dx = ex gives


Z
In = xnex − nxn−1ex dx = xnex − nIn−1.
9

The formula In = xnex − nIn−1 relating In and In−1 is an ex-


ample of a reduction formula.
Starting with I0 we can apply this formula with n =
1, 2, 3, 4 . . . to generate successive In directly.

For example
I0 = ex,
I1 = xex − ex,
I2 = x2ex − 2(xex − ex)
= (x2 − 2x + 2)ex,
I3 = x3ex − 3(x2 − 2x + 2)ex
= (x3 − 3x2 + 6x − 6)ex.
In each case we get the general solution by adding on the
usual arbitrary constant.
10 MATH 1021 Calculus of One Variable

We can apply the same technique to definite integrals. An


interesting example involves the integral
Z π /2
an = (sin x)n dx
0
for a general positive integer n.
For small values of n the integral is easy to evaluate. For
example,
Z π /2
π
a0 = dx = ,
0 2
while
Z π /2  π /2
a1 = sin x dx = − cos x 0 = 1.
0
11

For n > 1 we can try to use integration by parts to get a


reduction formula.
For this we first have to identify the factors u and dv/dx in
(sin x)n.
If dv/dx = sin x then v = − cos x and u = (sin x)n−1.
This gives
Z π /2
π /2
an = −(sin x)n−1 cos x 0 + (n−1)(sin x)n−2(cos x)2 dx.
 
0

Since sin x = 0 when x = 0 and cos x = 0 when x = π /2,


the first term on the right is zero.
We can use the standard formula cos2 x = 1 − sin2 x to
rewrite the remaining term:
Z π /2
n−2 2

an = (n − 1)(sin x) 1 − (sin x) dx
0
Z π /2 Z π /2
n−2
= (n − 1)(sin x) − (n − 1)(sin x)n dx
0 0
= (n − 1)an−2 − (n − 1)an.
This immediately rearranges to give
n−1
nan = (n − 1)an−2 or an = an−2
n
for all n > 1.
12 MATH 1021 Calculus of One Variable

Note that this reduction formula gives two sequences of


numbers, one for n even and the other for n odd.
For example
π
a0 =
2
π 1
a2 = ×
2 2
π 1 3
a4 = × ×
2 2 4
π 1 3 5
a6 = × × ×
2 2 4 6
..
π 1 3 5 2n − 1
a2n = × × × × · · · × ,
2 2 4 6 2n

while the odd sequence looks like


a1 = 1
2
a3 =
3
2 4
a5 = ×
3 5
2 4 6
a7 = × ×
3 5 7
..
2 4 6 2n
a2n+1 = × × × · · · × .
3 5 7 2n + 1
1

Week12-Lect1
Applications of the Riemann Integral

In Week 9, we used Riemann sums to calculate the area


under a curve y = f (x) between two points a and b.
The idea was to subdivide the area into a large number of
small rectangles whose areas are easy to calculate.

Then, we added all the areas together to obtain a Riemann


sum that gives an approximation to the total area.
The final step was to take the limit as the number of rectan-
gles tends to infinity and obtain the exact value of the area
under the curve.

We called this number the Riemann integral or the definite


integral of the function f (x) between the limits a and b,
and denoted it by Z b
f (x) dx .
a
2 MATH 1021 Calculus of One Variable

In this chapter we apply a similar method to calculate the


a) Area between two curves and
b) Volumes of solids of revolution.

Area between two curves


Find a formula for the area between two curves y = f (x)
and y = g(x) over the interval a ≤ x ≤ b.

f (x)

∆x

g(x)

Figure 1:
3

Consider a thin strip of width ∆x and of approximate length


f (x) − g(x). Then
Area of the strip ≈ [ f (x) − g(x)]∆x
and the Riemann sum gives
Total area ≈ ∑ [ f (x) − g(x)] ∆x
We then find lim∆x→0 and the Riemann sum becomes the
definite integral
Z b
[ f (x) − g(x)] dx.
a
4 MATH 1021 Calculus of One Variable

Solids of revolution: The disk method

For solids of revolution, we divide the volume into smaller


sections whose volumes are easy to calculate and then add
them all up to obtain Riemann sums.
By taking the limit as the number of sections tends to infin-
ity, we obtain a definite integral that can be evaluated using
the Fundamental Theorem of Calculus.

Suppose we have a continuous function f (x) > 0 defined


on the interval a ≤ x ≤ b. Consider the region bounded by
a function f (x) > 0, the x-axis, the lines x = a and x = b,
and the graph of f .

f (x)

Figure 2:
5

Now imagine that this region is rotated around the x-axis,


sweeping out a 3-dimensional solid of revolution.
We want to calculate the volume of this solid.

f (x)
∆x

Figure 3:

If [a, b] is partitioned into N equal subintervals, then each


subinterval has length ∆x = (b − a)/N.
Let mi and Mi be the minimum and maximum values
of f (x) on the ith subinterval.
If we take the rectangle of height mi based on this subin-
terval and rotate it around the x-axis it sweeps out a disk
of thickness ∆x and radius mi whose volume is
Vi = π m2i × ∆x .
6 MATH 1021 Calculus of One Variable

Adding up all the volumes, we get the sum


N
∑ π m2i × ∆x .
i=1

for the function Similarly, we get the upper Riemann sum


N
∑ π Mi2 × ∆x .
i=1

The above sums are the Riemann lower and upper sums of
the function
F(x) = π f (x)2.
and therefore
N N
∑ π m2i × ∆x ≤ V ≤ ∑ π Mi2 × ∆x .
i=1 i=1

Since the definite integral is the only number that satisfies


all these inequalities, we conclude that
Z b
V= π f (x)2 dx .
a
This method of calculating volumes is called the
disk method.
7

Example
Find a formula for the volume of the solid generated by
rotating the graph of the function
y = sin x, 0≤x≤3
about the x-axis. Express the answer as a definite integral.

We may just apply the formula


Z b Z 3
2
V= π f (x) dx = π (sin x)2 dx.
a 0
However, it is very useful to work it out as follows.
Slice the area under the graph of sin x on the interval [0, 3]
into thin vertical strips.
A typical such strip has width ∆x and approximate height
sin x.
8 MATH 1021 Calculus of One Variable

Rotation of this strip about the x-axis generates a disk of


approximate radius sin x and thickness ∆x.
So
Volume of disk ≈ π (sin x)2∆x .
As the strips are made narrower and narrower the sum of
their volumes (over the interval 0 ≤ x ≤ 3) converges to-
wards the integral
Z 3
V= π (sin x)2 dx.
0
9

A Simpler way to obtain the formula

Between points x and x + ∆x the volume ∆V of the solid of


rotation is approximately that of a disk of radius f (x) and
thickness ∆x and is given by
∆V ≈ π f (x)2∆x .

f (x)
∆x

Figure 4:

The total volume V is then the sum of volumes of the indi-


vidual disks, so
T OTAL VOLUME V = ∑ ∆V ≈ ∑ π f (x)2∆x .
As the number of subintervals increases and the thickness
of the disks is decreased towards zero, the terms on the
right are Riemann sums converging to the definite integral
Z b
2
V = lim ∑ π f (x) × ∆x = π f (x)2 dx .
∆x→0 a
1

Week12-Lect2
Applications of the Riemann Integral

The shell method


We now want to find the volume swept out when the region
is rotated around the vertical y-axis instead of the horizon-
tal x-axis.
Rotating a thin rectangle about the y-axis generates a cylin-
drical shell of approximate height f (x) and thickness ∆x.

f (x)

a x b

Figure 1:

We need an approximate formula for the volume of the


shell lying between radii x and x + ∆x.
We can imagine cutting through it and flattening it out into
a rectangle of width 2π x (the circumference of the cylin-
der) and height f (x) (the height of the cylinder).
2 MATH 1021 Calculus of One Variable

Therefore the volume of this shell is


∆V ≈ 2π x × f (x) × ∆x.

Summing up over the subintervals of a partition of [a, b]


gives
V ≈ ∑ 2π x f (x) ∆x .
Letting ∆x → 0 gives the formula
Z b
VOLUME V = 2π x f (x) dx .
a

Sometimes, both the disk and shell methods can be used to


find the volume of the same solid.
Both methods will give the same result if correctly applied,
but is often the case that one method will lead to easier
calculations than the other.
3

Example
Find a definite integral for the volume of a donut with cir-
cular cross-section, inner hole of radius r and an outer ra-
dius of R.

In order to simplify the calculations we introduce the con-


stants
R−r R+r
a= and b = .
2 2
These correspond to the dimensions shown in Figure 2,
which shows a cross-section through the donut.

a
p
b x 2 a2 − (x − b)2

R r

Figure 2:
4 MATH 1021 Calculus of One Variable

Take a cylindrical shell of radius x and thickness ∆x around


the donut’s axis of symmetry.
Simple
p trigonometry shows that the height of this shell is
2 a2 − (x − b)2.
To estimate the volume of this cylinder imagine that
itpis cut and rolled out into a rectangle of dimensions
2 a2 − (x − b)2 by 2π x.

Since the thickness is ∆x, this contributes approximately


p
4π x a2 − (x − b)2 ∆x
to the total volume.
Converting to an integral we end up with the formula
Z R p
4π x a2 − (x − b)2 dx
r
for the total volume.

You might also like