0% found this document useful (0 votes)
174 views99 pages

Multivariable Functions Fields and Vector Calculus Notes 2020 PDF

This document outlines topics in engineering mathematics, including multivariable functions and derivatives, multiple integrations, vector calculus, and integration in vector fields. It provides an introduction and overview for each topic, outlines the key concepts and methods within each section, and includes examples and exercises.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
174 views99 pages

Multivariable Functions Fields and Vector Calculus Notes 2020 PDF

This document outlines topics in engineering mathematics, including multivariable functions and derivatives, multiple integrations, vector calculus, and integration in vector fields. It provides an introduction and overview for each topic, outlines the key concepts and methods within each section, and includes examples and exercises.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 99

Contents

1 Engineering Mathematics 3
1.1 What is engineering mathematics? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Why study the engineering mathematics? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 How hard are the engineering mathematical modules? . . . . . . . . . . . . . . . . . . . . . . 4
1.4 About this lecture note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Useful maths websites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Multivariable functions and their derivatives 7


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Functions of more than one variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Visualizing functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 The partial derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 Chain rule for partial derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.6 High order partial derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.7 Partial differential equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.8 The stationary points of a function of two variables . . . . . . . . . . . . . . . . . . . . . . . . 17
2.9 Maximum and minimum points of a function of two variables . . . . . . . . . . . . . . . . . . 18
2.10 Taylor series for functions of two variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.10.1 Taylor theorem for a function of a single variable . . . . . . . . . . . . . . . . . . . . . 21
2.10.2 Taylor theorem for a function of two variables . . . . . . . . . . . . . . . . . . . . . . . 21
2.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3 Multiple integrations 27
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 Double integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.3 Triple integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4 Vector calculus 37
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.2 Partial differentiation of vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.3 The gradient of a scalar field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.3.1 Physical interpretation of ∇φ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4 The divergence of a vector field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.4.1 Physical interpretation of ∇ · v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.5 The curl of a vector field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.5.1 Physical interpretation of ∇ × v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.5.2 Conservative fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.5.3 The potential function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.6 Examples involving grad, div and curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5 Integration in vector fields 49


5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2 Line integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2.1 Line integral with respect to dx, dy and dz . . . . . . . . . . . . . . . . . . . . . . . . 51
5.2.2 Line integral with respect to ds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.3 Work done by a force over a curve in space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4 The line integral around a closed loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

1
2 CONTENTS

5.5 Green’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58


5.6 Vectors in electromagnetic theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

6 Fourier Series 63
6.1 Joseph Fourier (1768-1830) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.2 Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.3 Periodic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.4 Fourier coefficients for f (x) with period 2π . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.4.1 Determination of the constant term a0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.4.2 Determination of the coefficients an of the cosine terms . . . . . . . . . . . . . . . . . 66
6.4.3 Determination of the coefficients bn of the sine terms . . . . . . . . . . . . . . . . . . . 66
6.4.4 Summary of Fourier coefficients and Fourier series . . . . . . . . . . . . . . . . . . . . 67
6.5 Fourier coefficients for f (x) with any period p = 2L . . . . . . . . . . . . . . . . . . . . . . . . 68
6.6 Complex Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
6.7 Sine and Cosine series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.8 Differentiation and integration of Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.8.1 Integration of a Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.8.2 Differentiation of a Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.9 Some applications for the Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.9.1 Frequency response of a linear system . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.9.2 Parseval’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.9.3 Fourier series and Ordinary differential equations . . . . . . . . . . . . . . . . . . . . . 77
6.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

7 Partial differential equations 81


7.1 What are partial differential equations? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.2 Solution of partial differential equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.2.1 Direct integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.2.2 The separation of variables method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
7.2.3 Fourier series for PDE solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
7.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

8 Appendixes 95
A Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Chapter 1

Engineering Mathematics

1.1 What is engineering mathematics?


Engineering is the art of creating and improving our environment. It involves planning, design, construction,
quality assessment and control. However, none of these would be possible without mathematics. Engineer-
ing mathematics is at the core of all branches of engineering, from mechanical engineering to electronics
engineering, and from aerospace engineering to computer science. As engineering evolves and develops,
mathematics forms the common foundation of all new disciplines. Therefore, engineering mathematics is
the development and application of advanced mathematical and computational techniques to all branches of
modern engineering.
We are learning that engineering systems that seem straightforward to design exhibit unpredicted and
unstable behaviour when constructed. Take the example of a bridge that is made up of a simple suspension
structure. Tests on scale models can show the bridge to be both strong and stable, but when the real
structure is built it may sway unsteadily. Nonlinear dynamics, the mathematics of chaos, can help us to
predict such behaviour and correct the design before construction begins. Hence, engineering mathematics
is the key to the design and analysis of more and more real-world engineering problems.
Here, we can do no better than to make a quotation from the book Game, Set and Maths by the eminent
British mathematician Ian Stewart: Mathematics is fundamental to our lifestyle. How many people, watching
a television program, realise that without mathematics there would be nothing to watch? Mathematics was
a crucial ingredient in the discovery of radio waves. It controls the design of electronic circuits that process
the signals. When the picture on the screen rolls up into a tube and spins off to reveal another picture, the
quantity of mathematics that has come to life as computer graphics is staggering.

1.2 Why study the engineering mathematics?


The Engineering Mathematics modules offer a balance of theory and practice, which is both intellectually
stimulating and topical. Learning the craft of applying mathematics to real world problems will not only
equip you with technical skills, but will also enhance your ability to make sound judgments on the increasingly
important role played by science and technology in the modern world. Industry is well aware of acute skills
shortage in various fields including applied mathematics and computing. These shortages are bound to
persist in the near future, due to increasing demand from employers in line with modern industrial growth.
Engineering courses focus on the principles, methods and applications in their particular branch of en-
gineering (Aeronautical, Mechanical, Electrical/Electronic, Civil or Computing). Engineering mathematics
provides the mathematical foundations for all of these as well as areas of application in medicine and the
social sciences.
Although you will see very few jobs titled with an Engineering Mathematics, your subject has a wide
application across the working world. You could find employment across a broad range of sectors including
engineering, information technology, oil industry, biotechnology and the civil service. Any industry that
uses modelling, simulation, cryptography, forecasting, statistics, risk analysis and probability will value your
mathematical knowledge and skills. For example, in business employers look for excellent analytical and
problem solving skills for such diverse areas as logistics, market research, operational research, business
analysis and management consultancy. In some cases it can be very hard to achieve specialist roles straight
from an undergraduate degree, however, it would be of help to you on understanding the job you would
be doing and the environment you would be working in, if you have a good knowledge on mathematics.

3
4 CHAPTER 1. ENGINEERING MATHEMATICS

Hopefully, this module could play this role to you.

1.3 How hard are the engineering mathematical modules?


It is easy to fall into the trap of thinking that the maths modules are harder than other modules. Actually,
the engineering mathematical modules here are not difficult to most of you because many of the ideas and
knowledge we shall deal with are ones that you have learned and met before. However, we shall be taking
them further than you did at the first year on Engineering Mathematics (ENGD1001 or Maths I and II) and
we shall be covering the ground faster than you are used to.
Learning does not just happen, you need to participate. Trying to learn mathematics by reading is like
learning to play football by watching videos; the real test is how well you can do it yourself! The key to
success is to keep on the top of the track, and that means doing the tutorial questions before you come to
the tutorial. This ensures that you do not fall behind and that you can get help with the problems you
cannot do.
Many of you with a good background will find some of this material quite easy, but, I think everyone will
find some things in the module new and challenging. Working the exercise materials and getting help when
you have difficulties means you will pass! Simply by getting here you have shown that you have the ability,
all that remains is to make sure that you do the work.
Finally, all engineering modules involve a lot of hard work, and the module of engineering mathematics
is no exceptions. However, all students, who work hard on solving engineering mathematical problems, and
follow the module lectures and tutorials week by week, should be able to pass the module, given sufficient
(reasonable) motivation.

1.4 About this lecture note


This lecture note is designed as one way to help you get the most from the lectures and accompanying
tutorials. The note contains all teaching materials that I use when preparing the actual lectures. In this
sense it is my lecture note. It also approximates what you as a student may choose to write down from
these lectures, in that sense, it is your lecture note. And in each case, it forms

an approximation formula ⇒ a lecture is a kind of communication between the lecturer and students

Of course, I will alter things in the lecture whenever I think it necessary if a change will improve communi-
cation and you may choose to write down things from the lecture (or tutorial) that I have not included in
the note.
Experience shows that very few people are able to use lecture notes as a substitute for lectures. If it
were, otherwise, lecturing, as a profession, would have died out by now. So, you should bear in mind that
this note is intended to complement the experience you get from attending the lectures and is available to
supplement the note that you take in the lectures. There is significant value in taking your own notes, you
are much more likely to see what is going on as you do so. I hope that by having this version of the note as
well you can quickly correct any errors that occur as you take them.
At the end of each chapter is a set of questions. You should make sure you have a proper attempt at each
question before looking at the solution, which I hope will be helpful if you are having difficulties. However,
you should be aware that exam solutions are, of course, not made available always. Many things can cause
the solution to be wrong. One such is when the question is changed but the answer is not updated. In the
end you are responsible for ensuring that you understand the solutions and believe them to be correct. If
you have problems in doing so, please seek help.
A PDF (Portable Document Format) version is available from the Blackboard. The file can then be
viewed using Acrobat reader (freely available) or may well display directly in the browser. In either case,
the whole document or selected pages can be printed.

1.5 Useful maths websites


1. http://mathworld.wolfram.com
(which has a wealth of material where you can look up definitions and formulas, etc.)

2. http://en.wikipedia.org/wiki/Catergory:Mathematics
1.5. USEFUL MATHS WEBSITES 5

3. http://helm.lboro.ac.uk/
(a very good website to help engineers learn mathematics)

4. http://www.mathcentre.ac.uk/
(which offers students quick reference guides, practice and revision materials, and also online practice
exercises on many branches of mathematics)

There are, of course, hundreds of other websites to explore . . . , but, please don’t spend too much time
on surfing the internet.
6 CHAPTER 1. ENGINEERING MATHEMATICS
Chapter 2

Multivariable functions and their


derivatives

2.1 Introduction
Functions with two or more independent variables appear more often in science and engineering than func-
tions of a single variable, and their calculus is even richer. Their derivatives are more varied and more
interesting because of the different ways in which the variables can interact. Their integrals lead to a greater
variety of applications. The studies of mechanical and electronic engineering, fluid dynamics, to mention only
a few, all lead in natural ways to functions of more than one variable. The mathematics of these functions
is one of the finest achievements in science.
As we see in this chapter, the rule of calculus remain essentially the same as we move into higher
dimensions. We need to keep track of multiple directions of change at the same time, necessitating some new
notations that use the vector notations, but fortunately we do not need to reinvent the theories. Indeed, the
calculus of several variables is really single variable calculus applied to several variables at once.

2.2 Functions of more than one variables


According to Boyle’s law, the pressure, p, of a fixed mass of gas at constant temperature is inversely pro-
portional to its volume, V , i.e., p = C/V , where C is a constant. In this case, the pressure is a function of a
single variable, the volume, which we may write as p = f (V ). However, if the temperature, T , is also allowed
to vary, then the idea gas law tell us that the pressure, volume and temperature are related by pV = nRT ,
where n and R are constants. In this case, the pressure is a function of two variables, which we could write
as p = f (V, T ). p varies as V , T or both vary, and it is clearly a more difficult task to keep track of the
behaviour of p in this latter case, when both vary-even sketching a graph of the function f (V, T ) becomes
problematical. Therefore, we would have to draw it in three dimensions.
A brief reminder of the features of functions of a single variable will prepare us for more complicated
study of functions of two or more variables. A function f of a single variable, x, is a rule for assigning a
unique real number to each real number on which f acts- i.e. every element of its domain. The each and
the unique are essential components of the definition of a function. They tell us that we must look carefully
at the numbers or points on the real line involved in the definition of the function. Functions are defined on
sets of such points. So, when we move on to functions of two variables, for example, we will be interested in
points in a plane, defined by ordered pairs. Sets of such points are more complicated than those on a single
real line, and so call for more careful treatment. Of course, in practice, we usually deal with functions of a
single variable in graphical terms, most usually referred to rectangular coordinates Oxy in a two dimensional
plane. Functions of two variables require such a plane simply to represent their domain, and there is a wider
range of coordinate systems one can use in three dimensions. So, we have to give some attention to three
(or higher) dimensional coordinate systems and the sketching of graphs of functions of two variables. All
this extra complexity for functions of more than one variable requires us to rigorous about our definitions,
terminology and notation, and is is the purpose of this section to set this out.
Suppose D is a set of ordered pairs (x, y). A real value function f (x, y) on D is a mapping of each element
of D onto the real numbers. D is called the domain of the function f (x, y), and the set of values to which
D is mapped is called the range of f (x, y). We write

z = f (x, y)

7
8 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

where z is called the image of the ordered pair (x, y). In this case, x and y are called the independent
variables of f , and z is the dependent variable.
It is easy to extended to n-variables (x1 , x2 , · · · , xn ), thereby defining a function of n variables in the
obvious way
z = f (x1 , x2 , · · · , xn )
Suppose we consider a function with two independent input variables x and y, for example

f (x, y) = x2 + 2y + 3

If we specify values for x and y then we have a single value f (x, y). For example, if x = 2 and y = 3 then
f (x, y) = 22 + 2 × 3 + 3 = 13. We write f (2, 3) = 13.
Example 2.2.1 Find the values or formula of f (2, 1), f (−1, −3) and f (0, 0), for the following functions:

(a) f (x, y) = x + y
(b) f (x, y) = x2 + y 2 + 1
(c) f (x, y) = 2x + xy + y 3

Solution:

(a) f (2, 1) = 2 + 1 = 3, f (−1, −3) = −1 + (−3) = −4, f (0, 0) = 0


2 2 2 2
(b) f (2, 1) = 2 + 1 + 1 = 6, f (−1, −3) = (−1) + (−3) + 1 = 11, f (0, 0) = 1
3
(c) f (2, 1) = 2 × 2 + 2 × 1 + 1 = 7, f (−1, −3) = −26, f (0, 0) = 0
Similar to the one variable functions, we can have a function including the functions. Here is an example.
Example 2.2.2 Give the following function

f (x, y, z) = x2 + y 2 + z 2

find f (sin(y), cos(x), 1) and f (ex+y , y 2 , 6).


Solution:

f (sin(y), cos(x), 1) = (sin(y))2 + (cos(x))2 + 12 = sin2 y + cos2 x + 1


f (ex+y , y 2 , 6) = (e(x+y) )2 + (y 2 )2 + 62 = e2(x+y) + y 4 + 36

2.3 Visualizing functions


No doubt you have been graphing a function of one variable for so long that you give the matter little
thought. The important fact is that, in general, the graph of a scalar-valued function of a single variable is a
curve-a one dimensional object-sitting inside two dimensional space. However, the graph of a scalar-valued
function of two variables is something that sits in three dimensional space. Generally speaking, the graph
will be a surface.
p
Example 2.3.1 Identify the level curves of f (x, y) = x2 + y 2 . Sketch a few of them.
Solution:
First, for the sake of practice, let us identify what this surface given by f (x, y) is. To do this, let us rewrite
it as p
k = x2 + y 2
If we square both sides we get
k 2 = x2 + y 2
This is the equation of a circle of radius k pwith centre at the origin. Fig.2.1 shows a surface graph with
some values of k for the function f (x, y) = x2 + y 2 . Note that we can think of contours in terms of the
intersection of the surface that is given by z = f (x, y) and the plane z = k. The contour will represent the
intersection of the surface and the plane, which can be graphed them in a two dimensional axis system as
shown in Fig.2.2.
Similarly, we can plot the functions

f (x, y) = sin(x + y) cos(xy), 0 ≤ x ≤ 4, 0≤y≤4


2.4. THE PARTIAL DERIVATIVE 9

p
Figure 2.1: Surface of the function f (x, y) = x2 + y 2 with some values of k.

p
Figure 2.2: A contour plot of the function f (x, y) = x2 + y 2 with some values of k.

and
p
sin( x2 + y 2 )
f (x, y) = p , −10 ≤ x ≤ 10, −10 ≤ y ≤ 10
x2 + y 2

as shown in Fig.2.3 and Fig.2.4, respectively.


In fact, you can use MATLAB or Mathematica to plot the function of two or more variables. However,
we strongly suggest that you should learn to draw simple surface sketching in the initial stages of this study
as it will enhance understanding of functions of two variables.

2.4 The partial derivative


Our goal for this section is to define the derivative of a function f (x, y) of two variables. Predictably, the
derivative of a function of a several variables is more complicated object than the derivative of a function of
single variable. in addition, the notation of differentiability is quite subtle in the case of a function of more
than one variable.

Definition 2.4.1 A partial derivative of a function of several variables is its derivative with respect to one
of these variables, with others held constant. For example, the partial derivative of f (x, y) with respect to x
(or y) is the (ordinary) derivative of the partial function with respect to x (or y). That is
 
∂f (x, y) f (x + h, y) − f (x, y)
fx (x, y) = = lim
∂x h→0 h
10 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

Figure 2.3: A surface plot for the function f (x, y) = sin(x + y) cos(xy) on the domain 0 ≤ (x, y) ≤ 4.

0.8

0.6

0.4

0.2

−0.2

−0.4
10

5 10
5
0
0
−5
−5
−10 −10

p p
Figure 2.4: A surface plot for the function f (x, y) = sin( x2 + y 2 )/ x2 + y 2 .

and similarly for the corresponding partial derivative with respect to y


 
∂f (x, y) f (x, y + h) − f (x, y)
fy (x, y) = = lim
∂y h→0 h
By definition, the partial derivative is the rate of change of f (x, y) when all variables, except the specified
one, are held fixed. In the case where f (x, y) is a function of two variables, we can understand
∂f
(a, b)
∂x
geometrically as the slope at the point (a, b, f (a, b)) of the curve obtained by intersecting the surface z =
f (x, y) with the plane y = b. For instance,

z = f (x, y) = x2 + xy + y 2 .

The graph of this function defines a surface as shown in Fig.2.5. To every point on this surface, there are an
infinite number of tangent lines. Partial differentiation is the act of choosing one of these lines and finding
its slope. Usually, the lines of most interest are those that are parallel to the xz-plane, and those that are
parallel to the yz-plane.
To find the slope of the line tangent to the function at (1, 1, 3) that is parallel to the xz-plane, the y
variable is treated as constant. The graph and this plane are shown in Fig.2.5. On the graph follows it, i.e,
Fig.2.6, we see the way the function looks on the plane y = 1. By finding the derivative of the equation
while assuming that y is a constant, the slope of f at the point (x, y, z) is found to be
∂z
= 2x + y
∂x
2.4. THE PARTIAL DERIVATIVE 11

Figure 2.5: A graph of z = x2 + xy + y 2 . For the partial derivative at (1, 1, 3) that leaves y constant, the
corresponding tangent line is parallel to the xz-plane.

Figure 2.6: A slice of the graph above at y = 1.

∂z
So at (1, 1, 3), by substitution, the slope is 3. Therefore, = 3 at the point (1, 1, 3). That is, the partial
∂x
derivative of z with respect to x at (1, 1, 3) is 3.
∂f
In general, measures the rate of change of f (x, y) with respect to x when y is held constant. Similarly,
∂x
∂f
measures the rate of change of f (x, y) with respect to y when x is held constant.
∂y
Consider f (x, y) = x3 + 2x2 y + y 2 + 2x + 1. Suppose we keep y constant and vary x; then what is the
rate of change of the function f ? Suppose we hold y at the value 3, for example, then

f (x, 3) = x3 + 6x2 + 9 + 2x + 1 = x3 + 6x2 + 2x + 10

In effect, we now have a function of x only. If we differentiate it with respect to x we obtain the expression:

3x2 + 12x + 2

We say that f has been partially differentiated with respect to x when y = 3. We denote the partial derivative
of f with respect to x by
∂f (x, 3)
= 3x2 + 12x + 2
∂x
In the same way if y is held at the value 4 then f (x, 4) = x3 + 8x2 + 2x + 17 and so, for this value of y = 4,
we have
∂f (x, 4)
= 3x2 + 16x + 2
∂x
Now if we return to the original formulation

f (x, y) = x3 + 2x2 y + y 2 + 2x + 1

and treat y as a constant then the process of partial differentiation with respect to x gives
∂f (x, y)
= 3x2 + 4xy + 0 + 2 + 0 = 3x2 + 4xy + 2
∂x
12 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

The rules for partial differentiation are essentially the same as for one variable differentiation, but it
must always be remembered which variables are being held constant.

Example 2.4.1 Find the first partial derivatives for the following functions:

(i) f (x, y, z) = x + 2y + z 3
(ii) f (x, y, z) = x2 (y + 2z)
x+y
(iii) f (x, y, z) = 3
z +x
Solution:
We have
∂f ∂f ∂f
(i) fx = = 1, fy = = 2, fz = = 3z 2 .
∂x ∂y ∂z
∂f ∂f ∂f
(ii) fx = = 2x(y + 2z), fy = = x 2 , fz = = 2x2
∂x ∂y ∂z
∂f z3 − y ∂f 1 ∂f −3z 2 (x + y)
(iii) fx = = 3 , f y = = , f z = = .
∂x (z + x)2 ∂y z3 + x ∂z (z 3 + x)2

∂f (1, 2) ∂f (1, 2)
Example 2.4.2 If f (x, y) = exy + xy, find and .
∂x ∂y
Solution:
Since,
∂f ∂f
= yexy + y, = xexy + x
∂x ∂y
Hence,
∂f ∂f
= 2e1(2) + 2 = 2e2 + 2, = 1e1(2) + 1 = e2 + 1
∂x (1,2) ∂y (1,2)

Example 2.4.3 The pressure, P , for one mole of an ideal gas is related to its absolute temperature, T , and
specific volume, v, by the equation
P v = RT
where R is the gas constant. Obtain simple expressions for
1. the coefficient of thermal expansion, α defined by
 
1 ∂v
α=
v ∂T P

2. the isothermal compressibility, κT defined by


 
1 ∂v
κT = −
v ∂P T

Solution:

1. Since  
RT ∂v R
v= =⇒ =
P ∂T P P
hence, we have  
1 ∂v R 1
α= = =
v ∂T P Pv T

2. Since  
RT ∂v RT
v= =⇒ =−
P ∂P T P2
hence, we have  
1 ∂v RT 1
κT = − = 2
=
v ∂P T vP P
2.5. CHAIN RULE FOR PARTIAL DERIVATIVES 13

For the most part, partial derivatives are quite easy to compute, once you become adept at treating
variables like constants. The following example shows how to use the quotient rule in the multivariable
functions.
Example 2.4.4 Find the first order partial derivatives for the function
xy
f (x, y) =
x2 + y2
Solution:
From the quotient rule of ordinary calculus (one variable derivative), we have

∂f (x2 + y 2 )y − xy(2x) y(y 2 − x2 )


= 2 2 2
= 2
∂x (x + y ) (x + y 2 )2
and
∂f (x2 + y 2 )x − xy(2y) x(x2 − y 2 )
= =
∂y (x2 + y 2 )2 (x2 + y 2 )2
Note that, neither f (x, y) nor its partial derivatives are defined at (0, 0) for this example.

2.5 Chain rule for partial derivatives


The chain rule for partial derivatives on multi-variable functions is a little more complicated. If the variables
u, v and w are defined in terms of x, y and z, then, the partial derivative of f (u, v, w) with respect to x is
∂f ∂f ∂u ∂f ∂v ∂f ∂w
= + +
∂x ∂u ∂x ∂v ∂x ∂w ∂x
∂f ∂f
with similar expressions for ∂y and ∂z , these are,

∂f ∂f ∂u ∂f ∂v ∂f ∂w
= + +
∂y ∂u ∂y ∂v ∂y ∂w ∂y
∂f ∂f ∂u ∂f ∂v ∂f ∂w
= + +
∂z ∂u ∂z ∂v ∂z ∂w ∂z
So, basically what we are doing here is differentiating f with respect to each variable in it and then multiplying
each of these by the derivative of that variable with respect to x, y, z, respectively. The final step is to then
add all this up.
∂f
Example 2.5.1 Find when
∂t
f (x, y) = x2 y
where
x = t3 , y = t4

Solution:
By the chain rule
∂f ∂f ∂x ∂f ∂y
= +
∂t ∂x ∂t ∂y ∂t
Since
∂f ∂x
= 2xy, = 3t2
∂x ∂t
∂f ∂y
= x2 , = t4
∂y ∂t
Hence
∂f
= 2xy(3t2 ) + x2 (4t3 ) = 10t9
∂t
Actually, f (x, y) can be written as an explicit function with the variable t,
∂f ∂
f (x, y) = x2 y = (t3 )2 (t4 ) = t10 = f (t), = (t10 ) = 10t9
∂t ∂t
which gives the same result when the chain rule is used.
14 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

∂T ∂T
Example 2.5.2 Find and when
∂r ∂θ

T (x, y) = x3 − xy + y 3

and
x = r cos θ, y = r sin θ

Solution:
By the chain rule
∂T ∂T ∂x ∂T ∂y
= +
∂r ∂x ∂r ∂y ∂r
In this example
∂T ∂T
= 3x2 − y, = −x + 3y 2
∂x ∂y
and
∂x ∂y
= cos θ, = sin θ
∂r ∂r
so that
∂T
= (3x2 − y) cos θ + (−x + 3y 2 ) sin θ
∂r
Substituting for x and y in terms of r and θ gives

