Professional Documents
Culture Documents
MATH203 Lecture Notes 2015
MATH203 Lecture Notes 2015
1.1
Introduction
You may also have met interval notation. Given the reals numbers a and b.
(a, b) = { x R | a < x < b }
(a, b] = { x R | a < x b }
[a, b) = { x R | a x < b }
[a, b] = { x R | a x b }
(, b) = { x R | x < b }
(, b] = { x R | x b }
(a, ) = { x R | a < x }
[a, ) = { x R | a x }
(, ) = R
1.2
Most people are familiar enough with the trigonometric function that no revision is really
necessary. Fewer people, however, recall the hyperbolic versions as well, which is a pity as
they are simpler in a way. Recall the basic denitions.
ex ex
2
ex + ex
cosh x =
2
sinh x =
It is easy to see that the derivative of sinh x is cosh x and the derivative of cosh x is sinh x.
The following are also well known, and can easily be checked if you dont recall them.
cosh2 x sinh2 x = 1
sinh 2x = 2 sinh x cosh x
cosh 2x = cosh2 x + sinh2 x
= 2 cosh2 x 1
= 1 + 2 sinh2 x
Exercise When rst introduced, these functions seem odd and out of place. In fact, we have
met them before. In an important sense these are just the ordinary trigonometric functions!
But to see that we need to use complex numbers! Verify each of the following.
sinh(ix) = sin x
cosh(ix) = cos x
sin(ix) = sinh x
cos(ix) = cosh x
This is just one of the reasons why calculus should really be done with complex numbers.
Sadly, we will not have time to see the benets, except for small points like this one.
1.3
Review of Integration
The most important fact to remember about integration is that it has two aspects that are
connected by the Fundamental Theorems of Calculus. Our rst brush with integration is via
anti-dierentiation: If F (x) = f (x), then we call F (x) an anti-derivative of f (x). We should
also recall that F (x) is not the anti-derivative because we can add any constant to F (x) and
still obtain an anti-derivative of f (x). The second time we meet integration is in the guise
of the denite integral. Once we have those two aspects we can state the most important
results in calculus.
1.1 First Fundamental Theorem of Calculus Given the function f (x), if we dene
x
f (t) dt
F (x) =
a
x
If we rewrite the second theorem in the form a f (t) dt = F (x) F (a) then we can see
the dierentiating rst and then integrating takes us back to where we started, except for the
addition of a constant, the F (a). The other tells us that integrating and then dierentiating
takes exactly back to where we started.
We all have enough experience now to know that although dierentiation is straightforward, but complicated at times, it is integration that causes the most headaches. Indeed
there are some integrals that we cannot evaluate. The most famous example being the one
coming from the normal distribution that you will meet in statistics
2
ex dx
Chapter 1
You should be familiar with the following methods of integration, it will be assumed without
comment that you can evaluate integrals using these methods.
(1)
You should be able to nd direct anti-derivatives. For example,
3
3x3 sin x + sec2 x dx = x4 + cos x + tan x + c1
4
In particular, you should recall that integration is linear, that is
af (x) + bg(x) dx = a f (x) dx + b g(x) dx,
(2)
(3)
x x + 1 dx = (u 1) u du
3
1
= u 2 u 2 du
2 3
2 52
u u 2 + c3
5
3
2
2
5
3
= (x + 1) 2 (x + 1) 2 + c3
5
3
2
=
x + 1(x + 1)(3(x + 1) 5) + c3
15
2
=
x + 1(x + 1)(3x 2) + c3
15
The next method requires a little more work. We recall the product rule for dierentiation, in the form
(uv) = u v + uv
We may rearrange this to obtain
u v = (uv) uv
On integration we obtain
(uv) uv dx
= (uv) dx uv dx
u v dx = uv uv dx (+constant)
u v dx =
The constant comes from the integral of (uv) , it is important to remember that it is there
but we usually leave it out to remember the usual method of integration by parts
u v dx = uv uv dx
Although the following is just as good.
uv dx = uv u v dx
Example To evaluate
x sin x dx = x( cos x) 1( cos x) dx
= x cos x + cos x dx
= x cos x + sin x + b
There are various tricks with integration by parts, you have met some and these will
be refreshed in the tutorial. The nal trick we will meet is the method of partial fractions.
1.4
Partial Fractions
As the name suggests this method applies to integrands that are in the form of fractions. In
fact we need to be a bit more specic than that. The method of partial fraction only applies
to fractions made up from polynomials, that is, we will be considering integrals of the form
2x3 5x2 + 6x 8
dx
x5 + 3x4 5x3 + x2 8x + 9
(2)
r(x)
,
We can integrate q(x) directly, so it only remains to nd the integral of d(x)
where the degree of the numerator is less than the degree of the denominator.
We now need to factorise the denominator. In reality this will be a very, very
dicult process, and is sometimes impossible to actually carry out, as youll see
in MATH216. For this unit we will organise things so that the denominator
factorises relatively easily. One fact that is important to keep in mind, but is
Chapter 1
very hard to actually prove, is that all polynomials using real numbers can be
factorised as a product of degree one terms and degree two terms.
r(x)
, using the method of partial fractions that will be
We split the last term, d(x)
explained in a moment.
(4)
Finally we integrate each of the resulting terms.
As long as you can factorise the denominator it is possible to integrate any function of the
form n(x)
with polynomials top and bottom. Sadly, as youll see, the details can get a bit
d(x)
messy.
(3)
(x 1)(x + 2)
3(x 1) 3(x + 2)
The other alternative is to expand the polynomials and equate coecients.
1 = a(x + 2) + b(x 1)
1 = (a + b)x + (2a b)
Thus
a+b=0
2a b = 1
These can be solved to nd the same solution as above.
Exercise This will work with any number of factors. Repeat the above for the frac1
.
tion (x1)(x+2)(x+3)
The rst problem arises when we have degree one terms but some are repeated. There
is a quick trick we can use in this case: If a term appears to the power n in the denominator
then we may have a term with each power of that term up to degree n. It is possible to prove
this, but this is easier to remember than prove.
* Some object that the initial fractions forbid the use of x = 1 and x = 2, however
we can avoid this problem. The equation 1 = a(x + 2) + b(x 1) is an equality between
polynomials that is true for all points except possibly 1 and 2. However, if two polynomials
agree at an innite number of points then they agree everywhere. Thus these polynomials
agree at 1 and 2 and we can use the easy method.
Example Write (x1)12 (x+2) as the sum of simpler fractions. Here the target will have terms
with all powers of (x 1) up to degree 2.
1
a
b
c
=
+
+
2
2
(x 1) (x + 2)
x 1 (x 1)
x+2
If we had a cube term, then there would be 3 powers to consider, and so on.
We multiply again to obtain
1 = a(x 1)(x + 2) + b(x + 2) + c(x 1)2
Letting x = 1 we nd b = 13 , letting x = 2 we nd c = 19 . At this point we seem to hit a
wall, we could revert to equating coecients but this time there is another trick. We know
that
1
1
1 = a(x 1)(x + 2) + (x + 2) + (x 1)2
3
9
so pick another value for x, say we try x = 0.
1 = 2a +
2 1
+
3 9
and we nd that a = 19 .
1
1
1
1
=
+
+
2
2
(x 1) (x + 2)
9(x 1) 3(x 1)
3(x + 2)
Again we might use the equating coecients method if we prefer.
Finally we might have a quadratic term on the bottom line. The dierence here will
be that the top line has degree less than the bottom and so our term will look like xax+b
2 + .
Example Write (x1)(x12 +x+1) as the sum of simpler fractions. As mentioned above the
simplication will look like the following.
a
bx + c
1
=
+
(x 1)(x2 + x + 1)
x 1 x2 + x + 1
We multiply to remove the denominators.
1 = a(x2 + x + 1) + (bx + c)(x 1)
We can only nd the value of a easily in this case. If we let x = 1 then we nd a = 13 . To
nd the others we can either equate coecients or chose two other values for x and solve the
resulting equations. This time we equate coecients.
1 2
(x + x + 1) + (bx + c)(x 1)
3
3 = x2 + x + 1 + (bx + c)(3x 3)
= (3b + 1)x2 + (1 3b + 3c)x + 1 3c
1=
4
(x+2)(x2 +3)
Chapter 2
Functions of Several Variables
2.1
In this unit we will be concentrating upon functions whose domain is a subset of Rn , usually
R2 , and whose codomain (and hence their range) is a subset of R. That is, our functions will
usually be functions of several variables but whose values are a single real number.
Examples The following are all functions of several variables.
The volume of a cylinder:
V = V (r, h) = r 2 h.
The area of a rectangle:
A = A(h, w) = hw.
Or anything similar to the following:
f (w, x, y, z) = 2w + sin(x + y) log
3
x cos y
x2 + z 2 + 1
.
y + 1.
What is the largest domain we couldpossible have? We know that log(x) does not make
sense unless x > 0 while to evaluate y + 1 we need y 1. Thus the largest domain we
could have is
D = { (x, y) | x > 0, y 1 }
= (0, ) [1, )
This set is sometimes called the domain of denition of f . (Also note that the interval
notation is much shorter but much harder to decipher.)
As with functions f : R R the range of f is the set of values that f attains and is
often quite hard to nd. (In the last example the range is the whole of R.)
With functions of one variable we have seen that sketches of the graph of the function
help us to notice some properties of the function. These sketches can be drawn as we only
need one dimension for the domain and one for the range and our pages are two dimensional.
A function f : R2 R can only be successfully drawn on a two dimensional page if we use
our imagination. As we need two dimensions for the domain and one for the codomain we
have to invent a new dimension on the page. The convention is that the x-axis is drawn
coming out of the page toward the reader. This is shown by drawing the axis at an angle of
/6 to the vertical. For example suppose we plot the point (1, 3, 2).
MATH203: W. N. Franzsen (10/2/2015).
z
3
2
(1, 3, 2)
1
y
1
1
2
3
x
So we can plot points with reasonable success, but how to sketch a function f : R2 R? As
with functions of one variable we sketch the surface
z = f (x, y)
where z is represented by the height above the point (x, y).
Exercise Try to sketch the surface z = x2 y 2 .
The sketches below show the surface z = x2 + y 2 and demonstrate the two easiest ways
of depicting a surface in three dimensions. In the rst method we draw the cross-sections we
get by slicing the surface vertically, while in the second we slice horizontally.
Chapter 2
Putting the two together gives an even better idea of the shape.
Surface sketching is not part of this unit but the ideas behind both methods will be
used at various times. The rst method being the one we will see most. The second method
is also used on all maps. Take a surface
z = f (x, y),
for example z = x2 + y 2 + 2. We can cut this surface at any height. If we cut at the height
z = 6 we obtain a cross-section of the surface. In the case z = 6 we nd that 6 = x2 + y 2 + 2
and so we obtain the cross-section z = 6 and x2 + y 2 = 4. This cross-section is a circle with
radius 2. If we ignore the fact that the circle lies in the plane z = 6 we get a level curve.
Thus the cross-section is the curve z = 6, x2 + y 2 = 4.
10
y
2
x
While the level curve is the circle x2 + y 2 = 4.
y
You will have seen level curves before as contour lines on a map. They are not crosssections as they are not raised above the surface of the map.
Note that even if you cant draw the surface the level curves often allow you to imagine
the shape.
2.2
Continuous Functions
As with functions of one variable we have the idea of a function being continuous. A function
f : R2 R is continuous at (a, b) if
lim
(x,y)(a,b)
Unfortunately your background to this point is not enough for us to be able to cover this
idea properly. For reference the following functions are continuous:
Any polynomial in x and y, for example, f (x, y) = x3 + 3x4 y xy 5 + y 6 18
Chapter 2
Any function involving e? where the power is one of the functions on this list
Any function with sin, cos in the numerator
Any positive power of x or y
2.3
Partial Derivatives
If we imagine a surface in R3 what could we mean by the word gradient. Instead of a tangent
line we will get a tangent plane. This means that we do not have a nice equivalent of the
derivative. If we observe that a tangent line has one dimension while a tangent plane has two
we might expect to get two derivatives. As each derivative forms part of the whole we call
them partial derivatives. We will meet the tangent plane again later.
To nd the partial derivatives we cut the surface with a plane that is parallel to the
x or y-axis and that passes through the given point. If we cut parallel to the x-axis then
y = y0 is a constant. If our surface is z = f (x, y) then we get the curve z = f (x, y0 ). This
is a function of one variable and we can use all the techniques from one-variable calculus to
nd the slope in the x-direction. If we want to dierentiate with respect to x we could use
limits.
f
f (x + h, y) f (x, y)
= lim
fx (x, y) =
x h0
h
This is called the partial derivative with respect to x. Similary we can dene the partial
derivative with respect to y, and so nd the slope in the y-direction.
fy (x, y) =
f
f (x, y + h) f (x, y)
= lim
h0
y
h
fx (x, y) = lim
h0
= 2x
Example 2 Find the partial derivative of g(x, y) = 2xy y 3 with respect to y at the point
(2, 1).
g(2, 1 + h) g(2, 1)
h
4(1 + h) (1 + h)3 3
= lim
h0
h
4 + 4h 1 3h 3h2 h3 3
= lim
h0
h
h 3h2 h3
= lim
h0
h
= lim 1 3h h2
gy (2, 1) = lim
h0
h0
=1
11
12
z
z
and
for each of the following.
x
y
z = x2 y 2 + 3x3 + 2y + cos x
z = cos x tan y
z = x sin y
z = sin(xy)
z = xey
z
z
and
for each of the following.
x
y
z = x2 y 3 sin x cos y
y
x
z=
tan x log y
Chapter 3
Tangent Planes and Dierentials
3.1
Tangent Planes
We now know how to nd the partial derivatives of a function. These can be used to nd the
slope in the x- and y-directions. For example, if f (x, y) = x2 + 2y 2 then
fx (x, y) = 2x
fy (x, y) = 4y
Thus, at the point (3, 4, 41), on the surface z = f (x, y), the slope in the x-direction is
fx (3, 4) = 6, while the slope in the y-direction is fy (3, 4) = 16. This means that we could
nd the equations of the lines tangent to the surface in these directions. But we know that
there is a plane tangent to the surface at this point. To nd the equation of this tangent we
recall that the (general) equation of a plane can be written in the form
z = ax + by + c
(at least this is true in most cases, we will ignore the small problems that can arise for the
z
z
= a and
= b. Suppose that we are given the function f and want
moment). Then
x
y
to nd the equation of the tangent plane to f at the point (x0 , y0 , z0 ). As this is to be the
tangent plane the slopes in the x and y-directions should agree with the slopes of the function
in these directions. That is we should have
z
= fx (x0 , y0 )
x
z
= fy (x0 , y0 )
y
Thus a = fx (x0 , y0 ) and b = fy (x0 , y0 ) and we nd that
z = fx (x0 , y0 ) x + fy (x0 , y0 ) y + c.
Now at (x0 , y0 ) we should have z = f (x0 , y0 ) and so
f (x0 , y0 ) = fx (x0 , y0 ) x0 + fy (x0 , y0 ) y0 + c
c = f (x0 , y0 ) fx (x0 , y0 ) x0 fy (x0 , y0 ) y0
Hence the equation of the tangent plane to the function f (x, y) at the point (x0 , y0 ) is
z = fx (x0 , y0 ) x + fy (x0 , y0 ) y + f (x0 , y0 ) fx (x0 , y0 ) x0 fy (x0 , y0 ) y0
Or more simply:
z f (x0 , y0 ) = fx (x0 , y0 )(x x0 ) + fy (x0 , y0 )(y y0 )
13
14
The advantage of this idea is that we may dene surfaces that cannot be written in
the form z = f (x, y) in any easy way, if at all. Nevertheless we will still be able to nd the
tangent plane to such surfaces. In fact, the formula we use will be easier to remember.
3.1 Tangent Planes Given a surface dened by g(x, y, z) = k, where k is a constant,
the equation of the tangent plane at a point (x0 , y0 , z0 ) on the surface is given by
fx (x0 , y0 , z0 )(x x0 ) + fy (x0 , y0 , z0 )(y y0 ) + fz (x0 , y0 , z0 )(z z0 ) = 0
In Leibnitzs notation this would be
f
f
f
(x x0 ) +
(y y0 ) +
(z z0 ) = 0
x
y
z
where all the partial derivatives are evaluated at (x0 , y0 , z0 ).
The advantage of this form is that x, y and z are treated the same. However, does this
give the same answer for functions we can write in the form z = g(x, y)? We have already
seen the trick we need to apply. The surface z = g(x, y) is exactly the same as the surface
dened by g(x, y) z = 0, so we let f (x, y, z) = g(x, y) z and consider the tangent planes
at (x0 , y0 , z0 ) for the surfaces z = g(x, y) and f (x, y, z) = 0.
From before, we know that the tangent plane to the surface z = g(x, y) is given by
z z0 = gx (x0 , y0 )(x x0 ) + gy (x0 , y0 )(y y0 )
Using the above we calculate the tangent plane to the surface f (x, y, z) = 0 at the given
point.
fx (x0 , y0 , z0 )(x x0 ) + fy (x0 , y0 , z0 )(y y0 ) + fz (x0 , y0 , z0 )(z z0 ) = 0
We now calculate the partial derivatives of f .
(g(x, y) z)
f
=
x
x
z
g(x, y)
=
x
x
= gx (x, y)
Chapter 3
fx (x0 , y0 , z0 ) = gx (x0 , y0 )
(g(x, y) z)
f
=
y
y
g(x, y) z
=
y
y
= gy (x, y)
fy (x0 , y0 , z0 ) = gy (x0 , y0 )
(g(x, y) z)
f
=
z
z
g(x, y) z
=
z
z
= 1
fz (x0 , y0 , z0 ) = 1
Thus the tangent plane is
0 = fx (x0 , y0 , z0 )(x x0 ) + fy (x0 , y0 , z0 )(y y0 ) + fz (x0 , y0 , z0 )(z z0 )
0 = gx (x0 , y0 )(x x0 ) + gy (x0 , y0 )(y y0 ) + (1)(z z0 )
0 = gx (x0 , y0 )(x x0 ) + gy (x0 , y0 )(y y0 ) (z z0 )
z z0 = gx (x0 , y0 )(x x0 ) + gy (x0 , y0 )(y y0 )
and the two forms agree.
3.2
Dierentials
the numerical value of 8 + 37 but did not have a calculator. We rst nd afunction that
has a function value equal to the given expression, for example if f (x, y) = x + y then
9+
36 = 3 + 6 = 9.
Look at the tangent plane to the surface z = f (x, y) at the point (9, 36). For points near
(9, 36, 9) the z-values on the tangent plane will be close to the values on the surface. We
therefore nd the equation of the tangent plane at that point.
The equation of the tangent plane to the surface z = f (x, y) at the point (a, b) is
z f (a, b) =
z
z
(x a) +
(y b).
x
y
15
16
1
1
(x 9) + (y 36).
6
12
For the record 107/12 = 8.916 while 8 + 37 = 8.911 . . ., a reasonably good approximation.
Example We nd an approximation to sin 1 + cos 1. To complete this we must remember
that = 3.1415 . . . and so 1 3 . If you recall your exact values you will realise that the value
is similar to the previous question and so well just use the approximate value 23 = 0.8660 . . .
To start, we let f (x, y) = sin x + cos y, then
3 1
,
= sin + cos =
+ = 1.3660 . . .
z0 = f
3 3
3
3
2
2
f (8, 37) 9
1
,
= cos =
fx
3 3
3
2
,
= sin = 0.8660 . . .
fy
3 3
3
We can now write down the equation of the tangent plane at the point 3 , 3 , writing our
numbers correct to 3 decimal places.
,
x
+ fy
,
y
z 1.366 fx
3 3
3
3 3
3
1
= (x 1.047) 0.866(y 1.047)
2
at (1, 1)
z 1.366 + 0.5(1 1.047) 0.866(1 1.047)
1.383
The actual value of sin 1 + cos 1, to 3 decimal places is 1.382 and we are not too far o the
mark.
If we now return to the approximation:
z f (a, b)
we can write this as
z
z
z
(x a) +
(y b)
x
y
z
z
x +
y.
x
y
As we move closer to the point (a, b) this approximation gets better, in the limit we have
dz =
z
z
dx +
dy.
x
y
Chapter 3
3.3
z
= fx (x, y)
x
z
= fy (x, y)
y
As in the 1-dimensional case we can dierentiate again. This time there are more possibilites:
(a)
We can dierentiate with respect to x and then with respect to x.
(b)
We can dierentiate with respect to x and then with respect to y.
(c)
We can dierentiate with respect to y and then with respect to x.
(d)
We can dierentiate with respect to y and then with respect to y.
Thus we have 4 second partial derivatives.
z
2z
=
x x
x2
z
2z
=
y x
yx
z
2z
=
x y
xy
z
2z
=
y y
y 2
= fxx (x, y)
= fxy (x, y)
= fyx (x, y)
= fyy (x, y)
2z
2z
=
.
yx
xy
=0
= 1
= 1
=
1
y2
17
18
Exercises Evaluate the four second partial derivatives for each of the following functions.
z = x2 y 2 + cos y
z = y cos x
z = ex log y
2z
2z
=
, this is always true. (Well
yx
xy
nearly always, we will not meet any functions where this is not true in this unit.) Later you
will also see that this is true of more complicated functions and of higher partial derivatives.
For example,
In each of these cases you will nd that
Chapter 4
The Chain Rules and Revision of Vector Arithmetic
4.1
Unlike functions of one variable there are two dierent chain rules:
(1)
The Total Derivative Rule, and
(2)
The chain rule for functions of several variables.
These two arise because we are looking at functions of functions. Suppose z = f (x, y) where
x and y are themselves functions. We have two cases.
(a)
Both x and y are functions of the same variable, or
(b)
they are functions of two or more variables.
Example 1 Suppose that z = x2 + y 2 and that x = 2t and y = t2 are functions of the same
variable. In this case we really have
z = x2 + y 2 = (2t)2 + (t2 )2 = 4t2 + t4 ,
a function of one variable. Dierentiating we nd that
dz
= 8t + 4t3 ,
dt
a normal (full) derivative.
In simple situations we can use the expressions for x and y to write z as a function of
the single variable, but things can become quite complicated. For example, there is no easy
way of eliminating x and y in the following situation.
x+y
2
x y +
cosh(w2 + 1) dw
z = arc sec
0
t
x = tan
t2 1
y = e t+log t
However we may still be able to evaluate dz
dt .
You will recall that we showed that
z
z
z
x +
y.
x
y
+
.
t
x t
y t
Taking the limit as t 0 we get (theres a lot to prove here but we dont need the details)
z dx z dy
dz
=
+
.
dt
x dt
y dt
This is known as the Total Derivative Rule. Notice that the left-hand-side is a full derivative.
MATH203: W. N. Franzsen (10/2/2015).
19
20
Example 3 Evaluate
z
= 2x and
x
x
= 1 and
t
x
= 1 and
u
z
= 2y
y
y
= 2t
t
y
=2
u
Thus we nd that
z x z y
z
=
+
t
x t
y t
= 2x 1 + 2y (2t)
= 2(u + t) 4t(2u t2 )
= 2u + 2t 8ut + 4t3
z x z y
z
=
+
u
x u y u
= 2x 1 + 2y 2
= 2(u + t) + 4(2u t2 )
= 10u + 2t 4t2
Exercise In the above example we could have just written z as a function of u and v and
dierentiated normally. Show that if we do this we get the same answers.
Chapter 4
Example 4 We may use the Total Derivative rule to perform implicit dierentiation. Given
a implicit equation
2x2 y + 3xy 4 = 7
we let z = 2x2 y + 3xy 4 7 = 0 and so
dz
dx
= 0 as z is constant.
dz
0=
dx
z dx z dy
+
=
x dx y dx
z dy
z
+
=
x y dx
z
dy
= x
z
dx
y
4xy + 3y 4
= 2
2x + 12xy 3
For the record, this is the only sensible way to evaluate implicit derivatives.
4.2
You should be familiar with the whole of this section, from MATH107 or equivalent. Dont
panic if you dont remember vectors, all the facts that you need will be covered in this
section. (Although we wont provide all of the proofs.) Firstly you should recall that there
are two standard ways to write down a vector, either as a small matrix or using the standard
vectors i, j and k . Thus the vectors
2
3
and
2i + 3j + k
1
represent the same vector. As most of our work in this unit will take place in three dimensions
the revision below will assume that we are working in three dimensions.
The rst fact to remember is that vectors are independent of their starting point. The
vector joining the points P (2, 0, 5) and Q(1, 3, 9) is
1
v = P Q = 3 = i + 3j + 4k
But this vector also joins the origin O(0, 0, 0) to the point (1, 3, 4).
4.1 Points and Vectors You should remember the following in whatever form is easiest
for you. What is written below is only one way of remembering these facts.
(a)
The vector joining P (a, b, c) to Q(r, s, t) is
ra
tc
(b)
Given the point P (a, b, c) and vector v = = i + j + k , the point Q
such that P Q = v is
Q(a + , b + , c + )
(c)
Given the point Q(r, s, t) and vector v = = i + j + k , the point P such
that P Q = v is
P (r , s , t )
21
22
Exercise Convince yourself that you only really need to remember one of these. That is,
using any one of these show that you can easily deduce the other two.
2
0
We may also add vectors. Given the vectors 1 and 5 we can easily form the
sum
2
1
5
+
0
5
3
=
2+0
1+(5)
5+3
=
2
4
8
With similar ease if we had written these using i, j and k. It is also important to remember
v+u
We may also subtract vectors. The above diagram, with one small change can also help us
visualise this.
u
We have seen that given a vector v and a point P we can nd a point Q so that v = P Q.
It is easy to see that the length of v can be calculated from the distance between P and Q.
the length directly.
In fact there is an easier way to nd
a
4.2 Length of a Vector Given the vector v = b = ai + bj + ck the length of v is
given by
|v | = v = a2 + b2 + c2
You will note the two common notations for the length of a vector are given above, namely ||
and , both are used at dierent times, but should never be used in the same book or unit.
As the notation | | is used in other areas of this unit we will stick with that notation.
If a vector has length 1 then we call it a unit vector.
The vector with length 0 is called the zero vector. It should be noted that the zero vector
has no direction.
Note The vector i is the unit vector that points in the direction of the positive x-axis.
Thus we can write i = (0, 0, 0)(1, 0, 0). Similarly, j is the unit vector in the direction of the
Exercise Check that the formula given above gives the right answer: First nd the distance
between the points P (2, 5, 5) and Q(3, 8, 2) using the distance formula from high school.
b
c
=
a
b
c
(ai + bj + ck) = ai + bj + cj
Geometrically things are a bit more complicated as the sign of the number changes the
vector dramatically. There are therefore two cases.
Case 1 If 0 then v is the vector that is parallel to v and has length |v |.
Chapter 4
Case 2 If < 0 then v is the vector that is parallel to v , has length |v | and points in
> 0 and so|v | can be the
the opposite direction to v . (Note that as < 0 we have
2
Example Given u =
1
5
2v
2v
1
and v = 5
evaluate 7u 3v .
14
3
7u 3v = 7 15
9
35
17
= 8
v
44
4.3
Lemma Given the vector v and the scalar (that is, number) we have
|v | = |||v |
,
if
|| =
, if
4.4 Unit Vectors Given a non-zero vector v the vector |v1 | v is a unit vector parallel to v .
positive, thisvector will have the same sense as v . We calculate its length.
1
1
v
=
|v |
|v |
|v |
1
|v |
as |v | 0
=
|v |
=1
4.3
We can add and subtract vectors so it is only natural to ask whether we can multiply them.
In this unit we will see that for vectors in three dimensions there are two ways of nding the
product of vectors. Only the Dot, or Scalar, Product can be applied to any sized vectors.
Before giving the denition we observe that given two non-zero vectors, u and v , there
are two angles formed if we start the vectors from the same point.
v
In all cases, we take the angle between vectors to be the smaller of the two angles. That is
the angle in the above diagram.
23
24
Exercise Show that for any pair of non-zero vectors the angle, , between them satises 0 .
4.5 Definition Given two non-zero vectors u and v , the dot (or scalar) product of u
and v is dened to be
u v = |u| |v | cos
where is the (smaller) angle between the vectors.
If either, or both, of the vectors are zero vectors then
uv =0
(We have to have this last little bit as is not dened in this case. In calculations we usually
just use the earlier formula. As one of the lengths is 0 we can pretend that the doesnt
matter as the right hand side will be 0.)
You should recall that there is a quick way of nding the dot product.
a
c
d = ac + bd
b
a
d
b
e = ad + be + cf
c
and so on. Using both forms we may nd the angle between a pair of non-zero vectors.
4.4
As a rst encounter with the cross product we give the denition and then the more useful
way of calculating the vector.
The main problem with the dot product is that the answer is a scalar, hence the
alternative name of the scalar product. It would be nice if we could multiply two vectors and
get a vector as an answer. In three dimensions this is possible, and this only applies to three
dimensions. The big problem is deciding what the direction of the resultant vector should
be. The following denition is correct but not particularly helpful.
4.6 Definition Given two non-zero vectors, u and v , in R3 with angle between them.
The cross product is dened to be the vector u v that is perpendicular to the plane formed
handed system, and such that the length
by u and v , so that u, v and u v forms a right
of u v is
|u v | = |u| |v | sin
A cross product involving the zero vector is the zero vector.
All of this denition makes sense except for the right handed system bit. Dont worry
about that for the moment.
As with the dot product there is another way of calculating the cross product. For
once, the i, j , k notation is quicker.
a b c
a
b
c
d e f
= det d e f
(ai + bj + ck) (di + ej + f k) =
i
j
k
i j k
a
d
bf ce
b
e = cdaf
c
acbd
2 3 1
Example (2i + 3j k) (i j k ) =
1 1 1
= 4i + j 5k.
i j
k
Exercise Show that the cross product in the example is perpendicular to the two individual
vectors forming it.
Chapter 5
Directional Derivatives, Stationary Points
5.1
Directional Derivatives
Using the partial derivatives we may nd the slope of a function in the x or y directions.
What if we dont want to move in those directions? Given a function f (x, y) is it possible to
nd the slope of the surface z = f (x, y) in a given direction? As you may have guessed, the
trick we use will involve vectors.
Extended Example Consider the function f (x, y) = x2 +y 2 . Suppose we are standing at
the
2
point (1, 1, 2) on the surface z = f (x, y) and we want to know the slope in the direction 1 .
To nd this slope we use the same trick that we did for functions of one variable.
That is, we nd the function value
at (1, 1) and then at the point we reach by moving a
2
short distance in the direction 1 . Using traditional notation, suppose we move along the
2
2h
vector h 1 = h . As we started at the point (1, 1) we end up at (1 + 2h, 1 + h) and have
moved a distance (2h)2 + h2 = h 5 (just using the distance formula if you must, this is
just the length of the vector along which we moved).
f (1, 1) = 12 + 12 = 2
f (1 + 2h, 1 + h) = (1 + 2h)2 + (1 + h)2
= 1 + 4h + 4h2 + 1 + 2h + h2
= 2 + 6h + 5h2
Thus the slope of the chord joining (1, 1) and (1 + 2h, 1 + h) is
rise
run
f (1 + 2h, 1 + h) f (1, 1)
=
h 5
2 + 6h + 5h2 2
=
h 5
h(6 + 5h)
=
h 5
6 + 5h
=
5
2
Taking the limit we nd that the slope at (1, 1) in the direction 1 is
slope of chord =
6 .
5
At this stage it is worth evaluating a few other things at the point (1, 1).
fx (x, y) = 2x
fx (1, 1) = 2
fy (x, y) = 2y
fy (1, 1) = 2
2
1
= 22 + 12 = 5
MATH203: W. N. Franzsen (10/2/2015).
25
26
fx (1,1)
fy (1,1)
1 1
6
1
2
2
2
= 2
= (2 2 + 2 1) =
1
1
5
5
5
5
5.1 Lemma
given by
The slope of the function f (x, y) at the point (a, b) in the direction v is
fx (a,b)
v
fy (a,b)
f (a,b)
Notation The vector fxy (a,b) is such a useful quantity that we have a special notation for
it.
f (a,b)
f (a, b) = fxy (a,b)
For once it is worth proving this lemma. Apart from anything else it will remind us of
some of the tricks we use with limits.
r
Proof To simplify matters while we are working let us suppose that v = s is a unit
chord
f (a + hr, b + hs) f (a, b)
h
f (a + hr, b + hs) f (a, b + hs) + f (a, b + hs) f (a, b)
=
h
f (a + hr, b + hs) f (a, b + hs) f (a, b + hs) f (a, b)
+
=
h
h
f (a, b + hs) f (a, b)
f (a + hr, b + hs) f (a, b + hs)
+s
=r
hr
hs
(a,b)
, we rst let hs = k, say,
We now concentrate on each fraction. Start with f (a,b+hs)f
hs
and note that k 0 as h 0. Then we note that, by denition,
lim
k0
f (a, b + k) f (a, b)
= fy (a, b)
k
The other fraction is slightly harder to deal with, but we note that as h 0 then b + hs b
and we nd
lim (slope of the chord) = rfx (a, b) + sfy (a, b) = f (a, b) v
h0
We can now deal with the problem of the length of the vector. If v =
v|
q
|v |
p
q
is not unit
Chapter 5
As this vector points in the same direction the above formula applies with r = |vp | and s = |vq | ,
thus
lim (slope of the chord) = rfx (a, b) + sfy (a, b)
h0
p
q
fx (a, b) +
fy (a, b)
|v |
|v |
1
(pfx (a, b) + qfy (a, b)
=
|v |
v
= f (a, b)
|v |
Example Find the slope at the point (2, 3, 9) in the direction v =
1 v .
10
3
1
on the sur-
f (x, y) =
=
f (2, 3) =
fx (x,y)
fy (x,y)
6x2y
2x+2y
6
2
denoted by
Dv f (a, b)
Thus we have
v
Dv f (a, b) = f (a, b)
|v |
fx (x,y)
The vector f (x, y) = fy (x,y) is called the gradient of f (x, y) and the symbol f is
pronounced grad-f .
5.2
Steepest Slopes
Most of the time we are not particularly interested in the slope in a given direction. Much
of the time we are more interested in either nding the direction of the steepest slope, or a
direction in which the slope is 0. By looking for these we will, in fact, nd a solution to the
general problem of nding a direction with a given slope.
We rst look closely at the value of the slope. Suppose we have a surface z = f (x, y)
and are interested in the slopes at the point (a, b). To save some fuss we again consider a
27
28
unit vector u. Let be the angle between u and f (a, b). You should observe that we are
that f (a, b) is not the zerovector, well worry about that case later. From
assuming here
before we know that the value of the slope at this point is
Du f (a, b) = f (a, b) u
6x5
10y
10
10
10
10
1
1
(the constant factor of 10
is unimportant for the direction) and the magnitude of the slope in that direction is
|f (2, 1)| =
(10)2 + 102 = 10 2
5.3
Stationary Points
We now need to deal with the one case we left out of the discussion of steepest slopes, namely
the case where f (a, b) is the zero vector.
Chapter 5
5.4 Definition Given the function f (x, y), the point (a, b) is called a stationary point
if f (x, y) is the zero vector.
Example Find all the stationary points of the function f (x, y) = 3x2 5x 5y 2 .
To do this we solve the equations we get from
f (x, y) = 00
fx (x,y)
= 00
fy (x,y)
6x5
= 00
10y
6x 5 = 0
10y = 0
Thus the only stationary point is 56 , 0 .
The next step should be to classify the nature of our stationary points, and we will, but
the fact is that we have many more possibilities. For functions of one variable a stationary
point is a local maximum, local minimum or a horizontal point of inexion. For functions
of two variables we might still have a local maximum (think of the top of a hill) or a local
minimum, but there are many others. The most important is a saddle point. As the name
suggests we need to imagine the middle point of a horses saddle, in one direction (across
the horse) the surface has a maximum, but in another direction (along the horse) we have
a minimum. We can also get equivalents of horizontal points of inexion as well as even
more option. The only three we will worry about are local maxima, local minima and saddle
points. All the rest will be counted as other.
Local Minimum
Local Maximum
Saddle Point
It would be nice if there was a simple test for the nature of a stationary point. As we
will see below, there is a test involving the second derivatives but it is not simple. We should
expect this, not least because for a function of 2 variables there are 4 second derivatives. We
rst start by forming the second derivatives into a matrix. Suppose the function f (x, y) a
stationary point at (a, b), so fx (a, b) = 0 and fy (a, b) = 0. We consider the following matrix
f (a, b)
Hf (a, b) = xx
fyx (a, b)
fxy (a, b)
fyy (a, b)
29
30
In one sense there is a simple rule for the nature of the stationary point: If both eigenvalues
are positive we have a local minimum, if both are negative we have a local maximum, one of
each and we have a saddle and if either or both are zero we have no information. Sadly, this is
only simple if we know the eigenvalues (indeed if we know what eigenvalues are!). Thankfully
we can remember this another way. To save writing, we use a symbol for the determinant of
the above matrix.
fxx (a, b) fxy (a, b)
= fxx (a, b)fyy (a, b) fxy (a, b)2
= det
fyx (a, b) fyy (a, b)
Remembering that fxy (a, b) = fyx (a, b) for all nice functions.
(1)
If > 0 and fxx (a, b) > 0 then f has a local minimum at the point (a, b).
(2)
If > 0 and fxx (a, b) < 0 then f has a local maximum at the point (a, b).
(3)
If < 0 then f has a saddle point at (a, b).
As with the second derivative test in one dimension, if = 0 then we have no information.
We might have a maximum, a minimum, a saddle or one of the other possibilities.
Example Find the stationary point(s) of the function
f (x, y) = 2x2 + y 2 + 4x 4y + 5
and determine the nature of these points.
We rst nd any stationary points by solving f (x, y) = 0.
0
= f (x, y)
0
4x+4
= 2y4
It is easy to see that the only stationary point is at (1, 2). We now calculate the matrix of
second derivatives here all the second derivatives are constant.
4 0
0 2
Clearly, in this case, = 8 > 0 and 4 > 0. Therefore (1, 2) is a local minimum.
Chapter 6
Lagrange Multipliers
6.1
Constrained Extrema
We have just seen how to nd stationary points and extreme points of functions. In principle
this process is straight-forward. However, the process relies on being able to nd a suitable
way of writing the boundary of a region in terms of parameters. In many cases that just
isnt possible or convenient. We need a way of nding extreme points that works in a similar
way to implicit dierentiation. That is, we wont need to write the boundary in the form
of a function. The boundary (or boundaries) we will be looking at are called constraints,
that is, they are conditions that our points must satisfy. For example, we might look the
highest value of a function that lies on the unit circle. In that case the constraint would
be x2 + y 2 = 1.
We will rst state the method of Lagrange Multipliers, following that statement will
be an example that is adapted from a genuine problem. The exercise following that example
shows an actual application of Lagrange Multipliers, in particular showing the problems that
can arise in real situations. (That is, it isnt an easy exercise.)
6.1 Method of Lagrange Multipliers To nd the extreme points of the function f (x)
subject to the constraints g1 (x) = 0, g2 (x) = 0 and so on, we solve the system of simultaneous
equations
f (x) = 1 g1 (x)
f (x) = 2 g2 (x)
..
.
g1 (x) = 0
g2 (x) = 0
..
.
For most of our examples there will only be one constraint. In this case the method of
Lagrange multipliers reduces to the following.
f (x) = g(x)
g(x) = 0
Note The multiplier, , is to be treated as a genuine unknown. Most of the time we will
need to nd its value(s) to solve the problem. However, there are cases where we can nd the
extreme points without nding the value(s) of . You will nd that solving problems using
Lagrange multipliers requires some exibility.
Example This is a traditional problem that uses Lagrange multipliers, it also has an important application that we will see later. A surf lifesaver is standing on the waters edge and
notices a swimmer in diculty. The lifesaver can run at 5 metres per second across sand and
swim at 1 metre per second through the surf. The swimmer is 30 metres from a point on the
waters edge that is 100 metres from the lifesaver.
MATH203: W. N. Franzsen (10/2/2015).
31
32
lifesaver
100 metres
30 metres
water
swimmer
The lifesaver realises that the quickest way to reach the swimmer is to run for a distance
along the beach and then dive in and swim directly to the person to be rescued.
In order to minimise the time taken, how far should the lifesaver run before swimming directly
to the person to be rescued?
Let r metres be the distance the lifesaver runs and s metres the swimming distance.
Then the time taken will be
s
r
r
+ =
+s
f (r, s) =
10 1
10
The right-angled triangle on the right has side lengths 30 and 100 r and hypotenuse s and
so (100 r)2 + 302 = s2 . Thus our constraint is
g(r, s) = (100 r)2 s2 + 302 = 0
Using Lagrange multipliers we have the constraint just noted, together with
f (r, s) = g(x, y)
1
2(100r)
10
=
2s
1
s
10
and so
s 2
s2 + 302 = 0
10
s2
s2 + 302 = 0
100
99 2
s = 900
100
90000
s2 =
99
10000
=
11
10000
s=
11
Chapter 6
A
1
2
speed of light = v2
B
Your task Using the method of Lagrange multipliers verify Snells Law
v1
sin 1
=
sin 2
v2
You should note that this is not a particularly easy task, but it is also not particularly hard.
So, dont try it as your rst Lagrange multipliers problem, but remember to have a go at it
sometime.
(Hint: Pick points A and B distance 1 from the line, and calculate the distances and times
in terms of the angles.)
Example Find the extrema of f (x, y) = x y subject to the constraint that x2 y 2 = 2.
We let g(x, y) = x2 y 2 and use Lagrange multipliers.
f (x, y) = g(x, y)
1
2x
=
2y
1
1 = 2x
1 = 2y
33
34
1
=y
2
4
9
,
70
70
or
9
4
,
70
70
This time it is easy to see that the value of f at the rst point is positive and the value at
the second is negative. Thus the rst is a maximum and the second a minimum.
As you might expect, not all Lagrange multiplier questions are as nice as these. In
many cases there is a complicated interplay between the variables and the multiplier. In
these cases the number of possible points usually multiplies, sometimes alarmingly. When
this happens it is important to remain organised.
Chapter 6
Example Find the extrema of f (x, y) = xy subject to the constraint g(x, y) = 4x2 +9y 2 = 36.
We rst observe that as 4x2 + 9y 2 = 36 we cant have both x and y being 0.
f (x, y) = g(x, y)
y
8x
=
x
18y
y = 8x
x = 18y
Now observe that if = 0 then both x and y are 0, but we have seen that this cant happen.
Thus = 0.
x = 18y = 18(8x) = 1442 x
1442 x x = 0
(1442 1)x = 0
And so we have 3 cases: x = 0, =
Case 1 Suppose x = 0, then
1
and = 12
.
1
12
4 02 + 9y 2 = 36
y2 = 4
y = 2
Thus there are two points that come from this case.
(0, 2)
Case 2 Suppose =
(0, 2)
and
1
12 .
2
4x + 9
4 2
x
9
y = 8x
2
= x
3
= 36
8x2 = 36
x=
y=
Thus there are two more points.
9
, 2
4
9
2
2
x= 2
3
and
9
, 2
4
1
.
Case 3 Suppose = 12
2
4x + 9
4 2
x
9
y = 8x
2
= x
3
= 36
8x2 = 36
x=
9
2
2
y= x= 2
3
35
36
9
, 2
4
and
9
, 2
4
2x = y
2y = x
Note that if = 0 then both x and y are also 0, but xy = 1 and so this cannot happen,
indeed neither x nor y can be 0. Thus x, y and are all non-zero.
2
y
2
2
y= y
4
1= 2
= 2
x=
as y = 0
can see that they are both the minimum distance of 2 from the origin.
Chapter 7
Extreme Points and Integration of Functions of Several Variables
7.1
We have seen how to nd the extreme points of a function associated with stationary points.
In the last section we saw how to nd the extreme values of a function given a constraint. We
will now consider the general situation of nding extreme points. The good news is that we
dont need to consider Lagrange multipliers here, that is only one method of nding extreme
points. Here are are only interested in describing where such points might be.
In one sense, the places where we might nd extreme points are reasonably obvious.
We know that an extreme point might be a stationary point, that is, a point where f (x) = 0.
However, we might remember from calculus of one variable, that we might also get extreme
points at places where we cant nd a derivative. We can even simplify things here by splitting
the points with no derivative into two types. There are points were there just is no derivative,
for example, the function |x| has no derivative at x = 0. There are also problems with nding
derivatives along the boundaries of the domain. Exactly what we mean by that last statement
will become obvious in our rst example.
7.1 Finding Extreme Points Given a function f dened on a domain D, the extreme
points of f will occur at
(1)
Points where f (x) = 0
(2)
Points where f is not dened
(3)
Points on the boundary of D.
Example Find the extreme points of the function f (x, y) = x2 + y 2 on the domain
D = [1, 2] [2, 1]
that is, D is the region between the lines x = 1, x = 2, y = 2 and y = 1. If we consider
a sketch of this function we can immediately see that by restricting the surface to the given
domain, the largest values are occurring on the edges.
8
6
2
4
1
2
1
0
0
0
1
1
2
We also have an extreme value that lies at a stationary point. To nd these extreme values
we consider each type of point in turn.
0
(a)
Stationary points occur when f (x, y) = 0 .
2x
2y
=
0
0
Thus, (0, 0) is the only stationary point. As we are nding all extreme points,
we dont need to determine the nature of this point yet. We merely nd the
MATH203: W. N. Franzsen (10/2/2015).
37
38
There are no points were the derivative is not dened, apart from the boundary,
and so we dont need to consider this type in this example.
This is where things get messy, although not hard if you are organised. There
are four boundaries we need to consider.
(i)
x = 1 and 2 y 1
(ii) x = 2 and 2 y 1
(iii) 1 x 2 and y = 2
(iv) 1 x 2 and y = 1
(i)
If x = 1 then the function becomes f (1, y) = 1 + y 2 . We want the
extreme points of this function on the interval 2 y 1. We now
repeat the above. The stationary point is at y = 0 and has value
f (1, 0) = 1
There are no points where the derivative is not dened. The end-points
are y = 2 and y = 1 and
f (1, 2) = 5
f (1, 1) = 2
(ii)
(iii)
It is worth noting at this stage that often the functions along the boundaries look quite dierent. We are lucky here that they are so simple.
If y = 2 then f (x, 2) = x2 + 4. Repeating again.
f (0, 2) = 4
(iv)
Chapter 7
Example Find the extreme values of the function f (x, y) = 2x 3y + 5 on the domain D = { (x, y) | x2 + y 2 2 }. That is, D is the disk of radius 2 centred at the origin.
2
This time we have f (x, y) = 3 = 0 and so there are no stationary points. This
tells us that the extreme points, if any, must lie on the boundary.
To deal with the boundary we could use Lagrange Multipliers or proceed as follows.
The boundary is the circle of radius 2 centred at the origin, we remember polar coordinates.
All the points on the circle have polar coordinates (2 cos , 2 sin ) and so
f (x, y) = 4 cos 6 sin + 5
If we let () = 4 cos 6 sin + 5 then we may nd the extreme points on the boundary
normally, remembering to only consider one cycle, so < .
() = 4 sin 6 cos
at a stationary point
0 = () = 4 sin 6 cos
4 sin = 6 cos
3
tan =
2
3
or
4 = arc tan
2
3
2 = arc tan
2
These are angles in the 4th and 2nd quadrants respectively. We could just evaluate these
directly to nd the function values. Better is to use what we know about trigonometric
ratios. You should check that the following are true.
3
sin 2 =
13
2
cos 2 =
13
3
sin 4 =
13
2
cos 4 =
13
Thus, the extreme values occur at the points
4
6
,
and
13
13
6
4
,
13
13
39
40
7.2
Having completed our introduction to dierentiation, if we followed the script from a calculus
of one variable unit wed now consider anti-dierentiation. While we could consider antipartial-dierentiation nobody ever does. With functions of several variables virtually all
integrals will be denite integrals. Following the lead from calculus of one variable suppose
we have a function of 2 variables dened on some region R of the plane. As with functions of
one variable we consider a very small rectangle within that region of width dx and depth dy.
If the height of the function at that point is f (x, y) then the volume of the little shape will
be approximately
f (x, y) dx dy
z
f (x, y)
y
dx
dy
x
Obviously, this is just an approximation as the height will be dierent at dierent points
within the little rectangle. But, in the limit, this will be all be sorted out. Adding all these
little volumes will give use the total volume at least it would if we could rely on all the
function values being positive. Just as with areas, this calculation does not always give us
the volume as some terms might be negative. However, regardless of the value, adding these
will always give the integral. We denote the integral of f (x, y) over the region R as
f (x, y) dx dy
R
(2)
How can we convert a region R, that might be quite complicated, into ordinary
limits of integration?
(3)
How do we actually calculate such integrals?
We tackle these points one at a time.
Notation If we have three variable then we get a triple integral
f (x, y, z) dx dy dz
R
and so on.
Chapter 7
7.3
Fubinis Theorem
As you might guess, Fubinis theorem gives us the answer to our rst question. This theorem
is a surprisingly late addition to calculus being proved by Guido Fubini (18791943) in 1907.
For us, that is ignoring the ddly details, we have the following.
7.2 Fubinis Theorem If f (x, y) is a continuous function dened on the region R then
f (x, y) dx dy =
f (x, y) dy dx
R
In short, as long as we deal with the limits correctly, we may choose the order of
integration. It will turn out that this freedom is a very powerful tool. We will soon meet
integrals that we can only evaluate one way.
7.4
This is a good time to remember what the limits of integration really mean. If we consider
b
the denite integral a f (x) dx then what we really mean is
x=b
f (x) dx
x=a
This gives us the clue in the cases where our region is nice and simple. For example, if R is
the rectangle [1, 2] [3, 4]
R
x=?
f (x, y) dx dy
1
Never mix the two, that would be a mistake, just as writing [x + (2 + 3x]2 ) is a mistake.
It is obvious that more complicated regions will have more complicated limits. We will
see later that some regions even need to be cut into pieces for us to be able to determine the
limits. For the moment we will stay with rectangles in order to answer the third question.
41
42
7.5
Iterated Integrals
The word iterated means to perform repeatedly. Iterated integrals are just that, we integrate
repeatedly, only changing variables as we go. As with partial derivatives, when integrating
with respect to x, say, we treat y and any other variables as if they where constants. (So this
really is partial-anti-dierentiation after all!)
Example Given the rectangle R = [1, 2] [3, 4] and the function f (x, y) = 2x + 3y + 4
evaluate
f (x, y) dx dy
R
As this is a nice rectangle, we may use the above discussion to write down the limits.
f (x, y) dx dy =
R
2x + 3y + 4 dx dy
1
4
=
x2 + 3xy + 4x
3y + 7 dy
3 2
y + 7y
2
4
3 2
3 21
2
x2 + xy dy dx.
xy 2
x y+
2
3
x + xy dy dx =
0
dy
3
= 42 + 28
2
35
=
2
23
(4 + 6y + 8) (1 + 3y + 4) dy
Example Evaluate
2
9
3x2 + x dx
2
0
2
9
= x3 + x2
4
0
=8+9
= 17
dx
0
Chapter 8
Fubinis Theorem and Changing the Order of Integration
Recall Fubinis theorem (7.2): If f (x, y) is continuous on the region R then
f (x, y) dx dy =
R
f (x, y) dy dx
R
As mentioned before, the main problem with demonstrating this is the diculty of converting
the region into limits of integration. We will take things in easy stages. One unlooked-for
benet will be that we will also learn about changing the order of integration as we go.
8.1
Rectangles
In fact the title should be Rectangles with sides parallel to the axes. As we will see, an
absolute requirement will be that parallel to at least one axis we should be able to bound our
region with lines parallel to the axis. But well cross that bridge when we come to it. This is
the simplest case: Given the rectangle R = [a, b] [c, d] we have
f (x, y) dx dy =
f (x, y) dx dy =
c
f (x, y) dy dx
a
This particular case is easily checked, and there will be many examples in the tutorials for
you to try.
8.2
Triangles
Again triangles with one side parallel to an axis. Suppose our region is bounded by the
lines x = 1, y = 2 and y = x.
y=x
2
R
1
Here, the region can be bounded by lines parallel to the x or the y-axes and so
we may choose
either dx dy or dy dx. Suppose we wish to write this integral in the form . . . dx dy. The
outside limits must be numbers. As the outside integral is with respect to y we must have
lines of the form y = so we draw lines parallel to the x-axis that mark the extreme limits
of our region.
MATH203: W. N. Franzsen (10/2/2015).
43
44
y=x
2
R
1
1
2
These two lines, namely y = 1 and y = 2 give use the outside limits: 1 . . . dy. Now pick
a y-value that lies in between and consider the x-values as we move along a line at that y-value.
y=x
2
R
1
1
Following the dotted line, it rst enters the region R when x = 1 and it always enters at that
value. So the lower limit of integration will be x = 1. However, the dotted line exits R when
it hits the line y = x, so from the point of view of x the upper limit will be x = y. Thus the x
integral will have limits x = 1 and x = y. Or, more conventionally, our integral becomes
2 y
f (x, y) dx dy =
f (x, y) dx dy
1
Note If you have been given the region and must work out the limits, one rule is to make sure
that the limits on the outside only contain numbers. The limits inside can contain letters,
but not those on the outside.
Example Evaluate R f (x, y) dx dy where f (x, y) = 2x + 4y and R is the triangular region
above.
2 y
f (x, y) dx dy =
2x + 4y dx dy
1
1
2
[x2 + 4xy]y1 dy
=
1
y 2 + 4y 2 (1 + 4y) dy
=
1
5y 2 4y 1 dy
=
1
2
5y 3
2
2y y
=
3
1
5
40
82
21
=
3
3
Chapter 8
Example Evaluate
above.
R
14
3
Here we are using the other possible order of integration. Following the steps we can see
2
that x is on the outside so we use the extreme boundaries for the limits. So we have 1 . . . dx
(again, sometimes that happens, usually not). For the limits for y we pick an x-value and
move upwards along that line.
y=x
2
R
1
1
Here the rst time we cross into the region is at y = x and we always leave R at x = 2. Thus
the integral becomes
2 2
f (x, y) dy dx
1
You should complete the calculation and show that we get the same answer.
Notation If we dont know whether to put dx dy or dy dx then we usually write dA, think
of this as a little bit of area, just like dx is a little bit of x.
Example Considering the region S bounded by the lines y = 1, y = x and y = x 4,
evaluate the integral
2x + xy + 5 dA
S
(2, 2)
(1, 1)
(3, 1)
This time our decision is almost made for us. The only line parallel to an axis is y = 1 so we
put the dy on the outside.
2x + xy + 5 dA =
S
. . . dx dy
1
45
46
We are looking for the x-value as the dotted line enters and leaves S, these are on the
lines y = x and y = x 4 respectively. Finding the x-value we nd x = y and x = y 4,
thus the integral is
2 y4
2x + xy + 5 dA =
. . . dx dy
1
y4
2x + xy + 5 dA =
2x + xy + 5 dx dy
1
x2 y
+ 5x
x +
2
y4
=
1
dy
y
4 + 6y + 4y 2 dy
=
4
= 4y + 3y + y 3
3
43
=
3
2
It is worth the time to check what happens if we try to write this integral using dy dx.
The outside limits are ne
2x + xy + 5 dA =
S
. . . dy dx
1
But the problems start when we try to draw our dotted line if we place it to the left of
the top vertex then we hit the line y = x, otherwise we hit the line y = x 4, but we can
only have one nice expression as out limit of integration. What this is telling us is that this
is not the way to go. Either weve chosen the wrong order, as we know, or we need to split
the integral into two bits. At times we will have to split integrals, but it is something to be
avoided if we can.
8.3
Other Regions
Obviously not all regions will be nice rectangles or triangles. The good news is that the
process weve just seen will work, it might take a bit more eort, but it will work.
Chapter 8
Example Let T be the region bounded by the line y = 1 and the parabola y = 3x2 + 9x 5
3
13
2, 4
T
(1, 1)
(2, 1)
Here we must use the form dy dx, the limits for x being from x = 1 to x = 2. The dotted
line will enter T at y = 1 and exit on the curve y = 3x2 + 9x 5, thus
3x2 +9x5
f (x, y) dA =
f (x, y) dy dx
1
Example Let C be the upper half of the circle of radius 2 centred at the origin.
The equation of the circle is x2 + y 2 = 4. We note that the limits for x are 2 and 2, while
the limits for y are then 0 and the point on the circle. Here we need the y-value.
x2 + y 2 = 4
y 2 = 4 x2
y = 4 x2
As we are considering the upper half we take y =
4x2
f (x, y) dA =
C
8.4
f (x, y) dy dx
2
To change the order of integration, that is to convert and integral of the form R . . . dx dy
to R . . . dy dx or vice versa now only requires one more skill: Taking the limits of a given
integral and sketching the region.
47
48
3x+1
f (x, y) dy dx
1
We interpret the limits of integration as weve done before, so the limits become
x=1
x=3
y=4
y = 3x + 1
Thus the region is bounded by these four curves.
(3, 10)
y = 3x + 1
R
y=4
Here we can reverse the order of integration. If we have dx dy then the outer limits become y = 4 and y = 10. The right x limit will be 3 while the left limit will be on the
and so
line y = 3x + 1. In terms of x this is the line x = y1
3
3x+1
f (x, y) dy dx =
1
10
3
y1
3
f (x, y) dx dy
Chapter 9
Polar Coordinates, Arc Length and Line Integrals
9.1
Polar Coordinates
You may recall that when we introduce integration we took our small piece of area as a
rectangle, deducing that dA = dx dy in some order. There was nothing that forced us to use
that shape, we only chose a rectangle as they are convenient and easy. Other shapes can
be used but the only commonly used alternative is via polar coordinates. The dierence in
shape is immediately apparent.
dy
dA
dA
d
dx
dA = dx dy = dy dx
r
dr
dA =?
The problem comes when we try to calculate the size of dA using polar coordinates. However,
as we will be taking a limit anyway we use some approximations. Roughly speaking the
region dA is close to a rectangle with height dr and width equal to the arc length, that
is r d. Hence
dA = r dr d = r d dr
It is worth summarising what we know about polar coordinates so that we have one place to
refer to.
9.1 Polar Coordinates All points may be written in Cartesian coordinates, that is (x, y),
or in polar coordinates, that is (r, ).
x = r cos
y = r sin
r = x2 + y 2
y
tan =
x
dx dy = dy dx = r dr d = r d dr
for x = 0
49
50
2
2
Example Evaluate R ex ey dA where R is the upper half of the unit circle centred at the
origin.
2
You should note that ex dx is one of the integrals that does not have a closed form,
2
that is there is no nice anti-derivative for ex .
The only sneaky trick we use is to convert to polar coordinates. First we consider
the limits. For the unit circle the values of r will run from 0 (at the origin) to 1 on the
circumference. As we only want the upper half the values of will lie between 0 and . We
now consider the integrand (the function we are integrating.
2
ex ey = ex +y
2
= er
We may now convert to polar coordinates and evaluate. Remembering to match the limits
with the correct dthing.
1
2 2
2
x y
e e dA =
er r d dr
R
0
1
rer d dr
=
2
rer 0 dr
rer dr
=
0
1
2
er
=
2
0
e
=
2
2
= (e 1)
2
Remember, this integral could not be evaluated using dx dy.
Example Evaluate the integral R x dA where R is bounded by = 6 , = 4 , r = 1
and r = 3.
Here the form of the region cries out to be evaluated using polar coordinates. We recall
(from 9.1) that x = r cos and so
4 3
x dA =
r cos r dr d
=
=
1
3
r 2 cos dr d
1
r3
cos
3
3
d
1
26
cos d
3
26
sin 4
=
6
3
26
2 1
=
3
2
2
13( 2 1)
=
3
Chapter 9
9.2
Arc Length
We now have some skills with iterated integrals (remember, that means repeated integrals).
It is time to use them to solve some problems that might be important. The problem we
will encounter is that the most useful applications tend to lead to integrals we cant actually
evaluate! For this reason, some of the examples will seem a little contrived. They are! We
only use them because they are the ones for which you can complete the calculation. First of
all we want to calculate the length of curves. Suppose we have a curve, l, we want to know
what the length along the curve from A to B is.
As with much of calculus we solve this problem by cutting the curve into tiny bits, approximating the length of those bits and then adding them up by integration. Here we cut the
arc into bits, that well call dl, and then integrate them, so the total (arc-)length L is
B
L=
dl
A
dy
dx
B
It is clear that dl = dx2 + dy 2 , but this would lead to the formula L = A dx2 + dy 2
which doesnt seem to have a dthing! In fact it does, or at least it can have, if we use a bit
of algebra rst. It turns out that there are three related forms, each of which will be useful
in some circumstances.
dl2 = dx2 + dy 2
2
dy
= 1+
dx2
dx
2
dy
dl = 1 +
dx
dx
Or we may repeat this but instead taking out a factor of dy 2 .
2
dx
+ 1 dy
dl =
dy
The third form seems strange at rst, but one example will show its usefulness. We take out
a factor of dt.
2
2
dy
dx
+
dt
dl =
dt
dt
These lead us to three equivalent formulae that may be used to calculate arc-length.
51
52
9.2
by
Arc-Length
Given an arc l from point A to point B the length of the arc is given
2
dy
L=
1+
dx
dx
A
B 2
dx
+ 1 dy
=
dy
A
B 2 2
dy
dx
+
=
dt
dt
A
dt
As an example of how we may set up these calculations we will consider the length
along the parabola y = x2 from (0, 0) to (2, 4). We will quickly see that setting up the
calculation is the least of our worries. Using the rst form of the arc-length we nd
L=
1+
0
2
dy
dx
2
1 + (2x)2
dx
dx
In two steps we have reduce the calculation to a single integral. Sadly, we cannot easily evalu
ate this integral. We could try repeating this using the second formula instead. Here x = y
1
= 2
and we nd
and so dx
dy
y
4
1
+ 1 dy
L=
4y
0
again an awkward integral. When setting examples we must be very careful to ensure they
can actually be evaluated. For this reason, the curves whose lengths we nd will not be
standard ones.
Exercise Conrm, by evaluating eitherof the above integrals, that the length of arc along the
4
. (For the record, this is approximately
parabola y = x2 from (0, 0) to (2, 4) is 17 + arc sinh
4
equal to 4.65.)
Example Find the length of the curve y 3 = 94 x2 from (0, 0) to (1, 1). (Clearly this has been
3
chosen to ensure we can complete the calculation. We rst observe that x = 23 y 3 = 23 y 2
1
2
and so dx
dy = y .
1
1 + y dy
L=
0
L=
1+y
du
2
2 3
2
u
=
3
1
2
= ( 8 1)
3
dy
L, length 1.219
Chapter 9
2
Rather than attempting to use the given equation we will instead use the parameterisation
x = cos3 t
y = sin3 t
and will nd the length of the astroid. First we observe that the length will be 4 times the
length in the rst quadrant. We do this so that both sin t and cos t are positive.
L=
0
=4
=4
=4
=4
=6
2 2
dy
dx
+
dt
dt
dt
2
2
dy
dx
+
dt
dt
dt
(3 cos2 t sin t)2 + (3 sin2 t cos t)2
dt
9 cos2 t sin2 t(cos2 t + sin2 t) dt
3 cos t sin t 1 dt
2 cos t sin t dt
sin 2t dt
=6
0
= 3 cos 2t 02
=6
9.3
Line Integrals
A reasonable comment on the last section is that it didnt involve iterated integrals. While
true, the last example was an example of a line integral. The classic example used to introduce
line integrals is to imagine a piece of wire that has dierent densities along its length. Can
we calculate its mass? In mathematical terms, if we have an arc L and a function f , can we
add up the values of the function along the arc? The trick, as always, is to cut the arc into
little bits, dl, multiply those little bits by the function values and then add them up. Thus
we have the basic form of a line integral.
53
54
9.3
Line Integrals Given a curve L and a function f (x), the line integral is given by
f (x) dl
Obviously, if you only have 2 dimensions then you can ignore the z terms.
Example Evaluate L 2x y 2 dl along the straight line joining the origin to the point (1, 2).
To evaluate this we need to nd parameters for the straight line. One way is to nd
the equation of the line, y = 2x, as it happens, and just let x = t. Then y = 2t and we have
our parameters. For simple curves this is good enough. The curve L runs from t = 0 to t = 1
and so
1
2x y dl =
(2t (2t)2 ) x (t)2 + y (t)2 dt
L
0
1
=
0
(2t 4t2 ) 1 + 2 dt
1
4 3
= 3 t t
3 0
4
= 3 1
3
3
=
3
Notation You should note that although Im using dl for a little bit of length, this is not
the only notation around. Many, indeed most, books use ds.
The above describes line integrals with respect to arc-length. It is possible to dene
line integrals with respect to x and y and so on. So, for example, the line integral of f along
the curve L with respect to x is
f (x, y, x) dx =
f x(t), y(t), z(t) x (t) dt
and similarly for the integrals with respect to other coordinates. This leads to one piece of
notation that sometimes worries people. Suppose we wish to evaluate the sum of integrals
M dx +
N dy =
M dx + N dy
L
L
L
M
dx
if we observe that N dy = M dx + N dy we write this as
M
M dx + N dy =
(M i + N j ) dl
dl
=
N
L
L
L
Final Note Sometimes the curve we are interested in actually forms a closed loop. For
example, consider the astroid we met earlier. In those cases we sometimes use the symbol
to indicate that the curve is closed. You should be aware that this is not really necessary, but
it does remind us of something that is occasionally very important. Namely, that the curve
starts and ends at the same point. Thus, the line integral in this case would be written as
f (x, y, z) dl
L
The most important thing is not to be intimidated by this notation. Nothing mysterious, the
curve just returns to the starting point.
Chapter 10
Vector Fields, Greens Theorem and Surface Integrals
55
56
Of course this is a fairly simple vector eld, below is a slightly more complicated example.
You should also remember the alternative way of writing these function values. In many
situations it will be convenient to write, for example,
f (x, y) = (2x + 3)i + (cos x 8)j + 3k
we have
f dl = f (b) f (a)
C
In actual fact there are some conditions on the function and path in the above theorem,
but those are unimportant for us in this unit. One special case to consider, however, is what
happens when the curve C is closed, that is, when a = b. It is clear that the right hand side
theorem
C
This fact turns out to be extremely important in many physical applications. If we have
a vector eld that can be written in the form f for some function f then we know that
integrals of the above form around closed paths are always equal to 0. This can be used to
show that for such functions, the actual path you follow is unimportant, all that matters is
where you started from and where you ended your journey. You may meet such things in
later applied mathematics units you undertake.
Of course, in many cases the integral around a closed curve will not be 0. Some would
even say that those are the interesting cases. However, calculating such integrals can be a
nuisance. Consider the path formed by the perimeter of the square [0, 1] [0, 1]. There are
four parts to this path so if we are to calculate the integral along this path we need four
separate sets of parameters. The following is one possible set.
(1)
y = 0, x = t for 0 t 1
(2)
x = 1, y = t for 0 t 1
(3)
y = 1, x = 1 t for 0 t 1
(4)
x = 0, y = 1 t for 0 t 1
We would then need to calculate four separate integrals. This can get messy, very quickly.
Thankfully, Greens theorem gives us a way to convert a path integral, around a closed path,
into an iterated integral.
Chapter 10
10.3 Greens Theorem Given a closed path L and functions M and N (with some
conditions on all of these). If we let R be the region enclosed by the path L then we have
N
M
dA
M dx + N dy =
x
y
L
This gives us a much quicker way of evaluating the integral around the square above.
Instead of calculating four separate integrals, we can simply calculate one iterated inte11
gral: 0 0 . . . dA. (Saving two integrations!) However, there are situations when evaluating
the contour integral is quicker. For example, if the curve was a circle, there is likely to be
a single integral to evaluate, rather than the two that the equivalent iterated integral would
require.
Example Using the square L from above, evaluate the integral
(x + 3y) dx + (x2 5y) dy
L
(x + 3y) dx + (x 5y) dy =
L1
t2
2
1
0
1
=
2
(2)
(1 + 3t)0 dt + (1 5t)1 dt
5t2
= t
2
5
=1
2
3
=
2
(3)
1
0
(x + 3y) dx + (x 5y) dy =
L3
(1 t + 3)(1) dt + 0 dt
t2
4t
=
2
1
= 4
2
7
=
2
1
0
57
58
(4)
5t2
= 5t
2
5
=5
2
5
=
2
1
0
(x + 3y) dx + (x 5y) dy =
2
1 3 7 5
= +
2 2 2 2
= 2
We now conrm this using Greens Theorem. In the integral
(x + 3y) dx + (x2 5y) dy
L
we have M = x + 3y and so
Theorem we have
N
M
= 3, and N = x2 5y giving
= 2x, thus using Greens
y
x
(x + 3y) dx + (x2 5y) dy =
L
R
2x 3 dA
2x 3 dx dy
=
0
1
=
x2 3x
1
0
dy
2 dy
=
0
= [2y]10
= 2
And the two agree, as expected.
Chapter 10
10.4 Surface Area Given a surface z = h(x, y), the area of that part of the surface that
lies above the region R is given by
2 2
2 2
h
h
z
z
1+
+
dA =
1+
+
dA
A=
x
y
x
y
R
10.5 Surface Integral Suppose we have a surface S dened by z = h(x, y) over a region R.
The integral of the function f (x, y, z) over this surface, S, is given by
2 2
h
h
f (x, y, z) dS =
f x, y, h(x, y) 1 +
+
dA
x
y
S
Example Find the surface area of the plane x + y + z = 1 that lies above the triangle formed
by the origin (1, 0) and (0, 1). (Another way of phrasing this would be to ask for the area of
that part of this plane the lies in the rst octant.)
Here we have h(x, y) = 1 x y and so hx (x, y) = 1 = hy (x, y). You can also check
that the limits for the region we are interested in are 0 x 1 and 0 y 1 x. Thus the
surface area is
1 1x
1 + (1)2 + (1)2 dy dx
A=
0
= 3
0
1
1x
dy dx
0
1 1
[x]0 x dx
= 3
= 3
0
1
1 x dx
0
1
x2
= 3 x
2 0
3
=
2
Exercise Sketch this surface and use geometry/trigonometry to conrm that this is the area
of this triangle.
Notation We have met expressions of the form M dx + N dy before, specically in the
lead-up to Greens Theorem. If we dene the function F (x, y) = M (x, y)i + N (x, y)j and we
F dr = M dx + N dy
f
x
f (x, y) =
f
y
x
and use it as a vector. So
to let =
y
f
x
=f
f (x, y) =
f
y
59
60
Finally, it is possible (at least in the cases we might meet) to consistently dene a
normal to the surface at any point. We usually denote that normal by n. Remember, that
this normal is a function of position, the normal to a surface will point indierent directions
from dierent points on the surface.
We now have enough notation to state Stokes Theorem. Sadly, as will many theorems,
this is known as Stokes theorem because Sir George Stokes publicised the result. It was rst
proved by Lord Kelvin (William Thomson).
10.6 Stokes Theorem If F is a function dened on a surface S whose edge is the path C
then
F dr =
F n dS
C
S
Just for completeness we will state one last theorem. We have some experience with
line integrals, and have just met surface integrals. As you might now expect we can dene
volume integrals. And, you now wont be surprised to learn there is an equivalent to Greens
and Stokes theorems.
10.7 Gausss Divergence Theorem If the region (volume) D is enclosed by the surface S
then
F n dS =
F dV
S
D