Professional Documents
Culture Documents
Mathematical Methods
for Physical Sciences
Skeletal Notes
School of Mathematics
University of Southampton
February 2005
CONTENTS i
Contents
2 Complex Numbers 9
2.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Powers of i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Differential Equations 31
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5 Multiple Integration 56
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Let A be a given square matrix of dimension n × n, and let c be a given column vector of
length n. Then
Ax = c (1)
is a matrix representation of a set of n simultaneous equations for the n unknown components
of the column vector x. For example,
µ ¶ µ ¶ µ ¶
1 2 x 4
A= , x= , c=
2 3 y 5
x + 2y = 4,
2x + 3y = 5.
In general, there is a simple systematic way to solve the set (1): Suppose that A has an
inverse, given by A−1 (i.e., A−1 A = I, where I is the Identity matrix). Then, by multiplying
both sides on the left by A−1 , we obtain
Hence x = A−1 c
Not all matrices have inverses. A square matrix which has an inverse is said to be nonsin-
gular. A matrix that does not possess an inverse is singular. Recall that a matrix only has
an inverse if its determinant is nonzero, i.e.,
We first consider examples of nonsingular systems. In the next section we shall look at
singular systems.
2 1 ELEMENTS OF LINEAR ALGEBRA
Example 1:
x + 2y = 4,
2x + 3y = 5.
Then
µ ¶µ ¶ µ ¶µ ¶ µ ¶
−11 3 −2 4 −3 2 4 −2
x=A c= = = .
3−4 −2 1 5 2 −1 5 3
Hence x = −2 and y = 3.
Example 2:
x + 2z = 1,
3y + z = 2,
x + y = 3.
Then
1 −2 6 1 1 + (−2) × 2 + 6 × 3 15/7
1 1
x = A−1 c = −1 2 1 2 = −1 × 1 + 2.2 + 1 × 3 = 6/7 .
7 7
3 1 −3 3 3 × 1 + 1 × 2 + (−3) × 3 −4/7
Ax = 0 is homogeneous,
Ax = c, c 6= 0, is inhomogeneous.
1.1 Matrices and simultaneous equations 3
Suppose we have a system with n equations and n unknowns, so that A is an n×n matrix. If
det (A) = 0 this implies that one or more rows of A can be expressed as a linear combination
of the others (recall properties of determinants). This row represents the coefficients of an
equation in the unknowns, so, in other words, one equation is just a linear combination of
the others, and so gives no further information.
Example :
x + y + z = 0,
x + 2y + z = 0,
2x + 3y + 2z = 0.
Since det A = 0, we know that we can write one of the equations in terms of the other two.
In this example the 3rd equation is just the sum of the first two equation, so this tells us
nothing new. Hence, the original system of equations is equivalent to
x + y + z = 0,
x + 2y + z = 0,
If det A 6= 0 then m = n and the only solution to Ax = 0 is the “trivial” null solution,
x = 0.
If det A = 0 then m < n and there are an infinite number of solutions that depend on n − m
parameters.
Example :
x + y + z = 0,
x + 2y + z = 0,
2x + 3y + 2z = 0.
4 1 ELEMENTS OF LINEAR ALGEBRA
As we have seen above, here det A = 0 so that the equations are not independent. In fact,
we have just two independent equations (so n = 3 and m = 2), so the solution depends on
3 − 2 = 1 parameters. To solve the system we throw away the third equation (which tells us
nothing new) and rewrite the first two equations (taking z as a parameter) as
x + y = −z,
x + 2y = −z.
subtracting these equations gives y = 0 and substituing back in the first gives x = −z.
Alternatively, we could have taken x as the free parameter, in which case the solution to
these two equations would have been written in the form z = −x, y = 0.
Geometrically, the three equations describe three planes, and the solution (in whatever form)
represents the line along which these planes intersect.
NB: we could not have picked y as a free parameter as its value is fixed. The fact that there
is an infinite number of solutions does not imply that all unknowns are undetermined: once
the chosen parameter values have been fed into the solutions, the corresponding values of
the unknowns can be found.
1.1 Matrices and simultaneous equations 5
Inhomogeneous case: Ax = c 6= 0
Example 1:
x + y + z = 1,
x + 2y + z = 1,
2x + 3y + 2z = 2.
The third equation is still the sum of the first two. The linear combination that works on
the LHS also works on the RHS. So, as before, we can throw the third equation away to
obtain
x + y = 1 − z,
x + 2y = 1 − z,
Example 2:
x+y+z = 1
x + 2y + z = 1
2x + 3y + 2z = 3
Here the combination that works on the LHS does not work on the RHS. Adding the first
two equations gives
2x + 3y + 2z = 2,
which of course is incompatible with the third equation, 2x + 3y + 2z = 3.
In many areas in physical sciences, properties of objects are often described by a matrix A.
One then often has to solve equations of the form
Av = λv,
namely: Find a number λ and a vector v such that this equation is satisfied. The number
λ is called an eigenvalue, the vector v is called an eigenvector. (“eigen” is the German
word of “own”, implying that an eigenvector is somehow “special” to the matrix.)
Example :
Rewrite: Av = λv as Av − λIv = 0
⇒ (A − λI)v = 0.
det(A − λI) = 0.
The expression det (A − λI) = 0 is actually a polynomial in λ and is called the character-
istic polynomial. The eigenvalues are the roots of the characteristic polynomial. Once the
eigenvalues are known, the eigenvectors are any solutions of the system
Example :
λ2 − 4λ + 3 = 0,
(λ − 3)(λ − 1) = 0,
λ = 3, or λ = 1.
µ ¶ µ ¶
2−1 1 1 1
A−I = = ,
1 2−1 1 1
µ ¶µ ¶ µ ¶
1 1 a 0
so we need to solve = ⇒ a + b = 0.
1 1 b 0
Note that we get just one independent equation a = −b. Hence, the general solution is
µ ¶ µ ¶
−b −1
v= =b .
b 1
µ ¶
−1
Namely, the general eigenvector with eigenvalue 1 is any multiple of the vector .
1
µ ¶ µ ¶
2−3 1 −1 1
A − 3I = = ,
1 2−3 1 −1
µ ¶µ ¶ µ ¶
−1 1 a 0
so we need to solve = ⇒ −a + b = 0.
1 −1 b 0
Note that again we get just one independent equation a = b. So the general solution is
µ ¶ µ ¶
b 1
v= =b .
b 1
µ ¶
1
Namely, the general eigenvector with eigenvalue 3 is any multiple of the vector .
1
8 1 ELEMENTS OF LINEAR ALGEBRA
Geometrically, eigenvectors and eigenvalues can be interpreted in the following way. Sup-
pose matrix A is a transformation of position vectors in a plane, e.g, combinations of ro-
tations, reflections, translations, magnifications. The eigenvectors are those special vec-
tors which remain unchanged in direction after the transformation, but which are scaled
by a factor λ. This has important consequences in solid mechanics, where the eigenvec-
tors give the principle directions in which strains caused by external forces take place.
For more information on matrix transformations of the plane, see the course website at
http://www.maths.soton.ac.uk/teaching/units/math1007/matrices.pdf. In this course you
will only be expected to know how to find eigenvalues and eigenvectors of 2 × 2 matrices.
9
2 Complex Numbers
2.1 introduction
x2 + 1 = 0,
or
x2 − 2x + 2 = 0,
we find that they do not have solutions which are real numbers. In order to solve such
equations, we introduce a quantity i which has the property that
i2 = −1.
We then define complex numbers by:
z = x + iy, x, y ∈ R.
Thus z = 2 + i6 or 2 + 6i is an example of a complex number.
Re(z) = x,
Im(z) = y.
Notice that both the real part and the imaginary part of z are real.
Example 1
x2 − 2x + 2 = 0
⇒ (x − 1)2 = −1
⇒ x − 1 = ±i
⇒x =1±i
2.2 Powers of i
i3 = −i
i4 = 1
i5 = i
i6 = −1
µ ¶
−1 1 1 i i i
i = = = 2 = = −i
i i i i −1
1
i−2 = = −1
i2
1 1 1
i−3 = 3
= =− =i
i −i i
2.3 Argand Diagrams 11
We can associate the complex number z = x + iy with the point in the Euclidean plane
with Cartesian coordinates (x, y). Conversely, any point in the x, y-plane corresponds to a
complex number z = x + iy.
z=x+iy
θ PSfrag replacements
x
x0
y0
φ
So we can think of the x-axis as the real axis, and the y-axis as the imaginary axis. A
diagram of the complex plane thought of in this way is called an Argand diagram.
Instead of using x and y as coordinates, we can use polar coordinates r and θ, where:
x = r cos θ, y = r sin θ
p y
r= x2 + y 2 , tan θ =
x
Note: The angle θ must be such that it is in the correct quadrant as given by the signs of x
and y. This means we may have to add or subtract π to the value given by arctan θ = tan−1 θ.
z = x + iy
= r cos θ + ir sin θ
The number r is called the modulus of z and we write the modulus of z as |z|:
p
|z| = r = x2 + y 2
The number θ is called the argument of z, which we write as arg z. Note that the argument
is not unique but it is only defined up to multiples of 2π.
Example
√ h ³π ´ ³ π ´i
1 + i = 2 cos + i sin
4 4
√ h ³ π ´ ³π ´i
= 2 cos + 2π + i sin + 2π
4 4
√ h ³ π ´ ³ π ´i
= 2 cos − 2π + i sin − 2π
4 4
In general,
√ h ³π ´ ³π ´i
1+i = 2 cos + 2kπ + i sin + 2kπ , where k ∈ Z.
4 4
Although the argument of a complex number is not unique, we define the principal value of
the argument to be the value of the argument in the range −π < θ 6 π.
Thus for z = x + iy the principal value of the argument is given by that value of θ in the
range −π < θ 6 π such that:
2.4 Modulus and Argument of a Complex Number 13
y
tan θ = ,
x
y y
sin θ = =p ,
r x2 + y 2
x x
cos θ = = p .
r x + y2
2
y y
It should be noted that this value does not always coincide with arctan = tan−1 .
x x
√ √
For example, if z = 1 + i 3 then x = 1 and y = 3 so that
√ √
r= 1+3=2 and tan θ = 3
as required.
√ √
On the other hand, if z = −1 + i 3 then x = −1 and y = 3 so that
√ √
r= 1+3=2 and tan θ = − 3
z = x − iy
In the Argand diagram, taking the complex conjugate is just a reflection in the real axis:
Im
z=x+iy
θ Re
θ
PSfrag
r
replacements
x0
z=x-iy
y0
φ
If
z = r(cos θ + i sin θ) then z = r(cos θ − i sin θ).
z = r(cos(−θ) + i sin(−θ))
z1 + z2 = (x1 + x2 ) + i(y1 + y2 )
and
z1 − z2 = (x1 − x2 ) + i(y1 − y2 ).
Z 1+ Z 2
Z2
Z1
PSfrag replacements
x0
y0
φ
z + z = 2x = 2 Re(z)
and
z − z = 2iy = 2i Im(z).
Conversely, we have
16 2 COMPLEX NUMBERS
1
Re(z) = (z + z)
2
and
1
Im(z) = (z − z).
2i
To find the rule for the multiplication of complex numbers we assume that complex numbers
obey the ordinary rules of arithmetic. Hence the product of z1 = x1 + iy1 and z2 = x2 + iy2
is given by
= x1 x2 + ix1 y2 + iy1 x2 − y1 y2 .
We in fact take the final line as our definition of the product of complex numbers (and the
previous lines as motivation).
= −6 + 9i + 10i − 15(i2 )
= 9 + 19i,
and
2.7 Multiplication of Complex Numbers 17
z2 z1 = (2 − 3i)(−3 + 5i)
= −6 + 10i − 9i − 15(i2 )
= 9 + 19i.
Notice that z1 z2 = z2 z1 .
More generally, with our definition of multiplication we can verify that complex numbers
satisfy all the usual rules of arithmetic, so that:
z1 z2 = z2 z1 (multiplication is commutative),
Hence
|z|2 = zz
The rule for multiplication of complex numbers is simpler if we write the complex number
in polar form.
Then:
Hence
To perform division, the trick is to multiply the numerator and denominator of the quotient
by the complex conjugate of the denominator:
z1 z1 z2
= ·
z2 z2 z2
1
= (z1 z 2 ).
|z2 |2
In Cartesian form:
z1 −3 + 5i
=
z2 2 − 3i
(−3 + 5i)(2 + 3i)
=
(2 − 3i)(2 + 3i)
−6 − 9i + 10i − 15
=
4+9
21 1
=− + i.
13 13
In polar form:
z1 r1 (cos θ1 + i sin θ1 )
=
z2 r2 (cos θ2 + i sin θ2 )
r1 (cos θ1 + i sin θ1 )(cos θ2 − i sin θ2 )
=
r2 (cos θ2 + i sin θ2 )(cos θ2 − i sin θ2 )
r1 (cos θ1 cos θ2 + sin θ1 sin θ2 ) + i(sin θ1 cos θ2 − cos θ1 sin θ2 )
=
r2 (cos2 θ2 + sin2 θ2 )
r1
= [cos(θ1 − θ2 ) + i sin(θ1 − θ2 )].
r2
Hence,
¯ ¯
¯ z1 ¯ r 1 |z1 |
¯ ¯=
¯ z2 ¯ r2 = |z2 | (divide moduli)
µ ¶
z1
arg = θ1 − θ2 = arg(z1 ) − arg(z2 ) (subtract arguments)
z2
z2 z3 z4
ez = 1 + z + + + + ...
2! 3! 4!
Now let z = eiθ , where θ ∈ R, then:
θ2 iθ3 θ4
eiθ = 1 + iθ −
− + + ...
2 3! 4!
µ ¶ µ ¶
θ2 θ4 θ3 θ5
= 1− + + . . . +i θ − + + ...
2 4! 3! 5!
| {z } | {z }
(1) (2)
(1) is the Taylor series for cos θ and (2) is the Taylor series for sin θ. Hence:
z = reiθ .
z = rei(θ+2kπ), where k ∈ Z.
eiθ + e−iθ
cos θ = .
2
eiθ − e−iθ
sin θ = .
2i
Example 1.
π
Let z1 = 3 + 3i, and z2 = 2ei 3 . Calculate z1 z2 in both Cartesian and polar form.
h ³π ´ ³ π ´i
z2 = 2 cos + i sin
3 3
à √ !
1 3
=2 +i
2 2
√
=1+i 3
√
so that z1 z2 = (3 + 3i)(1 + i 3)
√ √
= (3 − 3 3) + i(3 + 3 3).
µ ¶
√ 1 1
z1 = 3 + 3i = 3 2 √ + i√
2 2
| {z }| {z }
(1) (2)
(1) is the modulus and to put (2) in the form cos θ + i sin θ we must have θ = π4 , so
√ h ³π ´ ³ π ´i √ π
z1 = 3 2 cos + i sin = 3 2ei 4 ,
4 4
√ π π √ 7π
and z1 z2 = (3 2ei 4 )(2ei 3 ) = 6 2ei 12
· µ ¶ µ ¶¸
√ 7π 7π
= 6 2 cos + i sin .
12 12
iπk
Example 2: Find the possible values of e 2 , where k ∈ Z.
π
³π ´ ³π ´
k =1: ei 2 = cos + i sin =i
2 2
Z1
π/2 π/2
Z2 π/2 π/2 Z4
Z3
PSfrag replacements
x0
y0
φ
2.11 Multiplying Complex Numbers in Exponential Form 23
z1 z2 = r1 r2 ei(θ1 +θ2 ) ,
since we multiply the moduli and add the arguments.
⇒ (cos θ cos φ − sin θ sin φ) + i (sin θ cos φ + cos θ sin φ) = cos(θ + φ) + i sin(θ + φ)
z1 r1 eiθ1
=
z2 r2 eiθ2
r1 iθ1 −iθ2
= e e
r2
r1 i(θ1 −θ2 )
= e
r2
1 1
= iθ
z re
1
= e−iθ ,
r
so that
¯ ¯
¯1¯
¯ ¯= 1 ,
¯ z ¯ |z|
µ ¶
1
arg = − arg z.
z
If we write a complex number in exponential form, z = reiθ , and take the n-th power we get
z n = rn einθ .
Note: this result remains true for non-integer values of n, although some care is needed (see
details later in section on solving complex equations). For example,
√ √ θ
z = ± rei 2 .
¡ ¢n
eiθ = einθ ,
so that
Example 1:
3 tan θ − tan3 θ
tan 3θ = .
1 − 3 tan2 θ
Example 2:
To go in the other direction and write sinn θ and cosn θ in terms of sines and cosines of
multiple angles, we write
so that
µ ¶
eiθ + e−iθ 1 1
cos θ = = z+ ,
2 2 z
µ ¶
einθ + e−inθ 1 n 1
cos nθ = = z + n ,
2 2 z
µ ¶
eiθ − e−iθ 1 1
sin θ = = z− ,
2i 2i z
µ ¶
einθ − e−inθ 1 n 1
sin nθ = = z − n .
2i 2i z
2.16 Solving Equations 27
Example 1:
µ ¶3
3 1 1
cos θ = 3 z +
2 z
µ ¶
1 3 21 1 1
= z + 3z + 3z 2 + 3
8 z z z
µ ¶ µ ¶
1 3 1 3 1
= z + 3 + z+
8 z 8 z
1
= (2 cos 3θ + 6 cos θ)
8
1 3
cos3 θ = cos 3θ + cos θ.
4 4
Example 2:
µ ¶6
6 1 1
cos θ = 6 z+
2 z
µ ¶
1 6 4 2 15 6 1
= z + 6z + 15z + 20 + 2 + 4 + 6
64 z z z
½ µ ¶ µ ¶ µ ¶ ¾
1 1 6 1 6 4 1 15 2 1
= z + 6 + z + 4 + z + 2 + 10
32 2 z 2 z 2 z
1
= {cos 6θ + 6 cos 4θ + 15 cos 2θ + 10} .
32
Example 1: Determine the nth roots of unity; that is, solve the equation
z n = 1.
We write the RHS as a complex number in polar form using the general value of the argument:
28 2 COMPLEX NUMBERS
z n = e2kπi where k ∈ Z
2kπi
⇒ z =e n
µ ¶ µ ¶
2kπ 2kπ
⇒ z = cos + i sin .
n n
k =0: z0 = 1
µ ¶ µ ¶
2π 2π
k =1: z1 = cos + i sin
n n
µ ¶ µ ¶
4π 4π
k =2: z2 = cos + i sin
n n
.. ..
. . µ ¶ µ ¶
2π 2π
k =n−1: zn−1 = cos 2π − + i sin 2π −
n n
If n = 3,
Z1
2π/3
2π/3
Z0
2π/3
PSfrag replacements
Z2 x0
y0
φ
2.16 Solving Equations 29
If n = 4,
Z1
2 π/4 2 π/4
Z2 2 π/4 Z0
2 π/4
Z3
PSfrag replacements
x0
y0
φ
There are 3 distinct roots for z 3 = 1, 4 distinct roots for z 4 = 1 and in general,
Note: A general complex polynomial of degree n has n complex roots (counting the roots
according to their multiplicity). This result is known as the Fundamental theorem of Algebra.
Example 2:
√
z4 = 1 + i 3
à √ !
1 3
=2 +i
2 2
h ³π ´ ³ π ´i
= 2 cos + i sin
3 3
π
= 2ei 3
z 4 = 2ei( 3 +2kπ)
π
1 π 1
h ³π´ ³ π ´i
i 12
z0 = 2 e = 2 cos
4 4 + i sin
12 12
· µ ¶ µ ¶¸
1 7π 1 7π 7π
z1 = 2 4 ei 12 = 2 4 cos + i sin
12 12
· µ ¶ µ ¶¸
1
i 13π 1
−i 11π 1 11π 11π
z2 = 2 4 e 12 = 2 4 e 12 = 2 4 cos − i sin
12 12
· µ ¶ µ ¶¸
1
i 19π 1
−i 5π 1 5π 5π
z3 =2 e4 12 =2 e 4 12 = 2 cos
4 − i sin
12 12
31
3 Differential Equations
If the function is a function of one variable, then the differential equations involving this
function are called Ordinary Differential Equations (ODE’s).
If the function is a function of two or more variables, then the differential equations involving
this function are called Partial Differential Equations (PDE’s).
The order of a differential equation is the order of the highest derivative in the equation eg.
dy
= cos x has order 1
dx
µ ¶3
d2 y dy
+ 2x + y = 0 has order 2
dx2 dx
d3 y dy
3
+y − 4xy = 0 has order 3
dx dx
An equation is linear if y and its derivatives occur as linear terms. The following are
examples of linear ODE’s:
d2 y
+ y sin x = ex
dx2
d2 y dy
ln x 2
+ ex = x5 cos x
dx dx
An equation which is not linear is called non-linear. The following are examples of
non-linear equations
d2 y dy
2
+y = x2
dx dx
dy
+ sin y = 0
dx
32 3 DIFFERENTIAL EQUATIONS
dy
= f (x)
dx
Z
y= f (x)dx = F (x) + c for some F (x) such that F 0 (x) = f (x)
Note that we do not get a unique solution. We get a family of solutions depending on c (a
1-parameter family of solutions).
We can obtain an unique solution by specifying a value taken by y, say y0 , for some particular
value of x, say x0 , so that y(x0 ) = y0 . Using this we obtain
hence
Z
y= f (x) dx = F (x) − F (x0 ) + y0
This amounts to having solved the initial value problem governed by the two equations
dy
= f (x) and y(x0 ) = y0
dx
dy
= f (x, y)
dx
This ODE is one which states that at the point (x, y), the graph of the solution y as a
function of x has slope f (x, y).
3.2 Simple Differential Equations 33
direction field is a
(x,y) line with slope f(x,y)
PSfrag replacements
x0
y0
φ
Thus, in the x, y-plane the tangent to a solution curve through the point (x, y) has slope
f (x, y). We can plot short line segments of slope f (x, y) called direction fields at every
point (x, y) in the x, y-plane. The solution curves are therefore curves tangent to the direction
field. Again we can get a unique solution satisfying y(x0 ) = y0 by selecting the unique curve
through the point (x0 , y0 ) that follows the direction field.
There is a systematic method for drawing direction fields, and hence solution curves, by
using isoclines. Isoclines are curves on which the slope dy/dx is constant, ie. curves for
which f (x, y) is constant.
Example 1
dy
=y−x
dx
dy
= f (x, y) = y − x = c with c constant
dx
so that
y =x+c
For various fixed values of c, we can now draw the lines y = x + c (the isoclines) and mark
34 3 DIFFERENTIAL EQUATIONS
on each isocline a short line of slope c (the direction field). Finally we draw curves which
have the direction field as tangents (the solution curves).
-2 -1 0 1
-1
PSfrag replacements
-2 x0
y0
φ
Example 2
dy
= x2 + y 2
dx
Hence
f (x, y) = x2 + y 2
x2 + y 2 = c
Again we draw the isoclines, the direction field and finally the solution curves.
3.2 Simple Differential Equations 35
-1 0 1
-1
PSfrag replacements
x0
y0
φ
In both of these examples, we see that the differential equation gives a 1-parameter family
of curves. Conversely, if we are given a 1-parameter family of curves, we can find a first order
ODE with that family as its solution.
Example 1
dy
= 8ax (3)
dx
However (3) is not the equation that we want because it contains the arbitrary constant a.
We must eliminate a from (2) and (3). Taking their ratio gives:
1 dy 2
=
y dx x
so that
dy 2y
=
dx x
36 3 DIFFERENTIAL EQUATIONS
Example 2
dy dy
2x − 2a + 2y −2 a=0
dx dx
so that µ ¶
dy dy
2x + 2y − 2a 1 + =0 (5)
dx dx
Again this is not the required equation as it contains the constant a. However from (4)
x2 + y 2
2a =
x+y
dy x2 + 2xy − y 2
= 2 .
dx x − 2xy − y 2
We can see from these examples that in general a 1-parameter family of curves gives rise to
a first order ODE.
3.3 Separation of Variables 37
dy f (x)
=
dx g(y)
g(y)dy = f (x)dx
This has separated the equation into an expression involving x and one involving y, and each
side may be integrated to give:
Z Z
g(y)dy = f (x)dx + constant
Example 1
dy 2y
=
dx x
dy 2dx
⇒ =
y x
Z Z
dy 2dx
⇒ = + constant
y x
⇒ ln y = ln x2 + ln K
⇒ ln y = ln Kx2
⇒ y = Kx2
Example 2
38 3 DIFFERENTIAL EQUATIONS
Solve
dy 1 + y2
=− with y(0) = −1
dx 1 + x2
Z Z
dy dx
⇒ − = +c where c is constant
1 + y2 1 + x2
⇒ − arctan y = arctan x + c
⇒ y = − tan(arctan x + c)
−1 = − tan(arctan 0 + c) = − tan c
⇒ c = arctan 1
⇒ y = − tan(arctan x + arctan 1)
Then using
tan A + tan B
tan(A + B) = with A = arctan x, B = arctan 1
1 − tan A tan B
gives
x+1
y=−
1−x·1
x+1
⇒ y=
x−1
dy ³y´
=f
dx x
y
v=
x
3.4 Homogeneous Equations 39
dy dv
=x +v
dx dx
dv
x + v = f (v)
dx
dv f (v) − v
⇒ =
dx x
Z Z
dv dx
⇒ = +c
f (v) − v x
Example 1
dy x2 + y 2
+ =0
dx xy
dy x2 + y 2
⇒ =−
dx xy
dy 1 + ( xy )2
⇒ =− y (dividing top and bottom by x2 )
dx x
y dy dv
Now let v= so that y = xv and =x +v
x dx dx
dv 1 + v2
x +v =−
dx v
dv 1 + v2 v2
⇒ x =− −
dx v v
1 + 2v 2
=−
v
Z Z
v dx
⇒ dv = − +c
1 + 2v 2 x
1
⇒ ln(1 + 2v 2 ) = − ln |x| + c
4
⇒ ln(1 + 2v 2 ) = −4 ln |x| + ln k
µ ¶
k
= ln
x4
k
⇒ 1 + 2v 2 =
x4
2y 2 k
⇒ 1+ 2
= 4
x x
⇒ x4 + 2y 2 x2 = k
µ ¶ 12
k − x4
⇒ y=±
2x2
Example 2
dy x+y
=
dx x−y
y
1+ x
= y
1− x
y dy dv
Now let v= so that y = xv and =x +v
x dx dx
dv 1 + v v(1 − v)
x = −
dx 1−v 1−v
1 + v2
=
1−v
Z Z
1−v dx
⇒ 2
dv = +c
1+v x
Z Z Z
dv vdv dx
⇒ − = +c
1 + v2 1 + v2 x
1
⇒ arctan v − ln(1 + v 2 ) = ln x + c
2
⇒ 2 arctan v = ln(1 + v 2 ) + 2 ln x + 2 ln k
¡ ¢
= ln (1 + v 2 )k 2 x2
³y´ µµ ¶ ¶
y2 2 2
⇒ 2 arctan = ln 1+ 2 k x
x x
µ ¶
y 1 ¡ 2 2 2
¢
⇒ = tan ln k (x + y )
x 2
³ ³ p ´´
⇒ y = x tan ln k x2 + y 2
A first order linear differential equation is one that can be written in the form
dy
A(x) + B(x)y = C(x)
dx
By restricting x if necessary, we may consider the case where A(x) 6= 0. Then we may
divide through by A(x) to obtain
dy B(x) C(x)
+ y=
dx A(x) A(x)
dy
+ p(x)y = q(x)
dx
We solve this equation by multiplying both sides by what is called an integrating factor
I(x)
dy
I(x) + I(x)p(x)y = I(x)q(x)
dx
where I(x) must be chosen so that the LHS takes the form of a total derivative, that is
dy d
I(x) + I(x)p(x)y = (I(x)y) (6)
dx dx
d
(I(x)y) = I(x)q(x)
dx
so that
Z
1
y= I(x)q(x) dx + c
I(x)
The only problem is to determine the integrating factor I(x). However, from (6) we have
dy d
I(x) + I(x)p(x)y = (I(x)y)
dx dx
dy dy dI
⇒ I(x) + I(x)p(x)y = I(x) + (x)y
dx dx dx
dI
⇒ (x) = I(x)p(x)
dx
Z Z
1 dI
⇒ (x) dx = p(x) dx
I(x) dx
Z
⇒ ln(I(x)) = p(x) dx
µZ ¶ R
p(x) dx
⇒ I(x) = exp p(x) dx = e
3.5 First Order Linear Differential Equations 43
Note: including a constant of integration c in the exponent would have no effect as it would
simply multiply I(x) by a constant ec .
We now summarise the method for finding an integrating factor and then solving first order
linear differential equations.
dy
+ p(x)y = q(x)
dx
µZ ¶
I(x) = exp p(x) dx
dy
I(x) + I(x)p(x)y = I(x)q(x)
dx
d
(I(x)y) = I(x)q(x)
dx
5. Integrate to get
Z
I(x)y = I(x)q(x) dx + c
Z
1 c
y= I(x)q(x) dx +
I(x) I(x)
Example 1
dy
x + 2y = 8x2
dx
dy 2
+ y = 8x
dx x
2
p(x) =
x
µZ ¶
2
I(x) = exp dx
x
= exp(2 ln x)
= exp(ln x2 )
= x2
dy
x2 + 2xy = 8x3
dx
d ¡ 2 ¢ dy
x y = x2 + 2xy = 8x3
dx dx
5. Integrate
Z
2
xy= 8x3 dx + c = 2x4 + c
Example 2
dy
x + (3 − x)y + 2 = 0
dx
dy 3 − x 2
+ y =−
dx x x
= exp(3 ln x − x)
= exp(ln x3 ) exp(−x)
= x3 exp(−x)
dy
x3 e−x + (3x2 − x3 )e−x y = −2x2 e−x
dx
d 3 −x dy
(x e y) = x3 e−x + (3x2 − x3 )e−x y
dx dx
d 3 −x
⇒ (x e y) = −2x2 e−x
dx
5. Integrate
Z
3 −x
x e y =− 2x2 e−x dx + c
integrating by parts,
Z
2 −x
= 2x e − 4xe−x dx + c
Z
2 −x −x
= 2x e + 4xe − 4e−x dx + c
dy
P (x, y) + Q(x, y) =0 (7)
dx
∂F ∂F
=P and =Q (8)
∂x ∂y
∂F ∂F dy
+ =0
∂x ∂y dx
d
⇒ F (x, y) = 0
dx
If a function F satisfying (8) exists then we say the equation is exact and the solution is
given by equation (9). If we look at equation (8) and differentiate P with respect to y and
Q with respect to x we get
∂P ∂2F ∂ 2F ∂Q
= = =
∂y ∂y∂x ∂x∂y ∂x
∂P ∂Q
= (10)
∂y ∂x
Conversely one can show that if equation (10) holds then it is possible to find an F (x, y)
such that equation (8) is satisfied.
∂P ∂Q
=
∂y ∂x
Note that in many of the books on ODE’s equation (7) is written formally as
P (x, y) dx + Q(x, y) dy = 0
Example 1
Hence
∂P ∂Q
= ey =
∂y ∂x
∂F
= P = ey (11)
∂x
∂F
= Q = xey + 2y (12)
∂y
∂F
= xey + f 0 (y) (14)
∂y
f 0 (y) = 2y
⇒ f (y) = y 2 + c
F (x, y) = xey + y 2 + c
(15)
xey + y 2 = constant.
Example 2
dy
3x(xy − 2) + (x3 + 3y 2 ) =0
dx
P = 3x(xy − 2) and Q = x3 + 3y 2
Hence
∂P ∂Q
= 3x2 =
∂y ∂x
∂F
= P = 3x(xy − 2) = 3x2 y − 6x (16)
∂x
∂F
= Q = x3 + 3y 2 (17)
∂y
∂F
= x3 + f 0 (y) (19)
∂y
f 0 (y) = 3y 2
⇒ f (y) = y 3 + c
F (x, y) = x3 y − 3x2 + y 3 + c
x3 y − 3x2 + y 3 = constant.
50 4 LINEAR ODES OF THE SECOND ORDER
4.1 Introduction
In this section we shall consider a set of differential equations which occur frequently in
situations such as simple harmonic motion, oscillations of a damped spring and linear forcing,
Situations such as these can be modeled by
d2 y dy
a + b + cy = f (x),
dx2 dx
where a, b, c are constants y is the unknown function, and f is a given forcing function.
The value of b often represents the damping.
The equation is said to be “second order” because the highest derivative is a two (nth order
equations have the nth derivative as the highest).
The equation is linear, as we shall see that if two functions y1 , y2 are a solution of the equation
then so is any linear combination αy1 + βy2 .
The equation is called an ordinary differential equation (ODE) since it contains no partial
derivatives, only total ones with respect to one variable, here x.
For that reason such equations are generically called second order linear ordinary dif-
ferential equations with constant coefficients.
The relationship between a, b, c and f can alter the type of solution we obtain and so for
simplicity here we only treat the homogeoneous, unforced case, i.e., where f =0.
First we take a homogeneous equation (with f (x) = 0) and divide through by a (this is
allowed as a is non-zero by definition—otherwise the equation would not be second order).
This gives
d2 y b dy c
2
+ + y = 0,
dx a dx a
or, equivalently,
d2 y dy
2
+ p + qy = 0,
dx dx
4.2 Homogeneous case: f = 0 51
This gives
dy d2 y
= kekx and = k 2 ekx
dx dx2
Assuming y = A exp (kx) is a solution of the homogeneous equation we substitute it into
the equation and obtain
The term exp (kx) can be divided through as it’s always non-zero for finite x. This leaves
what is called the auxilliary equation:
k 2 + pk + q = 0.
From the formula for the solution of the auxiliary equation we can see that the nature of the
solution of the equation will depend on whether p2 > 4q, p2 = 4q, or p2 < 4q.
When p2 > 4q the auxiliary equation gives two unequal real solutions and hence the solution
of the ODE can be written as above:
y = Aek1 x + Bek2 x .
52 4 LINEAR ODES OF THE SECOND ORDER
Example :
d2 y dy
+ − 6y = 0
dx2 dx
Auxilliary equation:k 2 + k − 6 = 0
(k + 3)(k − 2) = 0
k = −3 or k = 2
Hence y = e−3x and y = e2x are solutions, and the general solution reads
y = Ae−3x + Be2x .
When p2 = 4q, the roots of the auxiliary equation are real and equal. Let their common
value be called k. It is given by
p
k=− .
2
In this particular case, it is not possible to form a general solution with two arbitrary
constants, since we could rewrite it in the form
and there would be, effectively, only one arbitrary constant. Thus, we do not have the most
general form (which needs two independent, but arbitrary, constants).
y = xek1 x .
This gives
dy d2 y
= (1 + kx)ekx and = (2k + k 2 x)ekx ,
dx dx2
and, substituting in the ODE (and dividing through by the common factor ekx ),
which holds since both k 2 + pk + q and 2k + p are zero if k is a assumed a single root of the
auxiliary equation.
Hence, two independent solutions are y = epx/2 and y = xepx/2 , and the general solution
is
y = (A + Bx)epx/2 .
4.2 Homogeneous case: f = 0 53
Example :
d2 y dy
2
+ 6 + 9y = 0
dx dx
Auxilliary equation: k 2 + 6k + 9 = 0
(k + 3)2 = 0
k = −3 (twice)
Hence k = −3 is a double root of the auxilliary equation. The two solutions are y = e−3x
and y = xe−3x , and the general solution is
y = (A + Bx)e−3x .
When p2 < 4q the auxiliary equation has no real roots. However the complex roots appear
as a conjugate pair. The roots will be of the form
k1 = m + iω, k2 = m − iω.
y = Ae(m+iω)x + Be(m−iω)x
= Aemx eiωx + Bemx e−iωx
= emx (Aeiωx + Be−iωx ).
Note that this looks like a complex solution (of our real equation), but this is not necessarily
the case. Recall the following relations:
This, in fact, is the general real solution, since C and D are arbitrary real numbers. [Note
that for each choice of C and D there correspond different A = 21 (C−iD) and B = 21 (C+iD).]
Example :
d2 y dy
2
+ 2 + 2y = 0
dx dx
Auxilliary equation: k 2 + 2k + 2 = 0
√
−2 ± 4 − 8
⇒ k =
2
k = −1 ± i
Hence y = e−x e±ix are complex solutions of the equation. y = e−x cos x and y = e−x sin x
are real solutions, and the general real solution is
As we have seen above the general solution to a second order linear ODE contains two
arbitrary constants, A and B. To obtain a specific solution we must provide two independent
bits of information to establish precise values for A and B. These are called boundary
conditions, or initial conditions.
Boundary conditions specify the solution y at two different positions of the variable x.
Initial conditions specify the solution y and its derivative dy/dx at x=0.
In the homogeneous case the BCs/ICs can be applied immediately once the solution has
been found.
4.3 Boundary and Initial Conditions 55
Example :
k 2 + 2k + 1 = 0
(k + 1)2 = 0
⇒ k = −1 (twice)
y = (A + Bx)e−x
dy
= 1 when x = 0 gives 1 = (B + B × 0)e0 ⇒ B = 1
dx
. Hence A = 0 and B = 1, and the solution which satisfies the initial conditions is given by
y = xe−x .
56 5 MULTIPLE INTEGRATION
5 Multiple Integration
5.1 Introduction
We have already seen the integral of a function of one variable y = f (x) over an interval:
The geometrical meaning of this symbol is the area of the plane region bounded by the curve
y = f (x), the x-axis and the lines x = a and x = b:
Consider now the meaning of a double integral of a function of two variables f (x, y) over a
domain D in the xy-plane.
By analogy this is the volume of a three dimensional region S, bounded by the surface
z = f (x, y), the xy-plane and the (irregular) cylindrical sides parallel to the z-axis, passing
through the boundary of D.
The region D is called the domain of integration. We will represent the volume integral
with the symbol
5.2 Properties of the double integral 57
At first sight this looks like the volume of an irregular cylinder with base D and height 1,
which indeed it is. But we also know the general formula for the volume of a cylinder is:
Since the height of the cylinder is 1, the numerical value of the volume (beware units!) is the
same as the area of D. Therefore, we can use double integrals to measure the are of regions
of the plane.
on each of which f (x, y) is integrable, then f (x, y) is integrable over the union of these
domains: D = D1 ∪ D2 ∪ D3 ∪ . . . ∪ Dk .
Example 1:
RR
I= 3dA, where R: a 6 x 6 b and c 6 y 6 b.
R
Example 2:
RR
I= (sin x + y 3 + 3)dA, where D is x2 + y 2 6 1.
D
5.4 Evaluation of double integrals 59
Example 3:
RR p
I= 1 − x2 − y 2 dA, where D is x2 + y 2 6 1.
D
The evaluation of an integral is easiest when the domain of integration is said to be simple.
y-simple domain: bounded by two ver- x-simple domain: bounded by two hor-
tical linesx = a, x = b and two continuous izontal lines y = c, y = d and two continuous
graphs y = c (x) , y = d (x) graphs x = a (y) , x = b (y)
A domain that is not simple but which can be split up into x-simple and y-simple parts is
called regular. An integral over a regular domain is evaluated as the sum of integrals over
each constituent simple domain (section 5.2 property 5.).
60 5 MULTIPLE INTEGRATION
Example :
is the volume of the vertical cylinder of base D and bounded at the top by z = f (x, y).
Consider a very thin slice of the solid perpendicular to the x-axis at a point x. The value of
x does not vary across the slice and y is bounded between
We can think of the cylinder as if it were like loaf of bread formed from (infinitely) many
such slices. The volume of the cylinder is then obtained by summing up the contribution of
all such thin slices of area α (x) and thickness dx between x = a and x = b. Therefore it is
given by:
5.4 Evaluation of double integrals 61
If D is x-simple, we can repeat the same procedure with a slice perpendicular to the y-axis.
Therefore we have the following fact:
These examples stress the importance of drawing the domain of integration in the xy-plane.
It gives geometrical insight that can lead to considerable simplification.
Example 1:
Find the volume of the solid lying above the square defined by 0 ≤ x ≤ 1, 1 ≤ y ≤ 2 and
below the plane z = 4 − x − y.
The square is both x- and y-simple so the double integral can be evaluated either way: You
will get the same answer!
62 5 MULTIPLE INTEGRATION
Note: The limits on the inner integral do not depend here on the integration variable of the
outer integral. This is because in this example the integration domain D is rectangular (a
square). If it were not a rectangle, the inner limits would depend on the outer integration
variable.
Example 2:
RR
Evaluate I = xydA, over the triangle T with vertices (0, 0), (1, 0) and (1, 1).
T
The triangle is both x- and y-simple so again the double integral can be evaluated either
way.
5.5 Polar coordinates 63
Example 3:
RR 3
Evaluate I = ey dxdy, where D is This integral can’t be evaluated as it is since we
D
don’t know the integral of exp (y 3 ) (if you don’t believe this, just try to find it in a table of
integrals). We can try to swap the order of integration. The domain of integration D is also
y-simple.
In polar coordinates there is an origin called the pole and denoted by O, and a polar axis
which is a half line extending from O.
The position of a point P in the plane is determined by its polar coordinates (r, θ) where
NB: polar coordinates are not unique: (r, θ) and (r, θ + 2nπ) are the same point when n is
an integer.
64 5 MULTIPLE INTEGRATION
The conversion formulae that relate Cartesian and polar coordinates are as follows:
An equation in x and y represents a curve in the plane with respect to a Cartesian coordinate
system. Similarly, an equation in r and θ generally represents a curve with respect to a polar
coordinate system. Some curves have a simpler expression in one system than in the other.
Example 1:
Example 2:
This is an example of a case where the transformation to Cartesian coordinates has helped.
5.6 Double integrals in polar coordinates 65
Example 3:
As hinted above, some integrals are much simpler to evaluate if they are expressed in polar
rather than cartesian coordinates.
Consider the problem of finding the volume V of the solid region lying above the xy-plane
and beneath the paraboloid z = 1 − x2 − y 2 .
Since the paraboloid intersects the xy-plane in the circle x2 + y 2 = 1, the volume is given in
cartesian coordinates by
So that
Therefore we have:
Thus, because of the form of the integrand and the shape of the domain of integration,
we have achieved a dramatic simplification. Indeed, as the domain of integration in the (r, θ)
plane in this example is now a rectangle the order of the integration is irrelevant (but in
general may still be important).
Example 1:
Evaluate the area of the region of the xy-plane enclosed by the curve
p
x2 + y 2 = 2a x2 + y 2 + 2ax
.
68 5 MULTIPLE INTEGRATION
Example 2:
The transformation of double integrals to polar coordinates is just a special case of a general
change of variables formula in double integrals. A transformation of coordinates in a double
integral is a set of two functions
that give a relationship between the old variables (x, y) and the new ones (u, v). These
functions are “invertible” in the sense that we can describe the domain of integration D in
the plane, by either coordinate systems. In the case of polar coordinates we can describe a
disk of radius a as
5.7 Changes of variables in double integrals 69
It is possible to prove (and we don’t here, and you are not expected to know how to) that
if the functions x (u, v) , y (u, v) are invertible, then the determinant, called the Jacobian
is non-zero.
Moreover, it is possible to prove that the area element in the (u, v) coordinates is given by
The recipe for changing variables in double integral is therefore (cf. polars):
Example 1:
Use an appropriate change of variables to find the area of an elliptic disk with shape given
by x2 /a2 + y 2 /b2 6 1.
70 5 MULTIPLE INTEGRATION
5.8 Triple integrals 71
Once it is clear how to extend definite integration to two-dimensional domains, the extension
to three (or more) dimensions is relatively straightforward.
where dV denotes a small volume element. In Cartesians this takes the form dV = dx dy dz.
The procedure for evaluating the integrals in 3-D is effectively the same as that studied for
2-D: we integrate the three variables in succession.
Example 1:
Example 2:
RIfRRT is the tetrahedron with vertices (0, 0, 0) , (1, 0, 0) , (0, 1, 0) and (0, 0, 1), evaluate
ydV .
73
Given a curve y = f (x) we can work out the gradient (slope) of the curve at each point by
differentiating f :
df
Slope =
dx
It is unique: for a smooth function with no kinks there is only one slope at each point.
Now, suppose you are standing on a hill. What is the slope of the hill at that point? A
little thought should tell you that it is not unique: It depends on the direction in which you
are looking. For example, you could walk around the hill, on a level contour and keeping
the same height. In that case the slope is zero in the direction you walk at each point. You
could also aim for the summit, in which case you have to go uphill and the gradient will be
far from zero!
∂f
= ∇f .n
∂ n̂
where n̂ is a unit vector in the direction of interest and ∇f is the “gradient of f ”, or “grad
f ” defined as:
∂f ∂f
∇f (x, y) = i+ j.
∂x ∂y
The symbol “∇”, is an upside-down Greek capital delta (like a d for derivative) and so is
called “del”. Note that the gradient, ∇f , is a vector.
74 6 THE GRADIENT, DIVERGENCE, AND CURL
Example 1:
∂f ∂f
∇f = i+ j
∂x ∂y
2 2 2 2
= −2xe−(x +y ) i − 2ye−(x +y ) j
2 2
= −2e−(x +y ) (xi + yj)
Example 2:
Evaluate the directional derivative of the above function at the point (x, y) = (1, 1) in the
directions (a) i + j and (b) i − j
∂f 2 2
= ∇f .n, ∇f = −2e−(x +y ) (xi + yj)
∂ n̂
where n̂ is a unit vector in the direction of n
√ √
(a) n = i + j, hence |n| = 12 + 12 = 2
√
So that n̂ = n/ 2 = √1 i + √1 j
2 2
√ √
(b) n = i − j, hence |n| = 12 + 12 = 2
√
So that n̂ = n/ 2 = √1 i − √1 j So that ∇f .n̂ = −2e−2 ( √12 − √1 ) =0
2 2 2
6.1 Directional Derivatives and the gradient of a scalar function 75
Example 3:
Evaluate the directional derivative of the above function at (x, y) = (0, 0) in every direction.
Why is it the same in every direction?
∂f 2 2
= ∇f .n, ∇f = −2e−(x +y ) (xi + yj)
∂ n̂
where n̂ is a unit vector in the direction of n
2 +y 2 )
At (0, 0) we have ∇f = −2e−(x (0i + 0j) = 0
Properties of grad
2. Leibniz rule The gradient is a derivative and has the same properties of derivatives.
e.g.,
∇ (f g) = f ∇g + g ∇f
4. Physical examples of the use of gradients include the force F (x, y, z) generated by a
potential energy V (x, y, z), which is given by
F = −∇V.
Similarly, the level contours along which the direction derivative is zero are perpendicular
to ∇f , since there θ = π/2 and so cos θ = 0. The corollary is that ∇f is perpendicular to
the level contours.
Example :
Showpthat the gradient of the function f (r), where r is the radial distance from the origin
r = x2 + y 2 + z 2 , is given by
df
∇f (r) = r̂
dr
(see later for applications in polar coordinates).
∂f ∂f ∂f
∇f = i+ j+ k
∂x ∂y ∂z
We first work out ∇r by considering the special case f = (x2 + y 2 + z 2 )1/2 = r. Then
∂f 1 x x
= (x2 + y 2 + z 2 )−1/2 · 2x = p =
∂x 2 x2 + y 2 + z 2 r
Similarly we have
∂f y ∂f z
= , =
∂y r ∂z r
So that
x y z
∇r = i+ j+ k
r r r
1 r
= (xi + yj + zk) = = r̂
r r
We now work out the general case with f (r). By the chain rule
so that
df df
∇f (r) = ∇r = r̂ .
dr dr
Note: the divergence of the vector function F , or “divF ”, is a scalar. The derivative
operators and components of F here interact like the scalar product of two vectors, hence
the dot notation between them.
Physical Motivation:
The physical motivation for calculating the divergence of a field F is associated with the
sources and sinks of the field. A source is a region of space from which field lines flow
outwards, e.g., electric field in the neighbourhood of a positive charge, or fluids streamlines
in the neighbourhood of a water source. A sink is the region of space where the field lines
converge, e.g., the electric field in the neighbourhood of a negative charge, or the fluid
streamlines near to the plughole in your bath (assuming it’s not clogged up with hair!).
Many physical theories employ the divergence of a vector function. For example the law of
mass conservation (= no mass can spontaneously vanish) for a fluid of density ρ(x, y, z, t)
with velocity v(x, y, z, t) at each point can be expressed as:
∂ρ
+ ∇ · (ρv) = 0
∂t
78 6 THE GRADIENT, DIVERGENCE, AND CURL
If you now call ρ(x, y, z, t) the charge density, this is also the equation that expresses the
conservation of charge in electromagnetism.
Given a charge density ρ(x, y, z, t), Maxwell’s classical theory of electromagnetism states
that the associated electric field E(x, y, z, t) is the given by the solution of the divergence
equation:
∇ · E = ρ/²0
If the divergence of a field is zero, then it implies that there is no source or sink (convergence
or divergence of it’s field lines). Thus if B is the magnetic field another of Maxwells equations
is that
∇ · B = 0 everywhere,
which just says that there are no (known) magnetic monopoles (magnetic equivalent of point
charges).
∇ · v = 0 everywhere.
Example 1:
If the velocity of a fluid is given by v(x, y, z) = yi − xj + x cos yk, show that it is incom-
pressible.
Example 2:
Can the vector function B(x, y, z) = xyi − xzj + yzk represent a real magnetic field?
6.3 Curl of a vector function 79
Note: the curl of the vector function F , or “curlF ”, is a vector. The derivative operators and
components of F here interact like the vector product of two vectors, hence the × notation
between them. It is easier to remember how to evaluate a curl of a vector function by using
the determinant shorthand, provided that when you expand the determinant you always
write the differential operator before the component of F it is meant to be differentiating.
Properties of curl:
∇ × (gF ) = g(∇ × F ) + ∇g × F
∇ × (∇f ) = 0
Physical Motivation:
The physical motivation for calculating the curl of a field F is to calculate how much the
field is “rotating”. The vorticity w(x, y, z) of a fluid moving with speed v(x, y, z) is given
by
w =∇×v
and gives an indication how rotational the flow is at that point. A flow with no rotation is
called irrotational and has w = ∇ × v = 0 everywhere.
80 6 THE GRADIENT, DIVERGENCE, AND CURL
∂B
∇×E =−
∂t
Example :
Example :
If the electric field at a point in free space is given by E (x, y, z, t) = sin (z) j, find how the
associated magnetic field B is changing with time.
81
7.1 Introduction
A particle that moves in space describes a trajectory, a line or a curve. There are some
natural questions that arise:
How is it described?
We answer the last question later. Here we focus on the first two. We first consider curves
in 2-D before generalising to 3-D.
If a particle moves, its x and y coordinates are functions of time, x (t) , y (t). As t changes
the position of the particle describes a trajectory in space(-time).
Given the functions f and g, then x = f (t) , y = g (t) are the parametric equations of the
trajectory or curve. The parameter t will lie in some interval a ≤ t ≤ b.
Note that a parametric curve has a direction as t increases. Recall that the vector position
of the particle on the trajectory is given by
Example 1:
A straight line.
Example 2:
A circle.
Note that this example demonstrates that there is no unique set of parametric equations
for a single curve. We can exploit this property to choose the representation that is most
suitable to the problem we wish to solve.
7.2 Parametric Curves 83
Example 3:
An ellipse.
Example 4:
A triangle.
This example shows that it may sometimes be necessary to have different parameterizations
for different portions of a curve (usually those with discontinuities in one of their slopes).
84 7 CURVES AND LINE INTEGRALS
Recall that the velocity of a particle with position vector r(t) is ṙ(t) ≡ dr/dt. Suppose
a particle is constrained to move along a curve/trajectory with the vector equation r(t) =
f (t)i + g(t)j. The tangent to the curve at time t, which is by definition is the velocity is
then given by
The distance traveled along the trajectory in the short time dt is then just the speed multi-
plied by dt. This is approximately
In the limit as dt → 0 this becomes exact. Summing over all these small time intervals we
can obtain an expression for the length of the curve as
¯ ¯
The term ¯ dr
dt
¯ dt is represented by the scalar symbol ds, which is called the arc length element.
Thus
Note that the limits of the integral are the limits of the range of variation of t.
Note also that if the curve has the representation r(t) = f (t)i + g(t)j then ds can be written
down as follows:
Example 1:
A straight line.
Example 2:
A circle of radius a.
If we had chosen the following alternative parameterisation the answer remains the same!
86 7 CURVES AND LINE INTEGRALS
Example 3:
We can then follow the rules above to obtain the line element of this curve as
sµ ¶ µ ¶2 s µ ¶2
2
dx dy df
ds = + dt = 1 + dt.
dt dt dt
R R1 √ £t√ ¯ √ ¯¤t=1
L (C) = ds = 1 + t2 dt = 1 + t2 + 1 log ¯t + 1 + t 2¯
2 2 t=0
C 0 √ √
2
= 2
+ 12 log(1 + 2)
It is possible to extend the concept of the one dimensional integrals you are used to if we
make use of the method to evaluate the length of a curve we have just discussed.
An ordinary 1-D integral of a function f (x) over a ≤ x ≤ b can be thought of as the area of
a straight fence whose height changes from point to point according to f (x). The fence can
be thought of as being made up of a sequence of thin fence panels at position x of width dx
and height f (x). The area is then the sum of all these infinitesimal fence panels,
Zb
A= f (x) dx .
a
Suppose the fence is no longer straight, but its base is a curve C in the xy-plane given by
the position vector r(t) = f (t)i + g(t)j. How do we work out the area of this fence? We can
7.4 Line integral of a function 87
repeat the same argument as above and consider the fence as being made up of a sequence
of thin fence panels at position r(t) with width now ds, the arc length element, and with
corresponding height f (r(t)). The corresponding area is then given by
Z Zt=b ¯ ¯
¯ dr ¯
A= f (r (t)) ds = f (r (t)) ¯¯ ¯¯ dt .
dt
C t=a
Note that the height function f is a scalar function with a vector input. It must be evaluated
on the curve C itself. Thus the value of the integral will, in general, be different for different
curves.
Example 1:
Evaluate the integral of the function f (x, y) = x2 y 2 over a circle of radius 2, centred at the
origin.
Example 2:
The above results can be easily generalised to three (or more) dimensions.
Z Zt=b¯ ¯
¯ dr ¯
L (C) = ds = ¯ ¯dt.
¯ dt ¯
C t=a
Z Zt=b ¯ ¯
¯ dr ¯
L (C) = f ds = f (x (t) , y (t) , z (t)) ¯ ¯dt.
¯ dt ¯
C t=a
Example :
Find the length of the circular helix r(t) = A cos ti + A sin tj + Btk between the points
(A, 0, 0) and (A, 0, 2πB).
90 7 CURVES AND LINE INTEGRALS
We now have the ingredients to answer the question we asked at the beginning of the chapter:
what is the work done by a force acting on a particle that moves on a given trajectory?
With these definitions, the force experienced by the particle will (in general) differ at each
point of the trajectory. Thus the force is not constant and so we can’t apply the usual
formula (see any [old] A-level physics text) of
However, we can split the trajectory into very small sections of length dr over which the
force is approximately constant.
The total work done is just the sum of all these small efforts:
Z Z Zt=b· ¸
dr dr
W = F · dr = F (r(t)) · dt = F (r(t)) · dt
dt dt
C C t=a
Note that work is a scalar (it’s an energy), but the integrand is formed from the scalar/dot
product of two vectors, the force evaluated along the trajectory and the tangent to the
trajectory.
7.6 Line integrals of vector fields 91
We have introduced this type of integral using the concept of work, but it is generally defined
for any vector field F (r), independently of its physical meaning. If the curve C is closed,
this integral is also called the circulation of F around C.
Example 1:
Evaluate the work done by the force field F (x, y) = −yi + xj along:
(a) the semicircle that joins (1, 0) with (−1, 0) in the upper half plane,
(b) the semicircle that joins (−1, 0) with (1, 0) in the upper half plane,
(c) the straight line segment which joins (1, 0) with (−1, 0).
dr
The tangent vector dt
is:
dr
The tangent vector dt
is:
Conclusion: The line integral of a vector field depends on the direction of the curve. If the
direction is changed, the sign of the line integral is changed as well.
dr
The tangent vector dt
is:
Conclusion: In general the value of a line integral of a vector function depends on the path,
not just the end-points. The exception to these are the so called “conservative” vector fields.
Note that the parameterisation of a given trajectory does not affect the answer.
94 8 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
8.1 Introduction
Knowledge of surfaces are often required in physical problems. Consider, for example:
• Find how much water per unit time exits for the mouth of a pipe (flux).
whose components are functions of two scalar variables u and v which lie in some domain D
of the u,v plane. The equivalent parametric equations are:
x = x (u, v)
y = y (u, v) (u, v) ∈ D.
z = z (u, v)
Often, we can simplify many problems by being able to recognize the parametric or vector
equations of simple surface.
Example 1:
The surface r(u, v) = a cos ui + a sin uj + vk, 0 6 u 6 2π, 0 6 v 6 5, represents the surface
of a cylinder of radius a and height 5, symmetric about the z-axis.
Clue: A slice perpendicular to the z-axis, where v= constant, gives the parametric/vector
equations of a circle of radius a.
Example 2:
Clue: A slice perpendicular to the z-axis, where v= constant, gives the parametric/vector
equations of a circle of radius v.
96 8 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
Example 3:
The surface
Example 4:
To compute the area of a surface r(u, v), (u, v) ∈ D, we divide D up into small rectangles
such that the actual surface also becomes a patchwork of curvilinear subdivisions of area dS
the surface area element (note the capital S).
The area of the surface is then just the sum of all these infinitesimally small patches
ZZ
Surface Area = dS
S
The problem is to find a way of representing the dS patches in terms of the parameters u
and v. Consider a node on the lattice in the uv-plane, with uv-coordinates (ui , vj )
• The vertical lines u = ui (a constant) are transformed by r(u, v) into a curve in 3-D space,
r(ui , v).
8.3 Area of a surface 97
¯
∂r ¯
• The vector between two of these lines is ∆u ∂u u=ui
. (Note the partial derivative as r is a
function of 2 variables.)
• The horizontal lines v = vj (a constant) are transformed by r(u, v) into a curve in 3-D
space, r(u, vi ).
¯
• The vector between two of these lines is ∆v ∂r ¯ .
∂v v=vj
Suppose that the sides of the small rectangle in the uv-plane are du and dv. The area is
then dudv. This rectangle is transformed by r(u, v) into a parallelogram.
The sides of the parallelogram are vector line elements. They are given by the vector line
elements of each of these sets of curves. From the curves section above these are (see diagram)
∂r ∂r
du and dv.
∂u ∂v
Now from the vectors section we know that if a parallelogram has vectors a and b for its
sides the area is |a × b|. Thus the area of the parallelogram (area element) is given by
¯ ¯ ¯ ¯
¯ ∂r ∂r ¯ ¯ ∂r ∂r ¯
dS = ¯¯ du × dv ¯ = ¯ × ¯ dudv.
∂u ∂v ¯ ¯ ∂u ∂v ¯
Hence the area of the surface can be written as a double integral over the domain D in the
uv-plane: ZZ ZZ ¯ ¯
¯ ∂r ∂r ¯
A= dS = ¯ ¯
¯ ∂u × ∂v ¯ dudv.
S D
Example 1:
Find the surface area of the vertical portion of the cylinder of radius a, height h, centred
on the z-axis, with the base in the xy-plane.
(a) Geometry:
(b) Integration:
98 8 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
Example 2:
(a) Geometry:
(b) Integration:
8.4 Surface integral of a function 99
Consider a thin sheet of metal given by the position vector r(u, v) but which has variable
density f (r). What is its mass?
Suppose that the metal sheet can be thought of as being made up of elemental patchwork
parallelograms of area dS, with dS so small that the density is approximately constant over
the parallelogram. Then the mass of the thin sheet is just the sum of the masses of these
patchwork pieces, or
ZZ ZZ ZZ ¯ ¯
¯ ∂r ∂r ¯
M= f dS = f (r(u, v))dS = ¯
f (r(u, v)) ¯ × ¯ dudv.
∂u ∂v ¯
S S D
Example 1:
Find the mass of the thin-walled cylinder of radius a and height h if the density is given by
f (x, y, z) = z(x2 + y 2 ).
100 8 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
Example 2:
Find the moment of inertia about the z-axis of the parametric surface
x = 2uv, y = u2 − v 2 , z = u2 + v 2 , 0 6 u2 + v 2 6 1, v > 0.
8.5 Surface integrals of vector functions: flux integrals 101
The functions we have integrated over surfaces so far have all been scalars. Just as in the
line integrals chapter, it is also possible to evaluate integrals of vector fields over a surface.
Such integrals are called flux integrals.
•The flow of water out of a pipe, where the flux integral is over the velocity field of the water
and the surface of the pipe mouth. The result is the total volume of water out of the pipe
in unit time.
•A version of Faraday’s law, where the flux integral is over the magnetic field density through
a surface. The rate of change with time of the value of this integral is the total circulation
of the electric field around the line-boundary of the surface.
where
• S is a surface r(u, v) ∈ D.
• dS is an oriented surface element: one which has a magnitude |dS| = dS and a direction
which is one of the normals to the surface (there are two, since an orientable surface has two
sides).
depending on whether you want to evaluate the flux “coming out of” or “going in to” the
surface.
102 8 SURFACES, SURFACE INTEGRALS, FLUX INTEGRALS
As the surface has two normals it is important to check that you pick the correct one as the
following example shows. The example also shows the standard way in which you evaluate
these integrals.
Example 1:
∂r
= cos vi + sin vj + 2uk
∂u
∂r
= −u sin vi + u cos vj
∂v
¯ ¯
¯ i j k ¯
∂r ∂r ¯ ¯
× = ¯¯ cos v sin v 2u ¯¯
∂u ∂v ¯ −u sin v u cos v 0 ¯
= u cosv k + u sin2 vk − 2u2 sin vj − 2u2 cos vi
= −2u2 cos vi − 2u2 sin vj + uk
Now since u > 0 on the surface (see parameter range above) the k-component of this normal
is also positive and so is actually pointing upwards. This means we have to reverse the
orientation of dS to obtain the downwards normal for the downwards flux. This can be
achieved by setting
µ ¶
∂r ∂r
dS = × dudv
∂v ∂u
µ ¶
∂r ∂r
= − × dudv
∂u ∂v
= (+2u2 cos vi + 2u2 sin vj − uk)dudv
8.6 Relationship between multiple, flux and line integrals 103
2 cos v 2 sin v
= i+ j+k
u u
There are several key relationships between all the types of integrals we have studied in this
course. They are encompassed in the following results which are stated here without any
(required) proof. Both of the following theorems are used extensively in physical situations
such as fluid dynamics, or electromagnetism.
In other words the flux integral of a vector field F is equal to the volume integral of the
divergence of F . This relationship can sometimes be used to evaluate flux integrals by
relating them to simpler volume integrals and vice versa.
Let C be an oriented closed curve and S be any oriented surface with C as a boundary.
Suppose that the orientations are such that when we look through S in the direction of its
normal C is traversed clockwise. Then for a continuously differentiable vector field F we
have Z ZZ
F · dr = (∇ × F ) · dS
C
S
In other words, the line integral of the vector field F around C is equal to the flux integral
of the curl of F through any surface bounded by C and vice versa. From a practical point
of view a major importance of this result lies in the idea that any S can be used and so you
can chose one that simplifies the evaluation of the integral.
Historical note: This theorem has nothing to do with Stokes! It was thought up by Lord
Kelvin at the University of Glasgow in the 19th century. He wrote to his friend Stokes at
Cambridge and said, “Hey look at this great result”. Stokes immediately set it as a question
in the Cambridge final degree examinations. This was the first time the result had appeared
publicly and so Cambridge typically attributed it to one of their own rather than the true
author!