∂T
= 3r2 (cos3 θ + sin3 θ) − 2r cos θ sin θ
∂r
Similarly,
∂T
= 3r3 (sin θ − cos θ) cos θ sin θ + r2 (sin2 θ − cos2 θ)
∂θ

2.6 High order partial derivatives


fx and fy are in general still both functions of x and y and so may be differentiated again with respect to
either variables. We write, for example,

∂2f
 
∂ ∂f
= = fxx (x, y)
∂x ∂x ∂x2

This is called the second-order partial derivative with respect to x. Similarly,

∂2f
 
∂ ∂f
= = fyy (x, y)
∂y ∂y ∂y 2

We can also calculate mixed derivatives


∂2f
 
∂ ∂f
= = fxy (x, y)
∂x ∂y ∂x∂y

and
∂2f
 
∂ ∂f
= = fyx (x, y)
∂y ∂x ∂y∂x
∂2f
We must be careful with the notation here. We use to mean differentiate first with respect to y and
∂x∂y
∂2f
then with respect to x and we use to mean differentiate first with respect to x and then with respect to
∂y∂x
y. However, for most common functions, the mixed derivatives are equal,

∂2f ∂2f
=
∂x∂y ∂y∂x

Example 2.6.1 Given f (x, y) = 3xy 3 − 2xy + sin x, find all second order partial derivatives of f (x, y).
2.7. PARTIAL DIFFERENTIAL EQUATIONS 15

Solution:

∂f
= 3y 3 − 2y + cos x
∂x
∂2f
 
∂ ∂f ∂
= = (3y 3 − 2y + cos x) = − sin x
∂x2 ∂x ∂x ∂x
∂2f
 
∂ ∂f ∂
= = (3y 3 − 2y + cos x) = 9y 2 − 2
∂y∂x ∂y ∂x ∂y
∂f
= 9xy 2 − 2x
∂y
∂2f
 
∂ ∂f ∂
= = (9xy 2 − 2x) = 9y 2 − 2
∂x∂y ∂x ∂y ∂x
∂2f
 
∂ ∂f ∂
= = (9xy 2 − 2x) = 18xy
∂y 2 ∂y ∂y ∂y
We found that
∂2f ∂2f
= 9y 2 − 2 =
∂y∂x ∂x∂y
Third, fourth and higher order derivatives are found in a similar way to finding second order derivatives.
It is easy to image computing partial derivatives by iterating the process of differentiating with respect to
one variable, while all others are held constant.

Example 2.6.2 Find all third order partial derivatives of

f (r, s) = sin(2r) − 3r4 s2

Solution:

∂f ∂f
= 2 cos(2r) − 12r3 s2 = −6r4 s
∂r ∂s
∂2f ∂2f
= −4 sin(2r) − 36r2 s2 = −6r4
∂r2 ∂s2
∂2f
= −24r3 s
∂r∂s
The third order derivatives are found by differentiating the second derivatives

∂3f ∂ ∂2f
 
= = −8 cos(2r) − 72rs2
∂r3 ∂r ∂r2
∂3f
 2 
∂ ∂ f
= = −72r2 s
∂r2 ∂s ∂r ∂r∂s
∂3f ∂ ∂2f
 
= = −24r3
∂r∂s2 ∂r ∂s2
∂3f ∂ ∂2f
 
= =0
∂s3 ∂s ∂s2

Note that the mixed derivatives can be calculated in a variety of ways:

∂3f
 2 
∂ ∂2f
 
∂ ∂ f
= =
∂r2 ∂s ∂r ∂r∂s ∂s ∂r2
3 2
   2 
∂ f ∂ ∂ f ∂ ∂ f
2
= 2
=
∂r∂s ∂r ∂s ∂s ∂r∂s

2.7 Partial differential equations


Partial differential equations (PDE) occur in many areas of engineering. If a variable depends upon two or
more independent variables, then it is likely this dependence can be described by a PDE. The dependent
variables are often time t and space coordinates x, y and z.
16 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

One example is the wave equation. The displacement, u of the wave depends upon time and position.
Under certain assumptions, the displacement of a wave travelling in one dimension satisfies
∂2u ∂2u
2
= c2 2
∂t ∂x
where c is the speed of the wave. This PED is called the one dimensional wave equation. Under prescribed
conditions, the subsequent displacement of the wave can be calculated as a function of position and time.
Example 2.7.1 Verify that
u(x, t) = sin(x + 2t)
is a solution of the one dimensional wave equation
∂2u ∂2u
= 4
∂t2 ∂x2
Solution:
The first order partial derivatives are calculated
∂u ∂u
= cos(x + 2t), = 2 cos(x + 2t)
∂x ∂t
The second partial derivatives are
∂2u ∂2u
= − sin(x + 2t), = −4 sin(x + 2t)
∂x2 ∂t2
Now,
∂2u ∂2u
= −4 sin(x + 2t) = 4(− sin(x + 2t)) = 4
∂t2 ∂x2
Hence, u(x, t) = sin(x + 2t) is a solution of the given wave equation.
Example 2.7.2 Verify that
x
f (x, y) = xy +
y
is a solution of the partial differential equation
∂2f ∂2f
y + 2x = 2x
∂y 2 ∂x∂y
Solution:
The first partial derivatives are
∂f 1 ∂f x
=y+ and =x− 2
∂x y ∂y y
and the second order partial derivatives are
∂2f
   
∂ ∂f ∂ x
= = x − 2 = 2xy −3
∂y 2 ∂y ∂y ∂y y
∂2f
   
∂ ∂f ∂ x 1
= = x− 2 =1− 2
∂x∂y ∂x ∂y ∂x y y
Therefore,  
1 2x
y(2xy −3 ) + 2x 1 − 2 = 2xy 2 + 2x − 2 = 2x
y y
x
Hence, f (x, y) = f (x, y) = xy + is a solution of the given equation.
y
Another important PDE is Laplace equation, which is used extensively in electrostatics. Under certain
conditions the electrostatic potential in a region is described by a function φ(x, y), which is satisfies Laplace
equation in two dimensions.
∂2φ ∂2φ
+ 2 =0
∂x2 ∂y
This equation is so important that a whole area of applied mathematics, called potential theory, is devoted
to the study of its solution.
2.8. THE STATIONARY POINTS OF A FUNCTION OF TWO VARIABLES 17

Example 2.7.3 Verify that


1
φ(x, y, z) = p
x2 + y2 + z2
satisfies the three dimensional Laplace equation
∂2φ ∂2φ ∂2φ
+ 2 + 2 =0
∂x2 ∂y ∂z
Solution:
We begin by calculating the first partial derivative,
∂φ 1
= − (x2 + y 2 + z 2 )−3/2 (2x) = −x(x2 + y 2 + z 2 )−3/2
∂x 2
We use the product rule to find the second partial derivative
∂2φ 3
= −1(x2 + y 2 + z 2 )−3/2 − x(− )(x2 + y 2 + z 2 )−5/2 2x
∂x2 2
2 2 2 −5/2
= (x + y + z ) [−(x + y + z 2 ) + 3x2 ]
2 2

By a similar analysis we have


∂2φ
= (x2 + y 2 + z 2 )−5/2 [−(x2 + y 2 + z 2 ) + 3y 2 ]
∂y 2
∂2φ
= (x2 + y 2 + z 2 )−5/2 [−(x2 + y 2 + z 2 ) + 3z 2 ]
∂z 2
So
∂2φ ∂2φ ∂2φ
+ 2 + 2 = (x2 + y 2 + z 2 )−5/2 {−3(x2 + y 2 + z 2 ) + 3x2 + 3y 2 + 3z 2 } = 0
∂x2 ∂y ∂z
Therefore,
1
φ(x, y, z) = p
x2 + y2 + z2
is a solution of the three dimensional Laplace equation.

2.8 The stationary points of a function of two variables


Figure 2.7 shows a computer generated picture of the surface defined by the function z = x3 + y 3 − 3x − 3y,
where both x and y take values in the interval [−1.8, 1.8]. There are four features of particular interest on

Figure 2.7: A surface plot for the function f (x, y) = x3 + y 3 − 3x − 3y.

the surface. At point A there is a local maximum, at B there is a local minimum, and at C and D there are
what are known as saddle points.
18 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

At A the surface is at its greatest height in the immediate neighbourhood. If we move on the surface
from A we immediately lose height no matter in which direction we travel. At B the surface is at its least
height in the neighbourhood. If we move on the surface from B we immediately gain height, no matter in
which direction we travel.
The features at C and D are quite different. In some directions as we move away from these points along
the surface we lose height whilst in others we gain height. The similarity in shape to a horse’s saddle is
evident.
In Fig.2.7 at each of the points A, B, C, D the tangent plane to the surface is horizontal at the point of
interest. Such points are thus known as stationary points of the function. In the next section we show how
to locate stationary points and how to determine their nature using partial differentiation of the function
f (x, y).

2.9 Maximum and minimum points of a function of two variables


We knew that to find the turning points of y(x) we solve
dy
=0
dx
d2 y
The sign of the second derivative is then used to distinguish between a maximum point and a minimum
dx2
point. The analysis is very similar for a function of two variables.
To locate maximum and minimum points we equate both partial derivatives to zero, that is we solve

∂f (x, y) ∂f (x, y)
= 0, =0
∂x ∂y

Note that this is similar to locating and identifying turning points of a function of one variable. Equating
the first order partial derivatives to zero locates the stationary points, however, it does not identify them as
a maximum or minimum point. To distinguish between these various points a test involving second partial
derivative must be made.
Let f (x, y) and its first and second partial derivatives be continuous in a neighbourhood of x0 , y0 ) and
let fx (x0 , y0 ) = fy (x0 , y0 ) = 0, then
• f (x, y) has a local maximum at (x0 , y0 ) if

fxx < 0, fxx fyy − (fxy )2 > 0 at (x0 , y0 )

• f (x, y) has a local minimum at (x0 , y0 ) if

fxx > 0, fxx fyy − (fxy )2 > 0 at (x0 , y0 )

• f (x, y) has a saddle point at (x0 , y0 ) if

fxx fyy − (fxy )2 < 0 at (x0 , y0 )

• non conclusion is possible at (x0 , y0 ) if

fxx fyy − (fxy )2 = 0 at (x0 , y0 )

Actually, there is a pattern for the above description. Consider the array of second derivatives (remember
fxy = fyx ):  
fxx fxy
fxy fyy
Then notice that the conditions we have just derived depend on the sign of fxx and

fxx fxy

fxy fyy

the determinant of the array. This is the key. It is a classic result of linear algebra that the sign of the
quadratic form in the above is dependent on such determinant conditions. This is the way in which the idea
is generalized to functions of more than two variables, and although things do become more complicated,
the determinant notation greatly simplifies things.
2.9. MAXIMUM AND MINIMUM POINTS OF A FUNCTION OF TWO VARIABLES 19

Example 2.9.1 Locate and identify the stationary points of

f (x, y) = xy − x2 − y 2

Solution:
The first order partial derivatives are found

∂f ∂f
= y − 2x = 0, = x − 2y = 0
∂x ∂y

Solving the above equations, it yields x = 0 and y = 0. The second partial derivatives are found

∂2f ∂2f ∂2f


fxx = = −2, fxy = = 1, fyy = = −2
∂x2 ∂x∂y ∂y 2

The second derivative test to identify the stationary point is used. Now

fxx fyy − (fxy )2 = (−2)(−2) − 12 = 3 > 0

Since fxx < 0, then (0, 0) is a maximum point as shown in Fig.2.8.

0
f-20 4

-40 2
-4 0
Y
-2
0 -2
X 2
4 -4

Figure 2.8: Plot of f (x, y) = xy − x2 − y 2

Example 2.9.2 Locate and identify the stationary points of

f (x, y) = x2 + xy + 3x + 2y + 5

Solution:
The first partial derivative are found

fx = 2x + y + 3 = 0, fy = x + 2 = 0

the only turning point is thus (−2, 1). Clearly,

fxx = 2, fyy = 0, fxy = 1

So
fxx fxy 2 1

fyx = = −1 < 0
fyy 1 0

and therefore the turning point (−2, 1) is a saddle point.


Finally, we can tackle practical engineering problems involving partial derivatives. The following is a
simple engineering problem:

Example 2.9.3 Consider a closed rectangular box with dimension x, y and z. If the fixed volume of the box
is 1000 cm3 , find the dimensions so that it has minimum total surface area. What conclusion can you draw
from your result?
20 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

Solution:
The volume
Volume = xyz = 1000
1000
z=
xy
The surface area, A, is given by
A = 2xy + 2yz + 2xz
We need to replace the z term and get

1000 1000
A = 2xy + 2yz + 2xz = 2xy + 2y + 2x
xy xy
2000 2000
=2xy + +
x y

AT what values of x and y does A have a minimum surface area?


First we need to find the stationary points by differentiating

∂A ∂A
=2y − 2000x−2 , = 2x − 2000y −2
∂x ∂y

By equating these to zero we have

2y − 2000x−2 =0
2x − 2000y −2 =0

From the first equation we have

2000
2y = =⇒ x2 y = 1000
x2
From the second equation we have

2000
2x = =⇒ xy 2 = 1000
y2

Combining both equation we have


x2 y = xy 2 = 1000
Dividing through by xy gives
x=y
Therefore, we have
x = y = 10
Does these values x = 10 and y = 10 give the minimum surface area?
We have to check it base on the following rule:

• if fxx fyy − (fxy )2 > 0 and fxx > 0 then the stationary point is a minimum.

• if fxx fyy − (fxy )2 > 0 and fxx < 0 then the stationary point is a maximum.

• if fxx fyy − (fxy )2 < 0 then it is a saddle point.

(Please check it with function A(x, y) and give your answer)

Hence, x = 10, y = 10 gives minimum surface area. Then,

1000
z= = 10
xy

So, we can conclude that the minimum surface area of a rectangular box containing a fixed volume of 1000
cm3 is a cube of 10cm × 10cm × 10cm.
2.10. TAYLOR SERIES FOR FUNCTIONS OF TWO VARIABLES 21

2.10 Taylor series for functions of two variables


This is one of these topics where the details and the complications of the results belie their essential simplicity
and structure. The results look messy, but provided you are familiar with the Taylor series for a single variable
and with the binomial theorem, then things are not too bad.
Before we launch into the formal theory of power series for functions of two variables, let us see what we
can do using what we know about series for function of a single variable. So let us start with the following.

2.10.1 Taylor theorem for a function of a single variable


If f (x) is a function of a single variable x which has continuous derivatives up to (n + 1)th order in an
interval I, then, for any numbers x, x + h on this interval,

h2 ′′ h3 hn (n)
f (x + h) = f (x) + hf ′ (x) + f (x) + f ′′′ (x) + · · · + f (x) + Rn
2! 3! n!
where the remainder term Rn may be written in the Lagrange form

hn+1 (n+1)
Rn = f (x + θh), 0<θ<1
(n + 1)!

The special case when we take x = 0 yields Maclaurin theorem

h2 ′′ h3 hn (n)
f (h) = f (0) + hf ′ (0) + f (0) + f ′′′ (0) + · · · + f (0) + Rn
2! 3! n!
where
hn+1 (n+1)
Rn = f (θh), 0<θ<1
(n + 1)!
which is also referred to as expansion about the origin.

2.10.2 Taylor theorem for a function of two variables


Now consider a function of two variables f (x, y) whose partial derivatives up to order n + 1 are all continuous
in some region D of the xy-plane. Here comes the cleaver bit. Define a function

F (t) = f (x + ht, y + kt) = f (α, β)

treated as a function of t alone, for x, y, h, k all regarded as parameters. Clearly, F (0) = f (x, y). Also, by
the conditions imposed on f (x, y), F (t) is a continuous function of t whenever (x + ht, y + kt) lies in the
region D. Also, F ′ (t) exists and is continuous on D.
Example 2.10.1 Show that
∂f ∂f
F (t) = h +k
∂x ∂y
and obtain an expression for F (n) (t).
Solution:
We only have to apply the expression for the total derivative
∂f dα ∂f dβ ∂f ∂f ∂f ∂f
F ′ (t) = + =h +k =h +k
∂α dt ∂β dt ∂α ∂β ∂x ∂y
We can think of this in the operator form
 
∂ ∂
F ′ (t) = h +k f (x + ht, y + kt)
∂x ∂y

Similarly,
 2
∂ ∂
F ′′ (t) = h +k f (x + ht, y + kt)
∂x ∂y
∂2f ∂2f ∂2f
= h2 2 + 2hk + k2 2
∂x ∂x∂y ∂y
22 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

Furthermore, the nth derivative may be written


 n
(n) ∂ ∂
F = h +k f (x + ht, y + kt)
∂x ∂y

We can therefore apply Maclaurin theorem for a single variable to F (t) and get

t2 ′′ t3 tn
F (t) = F (0) + tF ′ (0) + F (0) + F ′′′ (0) + · · · + F (n) (0) + Rn
2! 3! n!
If we now return to the original (x, y) variables and put t = 1 then this finally gives us:
For simplicity, we state the theorem for a rectangular region. If f (x, y) and its partial derivatives up to order
n + 1 are continuous throughout an open rectangular region D centred on (x, y), then, throughout D,
 
∂ ∂
f (x + h, y + k) = f (x, y) + h +k f (x, y)
∂x ∂y
 2  n
1 ∂ ∂ 1 ∂ ∂
+ h +k f (x, y) + · · · + h +k f (x, y) + Rn
2! ∂x ∂y n! ∂x ∂y

where  n+1
1 ∂ ∂
Rn = h +k f (x + θh, y + θk), 0<θ<1
(n + 1)! ∂x ∂y
Note that this is very similar to Taylor theorem for single variable with an operator (h∂/∂x + k∂/∂y)n .

Example 2.10.2 Let f (x, y) = cos x cos y and (x, y) = (0, 0). Find the second order Taylor series.

Solution:
We have
f (x, y) = cos x cos y
f (0, 0) = 1
fx (0, 0) = − sin x cos y|(0,0) = 0
fy (0, 0) = − cos x sin y|(0,0) = 0
fxx (0, 0) = − cos x cos y|(0,0) = −1
fxy (0, 0) = sin x sin y|(0,0) = 0
fyy (0, 0) = − cos x cos y|(0,0) = −1

Hence,
1 1 1
f (x, y) ≈ 1 + (−1 · x2 − 1 · y 2 ) = 1 − x2 − y 2
2 2 2
Example 2.10.3 Measuring the height of a building
The height h of a building is estimated from (i) the known horizontal distance x between the point of ob-
servation M and the foot of the building and (ii) the elevation angle θ between the horizontal and the line
joining the point of observation to the top of the building (see Fig.2.9). If the measured horizontal distance
is x = 150 m and the elevation angle is θ = 40o , estimate the error in measured building height due to an
error of 0.1o degree in the measurement of the angle of elevation.

Figure 2.9: Geometry of the measurement for a building.


2.10. TAYLOR SERIES FOR FUNCTIONS OF TWO VARIABLES 23

Solution:
The variables x, θ and h are related by
h
tan θ = , x tan θ = h (2.10.1)
x
The error in h resulting from a measurement error in θ can be deduced by differentiating equation (2.10.1):

d(x tan θ) dh dx d(tan θ) dh


= =⇒ tan θ +x =
dθ dθ dθ dθ dθ
This can be written
dx dh
tan θ + x sec2 θ = (2.10.2)
dθ dθ
Equation (2.10.2) gives the relationship among the small variations in variables x, h and θ. Since x is
dx
assumed to be without error and independent of θ, = 0 and equation (2.10.2) becomes

dh
x sec2 θ = (2.10.3)

Equation (2.10.3) can be considered to relate the error in building height δh to the error in angle δθ:

δh
≈ x sec2 θ
δθ
40π 2π
It is given that x = 150 m, the incidence angle θ = 40o can converted to radians, θ = = rad. Then
180 9
the error in angle δθ = 0.1o need to be expressed in radians for consistency of the units in (2.10.3).
0.1π π
So δθ = = rad. Hence, from equation (2.10.3)
180 1800
π
δh = 150 ≈ 0.45
1800 × cos2 (2π/9)

So the error in building height resulting from an error in elevation angle of 0.1o is about 0.45 m.
24 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES

2.11 Exercises
1. Find the first partial derivatives of the following functions

2 2 x 3x2 y
(a) z = 2x + 3y (b) z = x y + xy (c) z= (d) z= −
y y x
2 2
+y 2 ) 2
(e) f = xy 2 + ex y
(f ) f = e−(x (g) f = x2 e−y (h) f = x4 y 2 + xy

2. Find the first order partial derivatives of the following functions


sin y
(a) z = 2 sin x + 3 cos y (b) z = xy sin y (c) z = sin(x + y) (d) z=
x
(e) y = tex (f ) y = x2 e−t (g) y = 3x2 e2t + t3 e−x (h) y=e 2x+3t

y  
p x
(i) z = x2 + y 2 (j) z = x ln (k) z = ln(2x − 3y) (l) z = sin
x y

3. Evaluate the first partial derivatives of the following functions at x = −1, y = 2


x+y 4x
(a) f= (b) z= (c) z = 2ex ey (d) f = (xy)3 + x
x−y y

4. Verify that u(x, y) = x2 + xy is a solution of the partial differential equation


∂u ∂u
−2 = y.
∂x ∂y

5. Show that φ(x, y) = x sin y + ex cos y satisfies

∂2φ ∂2φ
+ 2 = −x sin y.
∂x2 ∂y

6. Let f (x, y) = x sin(xy 2 ), find all second order partial derivatives of f (x, y).
7. Show that if w = f (u, v) satisfies the Laplace equation fuu + fvv = 0 and if u = (x2 − y 2 )/2 and v = xy,
then w satisfies the Laplace equation wxx + wyy = 0.
8. In physics, one dimensional wave equation is given by
∂2w 2
2∂ w
= c
∂t2 ∂x2
Show that the following functions are all solution of the wave equation:
(a) w = sin(x + ct)
(b) w = 5 cos(3x + 3ct) + ex+ct
(c) w = f (u), where f is a differentiable function of u, and u = a(x + ct), where a is a constant.
9. Find the local extreme values of the function

f (x, y) = xy − x2 − y 2 − 2x − 2y + 4

10. Determine the nature of the stationary points of the function

f (x, y) = 4 − x2 − xy − y 2

11. Given
H(t) = sin(3x − y)
and
1 2
x = 2t2 − 3, y= t − 5t + 1
2
use the chain rule to show that
 
dH(t) 11 2
= (11t + 5) cos t + 5t − 10
dt 2
2.11. EXERCISES 25

12. Given p
φ= x2 + y 2
(a) show
∂2φ 3

2
= y 2 (x2 + y 2 )− 2
∂x
(b) verify that φ is a solution of
∂2φ ∂2φ 1
+ 2 =p
∂x2 ∂y x + y2
2

13. Given the stress function, Ω(x, y), as

Ω(x, y) = Ax3 y 2 + Bxy 2 , (A 6= 0, B 6= 0)

find
∂4Ω ∂4Ω ∂4Ω
∇4 Ω = + 2 +
∂x4 ∂x2 ∂y 2 ∂y 4
If ∇4 Ω = 0 then Ω(x, y) is called the Airy stress function. Test whether the above Ω(x, y) is an Airy
stress function for x 6= 0.
14. The fluid velocity, v, around a sphere of radius r is given by

r3
 
v = v0 1 + 3
x

The streamline acceleration, a, is defined by


∂v
a=v
∂x
Show that
r3 r3
 
a= −3v02 1+ 3
x x4
At what value of x is a = 0?
15. Given
1
z = xexy , x = t2 , y=
t
dz
find .
dt
16. Find the first order partial derivatives of the following functions
p  2
x2 + y 2 + z 2 x + y2 + z2

(a) f = (b) z = sin
x+y+z z2

Solution:
∂z
1. (a) ∂x = 2, ∂z
∂y
= 3. (b) ∂z
∂x
= 2xy + y 2 , ∂z
∂y
= x2 + 2xy. (c) ∂z
∂x
= 1
y
∂z
,
∂y
= − yx2 . (d) ∂z
∂x
= 6x
y
+
√ 2 2 2 2
y 2 −(x +y 2 )
2
x2
, ∂z
∂y
= −3x
y2
− 1
√ .
2x y
(e) fx = y 2 + 2xyex y , fy = 2xy + x2 ex y , (f) fx = −2xe−(x +y ) , fy = −2ye ,
−y 2 2 2
3 2 4
(g) fx = 2xe , fy = −2x ye , (h) 4x y + y, fy = 2yx + x
−y

∂z ∂z ∂z ∂z ∂z ∂z
2. (a) ∂x = 2 cos x, ∂y = −3 sin y. (b) ∂x = y sin y, ∂y = x sin y + xy cos y, (c) ∂x = cos(x + y), ∂y = cos(x + y).
sin y cos y
∂z
(d) ∂x = − 2 , ∂y = ∂z ∂y x ∂y x ∂y −t ∂y 2 −t ∂y
, (e) ∂x = te , ∂t = e . (f) ∂x = 2xe , ∂t = −x e , (g) ∂x = 6xe − t3 e−x ∂y 2t
∂t
=
x x
2 2t 2 −x ∂y 2x+3t ∂y 2x+3t x y y x
6x e − 3t e , (h) ∂x = 2e , ∂t = 3e , (i) zx = √ , zy = √ , (j) zx = ln( x ) − 1, zy = y , (k)
2 2 2 2 x +y x +y
2 3
zx = 2x−3y , zy = 2x−3y , (l) zx y1 cos( xy ), zy = − yx2 cos( xy ).
4 2
3. (a) − 9 , − 9 , (b) 2, 1, (c) 5.4366, 5.4366 (d) 25, −12
6. fx = sin(xy 2 ) + xy 2 cos(xy 2 ), fxx = 2y 2 cos(xy 2 ) − xy 4 sin(xy 2 ), fxy = fyx = 4xy cos(xy 2 ) − 2x2 y 3 sin(xy 2 ),
fy = 2x2 y cos(xy 2 ), fyy = 2x2 cos(xy 2 ) − 4x3 y 2 sin(xy 2 )
9. a local maximum at (−2, −2), the value of f at this point is f (−2, −2) = 8.
x(y+z)−y 2 −z 2 −x2 +xy+z(y−z)
10. (0, 0) is local maximum. 15. dz dt
= 2tet + t2 et . 16. (a) fx = 2

2 2 2
,fy = 2

2 2 2
,
(x+y+z) x +y +z (x+y+z) x +y +z
     
x2 +y 2 +z 2 x2 +y 2 +z 2 x2 +y 2 +z 2
2x cos 2y cos 2(x2 +y 2 ) cos
−x2 +xz+y(z−y) z2 z2 z2
fz = √ . (b) fx = z2
, fy = z2
,fz = − z3
(x+y+z)2 x2 +y 2 +z 2
26 CHAPTER 2. MULTIVARIABLE FUNCTIONS AND THEIR DERIVATIVES
Chapter 3

Multiple integrations

3.1 Introduction
Before starting on multiple integrals let us do a quick review of the definition of a definite integral for
functions of a single variable. First, when working with the integral,
Z b
f (x)dx
a

we think of x as coming from the interval a ≤ x ≤ b. For this integral we can say that we are integrating
over the interval a ≤ x ≤ b. When we derived the definition of the definite integral we first thought of this
as an area problem. We first asked what the area under the curve was, and to do this we broke up the
interval a ≤ x ≤ b into n subintervals of width ∆x and choose a point, x∗i , from each interval as shown in
Fig. 3.1. Each of the rectangles has height of f (x∗i ) and we then use the area of each of these rectangles to

Figure 3.1: An area under the curve y = f (x).

approximate the area as follows:

A ≈ f (x∗0 )∆x + f (x∗1 )∆x + · · · + f (x∗n )∆x

To get the exact area we must take the limit as n goes to infinity and this was also the definition of the
definite integral:
Z b Xn
f (x)dx = lim f (x∗i )∆x
a n→∞
i=0

In a similar manner, the volume under a surface (given by a function of two variables z = f (x, y)) and above
the xy plane can be found by integrating the function z = f (x, y) twice, once with respect to x and once
with respect to y.
We start out by assuming that a function z = f (x, y) is defined on the region R which is a rectangle as
follows
R = [a, b] × [c, d]

27
28 CHAPTER 3. MULTIPLE INTEGRATIONS

This means that the ranges for x and y are a ≤ x ≤ b and c ≤ y ≤ d. We divide up a ≤ x ≤ b into n
subintervals and divide up c ≤ y ≤ d into m subintervals. This will divide up R into a series of smaller
rectangles and from each of these we choose a point (x∗i , yj∗ ). Here is a sketch of this set up as shown in
Fig.3.2. Now, over each of these smaller rectangles we construct a box whose height is given by f (x∗i , yj∗ ) as

Figure 3.2: A sketch of the region R.

shown in Fig.3.3. Each of the rectangles has a base area of ∆A and a height of f (x∗i , yj∗ ), so the volume of

Figure 3.3: A sketch of these small boxes on the region R.

each of these boxes is f (x∗i , yj∗ )∆A. The volume under the surface z = f (x, y) is then approximately,

n X
X m
V ≈ f (x∗i , yj∗ )∆A
i=0 j=0

Here, we have a double sum since we need to add up volumes in both the x and y directions. To get a better
estimation of the volume we will take n and m larger and larger and to get the exact volume we will need
to take the limit as both n and m go to infinity. In other words,
n X
X m
V = lim f (x∗i , yj∗ )∆A
m,n→∞
i=0 j=0

This looks a lot like the definition of the integral of a function of single variable. In fact this is also the
3.2. DOUBLE INTEGRALS 29

definition of a double integral, or more exactly an integral of a function of two variables over a rectangle,
ZZ X m
n X
f (x, y)dA = lim f (x∗i , yj∗ )∆A
R m,n→∞
i=0 j=0

Note the similarities and differences in the notation to single integrals. We have two integrals to denote the
fact that we are dealing with a two dimensional region and we have a differential here as well. Note that
the differential is dA instead of the dx and dy that we are used to seeing. Note that we have the R written
below the two integrals to denote the region that we are integrating over.
Note that one interpretation of the double integral of f (x, y) over the rectangle R is the volume under
the function (surface) f (x, y) (and above the xy-plane),
ZZ
Volume = f (x, y)dA
R

In the next section we start looking at how to actually compute double integrals.

3.2 Double integrals


In the previous section we gave the definition of the double integral. However, just like with the definition
of a single integral the definition is very difficult to use in practice and so we need to start looking into how
we actually compute double integrals by drawing on our experience with functions of a single variable.
We now use the following example to show how to integrate a continuous function f (x, y) over a bounded
region in the xy-plane. Suppose that we wish to calculate the volume under the surface (actually under the
plane)
z =4−x−y
over the rectangular region R
R = {0 ≤ x ≤ 2, 0 ≤ y ≤ 1}
in the xy-plane. Like single integrals, we can apply the method of slicing with slices perpendicular to the
x-axis (Figure 3.4), then the volume is
Z x=2
A(x)dx (3.2.1)
x=0

where A(x) is the cross-section area at x. For each value of x, we may calculate A(x) as the integral
Z y=1
A(x) = (4 − x − y)dy (3.2.2)
y=0

which is the area under the curve z = 4 − x − y in the plane of the cross section at x. In calculating A(x), x
is held fixed and the integration takes place with respect to y. Combining equations (3.2.1) and (3.2.2), we

Figure 3.4: To obtain the cross section area A(x) we hold x fixed and integrate with respect to y.
30 CHAPTER 3. MULTIPLE INTEGRATIONS

see that the volume of the entire solid is


Z 2 Z 2 Z y=1 
Volume = A(x)dx = (4 − x − y)dy dx
0 0 y=0
2 y=1 2
y2
  
7
Z Z
= 4y − xy − dx = − x dx (3.2.3)
0 2 y=0 0 2
2
x2
 
7
= x− =5
2 2 0

If we had just wanted to write instructions for calculating the volume, without carrying out any of the
integrations, we could have written
Z 2Z 1
Volume = (4 − x − y)dydx
0 0

This expression says that the volume is obtained by integrating 4 − x − y with respect to y from y = 0 to
y = 1, holding x fixed, and then integrating the resulting expression in x with respect to x from x = 0 to
x = 2.
What would have happened if we had calculated the volume by slicing with planes perpendicular to the
y-axis as shown in Fig.3.5? As a function of y, the typical cross-section area is
Z x=2
A(y) = (4 − x − y)dx = 6 − 2y (3.2.4)
x=0

The volume of the entire solid is therefore


Z y=1 Z y=1
Volume = A(y)dy = (6 − 2y)dy = 5
y=0 y=0

Again, we may write Z 1 Z 2


Volume = (4 − x − y)dxdy
0 0
This expression says that we can find the volume by integrating 4 − x − y with respect to x from x = 0 to
x = 2 as equation (3.2.3), and then integrating the result with respect to y from y = 0 to y = 1. In this
iterated integral, the order of integration is first x and then y, the reverse of the order in equation (3.2.4).
What do these two volume calculations with iterated integrals have to do with the double integral

Figure 3.5: To obtain the cross section area A(y) we hold y fixed and integrate with respect to x.

ZZ
(4 − x − y)dA
R
3.2. DOUBLE INTEGRALS 31

over the rectangle R : 0 ≤ x ≤ 2, 0 ≤ y ≤ 1? The answer is that they both give the same value of the
double integral. The following theorem published in 1907 by Guido Fubini says that the double integral of
any continuous function over a rectangle can be calculated as an integral in either order of integration.

Theorem 3.2.1 If f (x, y) is continuous through the rectangular region R : a ≤ x ≤ b, c ≤ y ≤ d, then


ZZ Z d Z b Z b Z d
f (x, y)dA = f (x, y)dxdy = f (x, y)dydx
R c a a c

Example 3.2.1 Evaluate a double integral


ZZ
(1 − 6x2 y)dxdy, R : 0 ≤ x ≤ 2, −1 ≤ y ≤ 1
R

Solution:
This integral is evaluated over the area as shown in Fig.3.6. By Fubini theorem, we have

O 2 x

-1

Figure 3.6: The plot of the integration domain R = [0, 2] × [−1, 1].

ZZ Z 1 Z 2 Z 1 x=2
Z 1
2 2 3

(1 − 6x y)dxdy = (1 − 6x y)dxdy = x − 2x y x=0
dy = (2 − 16y)dy = 4
R −1 0 −1 −1

Reversing the order of integration gives the same answer


Z 2 Z 1 Z 2 y=1
Z 2 Z 2
(1 − 6x2 y)dydx = y − 3x2 y 2 [(1 − 3x2 ) − (−1 − 3x2 )]dx =

y=−1
dx = 2dx = 4
0 −1 0 0 0

Example 3.2.2 Compute the following double integral over the rectangle R = [−2, −1] × [0, 1]
ZZ
(x2 y 2 + cos(πx) + sin(πy))dA
R

Solution:
In this example, we integrate with respect to x first,
ZZ Z 1Z −1
2 2
(x y + cos(πx) + sin(πy))dA = (x2 y 2 + cos(πx) + sin(πy))dxdy
R 0 −2
1  −1
1 3 2 1
Z
= x y + sin(πx) + x sin(πy) dy
0 3 π −2
Z 1   1
7 2 7 3 1 7 2
= y + sin(πy) dy = y − cos(πy) = +
0 3 9 π 0 9 π

Note that here we have used only the basic calculus skills.
In the previous examples, we looked at double integrals over rectangular regions. However, the problem
with this is that most of the regions are not rectangular so we need to now look at a double integral over a
bounded non-rectangular region R. There are two types of regions as shown in Fig.3.7.
The double integral for both of these cases are defined in terms of iterated integrals as follows:
32 CHAPTER 3. MULTIPLE INTEGRATIONS

Figure 3.7: Case 1: R = {a ≤ x ≤ b, g1 (x) ≤ y ≤ g2 (x)}, Case 2: R = {h1 (y) ≤ x ≤ h2 (y), c ≤ y ≤ d}.

Theorem 3.2.2 Let f (x, y) be continuous on a region R.


1. If R is defined by a ≤ x ≤ b, and g1 (x) ≤ y ≤ g2 (x) as shown in Fig.3.7 for Case 1, then
ZZ Z b Z g2 (x)
f (x, y)dxdy = f (x, y)dydx
R a g1 (x)

2. If R is defined by c ≤ y ≤ d, and h1 (y) ≤ x ≤ h2 (y) as shown in Fig.3.7 for Case 2, then


ZZ Z d Z h2 (y)
f (x, y)dxdy = f (x, y)dxdy
R c h1 (y)

Example 3.2.3 Evaluate the following integral over the given domain R
Z Z
(x − 2y)dA
R

where R = {0 ≤ x ≤ 1, 0 ≤ y ≤ 1 − x}.
Solution:
Z Z Z 1 Z y=1−x
(x − 2y)dA = (x − 2y)dydx
R 0 y=0
Z 1 y=1−x
Z 1
y 2 y=0 (−1 + 3x − 2x2 )dx

= xy − dx =
0 0
 1
3 2 3 2 1
= −x + x2 − x3 = −1 + − =−
2 3 0 2 3 6
Example 3.2.4 Evaluate the following integral over the given region R
ZZ
(4xy − y 3 )dA
R

where R is the region bounded by y = x and y = x3 .
Solution:
In this case we need to determine the two inequalities for x and y that we need to do the integral. The best
way to do this is the graph the two curves, which is shown in Fig.3.8. So, from the sketch we can see that
two inequalities are √
0 ≤ x ≤ 1, x3 ≤ y ≤ x
we can now evaluate the integral as

Z Z Z 1 Z x
3
(4xy − y )dA = (4xy − y 3 )dydx
R 0 x3
1   √x 1  
1 7 2 1
Z Z
= 2xy − y 42
dx = x − 2x7 + x12 dx
0 4 x3 0 4 4
 1
7 3 1 8 1 55
= x − x + x13 =
12 4 52 0 156
3.2. DOUBLE INTEGRALS 33


Figure 3.8: Integration domain R is bounded by the curves y = x and y = x3 .

Example 3.2.5 Find the area of the region R bounded by y = x and y = x2 in the first quadrant.
Solution:
We sketch the region as shown in Fig.3.9 and calculate the area as

1.0

0.8

0.6

0.4

0.2

0.2 0.4 0.6 0.8 1.0

Figure 3.9: The integration domain R is bounded by two curves y = x and y = x2 .

1 x 1 1 1
x2 x3

1
Z Z Z Z
x
Area = dydx = [y]x2 dx = (x − x2 )dx = − =
0 x2 0 0 2 3 0 6
Another method:
√ 1
1 y 1 √ 1 
√ 2 3/2 1 2 1
Z Z Z Z
y
Area = dxdy = [x]y dy = ( y − y) dy = y − y =
0 y 0 0 3 2 0 6
Example 3.2.6 Calculate
sin x
ZZ
dA
R x
where R is the triangle in the xy-plane bounded by the x-axis, the line y = x, and the line x = 1.
Solution:
If we integrate first with respect to y and then with respect to x, we find
Z 1Z x  Z 1 y=x Z 1
sin x sin x
dy dx = y dx = sin xdx = − cos(1) + 1 ≈ 0.46
0 0 x 0 x y=0 0

If we reverse the order of integration and attempt to calculate


Z 1Z 1
sin x
dxdy
0 y x
 
R sin x
we are stopped because dx cannot be expressed in terms of elementary functions.
x
There is no general rule for predicting which order of integration will be the good one in circumstances
like these, so don’t worry about how to start your integrations. Just forget ahead and if the order you first
choose does not work, try the other.
34 CHAPTER 3. MULTIPLE INTEGRATIONS

y=x

x=1
R

O
X

Figure 3.10: The integration domain R is bounded by the line y = x and the line x = 1.

3.3 Triple integral


At this point in the chapter, you can guess what triple integrals are like. Instead of a small interval or a small
rectangle, there is a small box. Instead of length dx or area dA = dxdy, the box has volume dV = dxdydz.
The goal is to put small boxes together (by integration). Hence, the techniques we have used for evaluating
double integrals can be generalised naturally to triple integrations. Whereas double integrals are evaluated
over two dimensional regions, clearly, triple integrals are evaluated over volumes.

Example 3.3.1 Evaluate Z x=1 Z y=1 Z z=1


I= (x + y + z)dzdydx
x=0 y=0 z=0

Solution:
What is meant by this expression is
Z x=1 Z y=1 Z z=1  
I= (x + y + z)dz dy dx
x=0 y=0 z=0

where, as before, the inner integral is performed first, integrating with respect to z, with x and y being
treated as constants. So,
Z x=1 Z y=1  1 !
z2
I= x + z + yz + dx
x=0 y=0 2 0
Z x=1 Z y=1 
1
= (x + y + )dy dx
x=0 y=0 2
Z x=1  1
y2

1
= xy + + y dx
x=1 2 2 0
Z 1  2 1
1 1 x 3
= (x + + )dx = +x =
0 2 2 2 0 2

Example 3.3.2 Evaluate the following triple integral


Z 3 Z − 23 x+2 Z 6−2x−3y
2xdzdydx
0 0 0

Solution:
Z 3 Z − 32 x+2 Z 6−2x−3y Z 3 Z − 23 x+2 Z 6−2x−3y 
2xdzdydx = 2xdz dydx
0 0 0 0 0 0
Z 3 Z − 23 x+2
= 2x(6 − 2x − 3y)dydx
0 0
3    3
4 3 1 4 8 3
Z
2 2
= x − 8x + 12x dx = x − x + 6x =9
0 3 3 3 0
3.4. EXERCISES 35

3.4 Exercises
1. Evaluate the following integrals
Z 1Z 3 Z 4Z 2 Z 2Z 3
(a) y 3 dxdy (b) xdxdy (c) (x2 y + 1)dxdy
0 0 0 0 1 2
1 3 Z 2Z 1 Z 2Z 4
y
Z Z
xy
(d) dxdy (e) xe dydx (f ) 6xy 2 dxdy
−1 2 x −1 0 1 2

Z 2Z y3 Z 9Z y Z 2Z x3p
x 3
(g) e y dxdy (h) x3 ey dxdy (i) x4 + 1dydx
1 y 0 0 0 0

2. Evaluate each of the following double integrals over the indicated rectangles
Z Z Z Z
(a) 6xy 2 dA, R = [2, 4] × [1, 2] (b) (2x − 4y 3 )dA, R = [−5, 4] × [0, 3]
Z Z R
Z Z R
1
(c) xexy dA, R = [−1, 2] × [0, 1] (d) dA, R = [0, 1] × [1, 2]
R (2x + 3y)2
ZZ Z ZR

(e) (x2 + y)dA, R : −1 ≤ x ≤ 1, 0 ≤ y ≤ x2 (f ) 4dA, R : x2 + y 2 ≤ 9
ZZ R
ZZ R

(g) y sin xdA, R : −1 ≤ x ≤ π, sin2 x ≤ y ≤ 2 sin x (h) (ex + ey )dA, R : −3 ≤ x ≤ 3, −x ≤ y ≤ x


R R

3. Sketch the region and evaluate the following integrals


Z 3Z 2 Z πZ x Z ln 8 Z ln y
(a) (4 − y 2 )dydx (b) x sin ydydx (c) ex+y dxdy
0 0 0 0 1 0
Z πZ sin y Z 1 Z x2 Z 1 Z y
2
(d) ydxdy (e) 2x sin(y)dydx (f ) ey dxdy
0 0 0 0 0 0

4. Sketch the region of integration, reverse the order of integration if necessary, and evaluate the integrals
Z 1Z 1 Z πZ π Z 2Z 2x
sin y
(a) x2 exy dxdy (b) dydx (c) (4x + 2)dydx
0 y 0 x y 0 x2
Z 1/16Z 1/2 Z 1 Z 1 Z 1 Z √ 1−x2
(d) cos(16πx5 )dxdy (e) (x2 + y 2 )dydx (f ) (5x2 y)dydx
0 y 1/4 0 x −1 0
Z 1 Z 1 Z 3Z 9 Z 8Z 2
2 3
p
(g) ey dydx (h) x3 ey dydx (i) √
x4 + 1dxdy
0 x 0 x2 0 3 y

5. Evaluate
1
Z Z
p dA
R (x + 2y)
over the region R: x − 2y ≤ 1 and x ≥ y 2 + 1.

6. Evaluate Z Z
(x2 + y 2 )dxdy
R

over the region for which R: x ≥ 0, y ≥ 0 and x + y ≤ 1.

7. Sketch the domain of integration of the double integral



1 1−x2
x+y
Z Z
dx p dy
0 0 x2 + y 2

and evaluate the integral.

8. Find the volume of the region bounded by the paraboloid z = x2 + y 2 and below by the triangle
enclosed by the lines y = x, x = 0, and x + y = 2 in the xy-plane.
36 CHAPTER 3. MULTIPLE INTEGRATIONS

9. Evaluating triple iterated integrals:


Z 1Z 1Z 1 Z πZ πZ π
(a) (x2 + y 2 + z 2 )dzdydx (b) cos(u + v + w)dudvdw
0 0 0 0 0 0
Z 1Z π Z π eZ eZ e
1
Z
(c) y sin zdxdydz (d) dxdydz
0 0 0 1 1 1 xyz

10. Evaluate the double integrals



4 y π x2
1 y
Z Z Z Z
x

(a) e y
dxdy, (b) cos dydx
1 0 π/2 0 x x

11. Show that π π


sin u
Z 2
Z 2
dx du = 1
0 x u

Solution:
3
(b) 8 (c) 10 1 . (d) 0., (e) e2 − e−1 − 3, (f) 84, (g) 1 e4 − 2e, (h) 1 (e729 − 1), (i) 1 ( 173 − 1). 2. (a) 84, (b) −756, (c) e2 − e−1 − 3, (d)
p
1. (a)
4 2 2 12 6
2
− 1 (ln 8 − ln 2 − ln 5). 3. (a) 16, (b) π + 2, (c) 8 ln 8 − 16 + e, (d) π (e) 1 − sin(1) (f) 1/2(e − 1). 4. (a) (e − 1)/2, (b)2, (c) 8, (d) 1/80π,
6 2
(e) 1/3, (f) 2/3 (g) 1/2(e − 1), (h) 1 (e729 − 1), (i) 1 ( 173 − 1). 5. 2/3. 6. 1/6. 7. 1. 8. 16/3. 9. (a) 1, (b) 0, (c) π 3 /2(1 − cos 1), (d) 1. ,10.
p
12 6
(a) 14 (e − 1), (b) 1
3
Chapter 4

Vector calculus

4.1 Introduction
In many practical problems it is necessary to measure the rate of change of a scalar point function. For
example, in heat transfer problems we need to know the rate of change of temperature from point to point,
because that determines the rate at which heat flows. Similarly, if we are investigating the electric field due
to static charges, we need to know the variation of electric potential from point to point. To determine such
information, the ideas of calculus were extended to vector quantities. The first development of this was the
concept of the gradient of a scalar point function.
A vector field is a function that assigns a vector to each point at given space. Vector fields arise in
differential equations and differential geometry. Vector field is an important topic in multivariable calculus.
Two vector fields are illustrated as below in Fig.4.1:

-1

-2

-3

(a) -3 -2 -1 0 1 2 3 , (b)

Figure 4.1: Vector fields (a) F = (sin2 (x) + y) i + cos(x + y 2 ) j and (b) F = −y i − z j + x k .

4.2 Partial differentiation of vectors


Consider the vector field v = vx (x, y, z) i + vy (x, y, z) j + vz (x, y, z) k , where each component vx , vy and
vz is a function of x, y and z. Hence, it can be partially differentiated with respect to x, y and z, respectively,
∂v ∂vx ∂vy ∂vz
= i + j + k
∂x ∂x ∂x ∂x
∂v ∂vx ∂vy ∂vz
= i + j + k
∂y ∂y ∂y ∂y
∂v ∂vx ∂vy ∂vz
= i + j + k
∂z ∂z ∂z ∂z
These are new vectors with the magnitudes and directions different from those of v.
Similarly, higher derivative are defined as, for example,
∂2v ∂ 2 vx ∂ 2 vy ∂ 2 vz
= + +
∂x2 ∂x2 ∂x2 ∂x2
∂v ∂v ∂v ∂2v ∂2v
Example 4.2.1 If v = 3x2 y i + 2xyz j − 3x4 y 2 k , find , , . Further, find 2
and .
∂x ∂y ∂z ∂x ∂x∂z

37
38 CHAPTER 4. VECTOR CALCULUS

Solution:
∂v
= 6xy i + 2yz j − 12x3 y 2 k
∂x
∂v
= 3x2 i + 2xz j − 6x4 y k
∂y
∂v
= 0 i + 2xy j − 0 k = 2xy j
∂z
∂2v
= 6y i + 0 j − 36x2 y 2 k = 6y i − 36x2 y 2 k
∂x2
∂2v
= 2y j
∂x∂z
In the following sections, we study the three derivatives, that is: (i) the gradient of a scalar field (ii) the
divergence of a vector field and (iii) the curl of a vector field.

4.3 The gradient of a scalar field


Before giving the definition of the gradient of a scalar field, let us look at a heat transfer on a metal plate.
Fig.4.2 shows the metal plate heated at one corner and cooled by an ice bag at the opposite corner. All

Figure 4.2: Temperature contours and heat flow lines for a metal plate.

edges and surfaces are insulated. After a while a steady state situation exists in which the temperature φ at
any point remains the same. Some temperature contours are shown in Fig.4.2.
The direction in which φ changes fastest is along the line of greatest slope which is orthogonal (i.e.
perpendicular) to the contours. Hence, at each point of a scalar field we can define a vector field giving the
magnitude and direction of the greatest rate of change of φ locally.
A vector field, called the gradient, written grad φ, can be associated with a scalar field φ so that at
every point the direction of the vector field is orthogonal to the scalar field contour. This vector field is the
direction of the maximum rate of change of φ. As an example, the direction of the heat flow is along the flow
lines which are orthogonal to the contours (see the dashed lines in Fig.4.2(b)); this heat flow is proportional
to the vector field grad φ.

Definition 4.3.1 Given a scalar filed function of φ = φ(x, y, z) then the vector

∂φ ∂φ ∂φ
i + j + k = ∇φ = grad φ
∂x ∂y ∂z

is called as the gradient of the scalar function φ, which is a vector.

The operational vector or differential operator is denoted by the symbol ∇, i.e.,


 
∂ ∂ ∂
∇= i + j + k
∂x ∂y ∂z
which leads to the notation
grad φ = ∇ φ
Note that the process of forming a gradient applies only to a scalar field and result is always a vector field,
this means that φ is a scalar field but grad φ is a vector field.
Example 4.3.1 Find grad φ for (a) φ = xy 2 z 3 and (b) φ = x2 + 3y 2 + 2z 2
4.3. THE GRADIENT OF A SCALAR FIELD 39

Solution:
(a)

∂ ∂ ∂
grad φ = ∇ φ = (xy 2 z 3 ) i + (xy 2 z 3 ) j + (xy 2 z 3 ) k = y 2 z 3 i + 2xyz 3 j + 3xy 2 z 2 k
∂x ∂y ∂z

(b)
∂φ ∂φ ∂φ
grad φ = ∇ φ = i + j + = 2x i + 6y j + 4z k
∂x ∂y ∂z
Example 4.3.2 If φ = x3 y + xy 2 + 3y, find (1) ∇φ, (2) ∇φ(1, 2, 3), (3) |∇φ| at (1, 1, 1)

Solution:

1.
∂φ ∂φ ∂φ
= 3x2 y + y 2 , = x3 + 2xy + 3, =0
∂x ∂y ∂z
Hence,
∇φ = gradφ = (3x2 y + y 2 ) i + (x3 + 2xy + 3) j + 0 k

2.
∇φ(1, 2, 3) = (3(1)2 (2) + 22 ) i + (13 + 2(1)(2) + 3) j = 10 i + 8 j

3.
∇φ(1, 1, 1) = 4 i + 6 j + 0 k
p √
|∇φ(1, 1, 1)| = |4 i + 6 j + 0 k | = 42 + 62 + 02 = 52

The change in a function φ in a given direction (specified as a unit vector a) is determined from the scalar
product (dot product) (gradφ) · a. This scalar quantity is called the directional derivative. Note that

• a along a contour implies a is perpendicular to grad φ which implies a · gradφ = 0.

• a perpendicular to a contour implies a · grad φ is a maximum.

Example 4.3.3 Given φ = x2 y 2 z 2 , find

1. grad φ

2. gradφ at (−1, 1, 1) and a unit vector in this direction


3 4
3. the derivative of φ at (2, 1, −1) in the direction of b = i + k
5 5
Solution:

1.
∂φ ∂φ ∂φ
grad φ = ∇φ = i + j + k = 2xy 2 z 2 i + 2x2 yz 2 j + 2x2 y 2 z k
∂x ∂y ∂z

2. At (−1, 1, 1), grad φ = ∇ φ(−1, 1, 1) = −2 i + 2 j + 2 k , A unit vector in this direction is

grad φ −2 i + 2 j + 2 k 1 1
=p = √ (−2 i + 2 j + 2 k ) = √ (− i + j + k )
|grad φ| (−2)2 + 22 + 22 2 3 3

3 4
3. At (2, 1, −1), grad φ = 4 i + 8 j − 8 k . To find the derivative of φ in the direction of b = i + k
5 5
take the scalar product (vector dot product)
 
3 4 3 4
(4 i + 8 j − 8 k ) · i + k = 4 × + 0 + (−8) × = −4
5 5 5 5

So the derivative in the direction of b is −4.


40 CHAPTER 4. VECTOR CALCULUS

Example 4.3.4 Find grad f for f (x, y, z) = 3x2 + 2y 2 + z 2 at the point (1, 2, 3). Hence calculate the
1
directional derivative of f at (1, 2, 3) in the direction of the unit vector (2, 2, 1).
3
Solution:
Since
∂f ∂f ∂f
= 6x, = 4y, = 2z
∂x ∂y ∂z
we have that
grad f = ∇f = 6x i + 4y j + 2z k
At the point (1, 2, 3)
grad f (1, 2, 3) = 6 i + 8 j + 6 k
 
2 2 1
Thus the directional derivative of f at (1, 2, 3) in the direction of the unit vector , , is
3 3 3
 
2 2 1 34
(6 i + 8 j + 6 k ) · i + j + k =
3 3 3 3
1 34
Therefore, the directional derivative in the direction of the unit vector (2, 2, 1) is .
3 3

4.3.1 Physical interpretation of ∇φ


Suppose we think of the scalar filed φ(x, y, z) as describing the temperature throughout a region. This
temperature will vary from point to point. At a particular point it can be shown that ∇φ is a vector
pointing in the direction in which the rate of temperature increase is greatest. |∇φ| is the magnitude of
the rate of increase in that direction. Similarly, the rate of temperature decrease is greatest in the direction
of −∇φ. Analogous interpretations are possible for other scalar fields such as pressure and electrostatic
potential.
Example 4.3.5 Electrostatic potential
The electrostatic potential V in a region is given by
y
V =
(x2 + y 2 + z 2 )3/2
Suppose a unit charge is located in the region at the point with coordinates (2, 1, 0). Find the direction at this
point, in which the rate of decrease in potential is greatest.
Solution:
The rate of decrease is greatest in the direction of −∇V . We first calculate the first partial derivatives of V .
With writing
V = y(x2 + y 2 + z 2 )−3/2
we have
∂V 3
= − y(x2 + y 2 + z 2 )−5/2 (2x) = −3xy(x2 + y 2 + z 2 )−5/2
∂x 2
∂V 3
= − y(x2 + y 2 + z 2 )−5/2 (2y) + (x2 + y 2 + z 2 )−3/2
∂y 2
= −3y 2 (x2 + y 2 + z 2 )−5/2 + (x2 + y 2 + z 2 )−3/2
∂V 3
= − y(x2 + y 2 + z 2 )−5/2 (2z) = −3yz(x2 + y 2 + z 2 )−5/2
∂z 2
These partial derivatives can be evaluated at the point (2, 1, 0). That is
∂V ∂V ∂V
= −0.107, |(2,1,0) = 0.036, |(2,1,0) = 0
∂x (2,1,0) ∂y ∂z
and so
∇V |(2,1,0) = −0.107 i + 0.036 j + 0 k
Finally,
−∇V |(2,1,0) = 0.107 i − 0.036 j − 0 k
At the point (2, 1, 0) this vector point in the direction of greatest rate of decrease in potential. This is also
the direction of the electrostatic force experienced by the unit charge at that point.
4.4. THE DIVERGENCE OF A VECTOR FIELD 41

4.4 The divergence of a vector field


The vector character of the operator ∇ suggests that we can also consider dot and cross products in which
it appears as a factor. Let v = v(x, y, z) be a differentiable vector field and let vx , vy , vz be the components
of v. If
v = vx i + vy j + vz k
we can take each component in turn and differentiate it partially with respect to x, y and z, respectively,
this is,
∂vx ∂vy ∂vz
, ,
∂x ∂y ∂z
If we add the calculated quantities the result turns out to be a very useful scalar quantity known as the
divergence of v, that is
∂vx ∂vy ∂vz
div v = + +
∂x ∂y ∂z

This is commonly denoted by ∇ · v (vector dot product). If we use the vector operator notation introduced
in the previous section we have
 
∂ ∂ ∂ ∂vx ∂vy ∂vz
div v = ∇ · v = i + j + k · (vx i + vy j + vz k ) = + +
∂x ∂y ∂z ∂x ∂y ∂z

Note that the divergence of a vector field is always a scalar quantity.

4.4.1 Physical interpretation of ∇ · v


We can give a physical interpretation of ∇ · v as follows. If the vector field v represents a fluid velocity field,
then loosely speaking, the divergence of v evaluated at a point represents the rate at which fluid is flowing
away from or towards that point. A negative divergence is a convergence indicating a flow towards the point.
Physically positive divergence means that either the fluid is expanding or that fluid is being supplied by a
source external to the field. Conversely convergence means a contraction or the presence of a sink through
which fluid is removed from the field. The lines of flow diverge from a source and converge to a sink.
If there is no gain or loss of fluid anywhere then ∇ · v = 0 which is the equation of continuity for an
incompressible fluid. This means that outflow from any point must be matched by an equal inflow to balance
this.

Example 4.4.1 Find the divergence of the vector v = (2x − y 2 ) i + (3z + x2 ) j + (4y − z 2 ) k at the point
(1, 2, 3).

Solution:
Here
vx = 2x − y 2 , vy = 3z + x2 , vz = 4y − z 2
∂vx ∂vy ∂vz
= 2, = 0, = −2z
∂x ∂y ∂z
Thus, the divergence of the vector v is

div v = ∇ · v = 2 − 2z

so that at the point (1, 2, 3)


∇ · v|(1,2,3) = 2 − 2(3) = −4

Example 4.4.2 Find the divergence of F = x2 z i − 2y 3 z 3 j + xyz 2 k at the point (1, 0, 3).

Solution:

∂(x2 z) ∂(−2y 3 z 3 ) ∂(xyz 2 )


∇·F= + + = 2xz − 6y 2 z 3 + 2xyz
∂x ∂y ∂z
Hence,
(∇ · F)|(1,0,3) = 2(1)(3) − 6(0)(33 ) + 2(1)(0)(3) = 6
42 CHAPTER 4. VECTOR CALCULUS

Example 4.4.3 Show that the vector field

v = x sin y i + y sin x j − z(sin x + sin y) k

satisfies the equation of continuity, i.e., ∇ · v = 0

Solution:
We have
vx = x sin y, vy = y sin x, vz = −z(sin x + sin y)
so that
∂vx ∂vy ∂vz
= sin y, = sin x, = −(sin x + sin y)
∂x ∂y ∂z
Therefore,
∂vx ∂vy ∂vz
∇·v = + + = sin y + sin x − (sin x + sin y) = 0
∂x ∂y ∂z
and hence v satisfies the equation of continuity.

4.5 The curl of a vector field


In the similar manner, we can define the vector cross product of ∇ with v as follows.

Definition 4.5.1 If v = vx i + vy j + vz k , the curl of the vector v is defined as



i j k
∂ ∂ ∂
curl v = ∇ × v = ∂x ∂y ∂z
vx vy vz

This determinant is evaluated in the usual way, explicitly, we have


     
∂vz ∂vy ∂vx ∂vz ∂vy ∂vx
curl v = − i + − j + − k
∂y ∂z ∂z ∂x ∂x ∂y

Note that the curl of a vector field is always a vector field. We can write the curl more compactly as

curl v = ∇ × v

4.5.1 Physical interpretation of ∇ × v


The word curl was introduced by Maxwell in his studies of electromagnetic fields. However, the curl is easily
understood in connection with fluid. Let us use water as an example.
Suppose we have a flow of water and we want to determine if it has curl or not: is there any twisting or
pushing force? To test this, we put a paddle wheel into the water and notice if it turns. If it does turn, it
means this field has curl at that point. If it does not turn, then there is no curl.
What does it really mean if the paddle turns? Well, it means the water is pushing harder on one side
than the other, making it twist. The larger the difference, the more forceful the twist and the bigger the curl.
Also, a turning paddle wheel indicates that the field is uneven and not symmetric; if the field were even,
then it would push on all sides equally and the paddle would not turn at all. The fact that there is a twist
means the field is not conservative (this has nothing to do with its political views). A conservative field has
zero curl: there are no free twists to push you along. Alternatively, if a field has curl, it is not conservative.
Gravity is another example of a conservative field. Technically, if you lift a rock and then let it fall, the
energy you get from falling is the same as what you put in to lift the rock. Theoretically speaking, no energy
was gained or lost in this transaction.
To be technical, curl is a vector, which means it has a both a magnitude and a direction. The magnitude
is simply the amount of twisting force at a point. The direction is a little more tricky: it is the orientation
of the axis of your paddle wheel in order to get maximum rotation. In other words, it is the direction which
will give you the most free work from the field. Imagine putting your paddle wheel sideways in the whirlpool
- it would not turn at all. If you put it in the proper direction, it begins turning. For this reason in some
science texts the word rotation is sometimes used instead of curl. The symbol curl v is then replaced by rot
v, anyway.
4.5. THE CURL OF A VECTOR FIELD 43

Example 4.5.1 If v = x2 yz i − 2xy j + yz k , find ∇ × v.

Solution:

i j k
∂ ∂ ∂
∇ × v = ∂x ∂y ∂z
x2 yz −2xy yz
∂(x2 yz) ∂(yz) ∂((−2xy) ∂(x2 yz)
     
∂(yz) ∂(−2xy)
= − i + − j + − k
∂y ∂z ∂z ∂x ∂x ∂y
= (z − 0) i + (x2 y − 0) j + (−2y − x2 z) k = z i + x2 y j − (2y + x2 z) k
Hence,
∇ × v = z i + x2 y j − (2y + x2 z) k


Example 4.5.2 Find the curl of the vector

v = (2x − y 3 , 3z + x2 , 4y − z 2 )

at the point (1, 2, 3).

Solution:
Since
vx = 2x − y 3 , vy = 3z + x2 , vz = 4y − z 2
so that

i j k
∂ ∂ ∂
curl v = ∂x ∂y ∂z
2x − y 3 3z + x2 4y − z 2
∂(4y − z 2 ) ∂(3z + x2 ) ∂(2x − y 2 ) ∂(4y − z 2 ) ∂(3z + x2 ) ∂(2x − y 3 )
     
=i − + j − + k −
∂y ∂z ∂z ∂x ∂x ∂y
= i (4 − 3) + j (0 − 0) + k (2x + 3y 2 ) = i + (2x + 3y 2 ) k

Hence, at the point (1, 2, 3), we have

∇ × v = (1, 0, 14) = i + 14 k

Example 4.5.3 In a magnetic field B, an associated current is given by


1
I= (∇ × B)
µ0

Given the magnetic field B = B0 x k , find the associated current I. A mathematical statement of this problem
is that we need to evaluate the curl of B.

Solution:

i j k
∂ ∂ ∂
∇ × B = ∂x ∂y ∂z = 0 i − B0 j + 0 k = −B0 j
0 0 B0 x
and so
B0
I=− j
µ0
The current is perpendicular to the field and to the direction of variation of the field.

4.5.2 Conservative fields


Definition 4.5.2 F is a conservative vector field if

curl F = 0
44 CHAPTER 4. VECTOR CALCULUS

Example 4.5.4 Show that the vector field

F = zex sin y i + zex cos y j + ex sin y k

is a conservative field.

Solution:

We find


i j k


∂ ∂ ∂

∇ × F = ∂x ∂y ∂z




zex sin y zex cos y x
e sin y
= (e cos y − e cos y) i + (ex sin y − ex sin y) j
x x

+ (zex cos y − zex cos y) k


=0

We have shown that ∇ × F = 0 and so that the field is conservative.

4.5.3 The potential function


It can be shown that any conservative vector field, F can be expressed as the gradient of some scalar field
φ, i.e., F = ∇φ. The scalar φ is called as potential function.
If
F = f (x, y, z) i + g(x, y, z) j + h(x, y, z) k
is conservative, we can write
∂φ ∂φ ∂φ
F = ∇φ = i + j + k
∂x ∂y ∂z
so
∂φ ∂φ ∂φ
f (x, y, z) = , g(x, y, z) = , h(x, y, z) =
∂x ∂y ∂z
Example 4.5.5 The vector field v is derivable from the potential φ = 2xy + zx, find v.
Solution:
If v is derivable from the potential φ, then v = ∇φ, and so

v = ∇φ = (2y + z) i + 2x j + x k

and

i j k
∂ ∂ ∂

∇ × v = ∂x ∂y ∂z = 0 i + (1 − 1) j + (2 − 2) k = 0
2y + z 2x x

4.6 Examples involving grad, div and curl


So far we have used the vector operator in three ways:
1. The gradient of a scalar function φ:

∇φ ⇒ a vector field

∂φ ∂φ ∂φ
gradφ = ∇φ = i + j + k
∂x ∂y ∂z

where  
∂ ∂ ∂
∇= i + j + k
∂x ∂y ∂z
2. The divergence of a vector field:
4.6. EXAMPLES INVOLVING GRAD, DIV AND CURL 45

div v = ∇ · v ⇒ a scalar

∂vx ∂vy ∂vz


div v = ∇ · v = + +
∂x ∂y ∂z

3. The curl of a vector field:

curl v = ∇ × v ⇒ a vector field



i j k


∂ ∂ ∂

curl v = ∇ × v = ∂x ∂y ∂z


vx vy vz

4. Higher order derivatives can be also formed, giving the following:

∂2f ∂2f ∂2f


div (gradf ) = ∇ · ∇ f = + + = ∇2 f
∂x2 ∂y 2 ∂z 2

where ∇2 is called the Laplace operator.

Example 4.6.1 Verify that ∇×(∇×v) = ∇(∇·v)−∇2 v for the vector field v = 3xz 2 i −yz j +(x+2z) k .

Solution:

i j k
∂ ∂ ∂
∇ × v = ∂x ∂y ∂z = (y, 6xz − 1, 0)
3xz 2 −yz x + 2z

i j k
∂ ∂ ∂
∇ × (∇ × v) = ∂x ∂y ∂z = (−6x, 0, 6z − 1)
y 6xz − 1 0
∂(3xz 2 ) ∂(−yz) ∂(x + 2z)
∇·v = + + = 3z 2 − z + 2
∂x ∂y ∂z
∇(∇ · v) = (0, 0, 6z − 1)
and
∇2 v = (∇2 (3xz 2 ), ∇2 (−yz), ∇2 (x + 2z)) = (6x, 0, 0)
Thus,
∇(∇ · v) − ∇2 v = (−6x, 0, 6z − 1) = ∇ × (∇ × v)
Example 4.6.2 Show for any vector field F = F1 i + F2 j + F3 k that ∇ · (∇ × F) = 0.
Solution:

i j k
∂ ∂ ∂
∇ · (∇ × F) = div ∂x ∂y ∂z
F1 F2 F3
      
∂F3 ∂F2 ∂F1 ∂F3 ∂F2 ∂F1
= div − i + − j + − k
∂y ∂z ∂z ∂x ∂x ∂y
     
∂ ∂F3 ∂F2 ∂ ∂F1 ∂F3 ∂ ∂F2 ∂F1
= − + − + −
∂x ∂y ∂z ∂y ∂z ∂x ∂z ∂x ∂y
∂ 2 F3 ∂ 2 F2 ∂ 2 F1 ∂ 2 F3 ∂ 2 F2 2
∂ F1
= − + − + − =0
∂x∂y ∂z∂x ∂y∂z ∂y∂x ∂z∂x ∂z∂y
Here we have assumed mixed partial derivatives are the same, for example,

∂ 2 F3 ∂ 2 F3
=
∂x∂y ∂y∂x
46 CHAPTER 4. VECTOR CALCULUS

4.7 Exercises
1. Given v = 2xi + 3yzj + 5xz 2 k find
∂v ∂v ∂v
(a) , (b) , (c) .
∂x ∂y ∂z
2. Given v = 2i − xyzj + 3x2 zk find
∂v ∂v ∂v ∂2v ∂2v ∂2v
(a) , (b) , (c) , (d) 2
, (e) 2
, (f) .
∂x ∂y ∂z ∂x ∂y ∂z 2
3. If φ = x2 − y 2 − 3xyz, find
(a) ∇φ,
(b) evaluate ∇φ at the point (0, 0, 0),
(c) Is ∇φ the same as ∇(−φ)? Explain your answer.

4. The force in an electrostatic field given by f (x, y, z) has the direction of the gradient. Find ∇f and its
value at point P
x
(a) f = xy, P (3, −4) (b) f= , P (1, 1)
x2 + y2
π
(c) f = ln(x2 + y 2 ), P (4, 2) (d) f = ex cos y, P (1, )
2
1
(e) f=p , P (12, 0, 16) (f ) f = 2x2 + 4y 2 + 9z 2 , P (−1, 2, −4)
(x2 + y2 + z2 )

5. A vector field given by


v = 3x2 yi + 2y 3 zj + xz 3 k.
Find
(a) vx , vy , vz ,
∂vx ∂vy ∂vz
(b) , , .
∂x ∂y ∂z
(c) ∇ · v.

6. Find the divergence of each of the vector fields:


(a) v = x2 i + y 2 j + z 2 k,
(b) v = x2 y 2 i − y 2 j − xyzk.
(c) v = exy i + 2z sin(xy)j + x3 zk.

7. Find the curl of the vector fields


(a) v = xi − 3xyj + 4zk ,
(b) v = cos xi + sin xj.

8. A vector field F is given by F = x3 yi + 2y 2 j + (x + z 2 )k


(a) Find ∇ × F.
(b) Find ∇ × 3F.
(c) Is 3(∇ × F) the same as ∇ × (3F).

9. Determine div v and curl v for v = (x − cos yz)i + (y − cos xz)j + (z − cos xy)k.

10. Given p
r = xi + yj + zk, r = |r| = x2 + y 2 + z 2

(a) show that ∇ · r = 3 and that ∇ × r = 0 (provide r 6= 0)


(b) show that r
div =0
r3
(c) show that  
1 r
grad =− 3
r r
(d) show that  
1
∇2 =0
r
4.7. EXERCISES 47

11. Show that


curl curl v = grad div v − ∇2 v

12. Express each of the following in operator notation using ∇, ∇· and ∇×.
(a) grad(div v).
(b) curl (gradφ).
(c) curl (curl v).
(d) div (curl v).
(e) div (gradφ).

13. The surface water velocity on a straight uniform river 20 metres wide is modelled by the vector
1
v= x(20 − x) j where x is the distance from the west bank (see Fig.4.3).
50
(a) find the velocity v at each bank and at the midstream
(b) find ∇ × v at each bank and at the midstream

Figure 4.3: The diagram for Q13.

14. Let
u = zi + xj + yk, v = (y + z)i + (z + x)j + (x + y)k, f = x + y − z, g = xyz
find the following expressions

(a) curl (gv) (b) curl (u + v) (c) div (u × v)


(d) div (grad(f g)) (e) curl (gu + v) (f ) curl (grad(f g))

15. Find curl(curl F) given that F = x2 y 2 i + y 2 z 2 j + x2 z 2 k

16. Find Curl (F) and Div(F) for the given vector function
p p
F = (x2 + y 2 + z 2 ) i + (x2 + y 2 + z 2 ) j + x k

Solution:

1. (a) 2i + 5z 2 k (b) 3zj, (c) 3yj + 10xzk

2. (a) −yzj + 6xzk (b) −xzj (c) −xyj + 3x2 k, (d) 6zk, (e) 0, (f) 0.

3. (a) (2x − 3yz)i − (2y + 3xz)j − 3xyk, (b) 0


∂vx ∂vy ∂vz
5. (a) vx = 3x2 y, vy = 2y 3 z, vz = xz 3 . (b) = 6xy, = 6y 2 z, = 3xz 2 .
∂x ∂y ∂z
6. (a) 2x + 2y + 2z, , (b) 2xy 2 − 2y − xy, (c) yexy + 2xz cos(xy) + x3 .

7. (a) curlv = −3yk, (b) cos xk.

8. (a) −j − x3 k, (b) −3j − 3x3 k.

12. (a) grad(div v) = ∇(∇ · v), (b) curl (gradφ) = ∇ × (∇φ), (c) curl (curl v) = ∇ × (∇ × v),

(d) div (curl v) = ∇ · (∇ × v), (e) div (gradφ) = ∇ · (∇φ)..

13. (a) 0; 0; 2 j , (b) 2 k , − 2 k , 0


5 5
15. curl(curl F) = (4xz − 2x2 ) i + (4xy − 2y 2 ) j + (4yz − 2z 2 ) k .

z z x y x y
16. curl(F)= − q i + (−1 + q j + (q − q ) k , div(F)= q + q
x2 +y 2 +z 2 x2 +y 2 +z 2 x2 +y 2 +z 2 x2 +y 2 +z 2 x2 +y 2 +z 2 x2 +y 2 +z 2
48 CHAPTER 4. VECTOR CALCULUS
Chapter 5

Integration in vector fields

5.1 Introduction
This chapter treats integration in vector fields. The mathematics in this chapter is the line integral. The
importance of line integrals lies in their applications. These are the integrals in which we calculate the
work done by variable forces along paths in space and the rates at which fluids flow along curves and across
boundaries. vector integral calculus is very important to the engineer and has many applications in solid
mechanics, in fluid flow, in heat problems and others.

5.2 Line integration


The concept of line integral is a simple and natural generalization of a definite integral
Z b
f (x)dx
a

Recall that, here we integrate the function f (x) from x = a along the x-axis to x = b. Now, in a line integral
we shall integrate a given function along a curve in space or in the plane. Hence, curve integral would be a
better name but line integral is standard.
Similar to the standard integral, a line integral for a function f (x, y) along a curve C can be defined as
Z Z Z Z
f (x, y)dx, f (x, y)dy, f (x, y)ds (f (x, y)dx + f (x, y)dy)
C C C C

The subscript C indicates that the integration is along the given curve C. This curve is not restricted to two
dimensions, and may be in as many dimensions as we please. Note that there are three main cases involving
the variable of
R the integration: dx, dy and ds.
The integral RC f (x, y)ds represents
R the area beneath the surface z = f (x, y) but above the curve C. However,
the integrals C f (x, y)dx and C f (x, y)dy represent the projections of this area onto the xz and yz planes,
respectively. These have been illustratedR in Fig.5.1. The last integral
R is a combination of the cases dx and
dy. A particular case of the integral C f (x, y)ds is the integral C ds. This is a means of calculating the
length along a curve, i.e., an arc length.
A line integral is normal evaluated by expressing all variables in terms of one variable. In general,
Z Z Z
f (x, y)ds 6= f (x, y)dx 6= f (x, y)dy
C C C

The technique for evaluating a line integral is to express all quantities in the integral in terms of a single
variable. If the integral is with respect to x or y, then the curve C and the function f (x, y) may be expressed
in terms of the relevant variable x or y. If the integral is with respect to ds, normally all quantities are
expressed in terms of x. For example, consider the integral
Z b
f (x, y)dx, where y = g(x)
a

This can be evaluated in the usual way by first substituting for y in terms of x in the integrand and then
performing the integration
Z b
f (x, g(x))dx
a

49
50 CHAPTER 5. INTEGRATION IN VECTOR FIELDS

Figure 5.1: Representation of a line integral and its projections onto the xz and yz planes.

Clearly the value of the integral will, in general, depend on the function y = g(x). If x and y are given in
terms of a parameter t, then t is used as the integration variable.

Example 5.2.1 Evaluate Z


xydx
C

from A(1, 0) to B(0, 1) along the curve C that is the portion of x2 + y 2 = 1 in the first quadrant as shown in
Fig.5.2.

B 1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 0.2 0.4 0.6 0.8 1
A

Figure 5.2: The integral path x2 + y 2 = 1 in the first quadrant.

Solution:
The curve C is the first quadrant of the unit circle as shown in Fig.5.2. On the curve,
p
y = 1 − x2

so that
0  0
1 1
Z Z p
xydx = x 1 − x2 dx = − (1 − x2 )3/2 = −
C 1 3 1 3

Example 5.2.2 Find Z


x(1 + 4y)dy
C

where C is the curve y = x2 , starting from x = 0, y = 0 and ending at x = 1, y = 1.

Solution:
This is the same as the previous example other than dx being replaced by dy. As this integral concerns only
points along C and the integration is carried out with respect to y, everything may be expressed in terms of
y. On the curve C, we have

y = x2 =⇒ x = y
5.2. LINE INTEGRATION 51

The limits on y will be 0 to 1. So the integral becomes


Z 1 Z 1

Z
1 3
x(1 + 4y)dy = y(1 + 4y)dy = (y 2 + 4y 2 )dy
C y=0 0
 1
2 3 8 5 2 8 34
= y2 + y2 = + =
3 5 0 3 5 15

5.2.1 Line integral with respect to dx, dy and dz


In general, a line integral with respect to dx, dy and dz can be defined as follows:
Definition 5.2.1 Suppose a smooth curve C has coordinate functions x = x(t), y = y(t), z = z(t) for
a ≤ t ≤ b. Let f (x, y, z), g(x, y, z) and h(x, y, z) be continuous at least on the graph of C. Then, the line
integral is defined by
Z
f (x, y, z)dx + g(x, y, z)dy + h(x, y, z)dz
C
b   (5.2.1)
dx dy dz
Z
= f (x(t), y(t), z(t)) + g(x(t), y(t), z(t)) + h(x(t), y(t), z(t)) dt
a dt dt dt

In fact, we can write it more compactly as

b  
dx dy dz
Z Z
f dx + g dy + h dz = f (t) + g(t) + h(t) dt
C a dt dt dt

To evaluate it, substitute the coordinate functions

x = x(t), y = y(t), z = z(t)

into f (x, y, z), g(x, y, z) and h(x, y, z), obtaining functions of t. Further, substitute
dx dy dz
dx = dt, dy = dt, dz = dt
dt dt dt
into the integrations with respect to only the variable t. In this way, the line integral results in the integral
of a function of t over the range of values of this variable.
Example 5.2.3 Evaluate the line integral
Z
xdx − yzdy + ez dz
C

if C is given by
x = t3 , y = −t, z = t2 , 1≤t≤2

8 6 4
2
0

-2.0
-1.5
-1.0
Figure 5.3: The integral path C: x = t3 , y = −t, z = t2 , 1 ≤ t ≤ 2.

Solution:
Here
f (x, y, z) = x, g(x, y, z) = −yz, h(x, y, z) = ez
52 CHAPTER 5. INTEGRATION IN VECTOR FIELDS

and, on C,
dx = 3t2 dt, dy = −dt, dz = 2tdt
Then
Z
xdx − yzdy + ez dz
C

Z 2  
2
= t3 (3t2 ) − (−t)(t2 )(−1) + et (2t) dt
1
2
111
Z  
2
= 3t5 − t3 + 2tet dt = + e4 − e
1 4

Example 5.2.4 Find the value Z


zdx + xdy + ydz
C

and C is the helix (Figure.5.4)

C: x(t) = cos(t), y = sin(t), z = 3t, 0 ≤ t ≤ 2π

Solution:

20

15
z=3t

10

0
1
0.5 1
0 0.5
0
−0.5 −0.5
y=sin(t) −1 −1
x=cos(t)

Figure 5.4: The integral path C : x(t) = cos(t), y = sin(t), z = 3t, 0 ≤ t ≤ 2π.

We have
dx dy dz
= − sin(t), = cos(t), =3
dt dt dt
thus Z Z 2π
zdx + xdy + ydz = (−3t sin t + cos2 t + 3 sin t)dt = 6π + π + 0 = 7π
C 0

5.2.2 Line integral with respect to ds


The line integral of f (x, y) along C is denoted by
Z
f (x, y)ds
C

We use a ds here to acknowledge the fact that we are moving along the curve, C, instead of the x-axis
(denoted by dx) or the y-axis (denoted by dy). Because of the ds this is sometimes called the line integral
of f (x, y) with respect to arc length. Actually, ds can be written as
p
ds = (dx)2 + (dy)2

or s  s 
 2  2
dy dx
ds =  1+  dx, ds =  + 1 dy
dx dy
5.2. LINE INTEGRATION 53

So, to compute a line integral with ds we will convert everything over to the x or y or other parametric
equations. The line integral is then
s  s 
 2  2
dy dx
Z Z Z
f (x, y)ds = f (x, y)  1+  dx = f (x, y)  + 1 dy
C C dx C dy

Let us take a look at an example of a line integral with ds.

Example 5.2.5 Find Z


x(1 + 4y)ds
C

where C is the curve y = x2 , starting from x = 0, y = 0 and ending at x = 1, y = 1. This is the same
integral and curve as Example 5.2.2, but the integration is now carried out with respect to ds, the arc length
parameter.

Solution:
As this integral is with respect to x, all parts of the integral can be expressed in terms of x. Along the curve,
y = x2 , we obtain
s  2
2 dy p p
y = x , =⇒ ds = 1 + dx = 1 + (2x)2 dx = 1 + 4x2 dx
dx

Hence, the integral becomes


Z Z 1 Z 1
3
p
x(1 + 4y)ds = x(1 + 4x2 ) 1 + 4x2 dx = x(1 + 4x2 ) 2 dx
C x=0 0

This can be done by substituting method. Let u = 1 + 4x2 , then du = 8xdx. When x = 0, u = 1 and when
x = 1, u = 5, hence,
Z 1 Z 5
3 1 1  5
3

x(1 + 4x2 ) 2 dx = u 2 du = 5 2 − 1 ≈ 2.745
0 1 8 20
Note that the result here is different from the result in Example 5.2.2.

Example 5.2.6 Evaluate the line integral Z


xyzds
C

where C is the helix given by x = cos t, y = sin t and z = 3t, 0 ≤ t ≤ 4π as show in Fig.5.4,

Solution:
The line integral is
Z Z 4π p
xyzds = 3t cos(t) sin(t) sin2 t + cos2 t + 9 dt
C 0
Z 4π  √ Z
√ 3 10 4π

1
= 3t sin(2t) 1 + 9 dt = t sin(2t)dt
0 2 2 0
√  4π
3 10 1 t √
= sin(2t) − cos(2t) = −3 10 π
2 4 2 0

So, as we can see there really is not too much difference between ds and dx or dy in the line integrals. All
are the basic integration skills.
Although we defined line integrals over a single smooth curve, if C is a piecewise smooth curve, that is
[ [ [
C = C1 C2 · · · Cn

is the union of smooth curves C1 , · · · , Cn , then we can define


Z Z Z Z
f (x, y)dx = f (x, y)dx + f (x, y)dx · · · + f (x, y)dx
C C1 C2 Cn
54 CHAPTER 5. INTEGRATION IN VECTOR FIELDS

S
Figure 5.5: The integral path C = C1 C2 for Example 5.2.7.

Example 5.2.7 Evaluate Z


(x2 + y 2 )dx + 2xydy
C
where C is the polygonal path from (0, 0) to (0, 2) to (1, 2).
Solution: S
Write C = C1 C2 , where C1 is the curve given by x = 0, y = t, 0 ≤ t ≤ 2 and C2 is the curve given by
x = t, y = 2, 0 ≤ t ≤ 1 as shown in Fig.5.5. Then
Z Z Z
(x2 + y 2 )dx + 2xydy = (x2 + y 2 )dx + 2xydy + (x2 + y 2 )dx + 2xydy
C C1 C2
Z 2 Z 1
2 2
(t2 + 4)(1) + 2t(2)(0) dt
 
= (0 + t )(0) + 2(0)t(1) dt +
0 0
2 1 1
t3

1 13
Z Z
= 0dt + (t2 + 4)dt = + 4t = +4=
0 0 3 0 3 4

5.3 Work done by a force over a curve in space


In physics, the intuitive idea of work to be done (or will be done) is that
Work = Force · Distance
Suppose that the vector field F = f (x, y, z) i + g(x, y, z) j + h(x, y, z) k represents a force throughout a
region in space (it might be the force of gravity or an electromagnetic force of some kind) and that
r(t) = x(t) i + y(t) j + z(t) k , a≤t≤b
is a smooth curve in the region. Then, the work done by the force F over the curve r(t) from t = a to t = b
is defined by a line integral
b b
dr
Z Z
W= F · dr = dt F·
a a dt
Z b   Z b
dx dy dz
= f +g +h dt = f dx + g dy + h dz
a dt dt dt a

The following steps tell you how to evaluate a work done integral:
1. evaluate F on the curve as a function of t
2. find dr/dt
3. dot product F with dr/dt
4. integrate from t = a to t = b
Example 5.3.1 Find the work done by the force
F = (y − x2 ) i + (z − y 2 ) j + (x − z 2 ) k
over the curve C as shown in Fig.5.6
r(t) = t i + t2 j + t3 k , 0≤t≤1
5.3. WORK DONE BY A FORCE OVER A CURVE IN SPACE 55

1
0.75
0.5
0.25 1
0

0.75

0.5

0.25

0
0.25 0
0.5
0.75
1

Figure 5.6: The integral path C : r(t) = t i + t2 j + t3 k .

Solution:
Step 1: Evaluate F on the curve
F = (y − x2 ) i + (z − y 2 ) j + (x − z 2 ) k
= (t2 − t2 ) i + (t3 − t4 ) j + (t − t6 ) k
= (t3 − t4 ) j + (t − t6 ) k
dr
Step 2: Find
dt
dr d
= (t i + t2 j + t3 k ) = i + 2t j + 3t2 k
dt dt
dr
Step 3: Dot product F with
dt
dr
F· = ((t3 − t4 ) j + (t − t6 ) k ) · ( i + 2t j + 3t2 k )
dt
= (t3 − t4 )(2t) + (t − t6 )(3t2 )
= 2t4 − 2t5 + 3t3 − 3t8
dr
Step 4: Integrate F · from t = 0 to t = 1
dt
Z 1  1
4 5 3 8 2 5 1 6 3 4 1 9 29
Work = (2t − 2t + 3t − 3t )dt = t − t + t − t =
0 5 3 4 3 0 60
3 1
Example 5.3.2 Find the work done by force F = i + j along the curve C traced by a half circle
4 2
r(t) = cos t i + sin t j from t = 0 to t = π as show in Fig.5.7.

1.0

0.8

0.6

0.4

0.2

-1.0 -0.5 0.5 1.0

Figure 5.7: The integral path C : r(t) = cos(t) i + sin(t) j , (0 ≤ t ≤ π).

Solution:
The work done by F is
Z   Z π 
3 1 3 1
Z
W = F · dr = i + j · dr = i + j · (− sin t i + cos t j )dt
C C 4 2 0 4 2
Z π     π
3 1 3 1 3
= − sin t + cos t dt = cos t + sin t = −
0 4 2 4 2 0 2
56 CHAPTER 5. INTEGRATION IN VECTOR FIELDS

The units of work depend on the units of |F| and on the units of distance.

5.4 The line integral around a closed loop


By a closed curve, we mean a curve C whose initial point and terminal point are the same, i.e. for C : x =
x(t), y = y(t), a ≤ t ≤ b, we have (x(a), y(a)) = (x(b), y(b)). A simple closed curve is a closed curve which

Figure 5.8: Closed vs nonclosed curves.

does not intersect itself. Note that any closed curve can be regarded as a union of simple closed curves. We
use the special notation
I I
f (x, y)ds, and F · dr
C C

to denote line integrals of scalar and vector fields, respectively, along closed curves.
Firstly, let us consider the following example.

Example 5.4.1 Evaluate


Z
(x2 + y 2 )dx + 2xydy
C

where
(a) C : x = t, y = 2t, 0 ≤ t ≤ 1; (b) C : x = t, y = 2t2 , 0 ≤ t ≤ 1

as shown in Fig.5.9.

Figure 5.9: Closed vs nonclosed curves.

Solution:
(a) Since x′ (t) = 1 and y ′ (t) = 2, then
Z Z 1
(x2 + y 2 )dx + 2xydy = (x(t)2 + y(t)2 )x′ (t) + 2x(t)y(t)y ′ (t) dt

C 0
1 1 1
13t3

13
Z Z
2 2 2

= (t + 4t )(1) + 2t(2t)(2) dt = 13t dt = =
0 0 3 0 3
5.4. THE LINE INTEGRAL AROUND A CLOSED LOOP 57

(b) Since x′ (t) = 1 and y ′ (t) = 4t, then


Z Z 1
2 2
(x(t)2 + y(t)2 )x′ (t) + 2x(t)y(t)y ′ (t) dt

(x + y )dx + 2xydy =
C 0
Z 1
(t2 + 4t4 )(1) + 2t(2t2 )(4t) dt

=
0
1 1
t3

1 13
Z
2 4
= (t + 20t )dt = + 4t5 = +4=
0 3 0 3 3

So in both cases, if the vector field F(x, y) = (x2 + y 2 ) i + 2xy j represents the force moving an object from
13
(0, 0) to (1, 2) along the given curve C, then the work done is . This may lead you to think that work
3
(and more generally, the line integral of a vector field) is independent of the path taken. However, this is not
always the case. The following theorem gives a necessary and sufficient condition for the path independence:
R
Theorem 5.4.1 InH a region R the line integral C F · dr is independent of the path between any two points
in R if and only if C F · dr = 0 for every closed curve C which is contained in R.
Clearly, the above theorem does not give a practical way to determine path independence, since it is impos-
sible to check the line integrals around all possible closed curves in a region. What it mostly does is give
an idea of the way in which line integrals behave, and how seemingly unrelated line integrals can be related
(in this case a specific line integral between two points and all line integrals around closed curves). For a
more practical method for determining path independence, the following result provides a convenient way
to evaluate a line integral in a conservative field.
Theorem 5.4.2 If F is a conservative field, all the following statements are equivalent:
I Z B
∇×F=0 ⇐⇒ F · ds = 0 ⇐⇒ F · ds = f (B) − f (A)
C A

Example 5.4.2 Evaluate Z


F · ds

where F = y 2 i + 2xy j and a curve C as shown in Fig.5.10


1. C = C1 is the curve y = x2 from A(0, 0) to B(1, 1)
2. C = C2 is the straight line going from B(1, 1) to A(0, 0).
H
3. Deduce F · ds = 0, where the closed line is taken around C1 then C2 .

1
0.8
0.6
0.4
0.2
0

0 0.2 0.4 0.6 0.8 1


Figure 5.10: The integral path C = C1 + C2 .

Solution:
1. Evaluate F on C1
F = y 2 i + 2xy j = x4 i + 2x3 j
and
ds
= i + 2x j
dx
58 CHAPTER 5. INTEGRATION IN VECTOR FIELDS

Hence,
Z Z Z 1 Z 1
4 3 4 4
F · ds = (x i + 2x j ) · ( i + 2x j ) = (x + 4x )dx = 5x4 dx = [x5 ]10 = 1
C1 0 0

2. Evaluate F on C2
F = y 2 i + 2xy j = x2 i + 2x2 j
and
ds
= i + j
dx
Hence,
Z Z Z 0 Z 0
2 2 2
F · ds = (x i + 2x j ) · ( i + j ) = (3x )dx = 3x2 dx = [x3 ]01 = −1
C2 1 1

3. I Z Z 
F · ds = + F · ds = 1 + (−1) = 0
C1 +C2 C1 C2
R
So, we found that the integral F · ds is path independence.

5.5 Green’s theorem


We now see a way of evaluating the line integral of a smooth vector field around a simple closed curve. A
vector field F(x, y) = M (x, y) i + N (x, y) j is smooth if its component functions M (x, y) and N (x, y) are
smooth. We will use Green’s Theorem (sometimes called Green’s Theorem in the plane) to relate the line
integral around a closed curve with a double integral over the region inside the curve:
Theorem 5.5.1 Green’s theorem
The counterclockwise circulation of a field F = M (x, y) i + N (x, y) j around a simple closed curve C in the
plane equals the double integral over the region R enclosed by C
ZZ  
∂N ∂M
I
M dx + N dy = − dx dy
C R ∂x ∂y

Example 5.5.1 Evaluate Z


(x2 + y 2 )dx + 2xydy
C

where C is the boundary (traversed counterclockwise) of the region R = {(x, y) : 0 ≤ x ≤ 1, 2x≤ y ≤ 2x} as
show in Fig.5.11.

Solution:
R is the shaded region in Fig.5.11. By Green’s Theorem, for M (x, y) = x2 + y 2 and N (x, y) = 2xy, we have

Figure 5.11: Closed curve C and the region R = {(x, y) : 0 ≤ x ≤ 1, 2x≤ y ≤ 2x}.

Z Z  
∂N ∂M
I
(x2 + y 2 )dx + 2xydy = − dA
C R ∂x ∂y
Z Z Z Z
= (2y − 2y)dA = 0dA = 0
R R
5.5. GREEN’S THEOREM 59

We actually already knew that the answer was zero. Recall from Example 5.4.1 that the line integral
I
(x2 + y 2 )dx + 2xydy = 0
C

This has verified the Green’s theorem.

Example 5.5.2 Verify the Green’s theorem for the field

F(x, y) = (x − y) i + x j

and the region R bounded by the unit circle

C: r(t) = (cos t) i + (sin t) j , 0 ≤ t ≤ 2π

Solution:
We have

M = (x − y) = cos t − sin t
N = x = cos t
dx = d(cos t) = − sin tdt
dy = d(sin t) = cos tdt

∂M ∂M ∂N ∂N
= 1, = −1, = 1, =0
∂x ∂y ∂x ∂y
From the Green’s theorem, we have from the left hand side
I Z t=2π Z t=2π
M dx + N dy = (cos t − sin t)(− sin tdt) + (cos t)(cos tdt)
C t=0 t=0
Z t=2π
= (− sin t cos t + 1)dt = 2π
t=0

and from the right hand side


ZZ  
∂N ∂M
ZZ ZZ
− dxdy = (1 − (−1))dxdy = 2 dxdy = 2π
R ∂x ∂y R

Example 5.5.3 Evaluate the integral


I
xydy − y 2 dx
C

where C is the square cut from the first quadrant by the lines x = 1 and y = 1.

Solution:
We can use either form of Green’s theorem to change the line integral into a double integral over the square.

1. Taking M = xy, N = y 2 , and C and R as the square boundary and interior gives
I Z Z Z 1 Z 1
xydy − y 2 dx = (y + 2y)dxdy = 3ydxdy
C 0 0
1 1 1
3 2 3
Z Z
= [3xy]x=1
x=0 dy = 3ydy = y =
0 0 2 0 2

2. Taking M = −y 2 and N = xy gives the same result

3
I Z Z
−y 2 dx + xydy = (y − (2y))dxdy =
C R 2
60 CHAPTER 5. INTEGRATION IN VECTOR FIELDS

5.6 Vectors in electromagnetic theory


The theory of electromagnetic fields and waves is a subject where the basic experimental laws concerning
electric and magnetic fields can be fully described by five equations. These five equations, in concise form,
utilize the divergence and curl concepts of vector analysis. They also have equivalent integral forms involving
line, surface and volume integrals as discussed in the previous chapters. However, they will be not presented
here. Of course, it is possible to study electromagnetic phenomena without using vector analysis but the
mathematical equations quickly become long and the underlying physics is easily lost. With the aid of vector
analysis, we can readily represent the basic equations in an elegant and concise manner and, hopefully,
understand their physical significance.
1. The continuity equation
Electric current is the flow of electric charge. If Q denotes the electric charge density, i.e., the amount
of electric charge per unit volume, and V is the velocity of the electric charge, then the vector field
J = QV
is called the current density. The continuity equation for current flow is given by
∂Q
+ ∇ · (QV) = 0
∂t
2. Maxwell’s equations
(a) Divergence equations:
∇·D=Q
∇·B=0
(b) Curl equations:
∂B
∇×E=−
∂t
∂D
∇ × H = σE +
∂t
where E is the electric field, D is the electric flux density, H is the magnetic field, B is the magnetic
flux density B, J is the current density and the scalar σ is the conductivity.
The derivation of these equations is beyond the scope of this text but can be found in many books on
electromagnetism. The power of these equations lies in their generality. The brevity with which the main
laws of electromagnetism can be expressed is a tribute to the utility of vector calculus. We use the following
special case to finish this section. As we know, for a perfect dielectric, σ = 0. Hence in this case Maxwell’s
equations reduce to the one-dimensional wave equations
∂2E ∂2H
∇2 E = c , and ∇2 H = c
∂t2 ∂t2
The constant c is the speed of light and the waves are known as electromagnetic waves.
Example 5.6.1 Suppose that E = (f (x, t), 0, 0) in a Cartesian coordinate system so that the wave equation
becomes
∂2f 2
2∂ f
= c
∂t2 ∂x2
Show that f (x, t) = sin k(x − ct) is a solution for any value of the constant k and interpret this solution
physically.
Solution:
For the function f (x, t) = sin k(x − ct), we obtain
∂f
= −(kc)2 sin k(x − ct)
∂t2
∂2f
= −k 2 sin k(x − ct)
∂x2
so f (x, t) = sin k(x − ct) is a solution for any value of the constant k. Physically, this solution corresponds
to a sine wave travelling to the right at a speed c. At t = 0, f (x, 0) = sin kx which is a sine wave which has
f = 0 at x = 0. At a later time t, the point at which f = 0 has moved to the position x = ct, so the wave
has moved to the right a distance ct. The speed of the wave is therefore c.
5.7. EXERCISES 61

5.7 Exercises
R
1. Evaluate C
3ydx + 2xdy along the straight line C between (1, 1) and (3, 3).
(7x + 3y)dx + 2ydy along the curve C, y = x2 , between (0, 0) and (2, 4).
R
2. Evaluate C

3. Find the line integral C xydx + x2 ydy where C is the rectangular curve from (2, 5) to (4, 5), to (4, 6),
R

to (2, 6), then back to (2, 5).


4. Find the line integral
z
Z
(x + y)dx + dy + xydz
C x
along the spiral C given by
π
x = cos t, y = sin t, z = 2t, 0≤t≤
2

5. If F = (2xy − y 4 + 3)i + (x2 − 4xy 3 )j, evaluate


R
C
F · ds, where C is the straight line joining A(1, 3)
and B(2, 5).
6. Verify that the vector field v = (4x3 + y)i + xj is conservative.
7. The function φ = 4xy is a potential function for which F = ∇φ.
(a) Find F. R
(b) Evaluate C F · ds along the curve y = x3 from A(0, 0) to B(2, 8).
(c) Evaluate φ at B and at A and show that the difference between theses values is equal to the value
of the line integral obtained in Question (b).
8. Calculate the work done by the force F = xi − yj + (x + y + z)k on a particle that move along the
parabola y = 3x2 , z = 0 from the origin to the point (2, 12, 0).
9. Find the work done by the force
xi +y j
F=
(x2 + y 2 )3/2
over the plane curve r(t) = (et cos t) i + (et sin t) j from the point (1, 0) to the point (e2π , 0) in two
ways:
(a) By using using the parametrisation of the curve to evaluate the work integral
(b) By evaluating a potential function for F
10. Find the total work done in moving a particle in a force field given by F = 3xy i − 5z j + 10x k along
the curve x = t2 + 1, y = 2t2 , z = t3 from t = 1 to t = 2.
11. Evaluate the line integral C F · dr where F = ex−1 i + xy j and C is given by r(t) = t2 i + t3 j ,
R

(0 ≤ t ≤ 1).
12. For f (x, y) = 2x + y 2 , find the following line integrals
Z Z Z
(a) f (x, y)dx, (b) f (x, y)dy, (c) f (x, y)ds
C C C

where C is the line y = 2x from (0, 0) to (1, 2).


13. Evaluate the line integral Z
(2x + 9z)ds
C
where C is defined by the parametric equations

x = t, y = t2 , z = t3 , 0≤t≤1

14. Evaluate the line integral Z


x2 zds
C
where C is defined by the parametric equations (line equations)

x = 4t, y = 6 − 5t, z = −1 + 6t, 0≤t≤1


62 CHAPTER 5. INTEGRATION IN VECTOR FIELDS

15. Evaluate the integral Z


I= V · dr
C

for the vector field V = y 2 i − xy j , along the curve y = 12 x2 + x − 3 with 1 ≤ x ≤ 3.

16. Evaluate the integral Z


I= F · dr
C

for the vector field F = x2 i + yz j + xy k , along the curve x = cos t, y = sin t, z = t, with 0 ≤ t ≤ 6π.

17. Find the total work done by a force F = x2 i +y 2 j +z 2 k along the curve C : r = cos t i +sin t j +et k
form (1, 0, 1) to (1, 0, e2π ).

18. Find the total work done by a force F = z i + x j + y k along the curve C, which is defined by the
parametric equations
x = t2 , y = t3 , z = t2 , 0 ≤ t ≤ 1.

19. Find the vector line integral Z


(∇ · F)(dx i + dy j + dz k )
C

where F = x2 i + 2xy j + 2xz k and C is the curve y = x2 , z = x3 from x = 0 to x = 1, i.e., from


(0, 0, 0) to (1, 1, 1). Here ∇ · F is the (scalar) divergence of the vector F.

20. Evaluate the vector line integral Z


(∇(xy)) × dr
C

where C is the contour y = x3 , z = 0 from (0, 0, 0) to (1, 1, 0), and r = x i + y j + z k .


(This is a vector integration, therefore, the solution should be a vector)

21. Evaluate Z
I= x2 ydx + (x − 2y)dy
C

over the part of the parabola y = x2 from (0, 0) to (1, 1). Then you do the same integral by using a
different curve C which is defined as x = sin t, y = sin2 t, 0 ≤ t ≤ π2 . You should obtain the same value
I = − 25 , this illustrate the very important point that the line integral is independent of how the curve
is defined.

22. Show that the integral Z Z


F · dr = (2xdx + 2ydy + 4zdz)
C C

is path independent in any domain in space and find its value in the integral from A(0, 0, 0) to B(2, 2, 2).

23. Evaluate the line integral I


(x + y)dx + 3xydy,
C

where C is the boundary of the triangle formed by the points (0, 0), (2, 0) (0, 5). Express the line
integral in terms of an appropriate double integral and evaluate this. Verify Green’s theorem.

24. Evaluate I
ey dx + ex dy
C
where C is the boundary of the triangle formed by the lines y = x, y = 5 and x = 0. By converting
this line integral into a double integral verify Green’s theorem in the plane.

Solution:
1. 20.
2
2. 38., 3. 60, 4. 1 − π + π
2 4 4
5. −1149.
7 (a) F = 4yi + 4xj, (b) 64, (c) 64.
8. −70 or 70
9. (a) 1 − e−2π , (b) 1 − e−2π
10. 303. √

11. 11 − 1 . 12. (a) 7 , (b) 14 , (c) 7 5. 13. 1 (143/2 − 1). 14. 56 77 . 15. − 161 16. I = − 3π . 18. 3 . 19. 3 i + 4 j + 9 k . 20. 0. 22. 16.
8 e 3 3 3 6 3 10 2 2 2
23. 20. 24. −452.239.
Chapter 6

Fourier Series

6.1 Joseph Fourier (1768-1830)


Fourier was born on March 21, 1768, at Auxerre, France, the son of a tailor. He was orphaned at age ten.
Because of the talent that he displayed in his early school years, he received financial support to finish his
education. In 1780 he was recommended to the Bishop of Auxerre, and through this introduction, he was
educated by the Benvenistes of the Convent of St. Mark. The commissions in the scientific corps of the
army were reserved for those of good birth, and being thus ineligible, he accepted a military lectureship on
mathematics. He took a prominent part in his own district in promoting the French Revolution, and was
rewarded by an appointment in 1795 in the Ecole Normale Superieure, and subsequently by a chair at the
Ecole Polytechnique.
Fourier went with Napoleon Bonaparte on his Egyptian expedition in 1798, and was made governor of
Lower Egypt and secretary of the Institut dEgypte. Cut off from France by the English fleet, he organized
the workshops on which the French army had to rely for their munitions of war. He also contributed several
mathematical papers to the Egyptian Institute (also called the Cairo Institute) which Napoleon founded at
Cairo, with a view of weakening English influence in the East. After the British victories and the capitulation
of the French under General Menou in 1801, Fourier returned to France, and was made prefect of Isere, and
it was while there that he made his experiments on the propagation of heat.
Fourier moved to England in 1816. Later he returned to France, and in 1822 succeeded Jean Baptiste
Joseph Delambre as Permanent Secretary of the French Academy of Sciences. In 1830, he was elected a
foreign member of the Royal Swedish Academy of Sciences.
In 1822 he published his Théorie analytique de la chaleur, in which he bases his reasoning on Newton’s
law of cooling, namely, that the flow of heat between two adjacent molecules is proportional to the extremely
small difference of their temperatures. In this work he claims that any function of a variable, whether
continuous or discontinuous, can be expanded in a series of sine of multiples of the variable. Though this
result is not correct, Fourier’s observation that some discontinuous functions are the sum of infinite series
was a breakthrough. The question of determining when a Fourier series converges has been fundamental for
centuries. Joseph Louis Lagrange had given particular cases of this (false) theorem, and had implied that the
method was general, but he had not pursued the subject. Johann Dirichlet was the first to give a satisfactory
demonstration of it with some restrictive conditions. A more subtle, but equally fundamental, contribution
is the concept of dimensional homogeneity in equations; i.e. an equation can only be formally correct if the
dimensions match on either side of the equality. Fourier also developed dimensional analysis, the method
of representing physical units, such as velocity and acceleration, by their fundamental dimensions of mass,
time, and length, to obtain relations between them.
Fourier left an unfinished work on determinate equations which was edited by Claude-Louis Navier and
published in 1831. This work contains much original matter, in particular, there is a demonstration of
Fouriers theorem on the position of the roots of an algebraic equation. Joseph Louis Lagrange had shown
how the roots of an algebraic equation might be separated by means of another equation whose roots were
the squares of the differences of the roots of the original equation. Francois Budan, in 1807 and 1811, had
enunciated the theorem generally known by the name of Fourier, but the demonstration was not altogether
satisfactory. Fouriers proof is the same as that usually given in textbooks on the theory of equations. The
final solution of the problem was given in 1829 by Jacques Charles Francois Sturm.
He died of heart disease on May 16, 1830 in Paris and was buried in the Pere Lachaise Cemetery in
Paris.The details of Fourier can be found in http://en.wikipedia.org/wiki/Joseph_Fourier.

63
64 CHAPTER 6. FOURIER SERIES

6.2 Fourier series


This chapter is devoted to a single topic, Fourier series, one of the most useful and important tools of applied
mathematics. At the turn of the 19th century, the French mathematician and physicist Joseph Fourier
analysed the flow and the distribution of energy as heat in solid bodies. Because Fourier was interested in
both the spatial and the temporal distribution of the temperature throughout a solid body, he considered
functions of temperature of the form T = T (x, y, z, t), which leads to partial differential equations. Upon
solving theses equations, Fourier found it necessary to express temperature distributions as infinite series of
sines and cosines of the form
X∞
f (x) = a0 + (an cos nx + bn sin nx) (6.2.1)
n=1

where an and bn depend upon f (x). This type of series is called a Fourier series. It might not be unexpected
that Fourier series would not converge to a function f (x) if f (x) is continuous over some interval, but the
amazing thing about Fourier series is that f (x) does not even have to be continuous. At the time, it was
incredible that series of continuous functions could converge to a discontinuous function and Fourier’s work
was severely criticized. Nevertheless, Fourier’s work not only survived almost two centuries of mathematical
scrutiny, but has fostered several areas of modern mathematical research.

6.3 Periodic functions


A function f (t) is periodic if the function values repeat at regular intervals of the independent variable t.
The regular interval is referred to as the period, which is shown in Fig.6.1. If P denotes the period we have

Figure 6.1: A periodic function with the period of 8.

f (t + P ) = f (x)

for any value of t. The most obvious examples of periodic functions are the trigonometric functions sin t and
cos t, both of which have period 2π (using radian measure as we shall do throughout this chapter) as shown
in Fig.6.2. This follows since

sin(t + 2π) = sin t, cos(t + 2π) = cos t

The following are examples of non-sinusoidal periodic functions:

Figure 6.2: A periodic function with the period of 8.

• Square wave (Fig.6.3) Analytically we can describe this function as follows



−1 −π < t < 0
f (t) =
1 0<t<π

f (t + 2π) = f (t)
6.4. FOURIER COEFFICIENTS FOR F (X) WITH PERIOD 2π 65

Figure 6.3: A periodic function for square wave.

Figure 6.4: A periodic function for saw-tooth wave.

• Saw-tooth wave In this case we can describe the function as follows

f (t) = 2t, 0 < t < 2, f (t + 2) = f (t)

1 2π
Here the period is 2, the frequency is and the angular frequency is = π.
2 2
• Triangular wave Here we can conveniently define the function as

Figure 6.5: A periodic function for a triangular wave.


−t −π < t < 0
f (t) =
t 0<t<π

or, more concisely


f (t) = |t| −π <t<π
together with the usual statement on periodicity

f (t + 2π) = f (t)

6.4 Fourier coefficients for f (x) with period 2π


Let us assume that f (x) is a periodic function of period 2π and is integrable over a period. Let us further
assume that f (x) can be represented by a trigonometric series as shown in (6.2.1). We assume that this
series converges and has f (x) as its sum. Given such a function f (x), we want to determine the coefficients
an and bn of the corresponding series (6.2.1).

6.4.1 Determination of the constant term a0


Integrating on both sides of (6.2.1) from −π to π, we get
Z π Z π " ∞
X
#
f (x)dx = a0 + (an cos nx + bn sin nx) dx
−π −π n=1
66 CHAPTER 6. FOURIER SERIES

If term-by-term integration of the series is allowed, we obtain


Z π Z π ∞ 
X Z π Z π 
f (x)dx = a0 dx + an cos nxdx + bn sin nxdx
−π −π n=1 −π −π

The first term on the right equals 2πa0 . All the other integrals on the right are zero, as can be readily seen
by integration. Hence, the first term a0 is
π
1
Z
a0 = f (x)dx (6.4.2)
2π −π

6.4.2 Determination of the coefficients an of the cosine terms


Similarly, we multiply (6.2.1) by cos mx, where m is any fixed positive integer, and integrate from −π to π,
Z π Z π " ∞
X
#
f (x) cos mxdx = a0 + (an cos nx + bn sin nx) cos mxdx (6.4.3)
−π −π n=1

Integrating term by term, we see that the right side becomes


Z π ∞ 
X Z π Z π 
a0 cos mxdx + an cos nx cos mxdx + bn sin nx cos mxdx
−π n=1 −π −π

The first integral is zero. Since


Z π
1 π 1 π
Z Z
cos nx cos mxdx = cos(n + m)xdx + cos(n − m)xdx
−π 2 −π 2 −π
π π π
1 1
Z Z Z
sin nx cos mxdx = sin(n + m)xdx + sin(n − m)xdx
−π 2 −π 2 −π

Integration shows that the four terms on the right are zero, except for the last term in the first line, which
equals π when n = m. Since in (6.4.3) this term is multiply by am , the right side in (6.4.3) equals am π. Our
second result is
1 π
Z
am = f (x) cos mxdx, m = 1, 2, 3, · · · (6.4.4)
π −π

6.4.3 Determination of the coefficients bn of the sine terms


We finally multiply (6.2.1) by sin mx and then integrate from −π to π,
Z π Z π " ∞
X
#
f (x) sin mxdx = a0 + (an cos nx + bn sin nx) sin mxdx (6.4.5)
−π −π n=1

Integrating term by term, we see that the right side becomes


Z π ∞ 
X Z π Z π 
a0 sin mxdx + an cos nx sin mxdx + bn sin nx sin mxdx
−π n=1 −π −π

The first integral is zero. The next integral is of the kind considered before, and is zero for all n = 1, 2, 3, · · · .
For the last integral we obtain
Z π
1 π 1 π
Z Z
sin nx sin mxdx = cos(n − m)xdx − cos(n + m)xdx
−π 2 −π 2 −π

The last term is zero. The first term on the right is zero when n 6= m and is π when n = m. Since in (6.4.5)
this term is multiplied by bm , the right side in (6.4.5) is equal to bm π, and the last result is

π
1
Z
bm = f (x) sin mxdx, m = 1, 2, 3, · · · (6.4.6)
π −π
6.4. FOURIER COEFFICIENTS FOR F (X) WITH PERIOD 2π 67

6.4.4 Summary of Fourier coefficients and Fourier series


The Fourier series are given by


X
f (x) = a0 + (an cos nx + bn sin nx) (6.4.7)
n=1

where
π
1
Z
a0 = f (x)dx
2π −π

π
1
Z
an = f (x) cos nxdx n = 1, 2, 3 · · ·
π −π

π
1
Z
bn = f (x) sin nxdx n = 1, 2, 3 · · ·
π −π

Example 6.4.1 Obtain the Fourier series of the half-rectified square wave as shown in Fig.6.6.

Solution:
We have the function

Figure 6.6: A periodic function for a half-rectified wave.


1 0<t<π
f (t) = f (t + 2π) = f (t)
0 π < t < 2π

The calculation of the Fourier coefficients is merely straightforward integration using the results already
obtained Z π Z π
1 1 1 1
a0 = f (t)dt = dt = (π) =
2π −π 2π 0 2π 2
Z π Z π  π
1 1 1 sin nt
an = f (t) cos ntdt = cos ntdt = =0
π −π π 0 π n 0

1 π 1 π

1 cos nt 1
Z Z
bn = f (t) sin ntdt = sin ntdt = − = (1 − cos nπ)
π −π π 0 π n 0 nπ
Some care is needed now here,

1 0 n = 2, 4, 6, · · ·
bn = (1 − cos nπ) = 2
nπ nπ n = 1, 3, 5, · · ·

Hence the required Fourier series is


 
1 2 1 1
f (t) = + sin t + sin 3t + sin 5t + · · ·
2 π 3 5

The Fourier series we have found can be written in summation notation



1 2X 1
f (t) = + sin(2k − 1)t
2 π 2k − 1
k=1

Fig.6.7 shows the Fourier series solutions with n = 10 and n = 100, respectively.
68 CHAPTER 6. FOURIER SERIES

1.0 1.0

0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

-5 5 -5 5

Figure 6.7: The Fourier series solutions with n = 10 (left) and n = 100 (right), respectively.

6.5 Fourier coefficients for f (x) with any period p = 2L


The function considered so far had periodic 2π, for simplicity. Of course, in applications, periodic function
will generally have other periods. However, the transition from period p = 2π to period p = 2L is quite
simple. If a function f (x) of period p = 2L has a Fourier series, we claim that this series is

∞ 
X nπ nπ 
f (x) = a0 + an cos x + bn sin x (6.5.8)
n=1
L L

with the Fourier coefficients of f (x) given by

L
1
Z
a0 = f (x)dx
2L −L

L
1  nπx 
Z
an = f (x) cos dx n = 1, 2, 3 · · ·
L −L L

L
1  nπx 
Z
bn = f (x) sin dx n = 1, 2, 3 · · ·
L −L L

Example 6.5.1 Determine the Fourier series of f (x) = x for [−l, l) and f (x + 2l) = f (x) outside this
interval (Fig.6.8 (left) shows a periodic function with l = 2).

Solution:
The Fourier coefficients are

1 l  nπx  1 l  nπx 
Z Z
an = f (x) cos dx = x cos dx = 0
l −l l l −l l
1 l  nπx  1 l  nπx 
Z Z
bn = f (x) sin dx = x sin dx
l −l l l −l l
l
(−1)n+1 2l

2 sin(nπx/l) x cos(nπx/l)
= 2 2 2
− = n = 1, 2, 3, · · ·
l n π /l nπ/l 0 nπ

The an = 0 because the integrand is an odd function of x. The Fourier series of f (x) is

2l X (−1)n+1 nπx
f (x) = sin (6.5.9)
π n=1 n l

Fig.6.8 and Fig.6.9 show f (x) and a few partial sums of its Fourier series representation plotted over its
periodic extension interval.

Example 6.5.2 Determine the Fourier series of f (x) = l2 − x2 for (−l, l) and f (x) = f (x + 2l) outside this
interval as show in Figure 6.10 (right) with l = 2.

Solution:
6.5. FOURIER COEFFICIENTS FOR F (X) WITH ANY PERIOD P = 2L 69

2 2

1 1

-10 -5 5 10 -10 -5 5 10

-1 -1

-2 -2

Figure 6.8: The periodic function f (x) = x on the interval (−2, 2) (left) and the Fourier series solution with
n = 3 (right), respectively.

2
2

1 1

-10 -5 5 10 -10 -5 5 10

-1 -1

-2
-2

Figure 6.9: The Fourier series solutions with n = 10 (left) and n = 100 (right), respectively.

l
1  nπx 
Z
an = (l2 − x2 ) cos dx
l −l l
l
2 2x cos(nπx/l) (n2 π 2 x2 /l2 − 2) sin(nπx/l)

= +
l (n2 π 2 /l2 ) n3 π 3 /l3 0
4l2 (−1)n+1
= n 6= 0
π2 n2
4l2
a0 =
3
The bn are equal to zero because (l2 − x2 ) sin(nπx/l) is an odd function of x. Thus,

2l2 4l2 X (−1)n+1 nπx
f (x) = + 2 cos
3 π n=1 n2 l

Fig.6.10 (left) shows f (x) = l2 − x2 and the first few partial sums of the Fourier series representation of f (x)
over the periodic interval −2 to 2, where n = 1, 2, 3. Note that the Fourier series represents not only f (x) in
the interval l = −2 to l = 2. but also its periodic extension as well as shown in Fig.6.10 (right).
4
4

3
3

2
2

1 1

-2 2 4 6 8 10 -2 2 4 6 8 10

Figure 6.10: The Fourier series solutions to f (x) = l2 − x2 with n = 1, 2, 3 (left) and n = 10 (right),
respectively, where l = 2.

Frequently in physical problems, x represents time and the function to be expanded as a Fourier series
is a periodic signal. Recall that sin t goes through one cycle as t goes from 0 to 2π ( or from any point t0
to t0 + 2π). Therefore, sin 2πt goes through one cycle as t goes from 0 to 1, and sin 2πνt goes through v
cycles as t goes from 0 to 1. The function sin 2πνt represents a sinusoidal signal with frequency of ν cycles
per second, or ν hertz (Hz). Because there are 2π radians in one cycle, ω = 2πν is the frequency in unit
of radians per second. If a signal has a frequency of ν cycles per second, then the time between successive
maxima or minima is 1/ν seconds per cycle, which means that the period, τ , of the signal is τ = 1/ν, or
τ = 2π/ω.
70 CHAPTER 6. FOURIER SERIES

Example 6.5.3 Let us consider the square wave show in Fig.6.11. We can express f (t) mathematically by

−1 −t0 ≤ t < 0
f (t) =
1 0 ≤ t < t0

1.0

0.5

-6 -4 -2 2 4 6

-0.5

-1.0

Figure 6.11: A plot of the square wave of period 2t0 , where t0 = 2.

Solution:
The period of f (t) is τ = 2t0 and its frequency is ω = 2π/τ = π/t0 . If we write f (t) as
∞  
a0 X nπ nπ
f (t) = + an cos t + bn sin t
2 n=1
t0 t0

then
t0  
1 nπt
Z
an = f (t) cos dt = 0
t0 −t0 t0
and
t0  
1 nπt 2
Z
bn = f (t) sin dt = [1 − (−1)n ] n = 1, 2, 3, · · ·
t0 −t0 t0 nπ
Thus,
∞ ∞
2 X 1 − (−1)n
 
nπt 4X 1
f (t) = sin = sin(2n − 1)ωt (6.5.10)
π n=1 n t0 π n=1 2n − 1

Fig.6.12 shows a few partial sum of this series. Note the slow convergence due to the denominator being
of order n. Figure 6.12 also shows the partial sum consisting of 1000 terms, showing that it is possible to
represent a square wave by a Fourier series, provided enough terms are taken.

Figure 6.12: The first five partial sums (left) and 1000 terms (right) of the Fourier series of the square wave
in Figure 6.11 plotted against ωt.

6.6 Complex Fourier series


Another form of a Fourier series is the complex Fourier series

X
f (x) = cn einπx/L (6.6.11)
n=−∞
6.7. SINE AND COSINE SERIES 71

Notice that the summation runs from −∞ to ∞. We can determine the cn in equation (6.6.11) by realizing
that {einπx/L } is an orthogonal set over the interval −L to L. Multiply equation (6.6.11) by e−ikπx/L and
integrate from −L to L to obtain
Z L X∞ Z L X∞
f (x)e−ikπx/L dx = cn ei(n−k)πx/L dx = 2Lcn δnk = ck 2L
−L n=−∞ −L n=−∞

thus
L
1
Z
ck = f (x)e−ikπx/L dx (6.6.12)
2L −L

Example 6.6.1 Let us determine the complex Fourier series representation of f (x) = x in [−l, l] with
f (x + 2l) = f (x).
Solution:
l
1
Z
ck = f (x)e−ikπx/l dx
2l −l
l
1 e−ikπx/l
 
kπx
= −i − 1n
2l −k 2 π 2 /l2 l −l
il (−1)k il
= cos kπ = (k 6= 0)
kπ kπ
1 l
Z
c0 = f (x)dx = 0
2l −l
Therefore,

il X (−1)n inπx/l
f (x) = e
π n=−∞ n
n6=0

This is the same result that we got in Example 6.5.1.

6.7 Sine and Cosine series


If you back over the Fourier series that we have derived, you will see that some of them involve only sine
terms and some involve only cosine terms. The reason for this is that the function being expanded was either
even or odd over the interval [−L, L]. Recall that even function has property that f (−x) = f (x) and an
odd function has the property that f (−x) = −f (x). Geometrically, an even function is symmetric across
the y axis and an odd function is symmetric through the origin, which are clearly shown in Figure 6.11. The
product of two even functions is even; the product of two odd functions is even; and the product of an even
and an odd function is odd.

Figure 6.13: An even and an odd function plotted against x.

The property of even fe (x) and odd fo (x) functions that we shall make use of is
Z L Z L
fe (x)dx = 2 fe (x)dx
−L 0

and Z L
fo (x)dx = 0
−L
72 CHAPTER 6. FOURIER SERIES

In particular,
Z L  nπx  Z L  nπx 
fe (x) cos dx = 2 fe (x) cos dx
−L L 0 L
Z L  nπx  Z L  nπx 
fo (x) sin dx = 2 fo (x) sin dx
−L L 0 L
Z L  nπx  Z L  nπx 
fo (x) cos dx = fe (x) sin dx = 0
−L L −L L
The equation for the Fourier coefficients
L
1  nπx 
Z
an = f (x) cos dx =⇒ an = 0 if f (x) is an odd function
L −L L

L
1  nπx 
Z
bn = f (x) sin dx =⇒ bn = 0 if f (x) is an even function
L −L L

show that an = 0 if f (x) is an odd function of x and bn = 0 if f (x) is an even function.

Example 6.7.1 Express the function

f (x) = π − x 0≤x<π

as a Fourier sine series.

Solution:
To express f (x) as a Fourier sine series, we use the odd extension of f (x) (see Fig.6.14)

−π − x −π ≤ x < 0
fo (x) =
π−x 0≤x<π

The Fourier coefficients are


π
2 2
Z
bn = (π − x) sin nxdx = n = 1, 2, · · ·
π 0 n

The sine series is



X sin nx
f (x) = 2
n=1
n

The partial sums of f (x) are also shown in Fig.6.14.

Figure 6.14: The odd extension of the function defined in Example 6.7.1 plotted against x (the left figure).
The right figure shows the partial sums of its Fourier series representation consisting of 4, 8 and 64 terms,
respectively.
6.8. DIFFERENTIATION AND INTEGRATION OF FOURIER SERIES 73

6.8 Differentiation and integration of Fourier series


It is inevitable that the desire to obtain the derivative or the integral of a Fourier series will arise in some
applications. Since the smoothing effects of the integration process tend to eliminate discontinuities, whereas
the process of differentiation has the opposite effect, it is not surprising that the integration of a Fourier series
is more likely to be possible than its differentiation. We shall not pursue the theory in depth here; rather we
shall state, without details, two theorems concerned with the term-by-term integration and differentiation
of Fourier series, and make some observations on their use.

6.8.1 Integration of a Fourier series


If f (t) satisfies some conditions in the interval [−π, π] and has a Fourier series expansion

1 X
f (t) = a0 + (an cos nt + bn sin nt)
2 n=1

then for −π ≤ t1 < t ≤ π


Z t t ∞ Z t
1
Z X
f (t)dt = a0 dt + (an cos nt + bn sin nt)dt
t1 t1 2 n=1 t1
∞  
a0 X bn an
= (t − t1 ) + (cos nt1 − cos nt) + (sin nt − sin nt1 )
2 n=1
n n

Example 6.8.1 Integrate term by term the Fourier series obtained in equation (6.5.10) for square wave

−1 −t0 ≤ t < 0
f (t) =
1 0 ≤ t < t0
Solution:
From equation (6.5.10), the Fourier series expansion for

2 X 1 − (−1)n
 
nπt
f (t) = sin (6.8.13)
π n=1 n t0

We now need to integrate between the limits −t0 and t and, owing to the discontinuity in f (t) at t = 0, we
must consider separately values of t in the intervals −t0 < t < 0 and 0 < t < t0 .
Case i: In the interval −t0 < t < 0, we integrate (6.8.13) term by term to obtain
Z t ∞ Z
4 X t sin(2n − 1)t
(−1)dt = dt
−t0 π n=1 −t0 (2n − 1)
that is
∞  t
4 X cos(2n − 1)t
−(t + t0 ) = −
π n=1 (2n − 1)2 −t0
"∞ ∞
#
4 X cos(2n − 1)t X 1
=− +
π n=1 (2n − 1)2 n=1
(2n − 1)2
It can be shown that

X 2 1
2
= π
n=1
(2n − 1) 8
so that the above simplifies to

1 4 X cos(2n − 1)t
−t = t0 + π − (−t0 < t < 0)
8 π n=1 (2n − 1)2
Case ii: In the interval 0 < t < t0 , we integrate term by term to get
Z 0 Z t ∞ Z
4 X t sin(2n − 1)t
(−1)dt + dt = dt
−t0 0 π n=1 −π (2n − 1)
giving

1 4 X cos(2n − 1)t
t = t0 + π − (0 < t < t0 )
8 π n=1 (2n − 1)2
74 CHAPTER 6. FOURIER SERIES

6.8.2 Differentiation of a Fourier series


If f (t) is a periodic function that satisfies some conditions, then its derivative f ′ (t), wherever it exists, may
be found by term-by-term differentiation of the Fourier series of f (t) if and only if the function f (t) is
continuous everywhere and the function f ′ (t) has a Fourier series expression.
In other word, if f (t) is continuous everywhere and has a Fourier series expansion

1 X
f (t) = a0 + (an cos nt + bn sin nt)
2 n=1

then, provided that f ′ (t) satisfies the required conditions, its Fourier series expansion is

X
f ′ (t) = (nbn cos nt − nan sin nt)
n=1

In this case the Fourier coefficients of the derived expansion are nbn and nan , so, in contrast to the integrated
series, the derived series will converge more slowly than the original series expansion for f (t).

Example 6.8.2 Consider the process of differentiating term by term the Fourier series of function

f (t) = t2 , (−π ≤ t ≤ π), f (t + 2π) = f (t)

Solution:
The Fourier series for f (t) is

π2 X (−1)n cos nt
t2 = +4 , (−π ≤ t ≤ π)
3 n=1
n2

Since f (t) is continuous within and at the end points of the interval −π ≤ t ≤ π, we obtain

X (−1)n+1 sin nt
t=2 (−π ≤ t ≤ π)
n=1
n

which can be confirmed from the Fourier series expansion obtained for the function

f (t) = t, (−π ≤ t ≤ π), f (t + 2π) = f (t)

6.9 Some applications for the Fourier series


6.9.1 Frequency response of a linear system
Linear systems have the property that the response to several inputs being applied to the system can be
obtained by adding the effects of the individual inputs. Another property of linear system is that if a
sinusoidal input is applied to the system then the output will also be a sinusoid of the same frequency but
with modified amplitude and phase. This is illustrated in Fig.6.15.

Figure 6.15: The response of a linear system to a sinusoidal input is also sinusoidal.

We know that sinusoidal signals can be represented by complex numbers and that an a.c. electrical circuit
can be analyzed using complex number. This is true for linear systems in general. It is possible to define
a complex frequency function, g(iω), where ω is the frequency of the input, G relates the output and the
input of a linear system.
6.9. SOME APPLICATIONS FOR THE FOURIER SERIES 75

If a sine wave of amplitude Ai , is applied to the system then the amplitude, Ao pf the output is given by

Ao = |G(iω)|Ai

The phase shift, φ, is given by


φ = ∠G(iω)
It is now possible to analyse the effect of applying a generalized periodic waveform to a linear system. The
first stage is to calculate the Fourier components of the input waveform. The amplitude and the phase shift
of each of the output components is then calculated using G(iω). Finally, the output components are added
to obtain the output waveform. This is only possible because of the additive nature of linear systems. An
example will help to clarify these points.
Example 6.9.1 Low-pass filter
Consider the circuit of Figure 6.16. Using Kirchhoff ’s voltage law and Ohm’s law we obtain

vi = iR + vo

For the capacitor


i
vo =
jωC

where j = −1.
Eliminating i yields
vi = vo jωCR + vo = vo (1 + jωRC)

Figure 6.16: The RC circuit.

vo 1
= (6.9.14)
vi 1 + jωRC
Equation (6.9.14) relates the output of the system to the input of the system. Therefore,
1
G(jω) =
1 + jωRC
It is convenient to convert G(jω) into polar form
1∠0
G(jω) = p
1 + (ωRC)2 ∠ tan−1 ωRC
1
=p ∠ − tan−1 ωRC
1 + (ωRC)2
Therefore,
1
|G(jω)| = p
1 + (ωRC)2
∠G(jω) = − tan−1 ωRC

The amplitude and phase characteristics for the circuit of Fig.6.16 are shown in Fig.6.17. These show the
variation of |G(jω)| and ∠G(jω) with angular frequency ω. Note that the circuit is a low pass filter, it
allows low frequency to pass easily and rejects high frequencies. The cut-off point of the filter, that is the
point at which significant frequency attenuation being to occur, can be varied by changing the values of R
and C. The quantity of RC is usually known as the time constant for the system. Consider the case when
RC = 0.3. Then the above equations reduce to
1
|G(jω)| = √ (6.9.15)
1 + 0.9ω 2
76 CHAPTER 6. FOURIER SERIES

Figure 6.17: Amplitude and phase characteristics for the circuit of Figure 6.16

∠G(jω) = − tan−1 0.3ω (6.9.16)


Let examine the response of this system to a square wave input with fundamental angular frequency 1 and
amplitude 1. This waveform is shown in Figure 6.18a. We note that T = 2π. The waveform function is odd
and so will not contain any cosine Fourier components. It has an average value of 0 and so will not have a
zero frequency component. Therefore, calculating the Fourier components reduces to evaluating
∞  
X 2nπt
f (t) = bn sin
n=1
T
Z T /2  
2 2nπt
bn = f (t) sin dt
T −T /2 T
Sine T = 2π, we have
Z 0 π 
1
Z
bn = − sin ntdt + sin ntdt
π −π 0
 0  π !
1 cos nt − cos nt
= +
π n −π n 0
1
= (cos 0 − cos nπ − cos nπ + cos 0)

2
= (1 − cos nπ)

The values of the first few coefficients are
4 4
b1 = , b2 = 0, b3 = ,···
π 3π
The next stage is to evaluate the gain and phase changes of the Fourier components. Using equations (6.9.15)
and (6.9.16):

n=1
ω1 = 1
1
|G(jω1 )| = √ = 0.96
1 + 0.09 × 1
∠G(jω1 ) = − tan−1 0.3 = −16.7o
n=3
ω3 = 3
1
|G(jω3 )| = √ = 0.74
1 + 0.09 × 32
∠G(jω3 ) = − tan−1 0.9 = −42.0o
6.9. SOME APPLICATIONS FOR THE FOURIER SERIES 77

n=5
ω5 = 5
1
|G(jω5 )| = √ = 0.55
1 + 0.09 × 52
∠G(jω5 ) = − tan−1 1.5 = −56.3o
It is clear that high-frequency Fourier components are attenuated and phase shifted more than low-frequency
Fourier components. The effect is to produce a rounding of the rising and falling edges of the square wave
input signal. This is shown in Fig.6.18b. The output signal has been obtained by adding together the
attenuated and phase-shifted output Fourier components. This is possible because the system is linear.

Figure 6.18: (a) The input square wave signal. (b) The output signal.

6.9.2 Parseval’s theorem


If the function f (t) is periodic with period T and has Fourier coefficients an and bn , then Parseval’s theorem
states

2 T a2 X 2
Z
(f (t))2 dt = 0 + (an + b2n ) (6.9.17)
T 0 2 n=1

It is frequently useful in power calculations as the following example shows.


Example 6.9.2 Average power of a signal
Find the average power developed across a 1 Ω resistor by a voltage signal with period 2π given by
1 1
v(t) = cos t − sin 2t + cos 3t
3 2
Solution:
We note that v(t) is periodic with period T = 2π. v(t) is already expressed as a Fourier series with a1 = 1,
a3 = 21 and b2 = − 31 . All other Fourier coefficients are 0. The instantaneous power is (v(t))2 and hence the
average power over one period is given by
Z 2π
1
Pav = (v(t))2 dt
2π 0
Therefore, using Parseval’s theorem we find
 2  2 !
1 2 1 1
Pav = 1 + − + = 0.68W
2 3 2

6.9.3 Fourier series and Ordinary differential equations


Fourier series are frequently to solve linear non-homogeneous differential equations with constant coefficients.
For example, consider the equation

y ′′ (x) + y(x) = f (x), 0≤x<l (6.9.18)

with boundary condition


y(0) = y(l) = 0
78 CHAPTER 6. FOURIER SERIES

Solution:
To solve equation (6.9.18) by means of Fourier series, first express f (x) as a Fourier series

a0 X  nπx nπx 
f (x) = + an cos + bn sin (6.9.19)
2 n=1
l l

Now write y(x) as a Fourier series



A0 X  nπx nπx 
Y (x) = + An cos + Bn sin (6.9.20)
2 n=1
l l

where An and Bn are to be determined. We substitute equation (6.9.19) and (6.9.20) into equation (6.9.18)
to obtain
∞ 
n2 π 2 n2 π 2
    
A0 X nπx nπx
+ An 1 − 2 cos + Bn 1 − 2 sin
2 n=1
l l l l

(6.9.21)
a0 X  nπx nπx 
= + an cos + bn sin
2 n=1
l l

Equating the coefficients from equation (6.9.21) we have


an l 2
An =
l2 − n2 π 2
(6.9.22)
bn l 2
Bn = 2
l − n2 π 2
with l 6= nπ. Realize that equation (6.9.22) are valid only for equation (6.9.18). We still have the boundary
conditions to consider. The coefficients an and bn are determined by f (x), and particularly how we choose to
extend f (x) to the interval (−l, 0). The an = 0 if we extend f (x) such that it is an odd function over [−l, l]
and the bn = 0 if we extend f (x) such that it is an even function. The boundary conditions, y(0) = y(l) = 0,
will be satisfied by y(x) in equation (6.9.20) if all the An = 0; this will be the case if all the an = 0, and so
we choose the odd extension of f (x) to develop its Fourier series in equation (6.9.19). Thus,

X bn l 2 nπx
y(x) = sin (6.9.23)
n=1
l2 − n2 π 2 l

satisfies equation (6.9.18) and the boundary conditions y(0) = y(l) = 0.


Example 6.9.3 Use Fourier series to solve the equation
y ′′ (x) + y(x) = x, 0≤x<l
with the boundary condition y(0) = y(l) = 0.
Solution:
The boundary conditions will be satisfied if we use a sine series, so we will use the odd extension of f (x);

x −l ≤ x < 0
fo (x) =
x 0≤x<l
The Fourier coefficients of fo (x) are
l
2 nπx (−1)n+1 2l
Z
bn = x sin dx =
l 0 l nπ
and so the Fourier coefficients of y(x) are (from equation (6.9.22))
(−1)n+1 2l3
Bn =
nπ(l2 − n2 π 2 )
and the solution y(x) is given by

2l3 X (−1)n+1 nπx
y(x) = sin l 6= nπ
π n=1 n(l2 − n2 π 2 ) l

Suppose the boundary conditions were y ′ (0) = y ′ (l) = 0. In this case, we would want to express f (x) as a
cosine series because the derivative of cos nπ/l is equal to zero at x = 0 and x = l. Therefore, we would use
the even extension of f (x) in the above example.
6.10. EXERCISES 79

6.10 Exercises
1. Show
T
2nπt
Z
sin dt = 0, for all integers n
0 T
T
2mπt 2nπt
Z
sin cos dt = 0, for all integers n
0 T T

2. Find the Fourier series representation of the function



 0, −5 < t < 0,
f (t) =
1, 0 < t < 5.

3. Find the Fourier series representation of the function



 −t, −π < t < 0,
f (t) =
0, 0 < t < π.

4. Find the Fourier series representation of the function

f (t) = t2 + πt, −π < t < π.

5. Find the half-range Fourier sine series representation of

f (t) = cos 2t.

6. Express the function f (x) = x2 , 0 ≤ x < L, as a Fourier sine series.

7. Express the function f (x) = sin x, 0 ≤ x < π, as a Fourier cosine series.

8. Express the function f (x) = cos x, 0 ≤ x < π, as a Fourier sine series.

9. Find the Fourier series of the sawtooth wave function as shown in Fig.6.19

f (x) = x + π, −π < x < π

and
f (x + 2π) = f (x)

Figure 6.19: The sawtooth wave function.

Solutions:
2. f (t) = 1 + 2 sin πt + 2 sin 3πt + 2 sin 5πt + 2 sin 7πt · · · .
2 π 5 3π 5 5π 5 7π 5
3. f (t) = π − 2 cos t − sin t + 1 sin 2t − 2 cos 3t − 1 sin 3t · · · .
4 π 2 9π 3
2
4. f (t) = π + 2π sin t − 4 cos t − π sin 2t + cos 2t + 2π sin 3t − 4 cos 3t · · · .
3 3 9
n(1−cos nπ)
5. f (t) = 2
P∞
n=1 sin nt.
π (n2 −4)
2L2 P 2+(−1)n (n2 π 2 −2)
6. f (x) = − ∞
n=1 sin nπx
π3 n3 L
cos 2nx
7. f (x) = 2 + 4
P∞
π π n=1 2
1 − 4n
8 P  
8. f (x) = ∞ n sin 2nx 1 1
n=1 4n2 −1 9. f (x) = π + 2 sin x − 2 sin 2x + 3 sin 3x − · · ·
π
80 CHAPTER 6. FOURIER SERIES
Chapter 7

Partial differential equations

7.1 What are partial differential equations?


A partial differential equation (PDE) is a differential equation involving partial derivatives of one dependent
variable with respect to two or more independent variables. The independent variables may be space variables
only or one or more space variables and time. Mathematical modelling for engineering problems in many
situations involving natural phenomena leads to partial differential equations. Actually, the subject of PDE
is a very very large one. We shall discuss only a few special PDEs which model a wide range of applied
engineering problems.
We have already studied ordinary differential equations (ODE) and have learnt how to obtain the solution
of certain types. Since a knowledge of the solution of certain ODE (i.e. those with constant coefficients) will
be required in solving partial differential equations (PDE), we will begin this unit reminding you of some
important results.
• Linear first order equations
dy
+ f (t)y = g(t)
dt
subject to an initial condition y(0) = y0
• Separable equations
dy f (t)
=
dt g(y)
subject to an initial condition y(0) = y0
• Linear constant coefficient 2nd-order equations
d2 y dy
a 2
+b + cy = f (t)
dt dt
dy
subject to a pair of initial conditions, y(0) = y0 , dt = v0 or, separated boundary conditions y(0) = y0 ,
and y(L) = y1 .
• Systems of nonlinear equations
dy
= f (y, t)
dt
where y is n-dimensional vector, subject to an initial condition y(0) = y0 .
The solution y(t) of the differential equation we can think of as a graph of x against t. In some cases this
graph is expressible as a closed form function. In contrast, partial differential equations (PDE) involve scalar
or vector functions or fields that depend on two or more independent variables typically space and time x
and t, but sometimes two spatial co-ordinates x and y. The simplest kind of PDE involves a single scalar
dependent variable u(x, t). There are three great equations that are very important in physical science and
engineering
1. The heat (or diffusion) equation
The heat equation governs the diffusion of a scalar quantity through a one-dimensional medium, such
as the diffusion of heat through a one-dimensional bar.
∂u ∂2u
= κ2 2
∂t ∂x

81
82 CHAPTER 7. PARTIAL DIFFERENTIAL EQUATIONS

where κ2 is heat transfer constant.

2. The wave equation


The wave equation governs the vibration amplitude of u(x, t) of a one-dimensional string with wave
speed c
∂2u ∂2u
2
= c2 2
∂t ∂x

3. The Laplace equation


This equation governs equilibrium configurations of deformed surfaces (e.g. a drum skin) in the form
of deflection (height) u(x, y)
∂2u ∂2u
+ 2 = 0 or ∇2 u = 0
∂x2 ∂y
Actually, we have seen this (∇) in the vector calculus.

Given suitable boundary or initial conditions, solutions are 3D graphs of the dependent variable u against
the independent variables (x, t) for the heat and wave equations, (x, y) for the Laplace equation.
Other Engineering examples of PDE:

• Beam equation, which derived from force balance, describes the vertical vibration u(x, t) of a one-
dimensional beam
∂2u ∂u ∂4u
m 2 +k + EI 4 = q(x, t)
∂t ∂t ∂x

• Cable equation governs the voltage (or current) u(x, t) in a transmission line

∂2u ∂2u ∂u
= LC + (LC + LG) + RGu
∂x2 ∂t2 ∂t

• Reaction diffusion equation: governs the chemical concentration u(x, t) of a reactant that both
diffuses and reacts with other chemicals

∂u ∂2u
= α2 2 + f (u)
∂t ∂x

• Korteweg-de Vries (KdV) equation governs amplitude u(x, t) of dispersive waves on the surface
of water.
∂u ∂u 3 ∂u ∂ 3 u
= + u +
∂t ∂x 2 ∂x ∂x3

• Navier Stokes equation the fundamental force balance equation for the (vector) velocity field u(x, t)
of viscous fluid flow
∂u 1
+ (u · grad) u + ∇p = η∇2 u
∂t ρ
This vector equation has been shown to be remarkably accurate at describing Newtonian fluid flow
both laminar and turbulent.

• Transverse vibrations equation


∂4u ∂2u
a2 + 2 =0
∂x4 ∂t
for a homogeneous rod, where u(x, t) is the displacement at time t of the cross section through x.

Because of the rich variety of PDE and the nature of their solutions, in these lectures, we shall give only
the briefest overview of the theory of PDE, what they are used for in Engineering, and how they can be
solved. We shall focus exclusively on single PDE for a scalar dependent variable u that depends on two (or
occasionally three) independent variables.

2 ∂2u 1 ∂u
Example 7.1.1 Show that u = e−2π t sin πx is a solution of the partial differential equation: =
∂x2 2 ∂t
7.1. WHAT ARE PARTIAL DIFFERENTIAL EQUATIONS? 83

Solution:
First we find
∂u 2 ∂u 2
= −2π 2 e−2π t sin πx, = πe−2π t cos πx
∂t ∂x
then
∂2u 2
= −π 2 e−2π t sin πx
∂x2
We see that
∂2u 1 2 1 ∂u
= (−2π 2 e−2π t sin πx) =
∂x2 2 2 ∂t
2
2 ∂ u 1 ∂u
Therefore, u = e−2π t sin πx is a solution of = .
∂x2 2 ∂t
Example 7.1.2 Verify that  
 πx  πct
u(x, t) = u0 sin cos
L L
satisfies the one dimensional wave equation

∂2u 1 ∂2u
2
= 2 2
∂x c ∂t
where u0 , L and c are constants.
Solution:
By straightforward partial differentiation of the given function u(x, t)

∂2u
   π 2  
∂u π  πx  πct  πx  πct
= u0 cos cos = −u 0 sin cos
∂x L L L ∂x2 L L L
2
   
∂u  πc   πx  πct ∂ u  πc  2  πx  πct
= −u0 sin sin = −u 0 sin cos
∂t L L L ∂t2 L L L

We see that
∂2u 1 ∂2u
=
∂x2 c2 ∂t2
which completes the verification.
One possible physical interpretation of this problem is that u(x, t) represents the displacement of a string
stretched between two points at x = 0 and x = L. Clearly the position of any point P on the vibrating string
will depend upon its distance x from one end and on the time t. The boundary conditions represent the fact
 πx 
that the string is fixed at these end-points as shown in Fig.7.1. The initial condition u(x, 0) = u0 sin
L
represents the displacement of the string at t = 0. From this example, we have found that PDEs are much

Figure 7.1: The displacement of a string stretched between two points at x = 0 and x = L.

more complicated than ODEs. They come in a variety of forms: linear homogeneous, linear inhomogeneous,
semi-linear and non-linear. Their solution depends significantly on the domain of the independent variables,
and the boundary conditions on the dependent variables. We have noted that Only the very simplest PDE
can be solved with analytical methods.
84 CHAPTER 7. PARTIAL DIFFERENTIAL EQUATIONS

7.2 Solution of partial differential equations


The main topic of this section is the solution of PDE using the direct integration and the method of separation
of variables. The former is just an integration, and the latter involves two independent variables to convert
into two ordinary differential equations. We should be aware that other analytical methods and also numerical
methods are available for solving PDE. However, the separation of variables technique does give some useful
solutions to important PDE.

7.2.1 Direct integration


The method of direct integration is a straightforward extension of solving very simple ODE by integration.
However, we have to use an arbitrary function (for example f (t)) replaces the normal arbitrary constant C
in ordinary integration. Let us look at the following example.
Example 7.2.1 Use the direct integration method to solve the equation

∂2u
= 2xet
∂x2
where u is a function of x and t.
Solution:
Integrating with respect to x gives us
∂u
= x2 et + f (t)
∂x
where the arbitrary function f (t) replaces the normal arbitrary constant C of ordinary integration. This
function of t only is needed because we are integrating partially with respect to x, i.e. we are reversing a
partial differentiation with respect to x at constant t. We can integrate it again with respect to x gives the
general solution
x3 t
u(x, t) = e + xf (t) + g(t)
3
where g(t) is a second arbitrary function. We have now obtained the general solution of the given PDE
but to find the arbitrary function we must know two initial conditions. For example, suppose that these
conditions are
∂u
u(0, t) = t, (0, t) = et
∂x
Inserting the first of these conditions into the general solution gives g(t) = t. Inserting the second condition
into the general solution gives f (t) = et . So the final solution is

x3 t
u(x, t) = e + xet + t
3
Example 7.2.2 Solve the PDE
∂2u
= sin x cos y
∂x∂y
subject to the conditions
∂u π
= 2x at y= , u = 2 sin y, at x=π
∂x 2
Solution:
First integrate the PDE with respect to y: (it is equally valid to integrate first with respect to x).
∂u
= sin x sin y + f (x)
∂x
∂u
Remember here to add an appropriate arbitrary function f (x). Since one of the given conditions is on ,
∂x
π
impose this condition to determine the arbitrary function f (x). At y = , we have
2
∂u  π 
= 2x =⇒ sin x sin + f (x) = 2x =⇒ f (x) = 2x − sin x
∂x 2
So
∂u
= sin x sin y + 2x − sin x
∂x
7.2. SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS 85

Integrating now with respect to x gives

u = − cos x sin y + x2 + cos x + g(y)

Here don’t forget to add an appropriate arbitrary function g(y). Similarly, we can obtain the arbitrary
function g(y) by using

u(π, y) = 2 sin y =⇒ − cos π sin y + π 2 + cos π + g(y) = 2 sin y =⇒ g(y) = sin y + 1 − π 2

Therefore, the final solution is

u(x, y) = x2 + cos x(1 − sin y) + sin y + 1 − π 2

7.2.2 The separation of variables method


2
2pi t
In the previous section we showed that u(x, t)e  sin πt is a solution of the one dimensional heat conduction
 πx  πct
equation, and u(x, t) = u0 sin cos is a solution of the one dimensional wave equation. All
L L
solutions here have a specific form: u(x, t) is a product of a function of x alone and a function of t alone.
The method of separation of variables involves finding solutions of PDEs which are of this product form. In
the method we assume that a solution to a PDE has the form

u(x, t) = X(x)T (t)

where X(x) is a function of x only, and T (t) is a function of t only. That is why the method is called as the
separation method. However, we should note that not all solutions to PDEs are of this type; for example,
it is easy to verify that u(x, y) = x2 − y 2 (which is not of the form u(x, y) = X(x)Y (y)), is a solution of
the Laplace equation. In this section we shall only consider this kind of product form to the PDE solutions.
Now, we shall see how to derive the general solution of the heat equation using the separation of variables
method.

Example 7.2.3 Solve the heat conduction equation

∂2u 1 ∂u
2
= , 0 < x < 3, t>0
∂x 2 ∂t
with the boundary conditions
u(0, t) = u(3, t) = 0
and the initial condition
u(x, 0) = 5 sin 4πx

Solution:
The basic idea is to try to find a solution that is a function of x times a function of t. That is, we write

u(x, t) = X(x)T (t)

Substituting this form into the PDE we get

dT d2 X
= 2KT, = KX
dt dx2
The T equation has general solution
T (t) = Ae2Kt
which will increase exponentially with increasing t if K is positive and decrease with t if K is negative. In
any physical problem the latter is the meaningful situation. To emphasise that K is being taken as negative
we assume that
K = −λ2
so 2
t
T = Ae−2λ
Similarly, the X equation becomes
d2 X
= −λ2 X
dx2
86 CHAPTER 7. PARTIAL DIFFERENTIAL EQUATIONS

which has solution


X(x) = B cos λx + C sin λx
Hence
2
t
u(x, t) = X(x)T (t) = (D cos λx + E sin λx)e−2λ (7.2.1)
where D = AB and E = AC are all constants. Note that we should always try to keep the number of
arbitrary constants down to an absolute minimum by multiplying them together in this way.
We now insert the initial and boundary conditions to obtain the constant D and E and also the separation
constant λ. The boundary condition u(0, t) = 0 gives
2
t
(D cos 0 + E sin 0)e−2λ =0 for all t

Since sin 0 = 0 and cos 0 = 1 this means that D = 0.


The other boundary condition u(3, t) = 0 then gives
2
t
E sin(3λ)e−2λ = 0, for all t

We cannot deduce that the constant E has to be zero because then the solution (7.2.1) would be the trivial
solution u(x, t) = 0. The only sensible deduction is that

sin(3λ) = 0 =⇒ 3λ = nπ

where n is some integer. Hence solutions of the form (7.2.1) satisfying the 2 boundary conditions have the
form  nπx  2n2 π2 t
u(x, t) = En sin e− 9
3
where we have written En for E to allow for the possibility of a different value for the constant for each
different value of n.
We obtain the value of n by using the initial condition u(x, 0) = 5 sin(4πx) and forcing this solution to agree
with it. That is,  nπx 
u(x, 0) = En sin = 5 sin(4πx)
3
so we must choose n = 12 with E12 = 5. Finally, we have the solution
 
12πx − 2 (12)2 π2 t 2
u(x, t) = 5 sin e 9 = 5 sin(4πx)e−32π t
3

Example 7.2.4 Solve the one dimensional wave equation

∂2u 1 ∂2u
= for 0 < x < 2, t>0
∂x2 16 ∂t2
with the boundary conditions
u(0, t) = u(2, t) = 0
and the initial conditions
∂u
u(x, 0) = 6 sin πx − 3 sin 4πx, (x, 0) = 0
∂t
Solution:
We first assume that the solution has a form

u(x, t) = X(x)T (t)

write down the ODEs satisfied by X(x) and T (t)

X ′′ T ′′
= K, =K
X 16T
Now decide on the appropriate sign for K and then write down the solution to these equations. Choosing
K as negative (say K = −λ2 ) will produce Sinusoidal solutions for X and T which are appropriate in the
context of the wave equation where oscillatory solutions can be expected. Then we have

X ′′ = −λ2 X, =⇒ X = A cos λx + B sin λx


7.2. SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS 87

Similarly,
T ′′ = −16λ2 T =⇒ T = C cos 4λt + D sin 4λt
Now obtain the general solution u(x, t) by multiplying X(x) by T (t) and insert the two boundary conditions
to obtain information about two of the constants.

u(x, t) = X(x)T (t) = (A cos λx + B sin λx)(C cos 4λt + D sin 4λt)

Using the boundary conditions we have

u(0, t) = 0 =⇒ A(C cos 4λt + D sin 4λt) = 0 =⇒ A=0

and
u(2, t) = 0 =⇒ B sin(2λ)(C cos 4λt + D sin 4λt) = 0
so, for a non-trivial solution

sin(2λ) = 0 =⇒ λ= for some integer n
2
At this stage we write the solution as
 nπx 
u(x, t) = sin (E cos(2nπt) + F sin(2nπt)
2
where we have multiplied constants and put E = BC and F + BD. Now we use the initial condition
∂u
(x, 0) = 0
∂t
to deduce the value of F . First, we differentiate the solution with respect to t
∂u  nπx 
= sin (−2nπE sin(2nπt) + 2nπF cos(2nπt))
∂t 2
so at t = 0 we have
∂u  nπx 
(x, 0) = sin 2nπF = 0 =⇒ F = 0
∂t 2
Finally using the other the initial condition u(x, 0) = 6 sin(πx) − 3 sin(4πx) deduce the form of u(x, t). At
this stage the solution reads  nπx 
u(x, t) = E sin cos(2nπt) (7.2.2)
2
We now insert the last initial condition
 nπx 
u(x, 0) = 6 sin πx − 3 sin 4πx =⇒ u(x, 0) = E sin (7.2.3)
2
At this point we seem to have incompatability because no single value of n will enable us to satisfy (7.2.3).
However, in the solution (7.2.2), any positive integer value of n is acceptable and we can in fact, superpose
solutions of the form (7.2.2) and still have a valid solution to the PDE Hence we first write, instead of (7.2.2)

X  nπx 
u(x, t) = En sin cos(2nπt) (7.2.4)
n=1
2

for which

X  nπx 
u(x, 0) = En sin (7.2.5)
n=1
2
Actually, this is a Fourier series.
To make the solution (7.2.5) fit the initial condition (7.2.3) we do not require all the terms in the infinite
Fourier series. We need only the terms with n = 2 with coefficient E2 = 6 and the term for which n = 8
with E8 = −3. All the other coefficients En have to be chosen as zero. Using these results in (7.2.4) we
obtain the solution
u(x, t) = 6 sin(πx) cos(4πt) − 3 sin(4πx) cos(16πt)
The above solution perhaps seems rather involved but there is a definite sequence of logical steps which can
be readily applied to other similar problems.
88 CHAPTER 7. PARTIAL DIFFERENTIAL EQUATIONS

Example 7.2.5 Heat conduction through a furnace wall


The temperature profile within a body depends upon the rate of heat transfer to the atmosphere, its capacity
to store some of this heat, and its rate of thermal conduction to its boundaries (where the heat is transferred
to the surrounding environment). Mathematically this is stated by the heat equation
 
∂ ∂T ∂T
k = ρc (7.2.6)
∂x ∂x ∂t
The thermal diffusivity α is related to the thermal conductivity k, the specific heat c, and the density of solid
k
material ρ by α = . The wall (thickness L) of a furnace, with inside temperature 800o C, is comprised
ρc
of brick material [thermal conductivity = 0.02 W m−1 K −1 )]. Given that the wall thickness is 12 cm, the
atmospheric temperature is 0o C, the density and heat capacity of the brick material are 1.9 gmcm−3 and 6.0
J kg −1 K −1 respectively, estimate the temperature profile within the brick wall after 2 hours. Here we have
the initial condition  πx 
T (x, 0) = 800 sin (7.2.7)
2L
and the boundary conditions
∂T
T (0, t) = 0, (L, t) = 0 (7.2.8)
∂x
This example is to ask us to find the temperature profile at t = 7200 second =2 hours.
Solution:
We assume that the solution has the form

T (x, t) = X(x) × Y (t)

so equation (7.2.6) becomes


Y′ X ′′
=α =K
Y X
Using values of K which are zero or positive does not allow a solution which satisfies the initial and boundary
conditions. Thus, K is assumed to be negative i.e. K = −λ2 . Then the above equation separates into the
two ordinary differential equations
dY
= −λ2 Y
dt
d2 X
= −λ2 αX
dx2
with solutions
2
Y = Ce−λ t
X = A cos ax + B sin ax
2
T = X × Y = e−λ t (A cos ax + B sin ax)
where
λ
a= √
α
Using the boundary condition T (0, t) = 0 we obtain A = 0 and
2
T = Be−λ t sin ax

Hence
dT 2
= Bae−λ t cos ax
dx
dT
Using another boundary condition (L, t) = 0, we can have one of the following conclusions:
dx
B = 0, λ = 0, cos(aL) = 0

The first two possibilities (B = 0 and λ = 0) can be discounted as they leave T = 0 for all x and t and it is
not possible to satisfy the initial condition (7.2.7). Hence, we have to take
 
1
cos aL = 0, =⇒ aL = n + π
2
7.2. SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS 89

This is   √  
λ 1 α 1
aL = √ L = n+ π =⇒ λ = n+ π
α 2 L 2
So the temperature T satisfies
  
α 1 2 1 πx
T = Be− L2 (n+ 2 ) t sin n+
2 L

This solution should also satisfied the initial condition (7.2.7)


 πx    
1 πx
800 sin = B sin n+
2L 2 L

Equating the arguments of the sine terms


 
πx 1 πx
= n+
2L 2 L
so n = 0,
800 = B
So the temperature profile is  πx 
αt
T (x, t) = 800e− 2L2 sin
2L
where
k 0.02
α= = = 1.764 × 10−6 m2 s−1
ρc 1900 × 6
αt
After two hours, t = 7200, so − 2L 2 = −0.438, therefore, we have the solution

 πx   πx 
T (x, 7200) = 800e−0.438 sin = 516 sin
2L 2L
This means the inner wall of the furnace has cooled from 800o C to 516o C.

7.2.3 Fourier series for PDE solutions


In this section we continue to use the separation of variables method for solving PDEs but we will find that,
to be able to fit certain boundary conditions, Fourier series methods have to be used leading to the final
solution being in the (rather complicated) form of an infinite series. The techniques will be illustrated using
the two-dimensional Laplace equation but similar situations often arise in connection with other important
PDEs. We recall from the previous Section that using a product solution

u(x, y) = X(x)Y (y)

in Laplace equation gives rise to the ODEs

X ′′ Y ′′
=K = −K
X Y
To determine the sign of K and hence the appropriate solutions for X(x) and Y (y) we must impose appropri-
ate boundary conditions. We will investigate solving Laplace equation in the square {0 ≤ x ≤ l, 0 ≤ y ≤ l}
for the boundary conditions as shown in Fig.7.2

u(x, 0) = 0, U (0, y) = 0, u(l, y) = 0, u(x, l) = U0

where U0 is a constant.
1. We must first deduce the sign of the separation constant K.
If K is chosen to be positive say K = −λ2 , then the X equation gives a general solution

x′′ = λ2 X =⇒ X = Aeλx + Be−λx

while the Y equation gives

Y ′′ = −λ2 Y =⇒ Y = C cos λy + D sin λy


90 CHAPTER 7. PARTIAL DIFFERENTIAL EQUATIONS

Figure 7.2: The domain and boundary conditions for the Laplace equation.

If the sign of K is negative K = −λ2 the solutions will change to trigonometric in x and exponential
in y. These are the only two possibilities when we solve Laplace equation using separation of variables
and we must look at the boundary conditions of the problem to decide which is appropriate. Here the
boundary conditions are periodic in x (since u(0, y) = u(l, y)) and non-periodic in y which suggests we
need a solution that is periodic in x and non-periodic in y.
Hence we choose K = −λ2 to give

X(x) = (A cos λx + B sin λx) and Y (y) = (Ceλy + De−λy )

The appropriate general solution of Laplace equation for the given problem is

u(x, y) = (A cos λx + B sin λx)(Ceλy + De−λy )

2. Inserting the boundary conditions produces the following consequences:

u(0, y) = 0 =⇒ A=0

u(l, y) = 0 =⇒ sin(λl) = 0 =⇒ λ=
l
where n is a positive integer n = 1, 2, 3, · · · . While n = 0 also satisfies the equation it leads to the
trivial u = 0 only.
u(x, 0) = 0 =⇒ C + D = 0 =⇒ D = −C
At this point the solution can be written as
 nπx   nπy nπy

u(x, y) = BC sin e l − e− l
l
This can be conveniently written as
 nπx   nπy 
u(x, y) = E sin sinh E = 2BC (7.2.9)
l l
At this stage we have just one final boundary condition to insert to obtain information about the
constant E and the integer n. Our solution (7.2.9) gives
 nπx 
u(x, l) = E sin sinh(nπ)
l
and clearly this is not compatible, as it stands, with the given boundary condition

u(x, l) = U0 = constant

The way to proceed is again to superpose solutions of the form (7.2.9) for all positive integer values of
n to give
X∞  nπx   nπy 
u(x, y) = En sin sinh (7.2.10)
n=1
l l
from which the final boundary condition gives

X  nπx  ∞
X  nπx 
U0 = En sin sinh(nπ) = bn sin 0<x<l (7.2.11)
n=1
l n=1
l

What we have here is a Fourier (sine) series for the function

f (x) = U0 , 0<x<l
7.2. SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS 91

Recalling the work on half-range Fourier series we must extend this definition to produce an odd
function with period 2l. Hence we define

U0 0<x<l
f (x) =
−U0 −l < x < 0
f (x) = f (x + l)
which has the period 2l as shown in Fig.7.3.

Figure 7.3: The function f (x) with period 2l.

3. We can now apply standard Fourier series theory to evaluate the Fourier coefficients bn in (7.2.11). We
obtain
4U0 l  nπx 
Z
bn = En sinh(nπ) = sin dx
2l 0 l
Carrying out the integration, we obtain
 4U0
2U0 n = 1, 3, 5, · · ·
En sinh(nπ) = (1 − cos nπ) =⇒ En = nπ sinh(nπ)
nπ 0 n = 2, 4, 6, · · ·
Since f (x) is a square wave with half-period symmetry we are not surprised that only odd harmonics
arise in the Fourier series. Finally substituting these results for En into (7.2.10) we obtain the solution
to the given problem as the infinite series

4U0 X 1  nπx   nπy 
u(x, y) = sin sinh
π n sinh nπ l l
n=1
(n odd)

Example 7.2.6 Determine the steady-state temperature distribution governing by the equation
∂2T ∂2T
2
+ =0
∂x ∂y 2
in a rectangular plate that is insulated along the edges x = 0 and x = a, so that
Tx (0, y) = Tx (a, y) = 0
and whose edges y = 0 and y = b are
πx
T (x, 0) = 0, T (x, b) = T0 cos
a
Solution:
Letting T (x, y) = X(x)Y (y) yields
X ′′ (x) = kX(x), X ′ (0) = X ′ (a) = 0
and
Y ′′ (y) = −kY (y), Y (0) = 0
If k = 0 yields a non-trivial solution X0 (x) = constant. The boundary conditions cannot be satisfied if k > 0,
n2 π 2
but, if k < 0, we find that kn = −λ2n = − 2 and that
a
 nπx 
Xn (x) = cos
a
92 CHAPTER 7. PARTIAL DIFFERENTIAL EQUATIONS

for n = 1, 2, 3, · · · . The equation for Y (y) gives us



y n=0
Yn (y) =
sinh nπy
a n = 1, 2, · · ·

The total solution so far is given by a superposition of the Xn (x)Yn (y)



X  nπy   nπx 
T (x, y) = β0 y + βn sinh cos
n=1
a a

We can determine the βn from the boundary conditions at y = b by using


 πx   πx  ∞  
X nπb  nπx 
T (x, b) = T0 cos =⇒ T0 cos = β0 b + βn sinh cos
a a n=1
a a

By matching coefficients on the two sides of this equation, we see that only the n = 1 term survives, yielding
T0
β1 =
sinh πb

a

so that
T0  πy   πx 
T (x, y) = sinh cos
sinh πb

a
a a
We can verify that T (x, y) satisfies Laplace equation and also fits the boundary conditions. Fig.7.4 shows
T (x, y) plotted over the rectangular region.

1.0

0.5
1.0
0.0
-0.5
-1.0
0.0 0.5

0.5

1.0

1.5
0.0
2.0
Figure 7.4: The steady-state temperature distribution for the system by the Laplace equation, where a =
2, b = 1, T0 = 1.
7.3. EXERCISES 93

7.3 Exercises
1. Show that
u(x, t) = sin x sin(vt)
is a solution to the one-dimensional wave equation
∂2u 1 ∂2u
=
∂x2 v 2 ∂t2
2. Show that
1
φ(x, y, z) = p , (x, y, z) 6= (0, 0, 0)
x2 + y2 + z2
satisfies Laplace equation
∂2φ ∂2φ ∂2φ
∇2 φ = + 2 + 2 =0
∂x2 ∂y ∂z
3. Show that 2
T (x, y, z, t) = Ae−3α t sin x sin y sin z
satisfies the three-dimensional heat equation
∂2T ∂2T ∂2T 1 ∂T
2
+ 2
+ = 2
∂x ∂y ∂z 2 α ∂t
4. Use the direct integration method to solve the equation
∂2T
= et sinx
∂x2
where T (x, t) is a function of x and t.
5. The temperature distribution in the slab governed by the heat equation is
∂2T 1 ∂T
= 2 , 0 ≤ x ≤ 1, 0<t
∂x2 α ∂t
subject to the boundary conditions
T (0, t) = T (1, t) = 0
and the initial condition
T (x, 0) = T0 = constant, 0<x<1
Find the temperature distribution T (x, t). (Hint: see Example 7.2.3).
6. Show that    
2πx 2πvt
u(x, t) = U0 sin cos
L L
satisfies the wave equation
∂2u 1 ∂2u
= , 0 ≤ x ≤ L, t>0
∂x2 v 2 ∂t2
and the boundary conditions
u(0, t) = u(L, t) = 0
and the initial conditions  
2πx ∂u
u(x, 0) = U0 sin , (x, 0) = 0
L ∂t
7. Verify (by substitution) that each u satisfies
∂2u ∂2u
+ 2 = f (x, y)
∂x2 ∂y
with f (x, y) as indicated
y 2y
(a) u= , f=
x x3
(b) u = sin xy, f = −(x2 + y 2 ) sin xy
2
+y 2 2 2
(c) u = ex f = 4(x2 + y 2 )ex +y
1 1
(d) u= p f=p
x2 + y2 (x + y 2 )3
2
94 CHAPTER 7. PARTIAL DIFFERENTIAL EQUATIONS

8. Verify (by substitution) that the given function is a solution of the heat equation

∂u ∂2u
= c2 2
∂t ∂x
with suitable c
2 2
c t
(a) u = e−t sin x (b) u = e−ω cos ωx
2
(c) u = e−9t sin ωx (d) u = e−π t cos 25x

9. Verify (by substitution) that the given function is a solution of the wave equation

∂2u ∂2u
2
= c2 2
∂t ∂x
with suitable c

(a) u = x 2 + t2 (b) u = cos 4t sin 2x


(c) u = sin(kct) cos(kx) (d) u = sin at sin bx

10. Solve the following partial differential equations

(a) uyy = 0 (b) uxx + 16π 2 u = 0


(c) uy + y 2 u = 0 (d) uyy + 6uy + 13u = 4e3y

Solution:
4. u(x, t) = sin x cos t + xf (t) + g(t)
P sin(2n−1)πx −α2 (2n−1)2 π 2 t
5. T (x, t) = 4Tπ0 ∞ n=1 2n−1
e
3
/3
10.(b) u = a(y) cos 4πx + b(y) sin 4πx, (c) u = c(x)e−y (d) u = e−3y (a(x) cos 2y + b(x) sin 2y) + 0.1e3y .
Chapter 8

Appendixes

A Formulas
1. Trigonometry formulas
sin A
sin2 A + cos2 A = 1 tan A =
cos A
sin 2A = 2 sin A cos A cos 2A = cos2 A − sin2 A
1 + cos 2A 1 − cos 2A
cos2 A = sin2 A =
2 2
sin(A + B) = sin A cos B + cos A sin B sin(A − B) = sin A cos B − cos A sin B
cos(A + B) = cos A cos B − sin A sin B cos(A − B) = cos A cos B + sin A sin B
sin(−A) = − sin A cos(−A) = cos A
1 1
sin A sin B = cos(A − B) − cos(A + B)
2 2
1 1
cos A cos B = cos(A − B) + cos(A + B)
2 2
1 1
sin A cos B = sin(A − B) + sin(A + B)
2 2
2. Laws of logarithm
If A = bc , then logb A = c.
These laws apply in any bases:
A
log A + log B = log AB log A − log B = log
B
log X ln X
n log A = log An loga X = =
log a ln a

3. Laws of powers
Am
Am An = Am+n Am ÷ An = n = Am−n
√ A √
(Am )n = Amn 1/n
Am/n = Am
n n
A = A

4. The quadratic equation


If ax2 + bx + c = 0, then √
−b ± b2 − 4ac
x=
2a
5. Matrices
If  
a b
A=
c d
then    
1 d −b 1 d −b
A−1 = =
|A| −c a ad − bc −c a

95
96 CHAPTER 8. APPENDIXES

The determinant is
a b
|A| = = ad − bc
c d
6. Vectors
(a) Normal
If r = x i + y j + z k then p
|r| = x2 + y 2 + z 2
(b) Scalar (dot) product
If a = a1 i + a2 j + a3 k and b = b1 i + b2 j + b3 k then
a · b = a 1 b1 + a 2 b2 + a 3 b3
a · b = |a||b| cos θ
(c) Vector (cross) product
If a = a1 i + a2 j + a3 k and b = b1 i + b2 j + b3 k then

i j k

a × b = a1 a2 a3 = (a2 b3 − a3 b2 ) i + (a3 b1 − a1 b3 ) j + (a1 b2 − a2 b1 ) k
b1 b2 b3

7. Complex numbers
(a) Cartesian form √
z = a + bj, j= −1
(b) Polar form
z = a + bj, z = r(cos θ + j sin θ)
p b
a = r cos θ, b = r sin θ, r = a2 + b2 tan θ = , (−π ≤ θ ≤ π)
a
(c) Exponential form z = rejθ
(d) Euler’s relation
ejθ = cos θ + j sin θ, e−jθ = cos θ − j sin θ
(e) Multiplication and division in polar form
z1 r1
z1 z2 = r1 r2 ∠(θ1 + θ2 ) = ∠(θ1 − θ2 )
z2 r2
z n = rn ∠(nθ)
(f) De Moivre’s theorem
(cos θ + j sin θ)n = cos nθ + j sin nθ
8. The binomial theorem
n(n − 1) n−2 2 n(n − 1)(n − 2) n−3 3
(a + b)n = an + nan−1 b + a b + a b + · · · + bn
2! 3!
9. Elementary derivatives
df
function f (x) derivatives = f ′ (x)
dx
k 0 (k is a constant )
n
x nxn−1
ekx kekx
1
ln(kx) (k is any constant)
x
sin kx k cos kx
cos kx − k sin kx
tan kx k sec2 kx
1
sin−1 x √
1 − x2
−1
cos−1 x √
1 − x2
A. FORMULAS 97

10. Derivative rules

(a) The linearity rule


d du dv
(au ± bv) = a ±b
dx dx dx
(b) The product rule
d dv du
(uv) = u +v
dx dx dx
(c) The quotient rule
d  u  vu′ − uv ′
=
dx v v2
(d) The chain rule
If y = y(u) where u = u(x) then
dy dy du
=
dx du dx
11. Elementary integrals
Indefinite integrals Reversed derivatives
xn+1
 n+1 
d x
Z
xn dx = + C (n 6= −1) = xn
n+1 dx n + 1
d
Z Z
dx = 1dx = x + C (x) = 1
dx
1 d 1
Z Z
dx = x−1 dx = ln |x| + C (ln x) = = x−1
x dx x
 
cos kx d cos kx
Z
sin kxdx = − +C − = sin kx
k dx k
 
sin kx d sin kx
Z
cos kxdx = +C = cos kx
k dx k
ekx
 kx 
d e
Z
ekx dx = +C = ekx
k dx k
d
Z
e−x dx = −e−x + C (−e−x ) = e−x
dx
ax
 x 
d a
Z
ax dx = +C = ax
ln a dx ln a

12. Integral rules

(a) The linearity rule


Z Z Z
[a f (x) ± b g(x)]dx = a f (x)dx ± b g(x)dx (a, b are constant)

(b) Integration by substitution

b u(b)
du du
Z Z Z Z
f (u) dx = f (u)du, f (u) dx = f (u)du
dx a dx u(a)

(c) Integration by parts


dv du
Z Z
u dx = uv − vdx
dx dx

(d) Other form


f ′ (x)
Z
dx = ln |f (x)| + C
f (x)
98 CHAPTER 8. APPENDIXES

13. A selection of more complicated integrals

1 1
Z Z
ln xdx = x ln x − x + C, dx = ln(ax + b)
ax + b a

1 1 −1 x 1 1 x − a
Z Z
dx = tan + C, dx = ln +C
x 2 + a2 a a x 2 − a2 2a x + a
1 1 x
Z p Z
√ dx = ln |x + x2 ± a2 | + C, √ dx = sin−1 + C
2
x ±a 2 2
a −x 2 a
1
Z p  p p 
x2 ± a2 dx = x x2 ± a2 ± a2 ln |x + x2 ± a2 | + C
2
kx
ne n
Z Z
n kx
x e dx = x − xn−1 ekx dx
k k
Z Z
tan xdx = − ln cos x + C tan2 xdx = −x + tan x + C
x 1 x 1
Z Z
2
sin xdx = − sin 2x + C cos2 xdx = + sin 2x + C
2 4 2 4
Z Z
x cos xdx = cos x + x sin x + C x sin xdx = −x cos x + sin x + C
1 1
Z Z
ex sin xdx = ex (sin x − cos x) + C ex cos xdx = ex (sin x + cos x) + C
2 2
1 x
Z
x
xe sin xdx = e (cos x − x cos x + x sin x) + C
2
1
Z
xex cos xdx = ex (x cos x − sin x + x sin x + C
2

14. The mean value


b
1
Z
Mean value = f (x)dx
b−a a

15. The root mean square (RMS) value


s
b
1
Z
RMS = [f (x)]2 dx
b−a a

16. Area between curves Z b


A= (f (x) − g(x))dx
a

17. Volume of solids of revolution

(a) About the x-axis


Z b
V =π ([R(x)]2 − [r(x)]2 )dx
a

(b) About the y-axis


Z b
V =π ([R(y)]2 − [r(y)]2 )dy
a

18. Two dimensional centre of mass


Rb 1
Rb
a
mxydx 2 a
my 2 dx
x̄ = R b , ȳ = Rb
a
mydx a
mydx

19. Newton-Raphson formula


f (xn )
xn+1 = xn −
f ′ (xn )
A. FORMULAS 99

20. Solution of first order differential equation


dy
if + p(x)y = q(x) then
dx Z 
1
y= µ(x)q(x)dx + C
µ(x)
where R
p(x)dx
µ(x) = e

21. Solution of second order homogeneous differential equation


If
d2 y dy
a 2 +b + cy = 0
dx dx
and the auxiliary equation is
ak 2 + bk + c = 0
where a, b and c are constants then

y = Aek1 x + Bek2 x (k1 , k2 both real and different)


kx
y = (A + Bx)e (k1 = k2 = k repeated roots)
y = eαx (A cos βx + B sin βx) (α ± jβ complex conjugate roots)

22. Some constants

π = 3.1415926, e = 2.71828182 10 = 0.017453 (rad) 1 (rad) = 57.295770

23. Vector calculus

(a) The gradient of a scalar function φ:


∇φ ⇒ a vector field

∂φ ∂φ ∂φ
gradφ = ∇φ = i + j + k
∂x ∂y ∂z

where  
∂ ∂ ∂
∇= i + j + k
∂x ∂y ∂z
(b) The divergence of a vector field:
div v = ∇ · v ⇒ a scalar

∂vx ∂vy ∂vz


div v = ∇ · v = + +
∂x ∂y ∂z

(c) The curl of a vector field:

curl v = ∇ × v ⇒ a vector field



i j k


∂ ∂ ∂

curl v = ∇ × v = ∂x ∂y ∂z


vx vy vz

(d) Higher order derivatives can be also formed, giving the following:

∂2f ∂2f ∂2f


div (gradf ) = ∇ · ∇ f = + + = ∇2 f
∂x2 ∂y 2 ∂z 2

where ∇2 is called the Laplace operator.

You might also like