0% found this document useful (0 votes)
39 views217 pages

ME1 Maths Notes Spring 2425

Uploaded by

Dasrizal Daz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views217 pages

ME1 Maths Notes Spring 2425

Uploaded by

Dasrizal Daz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IMPERIAL COLLEGE LONDON

DEPARTMENT OF MECHANICAL ENGINEERING

MECH 40008 MATHEMATICS AND COMPUTING

-1 1

-1

Dr Linda Stringer [Link]@[Link]


Differential equations content adapted from notes by Dr Fred Marquis
Applied integration content adapted from notes by Professor Daniel Balint
Spring Term 2024/25
Contents

12 MATRICES 1
12.1 Matrix Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
12.2 Matrix Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
12.3 Determinants and Cramer’s rule . . . . . . . . . . . . . . . . . . . . . 13
12.4 Inverses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
12.5 Gaussian Elimination and Linear Systems . . . . . . . . . . . . . . . 24
12.6 Eigenvectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
12.7 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
12.8 Problems: Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

13 APPLIED INTEGRATION 46
13.1 Functions of One Variable . . . . . . . . . . . . . . . . . . . . . . . . . 46
13.2 Double Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
13.3 Triple Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
13.4 Problems: Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

14 VECTOR CALCULUS 70
14.1 Parametric Representations of Lines and Length of a Curve . . . . 71
14.2 Line Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
14.3 Grad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
14.4 Scalar Potentials and The Fundamental Theorem of Calculus for
Line Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
14.5 Div and the Laplacian . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
14.6 Surface and Volume Integrals . . . . . . . . . . . . . . . . . . . . . . 107
14.7 The Divergence Theorem . . . . . . . . . . . . . . . . . . . . . . . . . 119
14.8 Curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
14.9 Stokes’ Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
14.10 Green’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
14.11 Conservative Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . 135
14.12 Problems: Vector Calculus . . . . . . . . . . . . . . . . . . . . . . . . 138

15 INTRODUCTION TO DIFFERENTIAL EQUATIONS 147

i
15.1 Occurrence of Differential Equations . . . . . . . . . . . . . . . . . . 147
15.2 Formation of Differential Equations . . . . . . . . . . . . . . . . . . . 150
15.3 Slope Fields Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 152
15.4 Classification of Differential Equations . . . . . . . . . . . . . . . . . 153
15.5 Problems: Introduction to Differential Equations . . . . . . . . . . . 155

16 FIRST ORDER ORDINARY DIFFERENTIAL EQUATIONS 156


16.1 Variables Separable Equations . . . . . . . . . . . . . . . . . . . . . . 156
16.2 Homogeneous Equations . . . . . . . . . . . . . . . . . . . . . . . . . 157
16.3 Exact Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . 160
16.4 Linear Differential Equations . . . . . . . . . . . . . . . . . . . . . . . 164
16.5 Summary of possible methods of solving first order differential
equationss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
16.6 Problems: First Order Differential Equations . . . . . . . . . . . . . . 170

17 SECOND ORDER ORDINARY DIFFERENTIAL EQUATIONS 174


17.1 Equations with the Dependent Variable Absent . . . . . . . . . . . . 174
17.2 Equations with the Independent Variable Absent . . . . . . . . . . . 176
17.3 Linear Equations with Constant Coefficients . . . . . . . . . . . . . . 178
17.4 Linear Homogeneous Equations with Constant Coefficients . . . . 178
17.5 Linear Inhomogeneous Equations with Constant Coefficients . . . 184
17.6 Summary of the method for finding the General Solution of Lin-
ear Homogeneous and Inhomogeneous Equations with Constant
Coefficients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
17.7 Problems: Second Order Differential Equations . . . . . . . . . . . . 199

18 SERIES SOLUTION OF DIFFERENTIAL EQUATIONS 202


18.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
18.2 Method 1: Method of Undetermined Coefficients . . . . . . . . . . . 203
18.3 Method 2: Use of Maclaurin series and Leibniz formula . . . . . . . 205
18.4 Boundary conditions at non-zero values of x. . . . . . . . . . . . . . 206
18.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
18.6 Problems: Series Solution of Differential Equations . . . . . . . . . 213

ii
12 MATRICES

12.1 Matrix Arithmetic

12.1.1 Terminology and Notation

A matrix (plural: matrices) is a rectangular array (table) of information described


by numbers, symbols, or expressions, arranged in rows and columns.

The order of a matrix tells us how many elements it has. The order is expressed
as m × n where m is the number of rows and n is the number of columns. In
equation (12.1) the first matrix is of order 3 × 3 and the second and third are of
order 3 × 1.

    
1 2 3  4
    
  y  = 5 (12.1)
2 3 4     

3 4 −5 z 6

If a matrix has one column (n = 1) it is called a column matrix (or vector), and if
a matrix has one row (m = 1) it is called a row matrix (or row vector).

If a matrix has an equal number of rows and columns, i.e. m = n then it is called a
square matrix.

Each element in the matrix is identified by j where  is the row the element is in,
and j is the column that the element is in. A general 3 × 3 matrix may be written
as:
 
11 12 13
 
A = j = 
  21  22  23

 (12.2)
31 32 33

The first index always corresponds to the row, and the second always corresponds
to the column.

1
12.1.2 Addition and Subtraction

If A = j is of order m × n and B = bj is also of order m × n then their sum is

A + B = j + bj (12.3)

Example

     
1 2 4 0
     
If A = 
 0 3  and B = 1 −3 then A + B = 
   


4 5 0 1

Matrices must be of the same order for addition (or subtraction) to be possible.

12.1.3 Multiplication

Multiplying a matrix by a scalar

We can multiply the matrix A by any scalar k to form another matrix kA by multi-
plying each element in A by k.

Example
     
2 −4
1
     
If A = 
 0 1 
 then 2A = 

 and
 2
A =



−6 2

More generally,

kA = kj = j k = Ak (12.4)

so multiplication of a matrix by a scalar is commutative

Multiplying a matrix by another matrix

An element of the product, AB, of two matrices A and B is found by multiplying the
elements of a row of A one-by-one by the elements of a column of B and adding
them up, similar to taking a scalar product of a row of the first matrix, with a column
of the second matrix.

2
The element in the -th row and j-th column of the product AB is calculated from
the -th row of A and the j-th column of B.
   
 b p q
For 2 × 2 matrices A =   and B =   we have
c d r s
    
 b p q p + br q + bs
AB =   = 
c d r s cp + dr cq + ds

Example
      
2 −1 4 1 2 −1 4 1
If A =   and B =   then AB =   
0 1 −2 0 0 1 −2 0
   
(2 × 4) + (−1 × −2) (2 × 1) + (−1 × 0) 10 2
= = 
(0 × 4) + (1 × −2) (0 × 1) + (1 × 0) −2 0

and   
4 1 2 −1
BA =   =
−2 0 0 1

The product of two 2 × 2 matrices is a 2 × 2 matrix. Note that in this example


AB ̸= BA.

Multiplying two matrices together is not commutative.

Example
 
  4 1 0 1
1 −1 0  
If A =   and B =  1
 then
0 −2 0
2 0 1

−1 1 0 1
 
  4 1 0 1
1 −1 0  
AB =    1 0 −2 0=
2 0 1

−1 1 0 1

 
4
1  1  0
  1 −1 0
Is it possible to compute BA = 
 1 0 −2 0
 ?
2 0 1
−1 1 0 1

3
Clearly to be able to multiply two matrices, AB, the number of columns of the first
matrix, A must be the same as the number of rows of the second matrix, B.

In general, if A is an m × n matrix and B is an n × p matrix, the matrix product AB


is a m × p matrix.
Pn
If C = AB then cj = k=1
k bkj = 1 b1j + · · · + n bnj
    
c11 c12 · · · c1p 11 12 · · · 1n b11 b12 · · · b1p
    
c
 21 c22 · · · c2p  
21  22 · · ·  2n
 b
21 b 22 · · · b 2p

=
   
 . .. ... ..   .. .. .. ..   .. .. .. .. 
 ..
   
 . .   . . . .  . . . . 

cm1 cm2 · · · cmp m1 m2 · · · mn bn1 bn2 · · · bnp

For example to calculate the element c11 ,


  
11 12 · · · 1n b11 b12 · · · b1p
  
 21 22 · · · 2n  b21 b22 · · · b2p 
 

 . .. .. 
 .. ..   ... .. .. .. 

 . . .  . . . 

m1 m2 · · · mn bn1 bn2 · · · bnp

n
X
c11 = 11 b11 + 12 b21 + · · · + 1n bn1 = 1k bk1
k=1

If A is 2 × 3 and B is 3 × 4 we can form the product AB and the result will be of


order 2 × 4 but we cannot form the product BA because the number of columns of
B is not equal to the number of rows of A, i.e. AB exists, BA does not.

In forming the product AB, B is said to be premultiplied by A, and A is said to be


postmultiplied by B.

4
Example
 
3 1  
  2 7 6
If A = 
2 3 and B =
  
1 0 3
5 4

 
3 1  
  2 7 6
then AB = 
2 3
 =
1 0 3
5 4

 
  3 1
2 7 6  
and BA =   2 3 =
1 0 3
 
5 4

5
12.1.4 The Zero Matrix and the Identity Matrix

The zero matrix, 0, is a matrix with all the entries zero. It acts in matrix arithmetic
like the number zero acts in scalar multiplication and addition.

The identity matrix is the square n × n matrix


 
1 0 ··· 0
 
0 1 · · · 0
n =  . . .
 
 .. .. .
. . .. 

 
0 0 ··· 1

The identity matrix acts in matrix multiplication in the same way as the number one
acts in scalar multiplication. For example, if A is an m × n matrix, then

m A = A n = A

Example
      
3 1 1 0 0 3 1 3 1  
       1 0
If A =  2 3  then 3 A = 0 1 0 2 3 = 2 3   = A2 = A
0 1
      
5 4 0 0 1 5 4 5 4

If the order of the identity matrix n is clear from the context, we drop the subscript
and call it .

12.1.5 Properties of Matrix Arithmetic

1. A + B = B + A, matrix addition is commutative.

2. (A + B) + C = A + (B + C), matrix addition is associative.

3. In general AB ̸= BA, matrix multiplication is not commutative.

4. (AB)C = A(BC), matrix multiplication is associative.

5. (A + B)C = AC + BC and C(A + B) = CA + CB, matrix multiplication is


distributive over addition.

6. 0 + A = A = A, the multiplicative identity is , the additive identity is 0.

6
12.1.6 Transposes

The transpose of a matrix is obtained by interchanging the rows and columns of


the matrix. If A is a matrix of order m × n with elements j , then its transpose is
AT of order n × m with its elements bj such that bj = j .

Example
 
3 1 5
If A =   then AT =
2 3 4

Note that the transpose of a (column) vector is a row vector.

Some properties of transposes are

1. (AT )T = A

2. (A + B)T = AT + BT , transposing is distributive over addition.

3. (AB)T = BT AT , law of reversals for transposes.


   
1 b1
The scalar product can be written using transposes. Let  =  , b =  
2 b2
be vectors.
 T    
1 b1  b1
Then T b =     = 1 2   = 1 b1 + 2 b2 . So T b =  · b.
2 b2 b2
   T    
1 b1 1   1 b1 1 b2
This is different to bT =     =   b1 b2 =  
2 b2 2 2 b1 2 b2
which is known as a dyadic form,  ⊗ b.

The magnitude of a vector can be expressed using transposes, since


Ç p p
|| = 21 + 22 = ·= T 

Quadratic forms can also be expressed using transposes, for example


  
 T  b 
xT Ax =  y    =
c d y

7
12.1.7 Symmetric Matrices

A square matrix A is said to be symmetric if AT = A and is said to be anti-


symmetric or skew-symmetric if AT = −A. For example
   
1 2 3 0 1 −2
   
2 4 5 is symmetric and −1 0 3  is anti-symmetric.
   
3 5 6 2 −3 0

All elements on the leading diagonal of any anti-symmetric matrix must be zero,
since if AT = −A, then this means that 11 = −11 , 22 = −22 ,. . . ,nn = −nn .
Therefore 11 = 22 = . . . = nn = 0.

A useful technique is that any square matrix A can be expressed as the sum of a
symmetric matrix and an anti-symmetric matrix

1 1
A= (A + AT ) + (A − AT )
|2 {z } |2 {z }
Symmetrc Ant−symmetrc

Example
 
1 2 3
 
Express A = 
 4 5 6  as the sum of a symmetric and an anti-symmetric matrix.

7 8 9

Using the properties of transposes in (12.1.6), we can prove that (A + AT ) is sym-


metric:

(A + AT )T = AT + (AT )T = AT + A = (A + AT ) (12.5)

You can show that (A − AT ) is anti-symmetric in a similar way (see problem sheet).

8
12.2 Matrix Transformations

Let the points P and P′ have coordinates (, y, z) and (′ , y ′ , z ′ ) where

′ = 11  + 12 y + 13 z


y ′ = 21  + 22 y + 23 z (12.6)
z ′ = 31  + 32 y + 33 z
This defines a transformation of the variables , y, z to ′ , y ′ , z ′ respectively. The
point P transforms to the point P′ .

We can represent P and P′ by their postition vectors x and x′ respectively and


write the transformation in matrix form

x′ = Ax

    
′ 11 12 13 
    
 y ′  =  (12.7)
   21 22 23 
 y 
 

z′ 31 32 33 z

We say that P′ is the image of P after transformation by A. Any vector or subset of


3D space (e.g. line, plane, or other region) is correspondingly transformed by A.

y y

P′

x x

It can be shown that straight lines are transformed by matrices to straight lines.

Note that the origin always stays fixed because A0 = 0.


    
11 12 13 0 0
    
 21 22 23  0 = 0
    

31 32 33 0 0

9
Example
Sketch the image of the unit squarewith corners
 0, P, Q, R = (0, 0), (1, 0), (1, 1), (0, 1)
2 1
after transformation by the matrix  
0 3
           
2 1 0 2 1 1 2 1 1 2 1 0
   =    =    =    =
0 3 0 0 3 0 0 3 1 0 3 1

Note that the columns 


of the
 transformation
  matrix tell us the image of the Cartesian
1 0
unit basis vectors i =   and j =  , since
0 1
         
 b 1   b 0 b
    =   and     =  .
c d 0 c c d 1 d

Examples
The following matrices have the effect of enlargement by factor 3, reflection in the
x-axis, anti-clockwise rotation by quarter-turn, one-way stretch factor 5 in the y-
direction respectively.
       
3 0 1 0 0 −1 1 0
 , , , 
0 3 0 −1 1 0 0 5

10
Example
The rotation matrix Rθ rotates the xy-plane anti-clockwise by θ about the origin.
 
cos θ − sin θ
Rθ =  
sin θ cos θ

An orthogonal matrix is a square matrix A with the property that A−1 = AT . The
rotation matrix Rθ above is an example of an orthogonal matrix. Transformation by
orthogonal matrices is known as orthogonal transformation. It can be shown that
in orthogonal transformations, the distance between points stay the same, and the
angle between any two vectors stays the same. In three dimensional space is not
deformed in any way by orthogonal transformations - it simply rotated or reflected.

11
Any linear combination of two position vectors representing points is transformed
to the same linear combination of the transformed vectors, as we shall now show.

Let A be a matrix, let α and β be scalars and let  and v be vectors. Then by the
properties of matrix arithmetic in (12.1.5) we have

A(α + βv) = A(α) + A(βv) = α(A) + β(Av) (12.8)

So α + βv gets transformed by A to α(A) + β(Av).

For example, in the figure below, the point P with position vector 2i + j is trans-
formed to the point P′ with position vector 2Ai + Aj.

y y

P′

x x

Transformation by matrices are called linear transformations because they pre-


serve linear relationships between points in space.

Is this section we have shown how matrices can transform the points in space,
which is the same approach as in high school. An alternative approach to the
study of matrix transformations does not consider that the points move - instead
the points remain stationary and the axes move. In that approach, (′ , y ′ , z ′ )
are considered to be the coordinates of P with respect to new axes ′ , y ′ and
z ′ . We will not study the alternative approach in this module, although it is very
common in engineering applications and it is closely related to the approach we
have taken here.

12
12.3 Determinants and Cramer’s rule

12.3.1 Determinant of a 2 × 2 Matrix


 
 b
Let A =  
c d
The determinant of A, denoted |A|, is defined to be d − cb

 b
|A| = = d − bc (12.9)
c d

13
12.3.2 Determinant of a 3 × 3 matrix
 
11 12 13
 
The determinant of A =  
 21  22  23  is defined as

31 32 33

|A| = 11 22 33 +12 23 31 +13 21 32 −11 32 23 −12 21 33 −13 22 31

Each term in this sum is a product of exactly one element from each row and
column. The sign of the product is determined by the number of ‘column swaps’
needed to get these elements on the leading diagonal.

The usual way to calculate |A| is to sum the products of the elements of the top
row 1j with the cofactors A1j , (signed minors), where the minors M1j are deter-
minants of submatrices obtained by removing a row and column from the original
matrix.

|A| = 11 A11 + 12 A12 + 13 A13

= = 11 (−1)1+1 M11 + 12 (−1)1+2 M12 + 13 (−1)1+3 M13

22 23 21 23 21 22


=11 (+1) + 12 (−1) + 13 (+1)
32 33 31 33 31 32

Example
 
1 −3 −3
 
Find the determinant of A = 
 2 3 −2

−2 0 2

14
12.3.3 Determinant of a n × n Matrix

The determinant of an n × n matrix is the sum of n! signed products of n elements,


where each row and each column of the matrix contributes exactly one element to
the each product in the sum. It can be found using the following expression
n
X
|A| = 11 A11 + 12 A12 + · · · + 1n A1n = 1k A1k (12.10)
k=1

where the Aj are cofactors - we will now explain how to find these.

First take an element j of a square matrix A of order m × m and remove the row
and column containing j . This leaves a square submatrix of order (m − 1) × (m −
1). The determinant of this smaller matrix is called the minor of j and is denoted
Mj .

Then the cofactor of j is denoted Aj and is Aj = (−1)+j Mj (it is a ‘signed’
minor.) Note that the signs of the cofactors,(−1)+j , are
 
+ − + ···
 
 − + − · · ·
 
 
 + − + · · ·
 
··· ··· ··· ···

We can now use this definition recursively on each M1j repeatedly until it is only in
terms of 2 × 2 determinants which can be found easily.
Example
5 −7 2 2
0 3 0 −4
Show that = 20
−5 −8 0 3
0 5 0 −6

15
12.3.4 Cramer’s Rule

Consider the n × n linear system

11 1 + 12 2 + · · · + 1n n = p1

21 1 + 22 2 + · · · + 2n n = p2


.. ..
. .

n1 1 + n2 2 + · · · + nn n = pn

which can be written in matrix form


    
11 12 · · · 1n 1 p1
    
 21 22 · · · 2n  2  p2 
    
 . .. ..   =  or Ax = p
 .. .
...
.   ...   ... 
    
n1 n2 · · · nn n pn

Then Cramer’s rule tells us that


|Bj |
j =
|A|
where Bj is obtained from A by replacing the j-th column by p.
Example

1 + 32 = 0

21 + 42 = 6

Note that if |A| ̸= 0 the solution is unique and Cramer’s rule can be used, but if
|A| = 0, then solutions cannot be found with Cramer’s rule.

16
12.3.5 Theorems on Determinants

1. Laplace Expansion Theorem

In (12.10) we showed how to evaluate determinant by expanding along the


first row. We can also evaluate a determinant by expanding by any row or
column.
n
X n
X
|A| = pk Apk = kq Akq (12.11)
k=1 k=1
| {z } | {z }
expanding by p-th row expanding by q-th column

Example
1 −3 −3
Show that 2 3 −2 = −12, by expanding by the middle column.
−2 0 2

2. If a matrix has a row of zeros then the determinant of the matrix is zero.

3. If two rows or columns are interchanged, the sign of the determinant is re-
versed,

 b b  c d
= d − bc = bc − d = bc − d
c d d c  b

4. If a matrix A has at two identical rows or columns then |A| = 0. This follows
on from (3) above. If we interchange two identical rows or columns then
the sign is reversed, but it is the same determinant (matrix), therefore the
determinant must be zero for this to be true.

5. If a row (or column) is multiplied by a constant factor, then the determinant is


multiplied by the same constant factor.

6. If one row (or column) is a multiple of another row (or column) then the deter-
minant is zero.

17
7. If a multiple of a row (or column) is added to another row (or column), the
value of the determinant is unaltered – very useful.

8. The determinant of an upper, or lower triangular matrix is equal to the product


of the diagonal elements.

9. The determinant of a diagonal matrix is equal to the product of the diagonal


elements.

10. |AT | = |A|

11. |AB| = |A||B|

18
12.3.6 3 × 3 Determinants,Triple Scalar Products and Linear Dependence

The vector product and triple


 
scalarproduct

can be computed using determi-
 
1 b1 c1
     
2  , b = b2  , c = c2 ,
nants. For example if  =      

3 b3 c3
i j k
then × b = i(2 b3 − 3 b2 )− j(1 b3 − 3 b1 )+ k(1 b2 − 2 b1 ) = 1 2 3
b1 b2 b3

1 2 3 1 b1 c1
and  × b · c = b × c ·  = c ×  · b = b1 b2 b3 = 2 b2 c2 .
c1 c2 c3 3 b3 c3
So the triple scalar product of three vectors is equal to the determinant of the matrix
which has the vectors as its rows (or columns).

Recall that the magnitude of the triple scalar product is the volume of a paral-
lelepiped with sides , b, c.

Now suppose that , b, c are linearly dependent vectors (i.e. they are coplanar).
Then there exist constants α, β, γ (not all zero) such that

β γ
α + βb + γc = 0 so  = − b− c
α α
β γ
If we add α
times the second column and α
times the third column to the first
column, then the first column becomes a column of zeros. But this does not change
the determinant, so the determinant (and the triple scalar product, and the volume
of the corresponding parallelepiped) must be zero.

The vectors , b, c are linearly dependent if and only the their triple scalar
product is zero, or equivalently, the matrix which has , b, c as its rows (or
columns) has determinant equal to zero.

19
12.4 Inverses

12.4.1 The Inverse of a Square Matrix

If A is a square matrix, then the inverse of A is another square matrix A−1 such
that

AA−1 = A−1 A = 

In matrix multiplication, the inverse of a matrix acts in the same way as the recip-
rocal of a number acts in scalar multiplication.

Example
      
2 5 3 −5 2 5 3 −5
If A =   then A−1 =   and AA−1 =   =
1 3 −1 2 1 3 −1 2

12.4.2 Using the Inverse to Solve a Linear System

Consider the linear system (system of simultaneous linear equations)

2 + 5y = 9

 + 3y = 5

This can be written in matrix form as


    
2 5  9
   =  
1 3 y 5

Then since

Ax = p

we can premultiply both sides by A−1 to get

Ax = p

A−1 Ax = A−1 p

x = A−1 p

x = A−1 p
        
 3 −5 9 3 × 9 + −5 × 5 2
Therefore   =    =  = 
y −1 2 5 −1 × 9 + 2 × 5 1

20
12.4.3 Inverse of a 2 × 2 Matrix
   
 b e ƒ
Let A =  . Assume that A−1 exists and A−1 =  
c d g h
      
1 0  b e ƒ e + bg ƒ + bh
Then  =  =  = 
0 1 c d g h ce + dg cƒ + dh

So we must solve the following equations for e, ƒ , g, h.


e + bg = 1
ƒ + bh = 0
ce + dg = 0
cƒ + dh = 1

We find that
       
d −b
−1
e ƒ d−bc d−bc 
1 d −b 1 d −b
A = =
−c 
=  =  
g h d − bc −c  |A| −c 
d−bc d−bc

The determinant of A is important because


if |A| = 0, then A is not invertible and A−1 does not exist. In this case A said to
be a singular matrix.  
1 d −b
If |A| ̸= 0 then A is invertible and A−1 = |A|
 
−c 

Verification that A−1 A = :


      
1 d −b  b 1 d − bc db − bd 1 0
  =  = 
d − bc −c  c d d − bc −c + c −bc + d 0 1

21
12.4.4 Finding the Inverse using Adjoints and Determinants

The adjoint of a matrix A, denoted by djA, is formed by replacing each element


in a matrix by its cofactor and transposing the result. Then

1
A−1 = djA
|A|

Use the following steps to find the inverse of a matrix

1. Find |A| and check that |A| ̸= 0 before proceeding

2. Form the matrix where each element of A is replaced by its minor.

3. Now use the array of signs to obtain the matrix of cofactors.

4. Now transpose the matrix of cofactors to find djA

5. Divide by |A|

Example
 
1 −3 −3
 
Find the inverse of A = 
 2 3  and use it solve the linear system
−2
−2 0 2

 − 3y − 3z = −14

2 + 3y − 2z = 2

−2 + 2z = 4

22
12.4.5 Theorems on Inverses

1. Uniqueness of inverses

The inverse of a non-singular matrix is unique, that is if AB =  and AC = 


then B = C = A−1

2. Law of reversals for inverses

If A and B are non-singular square matrices of the same order then:

(AB)−1 = B−1 A−1

1
3. |A−1 | =
|A|

23
12.5 Gaussian Elimination and Linear Systems

12.5.1 Gaussian Elimination

Gaussian elimination is a process of solving a linear system. It is similar to the fa-


miliar way of solving simulataneous equations, but in a formalised process suitable
for converting to computer code.

Example
Solve the linear system below using Gaussian elimination.

 + 2y + 3z = 7

2 + 3y + 4z = 9

3 + 4y − 5z = 1

Step 1. Form the augmented matrix


 
1 2 3 7
 

2 3 4 9 

 
3 4 −5 1

Step 2. Use elementary row operations to reduce the augmented matrix to


upper triangular form
There are three elementary row operations that can be used in Gaussian elimina-
tion. They do not change the solutions of the linear system. They are

• swap two rows,

• multiply/divide a row by a constant (non-zero),

• add/subtract a multiple of one row to/from another row.

Use the row operations sequentially to first eliminate non-zero elements below the
leading diagonal in the first column, then eliminate non-zero elements below the

24
leading diagonal in the middle column.
 
1 2 3 7
 

2 3 4 9 

 
3 4 −5 1

 
R′1 = R1 1 2 3 7
 
R′2 = R2 − 2R1 0 −1 −2 −5 
 
 
R′3 = R3 − 3R1 0 −2 −14 −20

 
R′1 = R1 1 2 3 7
 
R′2 = R2 0 −1 −2 −5 
 
 
R′3 = R3 − 2R2 0 0 −10 −10

Step 3. Back substitution


Now that the augmented matrix is in upper triangular form, we can write it as a
linear system again

 + 2y + 3z = 7

−y − 2z = −5

−10z = −10

Then working from the bottom row upwards, it is easy to solve the system (this is
called back-substitution).

−10z = −10 so z = 1

−y − 2z = −3 so y = 3

 + 2y + 3z = 4 so  = −2

The solution of the system is

 = −2 y=3 z=1

25
Example 2
Use Gaussian elimination to solve the following homogeneous linear system

 + 2y + 3z = 0
2 + 3y + 4z = 0
3 + 4y − 5z = 0

Example 3
Use Gaussian elimination to solve the following non-homogeneous linear system

 − 3y + z = 4
− + 2y − 5z = 3
5 − 13y + 13z = 8

26
Example 4
Use Gaussian elimination to solve the following non-homogeneous linear system

−3 + y + 4z = −2
−2 + 2z = −2
 − y − 2z = 0

27
Example 5
Use Gaussian elimination to solve the following homogeneous linear system

−3 + y + 4z = 0
−2 + 2z = 0
 − y − 2z = 0

When conducting Gaussian elimination by hand, it can be helpful to keep the arith-
metic as simple as possible (avoiding fractions), whereas by computer this is not
necessary.

Note that the sequence of elementary row operations used to conduct Gaussian
elimination is not unique - there are usually many different ways. However, whichever
sequence is used, it will always lead to the same solution.

28
12.5.2 Solutions of a Linear System

The solutions of a linear system Ax = p are summarised in Table 1 below:

Table 1: Solution of Ax = p

Non-homogeneous system Homogeneous system


p ̸= 0 p=0
|A| ̸= 0 The system has a unique solu- The system has a unique so-
tion, which is non-trivial, lution, which is the trivial solu-
tion,
x = A−1 p
x = A−1 0 = 0

The system has an infinite The system has an infinite


|A| = 0
number of solutions number of solutions.
The system has no solutions,
the system is inconsistent.

Consider thee special case of a 3 x 3 linear system


    
11  + 12 y + 13 z = p1 11 12 13  p1
    
21  + 22 y + 23 z = p2  21 22 23  y  = p2 
    

31  + 32 y + 33 z = p3 31 32 33 z p3

The solutions of a 3 × 3 linear system can be interpreted geometrically as the


points of intersection of three planes. The normal vectors to the planes are the
rows of the coefficient matrix. The normal vectors are linearly dependent if and
only if |A| = 0.

Note that it is not possible to have an inconsistent homogeneous system, because


a homogeneous system always has the trivial solution (0, 0, 0). (The geometric
interpretation of this is that in a homogeneous 3 x 3 system, all three planes pass
through the origin, so the origin is always a point of intersection.)

29
12.5.3 Gauss-Jordan Elimination

Alternative Step 3.
At the end of step 2. in Gaussian elimination, instead of back-substitution, continue
conducting elementary row operations until the left hand side of the augmented
matrix is the identity matrix, by following these steps. (Optional - first make the
leading diagonal entries all equal to 1). Eliminate non-zero elements above the
leading diagonal in the final column. Then eliminate non-zero elements above the
leading diagonal in the middle column. Now read off the solution. This technique is
called Gauss-Jordan elimination. We resume our first example at the end of step
2.
 
1 2 3 7
 
−1 −2 −5 

0

 
0 0 −10 −10
 
R′1 = R1 1 2 3 7
 
R′2 = −R2

0 1 2 5

 
R′3 = −R3 / 10 0 0 1 1
 
R′1 = R1 − 3R3 1 2 0 4
 
R′2 = R2 − 2R3

0 1 0 3

 
R′3 = R3 0 0 1 1
 
R′1 = R1 − 2R2 1 0 0 −2
 
R′2 = R2

0 1 0 3 

 
R′3 = R3 0 0 1 1

30
Using Gauss-Jordan elimination to find an inverse matrix
To find the inverse of matrix A, first augment A with the identity matrix, then conduct
row operations to reduce the left hand side to the identity matrix. The right hand
side will now be the inverse matrix!
 
1 2 3 1 0 0
 

2 3 4 0 1 0 

 
3 4 −5 0 0 1

becomes
 
31 11 1
1 0 0 − 10 − 5 − 10
 
11 7 1 
−5

0 1 0 5 5 


1 1 1
0 0 1 10 5
− 10

31
12.6 Eigenvectors

12.6.1 Eigenvalues and Eigenvectors


 
−2 1 4
 
Let A =  −2 1 2  and consider matrix transformation by A

−1 1 3
      
1 −2 1 4 1 −4
      
If the vector x = 
 2  then Ax = −2 1 2  2  = −2
     
−1 −1 1 3 −1 −2
      
1 −2 1 4 1
      
If the vector x =  0
 
 then Ax = −2 1 2 0 = 
   


1 −1 1 3 1
In the second example, the result is twice the original vector.

If matrix transformation has the effect of multiplying a vector by a constant


(scaling the vector, but not rotating it), then that vector is called an eigenvec-
tor for the matrix, and the corresponding constant is called an eigenvalue.
   
1 −2 1 4
   
So 0 is an eigenvector for −2 1 2 and the eigenvalue is 2.
  

1 −1 1 3

In general, if Av = λv, then v is an eigenvector for A and λ is the correponding


eigenvalue

Any scalar multiple of an eigenvector is also an eigenvector, because

A (kv) = kAv = kλv = λ(kv)

For our particular matrix A,


      
−2 1 4 k 2k k
      
−2 1 2 0 =  0  = 2 0
      
−1 1 3 k 2k k

32
12.6.2 The Characteristic Equation

For a given n × n square matrix A, we wish to find v (an eigenvector) and λ (an
eigenvalue) such that

Av = λv

Av = λv

Av − λv = 0

(A − λ)v = 0

This is a homogeneous linear system. From Table 1, if |A − λ| ̸= 0, then the only
solution is the trivial solution v = 0, but if |A − λ| = 0 then it has infinitely many
solutions for v. The degree n polynomial

|A − λ| (12.12)

is called the characteristic polynomial of A and

|A − λ| = 0 (12.13)

is called the characteristic equation of A.

The solutions λ1 , . . . , λn of the characteristic equation are the eigenvalues of A,


and we can use Gaussian elimination or other methods to find the n corresponding
eigenvectors.

Example
 
−2 1 4
 
Let A = 
 −2 1 2 . Then the characteristic polynomial of A is

−1 1 3
   
−2 1 4 λ 0 0 −2 − λ 1 4
   
|A − λ| = 
 −2 1 2  − 0 λ 0 =
   −2 1−λ 2 =
−1 1 3 0 0 λ −1 1 3−λ

So the eigenvalues are λ = 2, 1, −1.

33
For each eigenvalue λ, we need to find a vector v such that

Av = λv

Av = λv

Av − λv = 0

(A − λ)v = 0
   
−2 1 4 −2 − λ 1 4
   
A=  −2 1 2 , so A − λ =  −2
  1 − λ 2 

−1 1 3 −1 1 3−λ
To conduct the Gaussian elimination, first form the augmented matrix
 
−2 − λ 1 4 0
 
 −2 1−λ

2 0

 
−1 1 3−λ 0

Case: λ = 2
 
−4 1 4 0
 
−2 −1 2

0

 
−1 1 1 0
 
R1 → R1 −4 1 4 0
 
R2 → 2R1 − 4R2  0

6 0 0

 
R3 → R1 − 4R3 0 −3 0 0
 
R1 → R1 −4 1 4 0
 
R2 → R2

 0 6 0 0

 
R3 → 6R3 + 3R2 0 0 0 0

Back-substituting from the bottom row, we see that z can take any value. So we let
z = α (free parameter). Then y = 0 and  = α. We can write the eigenvector as
     
1
α 1 p
     2
v =  0  or any multiple of this e.g. v = 0 , v = 
   
0

1
α 1 p
2

34
Case: λ = 1
 
−3 1 4 0
 
−2

0 2 0

 
−1 1 2 0
 
R1 = R1
′ −3 1 4 0
 
R′2 = −3R2 + 2R1  0

2 2 0

 
R3 = −3R3 + R1
′ 0 −2 −2 0
 
R′1 = R1 −3 1 4 0
 
R′2 = R2

 0 2 2 0

 
R′3 = 2R3 + 2R2 0 0 0 0

Let z = α (free parameter). Then y = −α and  = α. We can write the eigenvector


     
1
α 1 p
     31 
as v = −α  or any multiple of this e.g. −1
  
 , − p 3 
 
1
α 1 p
2
Case: λ = −1
 
−1 1 4 0
 
−2 2 2 0 
 
 
−1 1 4 0
 
R1 = R1
′ −1 1 4 0
 
R2 = −R2 + 2R1  0 0 6 0 
′  
 
R′3 = −R3 + R1 0 0 0 0

Then z = 0, y = α (free parameter), and  = α. We can write the eigenvector as


     
1
α 1 p
     2
v= or any multiple of this e.g. 1 ,  p1 
α 

   2
0 0 0
       
−2 1 4 1 1 1
       
−2 1 2 are 2, 0, 1, −1 and −1, 1
Three eigenpairs for        

−1 1 3 1 1 0

Note that an n × n matrix can have up to n distinct eigenvalues and eigenvectors.


The number of each depends on the entries in the matrix.

35
12.6.3 Results on Eigenvalues

36
12.7 Applications

12.7.1 Diagonalisation

The diagonalisation of a square matrix A involves writing the matrix as a product

A = BDB−1

where D is a diagonal matrix.

If A can be written in this way, we say it is diagonalisable.

One common diagonalisation uses the matrix V which has the eigenvectors of A
as its columns, this is called the eigenvector matrix or modal matrix and Λ has
the eigenvalues as its diagonal elements, this is called the eigenvalue matrix or
spectral matrix.

The spectral theorem says that if V is the modal matrix for A and if Λis the spectral
matrix for A, then

A = VΛV−1 or equivalently V−1 AV = Λ

The spectral theorem tells us that we can use the modal matrix to diagonalise a
matrix, and the result is the spectral matrix.

Example
     −1
−2 1 4 1 1 1 2 0 0 1 1 1
     
−2 1 2 = 0 −1 1 0 1 0  0 −1 1
     
−1 1 3 1 1 0 0 0 −1 1 1 0

Example

37
12.7.2 Powers and the Matrix Exponential

The spectral theorem allows us to efficiently compute powers of a square matrix.


First note that it is easy to compute positive integer powers of diagonal matrices,
since
 k
d11 0 ··· 0
 

 0 d22 · · · 0 

 .. .. .. .. 

 . . . . 

0 0 · · · dnn
    
d11 0 ··· 0 d11 0 ··· 0 d11 0 ··· 0
    
 0 d22 · · · 0  0 d22 · · · 0   0 d22 · · · 0 
= ···
    
.. .. .. ..  .. .. .. .. .. .. .. .. 

 . . . . 
 . . . . 


 . . . . 

0 0 · · · dnn 0 0 · · · dnn 0 0 · · · dnn
 
k
d11 0 ··· 0
 
 0 k
d22 ··· 0 
=
 
.. .. .. .. 

 . . . . 

0 0 k
· · · dnn

So a positive integer power of any diagonal matrix simply has powers of all the
elements. (This is not true in general for non-diagonal matrices). This extends to
non-integer and negative powers.

Now we can apply spectral theory to efficiently compute powers of a matrix. Let
V be the modal matrix and Λ be the spectral matrix for A, then

Ak = (VΛV−1 )k

= (VΛV−1 )(VΛV−1 )(VΛV−1 ) · · · (VΛV−1 )

= VΛV−1 VΛV−1 VΛV−1 · · · VΛV−1

= VΛΛΛ · · · ΛV−1

= VΛk V−1

38
This can be extended to efficiently compute the matrix exponential, which is use-
ful for example in solution of differential equations. We define

A
A2 A3
e =+A+ + + ···
2! 3!
Note that for a diagonal matrix D, it is easy to compute eD , since for example if
n=3

D
D2 D3
e =+D+ + + ···
2! 3!
     
1 0 0 d11 0 0 d112 0 0
    1  
= 0 1 0 + 0 d
22 0 +  0 d2 0 + ···
    2!  22 
0 0 1 0 0 d33 0 0 d332

2
 
d11
1 + d11 + 2! + · · · 0 0
 2

d22
= 1 + d22 + 2! + · · ·
 
0 0 
 2

d33
0 0 1 + d33 + 2! + · · ·
 
ed11 0 0
 
=
 0 e d22 0 

0 0 ed33

Then applying the spectral theorem, we have

A −1 −1
(VΛV−1 )2 (VΛV−1 )3
e = (VV ) + (VΛV )+ + + ···
2! 3!
−1 −1
VΛ2 V−1 VΛ3 V−1
= VV + VΛV + + + ···
2! Œ 3!
Λ2 Λ3
‚
=V +Λ+ + + · · · V−1
2! 3!
= VeΛ V−1

39
12.7.3 Coupled System of Linear Differential Equations

Let t be an independent variable, let (t) and y(t) be dependent variables, and
let , b, c, d be constants such that
d
=  + by
dt
dy
= c + dy
dt
This coupled system can be decoupled by transforming the dependent variables
then applying spectral theory. The decoupled system is straightforward to solve,
then we transform the dependent variables back to our original (t) and y(t).
     
d
(t) .  b
We use notation x =  , x=  dt , A =  , and we transform the
dy
y(t) dt
c d
dependent variables
  (t) y(t)
 and   to new
 dependent
  z(t) and
variables  (t)
 by
z(t) p q (t) p(t) + qy(t) p q
letting z =   =    =  , where   is
(t) r s y(t) r(t) + sy(t) r s
. .
V−1 (the inverse of the modal matrix for A). Note that z = V−1 x and z= V−1 x.

Matrix notation In full


.
   
d
x= Ax  b (t)
.  dt  =  
dy
x= (VΛV−1 )x dt
c d y(t)
.
V−1 x= V−1 (VΛV−1 )x
.
V−1 x= ΛV−1 x
    
dz
λ1 0 z(t)
.  dt  =
z= Λz
 
d
dt
0 λ2 (t)
z= eΛt c
Vz = VeΛt c      
(t) 11 12 e λ1 t 0 c1
x = VeΛt c  =   
y(t) 21 22 0 e λ2 t c2

The general solution to the coupled system is

(t) = 11 c1 eλ1 t + 12 c2 eλ2 t

y(t) = 21 c1 eλ1 t + 22 c2 eλ2 t

If values of (0) and y(0) (initial conditions) are given, we can determine the
values of the constants c1 and c2 .

40
Summary

You should now be able to

1. Recognise and use the terminology associated with matrices and matrix arith-
metic

2. Compute the determinant of a matrix

3. Apply the theorems on determinants and inverses

4. Recognize symmetric, anti-symmetric and orthogonal matrices

5. Compute the inverse of a 3x3 matrix using two different methods

(a) Adjoint and determinant

(b) Gauss-Jordan elimination

6. Solve a system of linear equations using three different methods

(a) using the inverse matrix

(b) Cramer’s rule

(c) Gaussian elimination

7. Explain the theory of solutions of systems of linear equations

8. Explain the connection between determinants and triple scalar products

9. Find the eigenvalues and eigenvectors of a matrix

10. Apply spectral theory to

(a) find powers of matrices and matrix exponentials

(b) solve coupled systems of linear first order ODEs

41
12.8 Problems: Matrices

1. Consider the following matrices


     
  1 4 9 3 0 0 4 0 0
1 2 3      
A=  , B = 4 0 6 , C = 8 1 0 , D = 0 4 0 ,
4 5 6
     
9 6 2 7 6 7 0 0 4
 
  1 3
5 3 1  
E=  , F = 8 7
0 2 2
 
9 4

(a) What is the order of each matrix?

(b) Which matrices are symmetric?

(c) Which matrices are triangular?

(d) Are A and B conformable for addition?

(e) Calculate A + E and A - E

(f) Multiply matrix D by the scalar 14 .

(g) Of the above matrices, which ones can be premultiplied by A? Which


can be postmultiplied by A?

(h) Find the following products where possible

i. AB
ii. BA
iii. BC
iv. CD

(i) Verify that (CF)T = FT CT and that (CF)T ̸= CT FT $

(j) Write the matrix C as the sum of a symmetric and an anti-symmetric


matrix

(k) Prove that (M − MT ) is anti-symmetric for any square matrix M. (Hint:


this is similar to the proof in the notes that M + MT is symmetric)
 
    cos θ 0 sin θ
4 0 0 1  
2. T1 =   , T2 =   , T3 =  0 1 0 
0 4 1 0
 
− sin θ 0 cos θ

42
(a) What is meant by a ’Linear Transformation’?

(b) What effect would transformations T1 and T2 have on the unit square?

(c) Find the image of the position vector 3i + 2j after transformation by T2 .


Is T2 a rotation or a reflection?

(d) What transformation is represented by T3 ?

(e) Find the image of the position vector -1i + 4j - 2k after transformation by
T3 with θ = π4 .

(f) Show that orthogonal transformations preserve the lengths of position


vectors and preserve the angle between position vectors. (Hint: start by
expressing the magnitude of Mx using transposes, and show that it is
the same as the magnitide of x)

3. Consider the following matrices


   
  1 3 1 1 2 3  
1 4 0     4 12
A=  , B = 0 4 1 , C = 0 1 4, D =  
2 2 6 1 3
   
2 −1 0 5 6 0

(a) Can you calculate a determinant of A?

(b) Calculate the determinant of B first by expanding along the first row, then
check you get the same result if you expand by the second column.

(c) Calculate the determinant of matrix D. What would be the effect of trans-
forming a unit square by D?

(d) Using the matrices above, verify that |BC| = |B||C|

(e) Solve the system below using Cramer’s rule (note that the coefficient
matrix is B).
x + 3y +z = 6
4y + z = 6
2x -y = 1

(f) What are the determinants of T1 , T2 and T3 in the previous question?


What does this tell you?

4. Using the same matrices as the previous question

43
(a) Find the inverses of matrix B and matrix C using the method of adjoints.

(b) Verify that (BC)−1 = C−1 B−1

(c) Use the inverse of B to solve the linear system below (Note that B is the
coefficient matrix of the system).

x + 3y +z = 6

4y + z = 6

2x -y = 1

(d) Prove that for any matrices M,X,Y, if MX = Y then X = M−1 Y (as long as
M is invertible).

5. (a) Solve the linear system in (4c) using Gaussian Elimination.

(b) Solve again using Gauss-Jordan Elimination.

(c) Give a geometric interpretation of the linear system in (4c).

(d) Solve the linear system below and give a geometric interpretation.
x + 3y +z = 0, 2x -2z = 0 , x -3y-3z = 0 .

6. (a) For the matrix A which eigenvalue corresponds to which eigenvector?


       
5 2 3 −1 2 −1
       
A=  1 4 1 
 λ = 6, 3, 2, v =  1  , 1 ,  0 
     
0 0 2 0 0 1
 
4 2
(b) For the matrix  , write down its characteristic polynomial and
−1 1
hence find its eigenvalues and eigenvectors.

7. (a) For A in (6a), verify that A = VΛV−1 .

(b) Verify that A2 = VΛ2 V−1

(c) Find A1/ 2

(d) Let (t), y(t) and z(t) be such that

d dy dz
= 4+ 3y− 2z, = 4+ 4y+ 3z, = −3− 3y+ 3z
dt dt dt

44
Show that the eigenvalues of the coefficient matrix are 1, 3 and 7, and
find the general solution for (t), y(t) and z(t) by decoupling the sys-
tem. Then show that the solution, subject to initial conditions (0) = 22,
y(0) = −12 and z(0) = −10, is

(t) = 15et −2e3t +9e7t , y(t) = −17et +2e3t +3e7t , z(t) = −3et +2e3t −9e7t

Answers

Use an online answer engine such as WolframAlpha.

45
13 APPLIED INTEGRATION

13.1 Functions of One Variable

13.1.1 Review of Integration

Let ƒ () be a function defined for  ≤  ≤ b. Let 0 =  and n = b and divide


the interval [, b] into n subintervals [ , +1 ] of equal width δ = (b − )/ n, for
 = 0, . . . , n − 1. Choose n sample points ∗

, one in each subinterval [ , +1 ].
If ƒ (∗

) > 0, then ƒ (∗

) δ is the area of the vertical strip ƒ (∗

) high and δ wide.

δ
y

y = ƒ ()


 = 0 ∗ b = n

Rb
The definite integral of ƒ () over [, b] is written as 
ƒ () d and is defined
as the limit of the sum of the ƒ (∗

) δ as n → ∞ and δ → 0. That is
Z b =n−1
X
ƒ () d = lim ƒ (∗

) δ (13.1)
n→∞
 =0

if this limit exists.

ƒ () δ.
P
We will usually write the sum in Equation 13.1 informally as limδ→0
Rb
If ƒ () ≥ 0 for all  in [, b], then the value of 
ƒ () d is the area bounded by
the -axis and the curve y = ƒ () between the lines  =  and  = b.

Example
Find the value of the following definite integral, using geometry
Z 2
( + 1) d
1

46
The Fundamental Theorem of Calculus tells us that if ƒ () is a continuous func-
dF
tion on [, b], and F() is any function such that d
= ƒ (), then
Z b
ƒ () d = F(b) − F() (13.2)

dF
If d
= ƒ (), then F() is called the indefinite integral of ƒ ()

An indefinite integral is a function. A definite integral is a value.

The fundamental theorem of calculus can be explained informally by the following


b =n−1 =n−1 dF(∗ )
Z X X

ƒ () d = lim ƒ (∗

) δ = lim δ
n→∞ n→∞ d
 =0 =0
=n−1
X F( + δ) − F( ) =n−1
X
= lim δ = lim F(+1 ) − F( )
n→∞ δ n→∞
=0 =0

= [F(n ) − F(n−1 )] + [F(n−1 ) − F(n−2 )] + . . . + [F(1 ) − F(0 )]

= F(n ) − F(0 ) = F(b) − F()

The fundamental theorem 13.2 provides us with another method of evaluating def-
inite integrals of some functions - we simply find the indefinite integral, evaluate it
at the endpoints of the interval and subtract.

Example
Find the value of the following definite integral, using the fundamental theorem of
calculus
Z2
( + 1) d
1

Rb
If ƒ () is negative for some of the values of  in [, b], then the value of 
ƒ () d
is the difference between the areas above and below the -axis.

47
13.1.2 Application

Integrals are useful for finding areas, and in engineering they have many other
practical applications when they are regarded as a limit of a sum of small elements.
For example, suppose a thin wire is positioned along the -axis between the points
 =  and  = b.

If the wire has varying line density [kgm−1 ], given by ρ() at the point , then
to find the total mass of the wire, we can divide the wire into n short sections of
equal length δ = (b − )/ n. The mass of the short section at the point  is
approximately

δM = ρ() δ (13.3)

The total mass M of the wire is approximated by the sum of masses of the short
sections
X X
M≈ δM = ρ() δ (13.4)
P
As n → ∞, the lengths δ → 0 and δM → M.

The total mass of the wire is equal to the integral

X Z b
M = lim ρ() δ = ρ() d (13.5)
n→∞

We can evaluate the integral geometrically or using the fundamental theorem of


calculus (13.2).

Example
A thin wire 10 m long of variable density is lying straight along the -axis between
the points  = 1 and  = 11, where -axis units are metres. Calculate the mass
of the wire if the line density of the wire at the point  is given by ρ() = 0.024 +
0.001. The units of line density are [kgm−1 ].

Z Z 11
M= ρ d = (0.024 + 0.001) d
1

48
13.1.3 Length of a Curve

The length of a curve y = y() between  and  + δ is given approximately by:


v v
 2  2
δy δy
q u u
δs ≈ δ2 + δy 2 = δ2 (1 + )= 1+
t t
δ (13.6)
δ δ

and the total length of the curve is


v
 2
X Xu δy
δs = 1+
t
s≈ δ (13.7)
δ
so
v v
2 2
δy dy
Xu  Z u 
s = lim 1+ δ = 1+
t t
d (13.8)
δ→0 δ d
Example
Find the length of the parabola y = 2 between (0, 0) and (2, 4).

49
13.1.4 Improper Integrals

In an improper integral, there is not an equivalent area which is fully bounded by


-axis, the curve and the limits  =  and  = b. The area is unbounded either in
the − or y−direction (or both). There are two main types of improper integrals,
they are

1. definite integrals on infinite intervals (unbounded in the −direction), e.g.


R∞
1
e− d

2. definite integrals of unbounded functions (unbounded in the y−direction), e.g.


R1 1
0 
d

We will only consider the first type here - definite integrals on infinite intervals.
R∞
The improper integral 
ƒ () d is defined as
Z ∞ Z b
ƒ () d = lim ƒ () d (13.9)
 b→∞ 

provided that this limit exists.

Example
R∞ 1 Rb 1
1  2 d = lim b→∞ 1 2
d =
y

Example
R∞ 1 Rb 1
1 
d = lim b→∞ 1 
d =
y

50
13.1.5 Integrating Vectors

To integrate vectors, we simply integrate the components individually.


Engineering Example (Electromagnetism)
Using Coulomb’s law, calculate the electrostatic force experienced by a charge of
+1 [C], at a distance c [m] from an infinite line of charge, where the charge per unit
length is λ [C m−1 ].

Force on charge at (0, c) due to charge between  and  + δ:

Total force on charge at (0, c) due to infinite line of charge:

Horizontal component of total force:

Vertical component of total force:

Total force experienced by the charge at (0, c) due to the infinite line of charge
along the −axis:

51
13.2 Double Integrals

13.2.1 Double Integration over a Rectangle

Let ƒ (, y) be a function of the two independent variables  and y defined on a


rectangle

R = [, b] × [c, d] = {(, y) ∈ R2 :  ≤  ≤ b, c ≤ y ≤ d}

Divide the interval [, b] into m subintervals [−1 ,  ] of equal width δ = (b −


)/ m, and the interval [c, d] into n subintervals [yj−1 , yj ] of equal width δy =
(d − c)/ n. Then R can be divided into mn subrectangles [−1 ,  ] × [yj−1 , yj ],
each of area δA = δδy.

Now choose mn sample points (∗


j
, yj∗ ), one in each sub-rectangle. Then the
double integral of ƒ over R is defined as the limit of the double sum
Z =m
XX j=n
ƒ (, y) dA = lim ƒ (∗
j
, yj∗ ) δA (13.10)
m,n→∞
R =1 j=1

if this limit exists.

z = ƒ (, y)

δV = ƒ (, y)δδy
=y=c δA = δδy
y=d
=b

If ƒ (, y) ≥ 0 for all (, y) in R, then each ƒ (∗


j
, yj∗ ) δA is the volume of a vertical
column, with base area δA and height ƒ (∗ ∗ ). Therefore ƒ (, y) dA as
R
j
, y j R
defined in (13.10) is the total volume bounded above by the surface z = ƒ (, y),
below by the plane z = 0, and on the sides by the planes,  = ,  = b, y = c and
y = d.

52
We can express a double integral as an iterated integral, then evaluate it using
partial integration.
=b Z y=d =b y=d
Z Z Z –Z ™
ƒ (, y) dA = ƒ (, y) dyd = ƒ (, y) dy d
R = y=c = y=c
(13.11)

First we evaluate the integral inside the brackets with respect to y, keeping  fixed.
R y=d
This is called partial integration. For each fixed value of , y=c ƒ (, y) dy is
the area bounded above by z = ƒ (, y), below by z = 0 and at the sides by
y = c and y = d. The volume of the thin slab with width δ indicated below is
hR i
y=d
y=c
ƒ (, y) dy δ. Then when we integrate with respect to  we have the total
volume bounded by the surfaces z = ƒ (, y), z = 0,  = ,  = b, y = c, y = d.

z = ƒ (, y)

y=c
y=d
=b

Alternatively we can express the double integral as


Z Z y=d Z =b Z y=d
–Z =b
™
ƒ (, y) dA = ƒ (, y) d dy = ƒ (, y) d dy
R y=c = y=c =
(13.12)

In this case we partially integrate with respect to  first keeping y fixed, then inte-
hR i
=b
grate with respect to y. The volume of the thin slab indicated below is = ƒ (, y) d δy.

z = ƒ (, y)

y=d
=b

53
Fubini’s theorem, stated in (13.13) below, tells us that (13.11) and (13.12) are the
same, so the order of integration does not matter. We often omit the ′  =′ and
′y =′ in the limits of the iterated integral if there is no loss of clarity.
Z Z bZ d Z dZ b
ƒ (, y) dA = ƒ (, y) dy d = ƒ (, y) d dy (13.13)
R  c c 

Example
Verify Fubini’s theorem for ƒ (, y) = 22 y and R = [0, 3] × [1, 2].

R =3 ”R y=2 —
=0 y=1
22 y dy d =

R y=2 ”R =3 —
y=1 =0
22 y d dy =

R
The value of the integral R
22 y dA is the volume of the region bounded above by

54
the surface z = 22 y, below by the plane z = 0, and on the sides by the planes
 = 0,  = 3, y = 1, y = 2.
R
Alternatively the value of R
22 y dA could represent the mass of a thin rectangular
plate of variable density occupying the y-plane between  = 0,  = 3, y = 1,
y = 2, where the area density at the point (, y) is given by 22 y. The units of
area density are kgm−2 .

Example
Evaluate the following double integral using geometry only
Z
ƒ (, y) dA
R
p
where R = [−1, 1] × [0, 3] and ƒ (, y) = 1 − 2

55
13.2.2 Double Integration over a General Region

We can extend the concept of a double integral over a rectangle (13.10) to a double
integral over a more general shape. Let ƒ (, y) be defined on a domain R.

If the region R is the subset of the y-plane bounded by the lines  =  and  = b
and curves y = g1 () and y = g2 (), then we can evaluate the double integral of
ƒ over R by forming the iterated integral below
Z Z =b Z y=g2 ()
ƒ (, y) dA = ƒ (, y) dy d (13.14)
R = y=g1 ()

z = ƒ (, y)

δV = ƒ (, y)δδy
= δA = δδy

=b
y = g1 ()
y = g2 ()

Example
ƒ dA where ƒ (, y) =  + 2y and R is the region bounded by the lines
R
Evaluate R
p
 = 0,  = 1, and the curves y =  and y =  − 1.

First sketch the domain of integration (the region over which we will integrate),
then form the iterated integral and evaluate.

R =1 hR y=p i
ƒ (, y) dA = ( + 2y) dy d
R
R =0 y=−1

56
Example
ƒ dA where ƒ (, y) =  + 2y
R
Sketch the domain of integration then evaluate R
and R is the region bounded by the parabolas y = 22 and y = 1 + 2 .

These examples had constant  limits, but the y limits depended on . Fubini’s
theorem does not apply, and the order of integration is important. Other regions
might be expressed differently, for example if R lies between two lines y = c and
y = d and curves  = h1 (y) and  = h2 (y). In that case we would evaluate
the double integral over R by forming an iterated integral which requires integration
with respect to  first.
Z Z y=d Z =h2 (y)
ƒ (, y) dA = [ ƒ (, y) d] dy (13.15)
R y=c =h1 (y)

For some regions the double integral can be iterated either way (i.e. with respect
to x then y, or with respect to y and then x).

Example
ƒ dA where ƒ (, y) = 1 and R is the triangle with corners at (0, 0),
R
Evaluate R
(0, 1) and (1, 0). Verify that you get the same result (which is simply the area of
the triangle) if you integrate with respect to  first, or with respect to y first.

Some regions need to be split up into subregions in order to integrate over them.

57
13.2.3 Moments of Area

The n-th moments of area of a region in the xy-plane about the x-axis and y-axis
respectively are defined as the double integrals
Z Z
y n dA and n dA (13.16)
R
The zero-th moment of area is dA and is simply the area of the region.

Example
dA to find the are of R, the region bounded by the lines  = 0,  = 1,
R
Evaluate R
p
and the curves y =  and y =  − 1.

Example
If a thin plate in a region in the y-plane has area density ρ(, y) [kgm−2 ], the
coordinates of the centre of gravity (an imaginary point where, for convenience
in certain calculations, the total weight of the plate can be considered to act) are
(̄, ȳ) where
Z Z Z Z
̄ gρ dA = gρ dA and ȳ gρ dA = gρy dA (13.17)

R R
ρ dA ρy dA
̄ = R and ȳ = R (13.18)
ρdA ρdA

58
Note that if ρ(, y) is constant, then the centre of gravity is equal to the centroid,
or centre of area of the region.
R R
 dA y dA
̄ = R and ȳ = R (13.19)
dA dA

These are the first moments of area divided by the zero-th moment.

Second moments of area (moment of inertia) are important in stress analysis of


bending, and are about the x-axis and y-axis respectively
Z Z
 = y 2 dA and y = 2 dA (13.20)

Example
Find the second moment of area of a rectangular cross-section width b height h.

[If XX is an axis through the centroid (̄, ȳ) which is parallel to the -axis, the
parallel axis theorem of stress analysis tells us that

 = XX + Ad2 (13.21)

Where d is the perpendicular distance between XX and the -axis, and A =


R
dA
is the area.]

59
13.3 Triple Integrals

13.3.1 Triple Integration over a Cuboid

Let ƒ (, y, z) be a function of the three independent variables , y, z defined on a


cuboid:

R = [, b]×[c, d]×[g, h] = {(, y, z) ∈ R3 :  ≤  ≤ b, c ≤ y ≤ d, g ≤ z ≤ h}

Divide the interval [, b] into m subintervals [−1 ,  ] of equal width δ = (b −


)/ m, and the interval [c, d] into n subintervals [yj−1 , yj ] of equal width δy =
(d − c)/ n and the interval [g, h] into p subintervals [zk−1 , z − k] of equal width
δz = (h − g)/ p. So the cuboid R can be divided into mnp subcuboids [−1 ,  ] ×
[yj−1 , yj ] × [zk−1 , zk ], each of volume δV = δδyδz.

Now choose mnp sample points (∗


jk
∗ , z ∗ ), one in each subcuboid. Then the
, yjk jk
triple integral of ƒ over R is defined as the limit of the triple Reimann sum
Z =m
XX j=n k=p
X
ƒ (, y, z) dV = lim ƒ (∗
jk

, yjk ∗
, zjk ) δV (13.22)
m,n,p→∞
R =1 j=1 k=1

if this limit exists.

Triple integrals can be evaluated in the same way as double integrals - either by
using geometry (if possible), or by forming the iterated integral and then partially
integrating with respect to the different variables.

Unfortunately we live in 3D space (not 4D), so the triple integral of a function over
a cuboid does not in general have a simple geometric interpretation similar to the
double integral of a function over a rectangle (which we can interpret as a volume
if the function is positive). The exception is when the function being integrated is
ƒ (, y, z) = 1, in which case the triple integral R dV is simply the volume of the
R

cuboid.

60
13.3.2 Triple Integration over a General Region

The concept of the triple integral over a cuboid can be extended to a triple integral
over a more general 3D shape. Let ƒ (, y, z) be defined on a domain R.

If the region R is the subset of 3D space between two planes  =  and  = b and
surfaces y = g1 (), y = g2 () and z = G1 (, y), z = G1 (, y) as shown below,
then we can evaluate the triple integral R ƒ (, y, z) dV of ƒ over R by forming the
R

iterated integral and integrating partially with respect to z then y then .


Z Z =b Z y=g2 () Z z=G2 (,y)
ƒ (, y, z) dV = ƒ (, y, z) dz dy d (13.23)
R = y=g1 () z=G1 (,y)

If the function ƒ (, y, ) gives the density of R, then ƒ (, y, z) dV is the mass of
R
R
R.

If ƒ (, y, ) = 1, then ƒ (, y, z) dV =


R R
R R
dV is simply the volume of V.

z y
z = G2 (, y)
z = G1 (, y)
y = ƒ2 ()
y = ƒ1 ()
a
b 

61
Examples

Let ρ(, y, z) be the density [kgm−3 ] of a solid object occupying a 3D region, D.


We can integrate ρ over D to find the mass of the object M = D ρ dV. Form the
R

iterated integral for the following three different regions D (but do not evaluate).

1. D = [1, 2] × [2, 3] × [0, 1]


Z Z = Z y= Z z=
M= ρ dV = ρ(, y, z) dz dy d
D = y= z=

2. D is the region bounded above by the plane 2 + 3y − z = 0, below by the


plane  + y − z = 0, and on the sides by the planes  = 2,  = 3 and the
surfaces y =  and y = 2 .
Z Z = Z y= Z z=
M= ρ dV = ρ(, y, z) dz dy d
D = y= z=

3. D is the region bounded by the surfaces z = 8 − 2 − y 2 and z = 2 + 3y 2 .


Z Z = Z y= Z z=
M= ρ dV = ρ(, y, z) dz dy d
D = y= z=

10 z 10
z = 2 + 3y 2
8 8

z = 8 − 2 6
− y2 6
4 4
2 2
2 2
−2 −1 x −2 −1 
1 2 1 2
−2 −2

62
The intersection of the two surfaces needs to be considered

10 z
8
6
4
y
2
2
−2 −1 x
1 2
−2

The projection of the intersection onto the y-plane is used to determine the  and
y limits

10 z
8
6
4
y
2
2
−2 −1 x
1 2
−2

In these examples, the z limits depend on  and y, the y limits depend on , and
the  limits are constants, so we are able to form the iterated integral as in 13.23.
For other 3D regions there may be different dependencies, or it may be necessary
to split the region into subregions in order to form the iterated integral.

63
13.3.3 Integration in Cylindrical Polar Coordinates

Recall the conversion betwen Cartesian and Cylindrical Polar coordinates

 = r cos θ y = r sin θ z=z (13.24)


q y
r = 2 + y 2 θ = tn−1 z=z (13.25)

where r ≥ 0, 0 ≤ θ < 2π.

In Cartesian coordinates we have

δA = δδy δV = δδyδz

In cylindrical polars we have

δA = rδrδθ δV = rδrδθδz

Let the polar rectangle, R, be the region given by  ≤ r ≤ b, α ≤ θ ≤ β.

Then the integral of ƒ over the polar rectangle, R, is given by


Z Z βZ b
ƒ dA = ƒ (r cos θ, r sin θ) rdrdθ (13.26)
R α 

64
Example

ƒ dA using polar coordinates, where ƒ (, y) = +2y and R is the polar


R
Evaluate R
rectangle in the first quadrant bounded by the circles 2 + y 2 = 1 and 2 + y 2 = 4.

First sketch the domain of integration, then express the iterated integral in polar
coordinates, then evaluate.

As in Cartesian coordinates, the limits of integration when using polar coordinates


do not have to be constants. It could be that part boundary of the domain can be
expressed with R as a function of θ, or θ as a function of r, or the domain might
need to be subdivided.

Example
ƒ dA using polar coordinates, where ƒ (, y) =  + 2y and R is the 2D
R
Evaluate R
region bound by the lines  = 1, y = 1 and y = 1 − .

65
Engineering Example (Area Integration in Fluid Mechanics)
Consider laminar, fully-developed fluid flow in a pipe. According to the Hagen-
Poiseuille Law, the axial velocity profile is parabolic:
  r ‹2 
(r, θ) = Um 1 −
R
where Um is the velocity at r = 0 (pipe centreline) and R is the pipe radius. Write
an expression for the mass flow rate where ρ is density.

66
Integration learning outcomes

You should now be able to


R
1. Integrate functions of one variable, ƒ d, over a finite or infinite interval

2. Integrate vectors (by integrating the components individually)


R
3. Evaluate double integrals, ƒ dA, over a rectangle or a more general bounded
region in the z = 0 plane
R
4. Evaluate triple integrals, ƒ dV, over a cuboid or a more general bounded
region in 3D space

5. Evaluate integrals geometrically (no calculus required)

6. Sketch domains of integration

7. Explain (using sketches and/or words) why for a region R


R
• if ƒ ≥ 0 then R
ƒ d is area

• if ρ is line density [kgm−1 ], then R ρd is mass


R

R
• if ƒ ≥ 0, then R ƒ dA is volume

• if ƒ = 1, then R ƒ dA can be interpreted as area or volume


R

• if ρ is area density [kgm−2 ], then R ρdA is mass


R

R
• if ƒ ≥ 0, then R ƒ dV does not have a geometric interpretation (unless
ƒ = 1)

• if ƒ = 1, then
R
R
ƒ dV is volume

• if ρ is volume density [kgm−3 ], then


R
R
ρdV is mass

8. Evaluate integrals using Cartesian or cylindrical polar coordinates

67
13.4 Problems: Integration

1. Use integration with the substitution  = c sinh t to show that


d 
Z
3
= p +K
2 2 + c2
( + c )
2 2 2 c

(Hint: cosh2 t − sinh2 t = 1 and coth2 t − 1 = cosech2 t)


p
5 p
2. Calculate the length of the curve y = ln , between  = and  = 3.
2
(Substitution hint for the integration: let 2 = 1 + 2 .)

 sin y dA, where the domain of integration is [1, 4] × [0, π6 ].


R
3. Evaluate
Verify Fubini’s theorem for this integral by integrating wth respect to  first
and with respect to y first.

4. For each of the following, first sketch the domain of integration then evaluate
the integral
RπR R π R sin 
(a) 0 0
 sin y dy d (b) 0 0
y dy d

5. Use double integration to find the area bounded by the parabolas y = 6− 2
and y = 2 − 2.

6. Show that the area enclosed by the ellipse (/ )2 + (y/ b)2 = 1 is πb. If a
sheet of uniform material occupies the part of the ellipse that lies in the first
quadrant, find its centre of gravity.
(Hint: when integrating to find the area, use the substitution  =  sin )

7. Find the second moment of area about the -axis of the region bounded by
the lines y = 0,  = 0,  = 1 and the curve y = e .
(Optional extra: check you get the same result if you first find the y-component
of the centre of mass, then find the second moment of area about the neutral
axis and apply the parallel axis theorem).
R1RzRy
8. Evaluate 0 0 0
yz ddydz

9. Use triple integration to find the volume of the solid whose base is the region
in the y-plane that is bounded by the parabola y = 4 − 2 and the line
y = 3, while the top is bounded by the plane z =  + 4.

68
10. By triple integration, find the volume common to the two cylinders 2 + y 2 =
2 and 2 + z 2 = 2 .

11. Sketch the domain of integration for the following double integral. Evaluate
the integral in Cartesian coordinates then verify that you get the same result
if you first convert to polar coordinates.
Z 2Z 
y dy d
0 0

Answers

1. e3 − 1
8.  = = 2.12
1 5 9
 
2. 1 + ln = 0.755 e+1
2 3 (Optional: y = = 0.930,
p 4
3. 15
(2 − 3) e3 − 1 (e2 − 1)(e + 1)
4 XX = − =
9 16
4+ π2 π 0.636, area = e − 1 = 1.72)
4. (a) (b)
2 4
64 1
9. 48
5.
3
4 625
6. 10.
3 12

4 4b 163
 
7. , 11.
3π 3π 3

69
14 VECTOR CALCULUS

Our study of vector calculus includes finding the grad, div and curl of scalar and
vector fields, and explaining the physical meaning of these concepts.

Figure 1: Positive div? Figure 2: Positive curl?

We will be able to describe and use the following three fundamental theorems
of vector calculus, and we will discuss the connection between Green’s theorem
and Stokes’ theorem.

The fundamental theorem of calculus for line integrals


Z
∇ ϕ · dr = ϕ(b) − ϕ()
C

The divergence theorem


Z I
∇ · A dV = A · n̂ dS
V S

Stokes’ theorem
Z I
∇ × A · n̂ dS = A · dr
S C

We will also start to explore the concept of conservative vector fields.

70
14.1 Parametric Representations of Lines and Length of a Curve

By then end of this section you should be able to

• write parametric representations of lines

• sketch lines, given their parametric representations

• find an expression for a tangent vector to a curve

• find the length of a curve using a line integral

14.1.1 Parametric Representation of Lines

A line (also called paths or curves) is a one-dimensional object in three-dimensional


space. Lines can be represented parametrically using a vector function (dependent
variable) with a single parameter (independent variable).
 
(t)
 
r(t) = (t)i + y(t)j + z(t)k =  y(t) 
 where  < t < b
z(t)

The functions (t), y(t) and z(t) give the Cartesian coordinates of the points
on the line, and they all depend on the parameter, t. (Usually t is used as the
parameter, even though it is often not representing time in this section). r(t) is
vector function, and it gives the position vectors of points on the line. The domain
of the vector function can be restricted to an interval (, b) of R, or can be all of R.

We usually assume that t increases over the given interval  < t < b, which
naturally orients the line. One method of the reversing the orientation is to replace
t with  + b − t.

71
Example

A helix from from (1, 0, 0) to (1, 0, 1).


t
r(t) = cos ti + sin tj + k where 0 < t < 2π

z

Example
A helix from from (1, 0, 1) to (1, 0, 0)
2π − t
r(t) = cos(2π − t)i + sin(2π − t)j + k where 0 < t < 2π

t
= cos ti − sin tj + (1 − )k

z

Example
A straight line from (−1, 1, 1) to (2, 1, 5).
   
   
r(t) = (−1 + 3t)i + j + (1 + 4t)k = 

+ t 
 

 where 0 < t < 1

72
14.1.2 Tangents to a Curve

Consider a curve with parametric representation r(t) = (t)i + y(t)j + z(t)k. The
derivative of r(t) with respect to t is
dr r(t+δt)−r(t)
dt
= limδt→0 δt
[((t+δt)i+y(t+δt)j+z(t+δt)k]−[(t)i+y(t)j+z(t)k]
= limδt→0 δt
[((t+δt)−(t)]i+[y(t+δt)−y(t)]j+[z(t+δt)−z(t)]k
= limδt→0 δt
d dy dz
= dt
i + dt j + dt k

So we differentiate a parametric representation by differentiating the individual


dr
component functions (t), y(t) and z(t). We will now show that dt
is tangent
to the curve. Let δr = r(t + δt) − r(t)

δr = r(t + δt) − r(t)

r(t) r(t + δt) δr is a small vector from r(t) to r(t + δt)

δr r(t+δt)−r(t)
δt
= δt

δr
δt
is a vector in the same direction as
r(t) r(t + δt) δr, but it is longer than δr (because δt
is small).

dr
dt

δr
As δt → 0, the vector δt
becomes tan-
r(t)
gent to the curve.

73
Example
t
Find a tangent vector to the helix r(t) = cos ti+sin tj+ 2π at the point (−1, 0, 0.5)
z

1

2
−2 −1 
1
2
−2

Example
Find an expression, in terms of the parameter t, for a unit tanget to the helix r(t) =
t
cos ti + sin tj + 2π
k

74
14.1.3 Vector Elements and Line Elements

If a line has parametric representation r(t) = (t)i + y(t)j + z(t)k, then a small
vector approximately along the line is given by

δr = r(t + δt) − r(t)

As δt → 0, the small vector δr becomes infinitesimal and it is called a vector


element, dr. We can obtain an expression for the vector element in terms of the
parameter

δr δr  dr
    ‹
dr = lim δr = lim δt = lim lim δt = dt
δt→0 δt→0 δt δt→0 δt δt→0 dt
where dt is an infinitesimal change in t.

δr = r(t + δt) − r(t) dr


dt
tangent vector
dr
dr = dt
dt
vector element
r(t) r(t + δt) r(t)

0 0

The line element, ds, is the length of the vector element, dr. It can also be
expressed in terms of the parameter t
v v v
t d 2 dy 2
 2
t dr dr t dr dr dz
p u u u   
ds = |dr| = dr · dr = dt · dt = · dt = + + dt
dt dt dt dt dt dt dt
Example
t
For the helix r(t) = cos ti + sin tj + 2π
k we have

dr 1
dr = dt = (sin ti − cos tj + k) dt
dt 2π
and
v
1
u
ds = 1+
t
dt
4π 2

75
14.1.4 Line Integral to Find the Length of Curve
R
For a curve C, the line integral C
ds is the total of the line elements and gives
the total length of the curve. If C is has parametric representation r(t) = (t)i +
y(t)j+ z(t)k where  < t < b, and it is a smooth curve ( dr
dt
is continuous and non-
zero), then the line integral can be written in terms of the parameter t to compute
the length
v
t d 2
t=b u 2 2
dy dz
Z Z   
ds = + + dt
C t= dt dt dt

Example
The length of the helix with parametic representation
t
r(t) = cos ti + sin tj + k where 0 < t < 2π

R t=2π r 1
r
1
p
ds = 1+ = 2π 1+ = 4π 2 + 1
R
is C t=0 4π 2
dt 4π 2

Example
Find the length of the arc which is a quarter of the circle 2 + y 2 = R2 between
(R, 0) and (0, R), using the parametric representation below (based on polar co-
ordinates)
π
r(t) = R cos t i + R sin t j 0<t<
2

76
14.2 Line Integrals

By the end of this section you should be able to

• find the line integral of a scalar field

• find the line integral of a tangential component of a vector field, and use this
to calculate work done by a force field moving a particle along a given path

• find the line integral of the normal component of a vector field, and use this to
calculate volumetric flow rate across a given boundary

14.2.1 Scalar and Vector Fields

A scalar field is an assignation of a scalar value to every point in a spatial domain.

A vector field is an assignation of a vector to every point in a spatial domain.

Scalar and vector fields are defined over spatial domains – for example all of 3D
space, or any subset of 3D space such as a 3D region (a volume), a 2D region (a
surface), or a1D region (a line/curve).

Scalar and vector fields are physical concepts that exist independently of mathe-
matical functions or coordinate systems.

14.2.2 Line Integral of a Scalar Field

Consider a wire of non-uniform density along a curve in 3D space C and let ρ be


the line density (in kgm−1 ) of the wire. (ρ is a scalar field and the domain is just
the 1D curve). The mass of a short section of wire of length δs is δM = ρ δs.

The total mass M of the wire is approximately the sum of these small masses over
the whole of the wire
X X
M≈ δM = ρ δs
C C

77
As the length of each δs reduces to zero, δs → ds, and the sum becomes an
integral
X Z
M = lim ρ δs = ρ ds
δs→0 C
C

If the curve C line has a parametric representation r(t) = (t)i + y(t)j + z(t)k,
and if ρ can be defined as a function of Cartesian coordinates ρ = ρ(, y, z), then
R
C
ρ ds can be expressed as an integral with respect to t
v
t d 2
t=b 2 2
dy dz
Z Z u   
M= ρ ds = ρ((t), y(t), z(t)) + + dt
C t= dt dt dt
Example
Calculate the mass of a wire of varying density: wire arc from (0,-2) to (0,2) centred
at (0,0) with density ρ(, y) = y 2
π π
r(t) = 2 cos ti + 2 sin tj where − <t<
2 2

In general, for any scalar field ϕ and curve C, the line integral of ϕ over C is
defined as
Z
ϕ ds (14.1)
C

If ϕ is defined by a scalar function ϕ(, y, z) and C has parametrization r(t) =


(t)i + y(t)j + z(t)k where  < t < b, then
v
t d 2 dy 2
Z t=b  2
dz
Z u   
ϕ ds = ϕ((t), y(t), z(t)) + + dt (14.2)
C t= dt dt dt

For the constant function ϕ(, y, z) = 1, the line integral ϕ ds =


R R
C C
ds is simply
the length of the line.

78
14.2.3 Tangential and Normal Components of a Vector Field

Many concepts in vector calculus concern the interaction of a scalar or vector field,
and a 3D, 2D or 1D object such as a volume, surface or curve. The object can be
solid and tangible, or imaginary (e.g. a control volume or control surface). In the
remainder of this section we will be considering the interaction of a vector field and
a curve.

Let A be a 3D vector field for which the domain includes a curve C. At each point
along the curve C, the vector can be resolved into a component which is tangential
to the curve at that point, and a component which is normal to the curve at that
point.

A = (A · t̂) t̂ + (A · n̂) n̂

79
14.2.4 Line Integral of the Tangential Component of A Vector Field over a
Curve

Consider a particle being moved along a curve C with parametric representation


r(t), by a variable force field F = F(, y, z). The work done by the force field to
move the particle along each vector element dr is

F · dr

(See applet [Link]


introduction)

The total work done moving the particle along the curve is
Z
W= F · dr (14.3)
C

Everything can be expressed in terms of the parameter t to evaluate


t=b
dr(t)
Z
W= F((t), y(t), z(t)) · dt (14.4)
t= dt
Note that
dr Á dr dr dr
t̂ = and ds = |dr| = dt = dt therefore dr = t̂ ds
dt dt dt dt

In general, the line integral of the tangential component of the vector field A
over the curve C is defined as
Z Z
A · t̂ ds which is the same as A · dr
C C

80
If the curve is a closed curve / loop, then it is conventional to evaluate the integral
H
in the anti-clockwise direction. This is denoted , and
I
A · dr (14.5)
C

called the (macroscopic) circulation of the vector field A around the curve C.
Example
Let A be the vector field A(, y, z) = −yi + 32 j and let C be the anti-clockwise
closed ellipse with parametric representation
p
r(t) = cos ti + 2 sin tj with 0 < t < 2π
H
Estimate if C
A·dr, the macroscopic circulation of A around C is positive, negative
or zero from the figure below, then check your estimate by evaluating the integral.
y

1
C
x
−2 −1 1 2

−1

−2

81
14.2.5 Line Integral of the Normal Component of a Vector Field over a Curve
(xy-plane only)

Let v = v(, y) be the velocity vector of a fluid at point (, y), and let C be a
curve representing a control surface. Note that this technique only applies for a 2D
model, that is one which is completely uniform in the z-direction. Both the flow and
the control surface do not change in the z-direction.
Then the volumetric flow rate [m2 s−1 ] of fluid crossing a line element, ds, is

v · n̂ ds (14.6)

where n̂ is a unit normal to the curve. (Note that the volumetric flow rate is given
in m2 s−1 . To find total flow rate in m3 s−1 it would be necessary to multiply by the
length of the control surface in the z-direction.)

The total volumetric flow rate [m2 s−1 ] of fluid crossing the curve is given by
.
Z
Q= v · n̂ ds (14.7)
C

In general, the line integral of the normal component of the vector field A over
the curve C is defined as
Z
A · n̂ ds (14.8)
C

This is also known as the flux integral of A over C. (Later in section (14.6.6) we
will study the flux integral of a vector field over a surface.)

82
If the curve has parametric representation r(t) = (t)i + y(t)j + z(t)k where
 < t < b, then everything can be expressed in terms of the parameter t to
evaluate
Z Z t=b
A · n̂ ds = A((t), y(t), z(t)) · n̂ ds (14.9)
C t=

An expression for n̂ can be found by finding normal vector below, and then dividing
it by its magnitude.

dy d
n(t) = i− j (14.10)
dt dt
If C is closed curve, then the outward pointing normal must be selected (check this
by inspection), otherwise the direction of n̂ should be determined by the specific
problem.
Example
Let A be the vector field A(, y, z) = −yi + 32 j and let C be the anti-clockwise
closed ellipse with parametric representation
p
r(t) = cos ti + 2 sin tj with 0 < t < 2π
H
Estimate if C
A · n̂ds the flux integral of A over C is positive, negative or zero, then
check your estimate by evaluating the integral.
y

1
C
x
−2 −1 1 2

−1

−2

83
14.2.6 Line Integrals of Components of Vector Fields Examples

Evaluate the line integral of the tangential and normal component of the two vector
fields, v1 and v2 below, over the anti-clockwise circle C of radius 5 centered at
(0, 0). Before evaluating the integrals, estimate if they will be positive, negative
or zero.
dr
To evaluate the integrals you first need to find expressions for r(t), dt
, dr, ds, n
and n̂. For a closed curve it is conventional to use the outward-pointing normal.

v1 (, y) = 3i + 3yj v2 (, y) = 2yi − 2j


y y
6 6

4 4

2 2
C x C x
−6 −4 −2 2 4 6 −6 −4 −2 2 4 6

−2 −2

−4 −4

−6 −6

= v · dr = = v · dr =
H H H H
C
v 1 · t̂ ds C 1 C
v 2 · t̂ ds C 2

v · n̂ ds = v2 · n̂ ds =
H H
C 1 C

84
14.2.7 Summary

Let the curve C be represented by r(t) = (t)i + y(t)j + z(t)k where  < t < b.
Let ϕ(, y, z) be a scalar function and let A(, y, z) be a vector function.

• The line integral of ϕ over C is


v
t=b
t dr dr
Z Z u
ϕ ds = ϕ((t), y(t), z(t)) (t) · (t) dt
C t= dt dt

For example the mass of a wire of varying density can be evaluated using the
R
line integral of the density function C ρ ds.
If ϕ = 1 then C ϕ ds = C ds = is the length of C.
R R

• The line integral of the tangential component of A over C is


Z Z
A · t̂ ds, this is usually written as A · dr
C C
R
For example if F is a force field, then C
F · dr is the work done by F moving
a particle along C.
H
If C is a closed curve (loop), this integral is denoted C
A · dr and is called
the (macroscopic) circulation of A around C.
H
For example if v is a fluid velocity field, the macroscopic circulation C
v · dr
is a measure of the tendancy of the fluid to move around C.

• The line integral of the normal component of A over C is


Z
A · n̂ ds
C

This integral is only relevant for 2D applications (or 2D representation of 3D


applications), so we must have z(t) = 0.
R
For example if v is a fluid velocity field, then C v · n̂ ds is the volumetric flow
R
rate across C. If ρ is density then C ρv · n̂ ds is the mass flow rate across C.
If C is a closed curve, it is conventional to select the outward-pointing normal.

85
14.3 Grad

By the end of this section you should be able to

• know the physical definition of the grad of a scalar field

• find ∇ ϕ for a scalar function

• find the rate of change with respect to distance of a scalar function in a given
direction

• expain why ∇ ϕ is the same as the physical definition of grad

• expain why ∇ ϕ is normal to level surfaces of ϕ

14.3.1 Grad of a Scalar Field

The grad of a scalar field is defined as the vector field such that

• the vectors point in the direction of maximum increase of the scalar field

• the magnitude of each vector is the rate of increase with respect to distance
of the scalar field in that direction.

The grad vectors of a scalar field are a vector field, sometimes called a gradient
field.

86
14.3.2 The Gradient of a Scalar Function

The vector differential operator, del, (also called nabla), is defined as


 

∂
∂ ∂ ∂
∂
 
∇= i+ j+ k=  ∂y 
∂ ∂y ∂z

∂z

Nabla can operate on scalar and vector fields to find special kinds of derivatives,
namely the grad, divergence and curl.

Nabla operates on a scalar function ϕ(, y, z) as follows


∂ ∂ ∂
 
∇ϕ = i+ j+ k ϕ
∂ ∂y ∂z
∂ϕ ∂ϕ ∂ϕ
= i+ j+ k
∂ ∂y ∂z

We will show in 14.3.3 that the result is a vector which points in the direction of
maximum increase of ϕ and that its magnitude is the rate of increase in that direc-
tion. This is the same as the physical definition of grad of a scalar field given on
the previous page, so we usually say grad ϕ instead of nabla when referring to ∇ ϕ
. (Later we will see how nabla operates in different ways on vector fields to form div
and curl)

Examples (2D scalar functions)


For each of the scalar functions below, find an expression for ∇ ϕ, find ∇ ϕ at (0, 0),
(1, 0), (0, 1) and (1, 1) and sketch in the ∇ ϕ vectors.

Figure 3: ϕ(, y) = 3

87
Figure 4: ϕ(, y) = 2 + 3y 2

Figure 5: ϕ(, y) = y

Note that if ϕ is a function of just two spatial variables, that is if ϕ = ϕ(, y), the
∇ ϕ vectors are perpendicular to the contour lines (we will prove this later).

88
In the two examples below, on the left, the 2D scalar field is represented as a
surface z = ϕ(, y), so the value of the scalar field at a point is represented as
the height of the surface. On the right the scalar field is represented a contour plot,
and the grad vectors are shown. Note grad vectors point in the direction that is the
steepest way up the surface (i.e. in the direction of maximum increase of z). Their
length indicates how steep the surface is.
Example
2 −y 2 2 −y 2 2 −y 2
If ϕ(, y) = e− , then ∇ ϕ = (1 − 22 )e− i − 2ye− j. Note that
the stationary points of ϕ(, y) are the two points (± p1 , 0) where the ∇ ϕ vectors
2
∂ϕ ∂ϕ
disappear, that is where ∂
= ∂y
= 0.

2 −y 2
Figure 6: ϕ(, y) = e− and ∇ ϕ

Example
1 1
ϕ(, y) = (−1)2 +y 2
− (+1)2 +y 2

1 1
Figure 7: ϕ(, y) = (−1)2 +y 2
− (+1)2 +y 2
and ∇ ϕ

89
14.3.3 ∇ ϕ Points in the Direction of Maximum Increase

Let ϕ ba a scalar field and consider any curve in 3D space with parametric rep-
resentation r(t) = (t)i + y(t)j + z(t)k. When we are on the curve, we have
ϕ = ϕ((t), y(t), z(t)), and

dϕ ∂ϕ d ∂ϕ dy ∂ϕ dz
= + + (14.11)
dt ∂ dt ∂y dt ∂z dt
∂ϕ ∂ϕ ∂ϕ d dy dz
   
= i+ j+ k · i+ j+ k (14.12)
∂ ∂y ∂z dt dt dt
dr
= ∇ϕ · (14.13)
dt

Now if the curve is a simply a straight line through a point with position vector
 = 1 i + 2 j + 3 k in the direction ̂ = 1 i + 2 j + 3 k it has parametric
representation

r(t) =  + t ̂ = (1 + t1 )i + (2 + t2 )j + (3 + t3 )k

dr
and t is the distance on the line from . Furthermore, in this case dt
= ̂, so at
any point on the line,

dϕ dr
= ∇ϕ · = ∇ ϕ · ̂
dt dt

So along the straight line, dt
is the rate of change of ϕ with respect to distance,
and this is equal to ∇ ϕ · ̂.

Now at any point, ∇ ϕ · ̂ = |∇


∇ ϕ| cos γ, where γ is the angle between ∇ ϕ and ̂.
∇ ϕ| when cos γ = 1 and γ = 0, that is if ̂ is
This is a maximum and is equal to |∇
pointing in the same direction as ∇ ϕ .

∂ϕ ∂ϕ ∂ϕ
So ∇ ϕ = ∂
i + ∂y
j + ∂z
k points in the direction of maximum increase of ϕ, and
the rate of change of ϕ with respect to distance in that direction is |∇
∇ ϕ|.

Therefore we can conclude that our definition of ∇ ϕ using the nabla operator ∇ on
a scalar function ϕ(, y, z) of Cartesian coordinates is the same as the physical
definition of the gradient of a scalar field that we defined in 14.3.1.

90
14.3.4 Directional Derivatives

The rate of change of ϕ with respect to distance in the direction ̂ is ∇ ϕ · ̂, this is
called the directional derivative of ϕ in the direction ̂

Example
Find the rate of change of ϕ(, y, z) = 2 + y 2 with respect to distance in the
positive y direction.

Example
Find the rate of change of ϕ(, y, z) = 2 + y 2 with respect to distance (the direc-
tional derivative) at the point (1, 1, 0) in the direction i + j + 2k.

91
14.3.5 ∇ ϕ is Normal to Level Surfaces

Let ϕ(, y, z) be a scalar function. Then a level surface of ϕ is the set of points
which satisfy ϕ(, y, z) = k for some constant k. This is the 3D equivalent of a
contour line for a 2D scalar function ϕ(, y).

Examples
If ϕ1 (, y, z) = 2 + y 2 + z 2 then the level surfaces of ϕ1 are the surfaces of
spheres centred on the origin, e.g. 2 + y 2 + z 2 = 1, 2 + y 2 + z 2 = 2.

If ϕ2 (, y, z) =  then the level surfaces of ϕ2 are simply vertical planes, e.g.
 = 1,  = 2.
If a curve on the level surfaces has a parametric representation r(t) = (t)i +
dr dr
y(t)j + z(t)k, then dt
is tangent to the curve and therefore dt
is also tangent to
the surface. Also, it must be true that the functions (t), y(t) and z(t) satisfy

ϕ((t), y(t), z(t)) = k

so for all t we have



=0 (14.14)
dt
However, by the chain rule

dϕ ∂ϕ d ∂ϕ dy ∂ϕ dz
= + + (14.15)
dt ∂ dt ∂y dt ∂z dt
∂ϕ ∂ϕ ∂ϕ d dy dz
   
= i+ j+ k · i+ j+ k (14.16)
∂ ∂y ∂z dt dt dt
dr
= ∇ϕ · (14.17)
dt
dr
Combining (14.14) and (14.17) tells us that ∇ ϕ · dt
= 0, so ∇ ϕ is perpendicular
dr
to dt
which is tangent to the level surface. This holds for all curves on the surface
through a particular point, so at that point ∇ ϕ is normal to the level surface.

Examples
Evaluate and sketch some grad vectors for the level surfaces for ϕ1 (, y, z) =
2 + y 2 + z 2 and ϕ2 (, y, z) = 

92
14.4 Scalar Potentials and The Fundamental Theorem of Cal-
culus for Line Integrals

By the end of this section you should be able to

• find scalar potential functions (if they exist)

• apply the fundamental theorem of calculus for line integrals

• describe the concept of path independent line integrals

14.4.1 Scalar Potentials

If a vector field is a grad of a scalar field, then that scalar field is called a scalar
potential for the vector field. Some vector fields are gradients of scalar fields and
some are not.

Scalar potentials functions can be found (if they exist) using partial integration.

Examples
Find the scalar potential functions ϕ1 , ϕ2 , ϕ3 for the following vector functions (if
they exist)

• A1 (, y, z) = 2i + 2yj

• A2 (, y, z) = yi + j + 3k

• A3 (, y, z) = −yi + j

93
14.4.2 The Fundamental Theorem of Calculus for Line Integrals

Recall the fundamental theorem of calculus part 2 for a function of one variable
=b =b
dF
Z Z
d = dF = F(b) − F()
= d =

The fundamental theorem of calculus generalises to three spatial variables and


becomes the fundamental theorem of calculus for line integrals.

The fundamental theorem of calculus for line integrals

Let C be a smooth simple curve from point  to point b and let ϕ be a differen-
tiable scalar field whose gradient field ∇ ϕ is continuous on C. Then
Z
∇ ϕ · dr = ϕ(b) − ϕ()
C

A simple curve is one which does not intersect itself at any point, except possibly
the endpoints.

Considering a Cartesian coordinate system, we see that ∇ ϕ · dr is an exact differ-


ential since
   
∂ϕ
∂
d
∂ϕ ∂ϕ ∂ϕ  ∂ϕ   
dϕ = d + dy + dz =   · dy 
 ∂y    = ∇ ϕ · dr
∂ ∂y ∂z
∂ϕ
∂z
dz

So ∇ ϕ · dr is the infinitessimal change in ϕ due to an infinitesimal change in posi-


tion.

As we integrate over all of C, we are simply adding up all the dϕ, that is the infin-
tesimal changes in ϕ. The result is the total change in ϕ as we move from  to b,
that is ϕ(b) − ϕ()

94
14.4.3 Line Integrals of Tangential Compenent of Vector Fields with Scalar
Potential Functions

If a vector field A has a scalar potential function ϕ, it very straightforward to cal-


culate the line integral of the tangential component of A over any curve, since if
A = ∇ ϕ then
Z Z
A · dr = ∇ ϕ · dr = ϕ(b) − ϕ()
C C

Example
The scalar potential function for the gravitational force on a mass m located at point
(, y, z) due to a mass M located at the origin, is

mMG
ϕ(, y, z) = Æ
2 + y 2 + z 2

where G is the gravitational constant. This function is known as the gravitational


potential.

• Show that the magnitude of the gravitational force exerted by M on m is equal


mMG
to r2
, where r is the distance between m amd M.

• Find the work done by the gravitational field due to a mass M at the origin if it
moves a particle with mass m from the point (3, 4, 12) to the point (2, 2, 0).

95
14.4.4 Path Independence

A path independent line integral is a line integral where the value is the same,
irrespective of which path is taken between the endpoints.

Example
Find C F · dr the work done by the force field F(, y, z) = yi + j + 3k to move a
R

particle from (0, 0, 0) to (1, 1, 1) over two different curves:

Figure 8: The vector field yi + j + 3k and two curves from (0, 0, 0) to(1, 1, 1)

1. If C is the curved path r(t) = ti + t 2 j + t 3 k where 0 < t < 1

dr = (i + 2tj + 3t 2 k)dt
Z Z1
F · dr = (t 2 i + tj + 3k) · (i + 2tj + 3t 2 k)dt
C 0
Z 1 Z 1
2 2 2
= (t + 2t + 9t )dt = (12t 2 )dt
0 0

= [4t 3 ] 10 = 4 Joes

2. If C is the straight line r(t) = ti + tj + tk where 0 < t < 1

dr = (i + j + k)dt
Z Z1
F · dr = (ti + tj + 3k) · (i + j + k)dt
C 0
Z1 Z 1
= (t + t + 3)dt = (2t + 3)dt
0 0

= [t 2 + 3t] 10 = 4 Joes

96
We have considered only two different paths, but for this particular function F =
yi + j + 3k we would get the same result for C F · dr for any path at all from
R

(0, 0, 0) to (1, 1, 1). This is because our force field F has a differentible scalar
potential function,

ϕ(, y) = y + 3z

We can simply apply the fundamental theorem of calculus for line integrals and find
that the line integral of the tangential component of F over any curve C is
Z Z
F · dr = ∇ ϕ · dr = ϕ(1, 1, 1) − ϕ(0, 0, 0) = 4 − 0 = 4
C C

97
If any vector field A has a differentible scalar potential ϕ, then the line integral of
the tangential component of A over any curve C only depends on the value of ϕ at
the endpoints  and b of C, and does not depend on the path that the curve takes
between the points, so it is path independent.
Z Z
A · dr = ∇ ϕ · dr = ϕ(b) − ϕ()
C C

Furthermore, if a vector field has a scalar potential, then the macroscopic circu-
lation around any loop (closed curve) is always zero, since
I I
A · dr = ∇ ϕ · dr = ϕ(b) − ϕ() = 0
C C

98
14.4.5 A Vortex Field

y 
Let A = − 2 +y2 i + 2 +y 2
j with domain R2 . This is a vortex field. Note how there
is a singularity at the origin (the vectors are undefined/of infinite length).

y  y
Figure 9: A = − 2 +y2 i + 2 +y 2
j Figure 10: ϕ(, y) = tn−1 

Let C1 and C2 be an anti-clockwise and clockwise respectively semi-circular arcs


from (1, 0) to (−1, 0). Then C A · dr = π but C A · dr = −π. So line integrals
R R
1 2

of the tangential component of A are not path independent.

A · dr = 2π. So
H
Also, note that if C is the unit circle centred on the origin, then C
the macroscopic circulation around C is not zero.

y
ϕ(, y) = tn−1 
is a scalar potential function for A, but the fundamental
theorem of calculus for line integrals does not apply in this case because ϕ
is not differentiable when  = 0.

Even though A has a scalar potential, line integrals are not path independent.
Also the macroscopic circulation is not zero for paths around the singularity. The
macroscopic circulation all arises from the singularity at (0, 0).

Note that if the domain of ϕ is restricted to a simply connected subset of R2 where


it is differentiable and has a continuous gradient field, for example the half-plane
 ≥ 0, and then the fundamental theorem of calculus does apply.
€ Š

(Note also that ϕ(, y) = − tn−1 y
is also a scalar potential function for A.)

99
14.5 Div and the Laplacian

By the end of this section you should be able to

• calculate the divergence of a vector function and the Laplacian of a scalar


function

• explain the physical meaning of the divergence and the Laplacian.

14.5.1 The Divergence

The divergence is a measure of how much a vector field is ’expanding’.

Figure 11: A = 2i + 2yj Figure 12: A = 5i + 5j

 y
Figure 13: A = −2i − 2yj Figure 14: A = 2 +y 2
i + 2 +y2 j

100
14.5.2 The Divergence of a Vector Function

Let A = A(, y, z) = A1 (, y, z)i+ A2 (, y, z)j+ A3 (, y, z)k be a vector function,
∂A1 ∂A2 ∂A3
where ∂
, ∂y and ∂z
all exist on the domain of A. Then the divergence of A
can be defined
∂ ∂ ∂
 
∇·A= j+ i+
k · (A1 i + A2 j + A3 k)
∂ ∂y ∂z
∂A1 ∂A2 ∂A3
= + +
∂ ∂y ∂z
Note that the divergence, ∇ · A, of a vector function, A, is a scalar function. We say
div A to mean ∇ · A.

The divergence of a vector field is a scalar field. It can be shown that the
divergence of a vector function is independent of the choice of coordinate system.

2
Figure 15: ( 2 − y 2 − 4)i + yj Figure 16: (5 + y)i + yj

101
14.5.3 Physical Interpretation of Divergence of Fluid Velocity

Suppose that v(, y, z) = 1 (, y, z)i + 2 (, y, z)j + 3 (, y, z)k is the velocity
of a fluid at the point (, y, z). Consider a differential volume element centred on
the point (, y, z).

d dy dz
( − 2
,y − 2
,z + 2
)

d dy dz d dy dz
( − 2
,y − 2
,z − 2
) ( + 2
,y − 2
,z − 2
)

We will show that ∇ · v dt ddydz is the volume of fluid flowing out of the volume
element in time dt by considering the flow out of each face:

d
1 ( + 2
, y, z)dt dydz = flow out of the right face
d
−1 ( − 2
, y, z)dt dydz = flow out of the left face
dy
2 (, y + 2
, z)dt ddz = flow out of the back face
dy
−2 (, y − 2
, z)dt ddz = flow out of the front face
dz
3 (, y, z + 2
)dt ddy = flow out of the top face
dz
−3 (, y, z − 2
)dt ddy = flow out of the bottom face

The sum of these terms is


dy
= 1 (+ d
2
, y, z)dt dydz − 1 (− d
2
, y, z)dt dydz + 2 (, y + 2
, z)dt ddz −
dy
2 (, y − 2 , z)dt ddz + 3 (, y, z + dz 2
)dt ddy − 3 (, y, z − dz 2
)dt ddy =
d d dy dy dz dz
– ™
1 (+ ,y,z)−1 (− ,y,z) 2 (,y+ y,z)−2 (,y− ,z) 3 (,y,z+ )−3 (,y,z− )
2
d
2
+ 2
dy
2
+ 2
dz
2
dt ddydz
” —
∂1 ∂2 ∂3
= ∂
+ ∂y
+ ∂z
dt ddydz = ∇ · v dt ddydz

So ∇ · v dt ddydz is the volume flowing out in time dt (units are m3 ),

and ∇ · v is the volumetric flow rate out of a volume element, per unit volume.
(Units are m3 s−1 m−3 = s−1 ).

102
14.5.4 Divergence of Vector Fields

For any vector field, A, the divergence ∇ · A is often described as the flux of A out
of a volume element (or informally, the growth or expansion rate of the field).

Consider the example of the heat flux density vector field q (units are Js−1 m−2 ).
If q has positive divergence at a point, then this means that heat is flowing away
from that point, and so either there must be a source of heat at that point, or the
amount of heat/temperature at the point must be decreasing (or both). Conversely,
if the divergence of q is negative, then there must either be a heat ’sink’ at that
point, or the heat/temperature must be increasing.

14.5.5 Incompressible Vector Fields, ∇ · A = 0

Divergence-free vector fields (those for which the divergence iz zero everywhere in
the domain) are called incompressible (or solenoidal in electrodynamics).

103
14.5.6 The Laplacian

The Laplacian operator, Δ can be defined

∂2 ∂2 ∂2
Δ= + +
∂2 ∂y 2 ∂z 2
Let ϕ = ϕ(, y, z) be a scalar function. Then the Laplacian of ϕ is

∂2 ϕ ∂2 ϕ ∂2 ϕ
Δϕ = + +
∂2 ∂y 2 ∂z 2
This is a generalisation of the second derivative of a scalar function of one inde-
pendent spatial variable to three independent spatial variables.

Note that the Laplacian of a field is the divergence of the gradient of the field,
since

∂2 ϕ ∂2 ϕ ∂2 ϕ
+ +
∂2 ∂z 2 ∂y 2
∂ ∂ ∂ ∂ϕ ∂ϕ ∂ϕ
=( i+ j+ k) · ( i + j+ k) = ∇ · ∇ ϕ
∂ ∂y ∂z ∂ ∂y ∂z

Common notations used for the Laplacian are Δ, ∇ · ∇ and ∇ 2 .

If the Laplacian is positive at a point, then overall the gradient field is diverging at
that point, so the value of the function at the point is less than the average value of
its neighbours. (This is similar to the second derivative of a function of one variable
being positive at a local minimum.)

The Laplacian Δϕ provides a measure of the difference between the value of ϕ at


a point and the average value of ϕ at the neighbouring points, since

∂2 ϕ ∂2 ϕ ∂2 ϕ 1 ϕ( + h, y, z) − ϕ(, y, z) ϕ(, y, z) − ϕ( − h, y, z)


 
+ + ≈ −
∂2 ∂y 2 ∂z 2 h h h
1 ϕ(, y + h, z) − ϕ(, y, z) ϕ(, y, z) − ϕ(, y − h, z) 1 ϕ(, y, z + h) − ϕ(, y, z) ϕ(, y, z) − ϕ(, y, z − h)
   
+ − + −
h h h h h h
6 ϕ( + h, y, z) + ϕ( − h, y, z) + ϕ(, y + h, z) + ϕ(, y − h, z) + ϕ(, y, z + h) + ϕ(, y, z − h)
 
= 2 − ϕ(, y, z)
h 6

104
It is important to note that Laplacian can not be used to determine if a stationary
point is a maximum or minimum or point of inflection, since if the Laplacian is pos-
itive at a stationary point, that point could either be a local minimum, or a point of
inflection. If the Laplacian is negative at a stationary point, that point could be a
local maximum or a point of inflection. All second partial derivatives including the
mixed derivatives must be inspected to determine the nature of the stationary point.

Examples
Find the grad, the stationary points and the Laplacian of the following functions, and
check the Laplacian at the stationary points, ϕ1 (, y) = 2 − y 2 and ϕ2 (, y) =
22 − y 2 . Consider the physicial interpretation of the value of the Laplacian at the
stationary points.

Example - non-constant Laplacian

2 −y 2
ϕ(, y) = e−
∂ϕ ∂ϕ 2 −y 2 2 −y 2
∇ϕ = i+ j = (1 − 22 )e− i − 2ye− j
∂ ∂y
∂2 ϕ ∂2 ϕ ∂2 ϕ 2 −y 2
Δϕ = ∇ · ∇ ϕ = ∇ ϕ = 2
+ + = 4(2 + y 2 − 2)e−
∂2 ∂y 2 ∂z 2

2 −y 2
Figure 17: ϕ(, y) = e−

2 −y 2
Figure 18: ∇ e−

105
14.5.7 Harmonic Functions

Functions which have zero Laplacian everywhere, that is Δϕ = ∇ · ∇ ϕ = ∇ 2 ϕ = 0


are called harmonic functions.
Example - zero Laplacian everywhere (and no stationary points)

ϕ(, y) = e cos y

∇ ϕ = e cos yi − e sin yj

2
∂2 ϕ ∂2 ϕ
Δϕ = ∇ · ∇ ϕ = ∇ ϕ = + =0
∂2 ∂y 2

Figure 19: ϕ(, y) = e cos y

(It can be shown that any function of the form ϕ(, y) = ƒ (+ y)+ g(− y), where
ƒ and g are ANY function, is harmonic, and conversely, any harmonic function can
be written in this form.)

106
14.6 Surface and Volume Integrals

By the end of this section you should be able to

• for a surface with parametric representation, find a normal vector to the sur-
face and an expression for a surface area element

• for a volume with parametric representation, find an expression for a volume


element

• use a surface integral to find the area of a surface

• find the surface integral of the normal component of a vector field (flux inte-
gral)

• use a volume integral to find a volume

• find surface and volume integrals of scalar fields

14.6.1 Parametric Representations of Surfaces

Surfaces are represented parametrically with two parameters - often s and t are
used.

r(s, t) = (s, t)i + y(s, t)j + z(s, t)k

The vector function r(s, t) gives a position vector of a point on the surface. The
domain can be all of R2 or a subset of R2 .
Example
A plane through the point (1, 1, 1) and containing direction vectors (2, 3, 0) and
(0, −1, 1)

107
Example
A half cylinder of radius 3 and height 2.

r(θ, z) = 3 cos θi + 3 sin θj + zk where 0 < θ < π, 0 < z < 2

Setting one of the parameters to a constant value represents a line on the surface,
called a parameter curve. For example in our half-cylinder above we could set

θ= 4
to obtain the curve

3 3
r(z) = − p i + p j + zk where 0 < z < 2
2 2
or we could set z = 1 to obtain the curve

r(θ) = 3 cos θi + 3 sin θj + k where 0 < θ < π

108
14.6.2 Normals to Surfaces

Let r(s, t) = (s, t)i + y(s, t)j + z(s, t)k be a parametric representation of a
surface. Then
∂r(s, t) r(s + δs, t) − r(s, t) ∂(s, t) ∂y(s, t) ∂z(s, t)
= lim = i+ j+ k
∂s δs→0 δs ∂s ∂s ∂s
is a tangent vector to the fixed t parameter curve, pointing in the direction of in-
creasing s, at the point on the surface with the position vector r(s, t). It is also
tangent to the surface.

∂r ∂r
n= ∂s
× ∂t
∂r
∂t

∂r
∂s
fixed s, varying t

fixed t, varying s

∂r
Similarly ∂t
is a tangent vector to the fixed s parameter curve, pointing in the direc-
tion of increasing t, at the point on the surface with the position vector r(s, t). It is
also tangent to the surface.

At the point on the surface with the position vector r(s, t), a tangent plane is
∂r ∂r
spanned by the two tangent vectors ∂s
and ∂t
.

Furthermore the vector product of these two tangent vectors is a normal vector to
the surface at r(s, t).

∂r(s, t) ∂r(s, t)
n(s, t) = ×
 ∂s ∂t
∂r(s, t) ∂r(s, t) ∂r(s, t) ∂r(s, t)

n̂(s, t) = × / ×
∂s ∂t ∂s ∂t

109
Example
Find a normal vector to the pringle at the point (0, 2, 4).
The pringle is part of a surface with parametric representation

r(s, t) = s sinh ti + s cosh tj + s2 k

Figure 21: Pringle

Figure 20: Hyperbolic paraboloid

i j k
∂r ∂r
n(s, t) = ∂s
× ∂t
= sinh t cosh t 2s
s cosh t s sinh t 0

cosh t 2s sinh t 2s sinh t cosh t


=i −j +k
s sinh t 0 s cosh t 0 s cosh t s sinh t

= −2s2 sinh ti + 2s2 cosh tj − sk

110
14.6.3 Surface Elements

For the surface r(s, t) = (s, t)i + y(s, t)j + z(s, t)k, the vector elements along
∂r ∂r
the parameter curves at the point ((s, t), y(s, t), z(s, t)) are ∂s
ds and ∂t
dt
respectively.

∂r ∂r
∂t
dt ∂t
A surface element can be considered to
∂r
∂s
ds be an infinitesimally small parallelogram
∂r
∂s
on the surface - two sides of the parallel-
∂r
ogram are the vector elements ∂s
ds and
∂r
∂t
dt

The area of the surface element is denoted by dS and


∂r ∂r ∂r ∂r
dS = ds × dt = × dsdt = |n| dsdt
∂s ∂t ∂s ∂t

Example
Find an expression for dS, the area of a surface element of a hyperbolic paraboloid
(pringle) represented by r(s, t) = s sinh ti + s cosh tj + s2 k
i j k
∂r
∂s
ds × ∂r
∂t
dt = sinh t ds cosh t ds 2s ds
s cosh t dt s sinh t dt 0
= −2s2 sinh t dsdti + 2s2 cosh t dsdtj − s dsdtk

p
so dS = s 4s2 cosh 2t + 1 dsdt

111
14.6.4 Surface Area
R
In the same way that the line integral, C
ds, is used to calculate the length of
a parametrized curve, we can calculate the area of a paramertrized surface by
R
calculating a surface integral, S dS.

Example - find the total surface area of a sphere radius 


Use a parametric representation based on spherical polar coordinates

(r, θ, ϕ) = r sin ϕ cos θ y(r, θ, ϕ) = r sin ϕ sin θ z(r, θ, ϕ) = r cos ϕ


Æ
q
−1
y −1
2 + y 2
r(, y, z) = 2 + y2 + z2 θ(, y, z) = tn ϕ(, y, z) = tn
 z
The domain is r ≥ 0, 0 ≤ ϕ < π, 0 ≤ θ < 2π.

ϕ y

θ x

On the surface of the sphere, r is fixed r =  so the surface can be represented by

r(θ, ϕ) =  sin ϕ cos θ i +  sin ϕ sin θ j +  cos ϕ k

0 ≤ θ < 2π, 0 ≤ ϕ < π

∂r ∂r
dS, first find an expression for dS =
R
Then to evaluate S ∂θ
× ∂ϕ
dθdϕ

i j k −2 sin2 ϕ cos θ


dS = − sin ϕ sin θ  sin ϕ cos θ 0 dθdϕ = −2 sin2 ϕ sin θ dθdϕ
 cos ϕ cos θ  cos ϕ sin θ − sin ϕ −2 sin ϕ cos ϕ

= 2 sin ϕdθdϕ
R ϕ=π R θ=2π
dS = 2 sin ϕ dθdϕ = 4π2 .
R
So S ϕ=0 θ=0

112
14.6.5 Surface Integral of a Scalar Field

The surface integral of a scalar field ϕ is


Z
ϕ dS
S

where dS is an element of area of S.

If ϕ(, y, z) = 1 then ϕ dS =
R R
S S
dS is the surface area.

If the scalar field is surface mass density (usually denoted ρ(, y, z) and measured
in kgm−2 ), then S ρ dS is the total mass of the surface.
R

113
14.6.6 Surface Integral of Normal Component of Vector Field

The surface integral of the normal component of a vector field A over a sur-
face S is
Z
A · n̂ dS
S

This is also referred to as the flux integral of the vector field.

In the case of a velocity field v (units are ms−1 ), the surface integral
R
S
v · n̂ dS is
the volumetric flow rate through the whole surface (units are m3 s−1 ).

If ρ(, y, z) is the volumetric mass density (units are kgm−3 ) then


R
S
ρv · n̂ dS is
the mass flow rate (units kgs−1 ) through the whole surface.

In the case of a heat flux density field q (the units are Js−1 m−2 ), the surface
R
integral S q · n̂ dS is the total heat flow rate through the whole surface (units are
Js−1 ).

114
R
In order to evaluate S
A · n̂ dS, a parametric representation of the surfaces is
needed

r(s, t) = (s, t)i + y(s, t)j + z(s, t)k

and also an expression for n̂ dS in terms of the parameters.

Recall that the unit normal vector to a surface is


∂r ∂r ∂r ∂r ∂r ∂r
 
n̂ = × / × and dS = × dsdt
∂s ∂t ∂s ∂t ∂s ∂t
Therefore
∂r ∂r
n̂ dS = × dsdt
∂s ∂t
Example - heat flux through part of a parabolic cylinder
Consider the heat flux density vector field (units are Js−1 m−2 )

q(, y, z) = 2i + j + k

and the surface S parametrized by

r(s, t) = si + tj + (4 − s2 )k where − 2 < s < 2, 0 < t < 3

∂r ∂r
n̂ dS = × dsdt = (i − 2sk) × j dsdt = (2si + k) dsdt
∂s ∂t
So
Z Z 2 Z 3
q · n̂ dS = (2si + j + k) · (2si + k) dsdt
S s=−2 t=0
2 3
™s=2
4s3
Z Z –
2
= 4s + 1 dsdt = 3 +s = 76
s=−2 t=0 3 s=−2

Heat is flowing through the surface at a rate of 76 Js−1 .

115
14.6.7 Volume Elements

If a volume is parametrized r(s, t, ) = (s, t, )i + y(s, t, )j + z(s, t, )k then
a volume element is an infinitesimally small parallelepiped.
∂r
∂
∂r
∂
d
∂r
∂t
∂r
∂s
ds

∂r
∂s

∂r ∂r ∂r ∂r ∂r ∂r
The volume is dV = ∂s
ds × ∂t
dt · ∂
d = ∂s
× ∂t
· ∂
dsdtd

116
14.6.8 Volume Integral of a Scalar Field

The volume integral of a scalar field ϕ is


Z
ϕ dV
V

where dV is an element of volume of V.


If ϕ(, y, z) = 1 then the volume integral
R
V
dV is the total volume of V. If the
scalar field is volumetric mass density (usually denoted ρ(, y, z) and measured
in kgm−3 ), then V ρ dV is the total mass of V .
R

Example - find the total volume of a sphere with radius 


r(r, θ, ϕ) = r sin θ cos ϕ i + r sin θ sin ϕ j + r cos θ k
with 0 < θ < π, 0 < ϕ < 2π, 0 < r < 

dV, first find dV = | ∂r ∂r ∂r


R
To evaluate V ∂r
× ∂θ
· ∂ϕ
| drdθdϕ

sin θ cos ϕ sin θ sin ϕ cosθ


dV = r cos θ cos ϕ r cos θ sin ϕ −r sin θ drdθdϕ
−r sin θ sin ϕ r sin θ cos ϕ 0

= r 2 sin θ drdθdϕ

117
14.6.9 Summary

• The surface integral of a scalar field ϕ is


Z
ϕ dS
S

where dS is an element of surface area of S.

For example if ϕ(, y, z) is mass density per unit area, this integral gives the
total mass of the surface. If ϕ = 1, then S ϕ dS = S dS is simply the area
R R

of S.

• The surface integral of the normal component of a vector field A over a


surface S (aka the flux integral), is the integral of the component of the field
which is normal to the surface
Z
A · n̂ dS
S

For example if the vector field is fluid velocity, this integral gives the volumetric
flow rate through the surface.

The mass flow rate of a fluid of density ρ(, y, z) flowing with velocity field
v(, y, z) through S is
Z
ρv · n̂ dS
S

• The volume integral of a scalar field ϕ is


Z
ϕ dV
V

where dV is an element of volume of V.

For example if the scalar field is mass density per unit volume, this integral
gives the total mass of V. If ϕ = 1, then V ϕ dV = V dV is simply the
R R

volume of V.

118
14.7 The Divergence Theorem

By the end of this section you should be able to

• verify and explain the physical meaning of the theorem

• apply the theorem to solve problems

14.7.1 The Theorem

Let V be a volume (closed bounded region) in 3D space with surface S, and let A
be a vector field. Then

Z I
∇ · A dV = A · n̂ dS
V S

H
If A is a velocity field of a fluid, then the right hand side of the theorem S
A · n̂ dS
is the total volumetric flow rate out of S.

Recall that ∇ · A dV is the volumetric flow rate out of a volume element. The left
R
hand side of the divergence theorem V ∇ · A dV is the sum of all these rates.
Since there is an equal and opposite flow through the coincindent boundaries of
adjacent elements, all of the internal flows cancel each other out. The left hand
side is therefore also equal to the total volumetric flow rate out of V through S.

The total divergence of a vector field in a volume is equal to the total flux of
the field out of the boundary surface.

119
14.7.2 Verifying the Theorem

Example
∇ · q dV =
R H
Verify that V S
q · n̂ dS where q is the heat flux density vector field
(units are Js−1 m−2 )

q(, y, z) = 2i + j + k

and S is the boundary surface of V parametrized by

r(s, t, ) = si + tj + k where − 2 < s < 2, 0 < t < 3, 0 <  < 4 − s2

Evaluate the surface integral To find the rate of heat flowing out of the surface. In
this case, four separate surface integrals must be evaluated. Let S1 be the curved
surface,let S2 and S3 be the front and back respectively and let S4 be the horizontal
base. Then S = S1 ∪ S2 ∪ S3 ∪ S4 and
I Z Z Z Z
q · n̂ dS = q · n̂ dS + q · n̂ dS + q · n̂ dS + q · n̂ dS
S S1 S2 S3 S4

The four surfaces have parametric representations

r1 (s, t) = si + tj + (4 − s2 )k − 2 < s < 2, 0 < t < 3 n̂dS = (2si + k) dsdt

r2 (s, ) = si + 0j + k − 2 < s < 2, 0 <  < 4 − s2 n̂dS = −j dsd

r3 (s, ) = si + 3j + k − 2 < s < 2, 0 <  < 4 − s2 n̂dS = j dsd

r4 (s, t) = si + tj − 2 < s < 2, 0 < t < 3 n̂dS = −k dsdt

q · n̂ dS = 76
R
We already know that S1

120
q · n̂ dS + q · n̂ dS = 0
R R
Also S2 S3

Finally, on S4 we have n̂ = −k and dS = dsdt so


Z Z2 Z3 Z 2 Z 3
q· n̂ dS = (2si+ j+ k)·(−k) dsdt = −1 dsdt = −12
S4 s=−2 t=0 s=−2 t=0

The total heat flow rate (in Js−1 ) through S is


I
q · n̂ dS = 76 + 0 − 12 = 64
S

R
Evaluate the volume integral, V
∇ · q dV, on the left hand side of the theorem to
find the total ’spreading out’ of the heat at all points contained within the volume.
The parametric representation of V is

r(s, t, ) = si + tj + k̂ where − 2 < s < 2, 0 < t < 3, 0 <  < 4 − s2

In this case dV = dsdtd. Then since

q(, y, z) = 2i + j + k

we have ∇ · q = 2, so
Z Z 2 Z 3 Z =4−s2
∇ · q dV = 2 dsdtd
V s=−2 t=0 =0
Z2 Z 2
=4−s2
=6 [] =0 ds = 6 4 − s2 ds
s=−2 s=−2
3 2
– ™
s
= 6 4s − = 64
3 s=−2

121
14.7.3 Using the Divergence Theorem to Calculate the Flux of a Vector Field

Find the flux of the vector field A = 4zi − y 2 j + yzk over the surface of the cube
0 < , y, z < 1.

14.7.4 Direction of Normal Vectors to a Closed Surface

It is conventional to select outward pointing normal vectors for a closed surface.


(For the divergence therem, surfaces are always closed because they are enclosing
a volume in space, but later for Stokes’ theorem we will consider surfaces which
are not closed).

14.7.5 Integral Definition of Divergence

An alternative way of defining the divergence of a vector field A is

1
I
d A = lim A · n̂ dS
dV→0 dV S

Note that this definition is coordinate-free i.e. it does not depend on a particular
coordinate system (e.g. Cartesian, cylindrical polar).

122
14.8 Curl

By the end of this section you should be able to calculate the curl of a vector
function at a point, and be able to explain the physical meaning of the curl.

14.8.1 The Curl

The curl is an indication of the ’rotation’ or microscopic circulation of a vector


field at a point in space.

Figure 22: −yi + j Figure 23: i + j

y 
Figure 24: j Figure 25: − 2 +y2 i + 2 +y 2
j

123
14.8.2 The Curl of a Vector Function

Let A = A(, y, z) = A1 (, y, z)i+ A2 (, y, z)j+ A3 (, y, z)k be a vector function,
such that all the partial derivatives in the definition below exist in the domain. Then
the curl of A can be defined

i j k
∂ ∂ ∂
∇×A= ∂ ∂y ∂z
A1 A2 A3
∂A3 ∂A2 ∂A1 ∂A3 ∂A2 ∂A1
     
= − i+ − j+ − k
∂y ∂z ∂z ∂ ∂ ∂y
Note that the curl of a vector field is a vector field.

Example - find the curl of A(, y) = −yi + j

Example - find the curl of A(, y) = (1 + y)i + yj

Figure 26: (1 + y)i + yj

124
14.8.3 Physical Interpretation of Curl

The curl of a fluid velocity vector field at a point is equal to twice the angular
velocity vector of a volume element at the point.

Consider a fluid element surrounding a point in a fluid velocity vector field. Suppose
that the Cartesian axes are positioned such that the axis of rotation of the element
points along the z-axis. If the angular velocity of the element is ω, then the angular
velocity vector of the fluid within the element is

ω = ωk

By treating the fluid element as a rigid body, the fluid velocity at a point with position
vector r = i + yj + zk within the element satisfies

i j k
v = ω × r = 0 0 ω = −ωyi + ωj
 y z

Therefore

i j k
∂ ∂ ∂
∇×v= ∂ ∂y ∂z
= 2ωk = 2ω
ω
−ωy ω 0

As with div and grad, it is possible to show that the curl of a field is independent of
any coordinate system. Therefore in general

∇ × v = 2ω
ω

where ω is the angular velocity vector of the volume element.

125
14.8.4 Applet with Curl-Detectors

See [Link]

y 
Figure 27: Falstad applet with curl detectors for − 3 i+ 3 j
(2 +y 2 ) 2 (2 +y 2 ) 2

14.8.5 Irrotational Vector Fields, ∇ × A = 0

Curl-free vector fields (those for which the curl is zero everywhere in the domain)
are called irrotational fields.

14.8.6 Div Curl and Curl Grad Are Both Zero

For a vector field A, it is always true that div curl A is zero

∇ ·∇ × A = 0

Therefore any curl field is incompressible.

For a scalar field ϕ, it is always true that curl grad ϕ is zero

∇ × ∇ϕ = 0

Therefore any gradient field (i.e. a vector field which has a scalar potential fuction)
is irrotational.

126
14.9 Stokes’ Theorem

By the end of this section you should be able to

• verify and explain the physical meaning of Stokes’ theorem

• apply Stokes’ theorem to solve problems

14.9.1 The Theorem

Let S be an oriented surface in 3D space, let the boundary of S be a simple closed


curve C, and let A be a vector function. Then Stokes’ theorem states that

Z I
∇ × A · n̂ dS = A · dr
S C

The direction of the normal, n̂ to the surface, S is found by applying the right
hand screw rule with the fingers pointing in the direction of integration around the
boundary curve C, and the thumb pointing in the direction of n̂.

Stoke’s theorem tells us that the total of all the microscopic circulation of a
vector field on a surface is equal to the macroscopic circulation of the field
around the boundary curve.

127
If the vector field is v, a velocity field of a fluid. Then the right hand side of the
H
theorem C v · dr is the (macroscopic) circulation of v around C i.e. a measure of
the tendacy of a fluid to move around C.

R
The left hand side of the theorem S
∇ × v · n̂ dS is the sum of the microscopic
circulations around all the surface elements, namely the total tendancy of the fluid
to circulate at each point.

On the common boundaries of adjacent surface elements there is an equal and


opposite contribution to the circulation. These contributions from all the internal
R
boundaries cancel each other out, and the net result S ∇ × v · n̂ dS is just the
circulation on the boundary of the surface - i.e. the macroscopic circulation around
the boundary C. That is
Z I
∇ × v · n̂ dS = v · dr
S C

128
14.9.2 Verifying the Theorem

Example
Verify Stokes’ theorem for the velocity field (units are ms−1 )

v = (2 − y)i − yz 2 j − y 2 zk

where S is the lower half of the surface of the sphere 2 + y 2 + z 2 = 1, and C is


the boundary of S oriented clockwise when looking at the origin from the positive z
direction.

H
First evaluate the line integral C
v · dr

Parametric representation for C is

r(θ) = cos θi + sin θj + 0k 2π < θ < 0π

dr = (− sin θi + cos θj) dθ


H
Then C
v · dr
Z θ=0
= ((2 cos θ − sin θ)i − (sin θ × 02 )j − (sin2 θ × 0)k) · (− sin θi + cos θj) dθ
θ=2π
Z θ=0
= (−2 cos θ sin θ + sin2 θ) dθ
θ=2π
θ=0
1
Z
= (− sin 2θ + (1 − cos 2θ)) dθ = −π
θ=2π 2

129
R
Now evaluate the surface integral S
∇ × v · n̂ dS
First find the curl of the vector field

i j k
∂ ∂ ∂
∇×v= ∂ ∂y ∂z
=k
2 − y −yz 2 −y 2 z

Next parametrise the surface and find and expression for n̂ dS


π
r(ϕ, θ) = sin ϕ cos θi + sin ϕ sin θj + cos ϕk < ϕ < π, 0 < θ < 2π
2
Recall that

i j k
∂r ∂r
n̂ dS = × dϕdθ = cos ϕ cos θ cos ϕ sin θ − sin ϕ dϕdθ
∂ϕ ∂θ
− sin ϕ sin θ sin ϕ cos θ 0

= (sin2 ϕ cos θi + sin2 ϕ sin θj + sin ϕ cos ϕk) dϕdθ

So we can now evaluate the integral


Z Z ϕ=π Z θ=2π
∇ × v · n̂ dS = k · (sin2 ϕ cos θi + sin2 ϕ sin θj + sin ϕ cos ϕk) dϕdθ
S ϕ= π2 θ=0
Z ϕ=π Z θ=2π
= sin ϕ cos ϕ dθdϕ
ϕ= π2 θ=0
ϕ=π
1

2
= 2π sn ϕ = −π
2 ϕ= π2

130
14.9.3 Direction of Normal Vectors to a Surface

In Stokes’ theorem, the direction of the normal, n̂ to the surface, S is found by


applying the right hand screw rule with the fingers pointing in the direction of in-
tegration around the boundary curve C, and the thumb pointing in the direction of
n̂.

If the incorrect normals are selected, the resulting integral will be of the wrong sign
(positive/negative).

14.9.4 Integral Definition of Curl

The component of the curl vector in the direction n̂ is given by

1
I
cr A · n̂ = lim A · dr
dS→0 dS C

where n̂ is normal to the (shrinking) surface dS.

Note that this definition is coordinate-free i.e. it does not depend on a particular
coordinate system (e.g. Cartesian, cylindrical polar).

131
14.10 Green’s Theorem

By the end of this section you should be able to

• verify and explain the physical meaning of the theorem

• apply the theorem to solve problems

• explain the connection between Green’s theorem and Stokes’ theorem

14.10.1 The Theorem

Let R be a closed bounded region in the y-plane with anti-clockwise boundary


∂Q ∂P
curve C. Let P(, y) and Q(, y) be scalar functions with ∂
and ∂y
continuous in
a domain containing R. Then

∂Q ∂P
ZZ   I
− ddy = P d + Q dy
R ∂ ∂y C

€ Š
∂Q ∂P
If A(, y) = P(, y)i + Q(, y)j is a vector field, then ∂
− ∂y
ddy is the mi-
croscopic circulation of A around an area element and note that P d + Q dy =
A · dr

So Green’s theorem tells us that the total of all the microscopic circulation of a
vector field in a region of the y-plane is equal to the macroscopic circulation
of the field around the region’s boundary curve.

Figure 28: Microscopic and Macroscopic Circulation

132
For a physical interpretation of Green’s theorem, we let P(, y) and Q(, y) be
the components of a force vector field F = P(, y)i + Q(, y)j, and consider the
work done by the force field in moving a particle around a differential area element
centred on the point (, y).
d dy d dy
( − 2
,y + 2
) ( + 2
,y + 2
)

(, y)

d dy d dy
( − 2
,y − 2
) ( + 2
,y − 2
)

The work done is


dy d dy d
       
= P , y − d + Q  +
, y dy − P , y + d − Q  − , y dy
2 2 2 2
dy dy
Q( + d d
! !
2
, y) − Q( − 2
, y) P(, y + 2
) − P(, y − 2
)
= ddy − ddy
d dy
∂Q ∂P
 
= − ddy
∂ ∂y
RR € Š
So on the left hand side of Green’s theorem R ∂Q ∂
− ∂P
∂y
ddy we are adding
up all the work done by the field moving particles around all the area elements.
But the work done on all the internal boundaries cancel each other out, because
on adjacent internal boundaries there is an equal amount of work done in opposite
directions. The net result is simply the work done moving a particle around the
boundary of region.

P d + Q dy =
H H
The right hand side of Green’s theorem is C C
F · dr, i.e. the work
done by the force moving a particle (anticlockwise) around the closed loop C.

(In fracture mechanics, Green’s theorem is used to show that the J-integral is a
well-defined measure of the strain on a notch tip - the value is the same whichever
path is chosen around the notch tip.)

133
14.10.2 Verifying Green’s theorem

Example
Verify that

∂Q ∂P
Z Z   I
− ddy = P d + Q dy
R ∂ ∂y C

where P(, y) =  + 2y and Q(, y) =  − 2y and let C consist of C1 , the cubic


y = 3 from (0, 0) to (1, 1) and C2 , the straight line from (1, 1) to (0, 0).

Evaluate the line integral


(note that on C1 we have y = 3 and dy = 32 d, and on C2 we have y =  and
dy = d).
I I
P d + Q dy = ( + 2y) d + ( − 2y) dy
C C
Z Z
= ( + 2y) d + ( − 2y) dy + ( + 2y) d + ( − 2y) dy
C1 C2
Z =1 Z =0
3 3 2
= ( + 2 ) d + ( − 2 ) 3 d + ( + 2) d + ( − 2) d
=0 =1
Z =1 Z =1
= ( + 23 ) d + ( − 23 ) 32 d − ( + 2) d + ( − 2) d
=0 =0
Z =1
1
= − + 53 − 65 d = −
=0 4
Evaluate the area integral
=1 Z y=
∂Q ∂P
ZZ   Z
− ddy = −1 dyd
R ∂ ∂y =0 y=3
Z =1
y=
= [−y] y=3 d
=0
=1
1
Z
= − + 3 d = −
=0 4

134
14.11 Conservative Vector Fields

14.11.1 Two types of conservative field

There are two types vector fields that are called conservative - they are

1. vector fields which have no curl and macroscopic circulation around all closed
loops is zero - these are irrotational conservative fields.

2. vector fields which have no divergence and flux integrals through all closed
surfaces are zero - these are incompressible conservative fields.

We will now explore the concept of irrotational conservative fields, but first we must
consider whether the field is smooth.

14.11.2 Sufficiently smooth vector fields

We call a vector field sufficiently smooth if the component functions have contin-
uus partial derivatives and the domain is simply connected. A simply connected
domain is one in which every closed path in the domain can be ’shrunk’ to a point
in the domain.

For example R2 is simply connected, but R2 with a point or disc removed, such
as R2 \(0, 0), is not simply connected. R3 is simply connected, but R3 with line
 = y = 0 removed is not simply connected. (R3 with just the origin removed is
simply connected).

Figure 29: Which one is simply connected?

An example of a not sufficiently smooth vector field is the vortex field from 14.4.5
with domain R2 .

135
14.11.3 Irrotational Conservative Fields

For a sufficiently smooth vector field A the four statements below are equivalent,
and any sufficiently smooth vector field which satsfies them is called an irrotational
conservative (vector) field.

A · dr = 0 for all closed paths C in the domain


H
1. C

2. All line integrals of the tangential component of A along curves in the


domain are path-independent

3. A has a scalar potential function ϕ (there exists ϕ such that ∇ ϕ = A)

4. A is irrotational, i.e. ∇ × A = 0

Sufficiently smooth vector fields satisfying 1-4 are called conservative because for
H
example if the vector field is a force field and C F · dr is a calculation of work done
by the field to move a particle around a closed loop, as in 14.2.4, then the net work
is zero - i.e. energy is conserved. There is no macroscopic circulation anywhere in
the domain.

Note that a useful consequence of the above is that we can check the curl of a
sufficiently smooth vector function to find out if it has a scalar potential function
or not (an alternative method is to simply try to find a scalar potential by partial
integration). If the curl is zero (i.e. if it is irrotational), then it has a scalar potential,
whereas if the curl is non-zero it does not.

(An example of a vector field which is irrotational but not irrotational conservative
is the vortex field from 14.4.5. However it is irrotational conservative if the domain
is restricted to a simply connected subset of R2 which does not contain (0, 0), for
example if the domain is just the half-plane with  > 0.)

In 14.4.4 we showed that 3. =⇒ 1. and 3. =⇒ 2. In the problem sheets you


showed that ∇ × ∇ ϕ = 0, that is 3. =⇒ 4. We now show that 2. =⇒ 3. and
4. =⇒ 1. for a sufficiently smooth fields. (It is also fun to show that 1. ⇐⇒ 2.!)

136
2. =⇒ 3.
We start by assuming that statement 2. is true. Now fix any point in the domain,
suppose it has coordinates (, b, c) where , b, c are all constants. Now for all the
points (, y, z) in the domain, define a function
Z
ϕ(, y, z) = A · dr
C

where C is any path from (, b, c) to (, y, z). (This requires A to be smooth -
R
otherwise we would not be able to calculate C A · dr as we did in 14.2.4). Then
ϕ(, b, c) = 0 (the potential is zero at (, b, c)) so
Z
∇ ϕ · dr = ϕ(, y, z) − ϕ(, b, c) = ϕ(, y, z)
C

So A and ∇ ϕ must be the same function - so ϕ is a scalar potential for A.

4. =⇒ 1.

137
14.12 Problems: Vector Calculus

Parametric representations and lengths of curves

dr
1. (a) Find an expression for the tangent vector, dt
, the vector element, dr,
and the line element, ds, for the curves

i. r(t) = ti + t 2 j + t 3 k

ii. r(t) = (cos t − 1)i + (sin t + 2)j

Also sketch the curves (use online maths tools to help you if necessary)
and add some unit tangent vectors to your sketches.

(b) Find the length of the curve  = t − sin t, y = 1 − cos t, 0 < t < 2π.
p Ç
(Hint for evaluating the integral: 1 − cos t = 2 sin2 2t )

(c) A curve is given parametrically by   = t2/


2, y = t. Find the length of
1
the curve from the origin to the point ,1 .
2
(Substitution hint: let t = sinh .)

Line integrals of scalar and vector fields

2. (a) Calculate the mass of a wire with line mass density ρ(, y) = 3 +  + y
if it is

i. A circular piece of radius 2m centred on the origin.

ii. A circular piece of radius 2m centred at (1, 1). (Hint: use a para-
metric representation similar to 1(a)ii)

(b) Complete the Line Integrals of Components of Vector Fields examples


in the notes.

(c) Find the work done moving a particle from (0, 0, 0) to (1, 1, 1) along the
following paths by the force field F(, y, z) = (32 + 6y)i − 14yzj +
20z 2 k

i. r(t) = ti + t 2 j + t 3 k where 0 < t < 1

ii. A straight line, r(t) = ti + tj + tk, 0 < t < 1

138
Grad

3. (a) Let ϕ(, y, z) = 3 y 2 z 6

i. Find ∇ ϕ
ii. What is the direction of maximum increase of ϕ from the point (1, 1, 1)?

iii. What is the directional derivative (rate of change with respect to dis-
tance) of ϕ at (1, 1, 1) in direction  = 2i − 2j + k?

(b) Find ∇ ϕ for each of the following functions ϕ (where r(, y, z) = i +


Æ
yj + zk and r = |r| = 2 + y 2 + z 2 ). Give your answer in terms of r
and r if possible.
Æ
i. ϕ = ln r ( Hint: start by substituting 2 + y 2 + z 2 for r)
ii. ϕ = r −1
iii. ϕ = r 3

(c) Prove the following for scalar fields ƒ and g by writing them as functions
of Cartesian coordinate ƒ (, y, z) and g(, y, z) and then applying the
product rule

i. ∇ (ƒ g) = ƒ∇
∇ g + g∇∇ƒ
€ Š
ƒ
ii. ∇ g = g12 (g∇ ∇ g) if g ̸= 0
∇ ƒ − ƒ∇

(d) Read the vector calculus section in Advanced Engineering Mathematics


by Kreyszig - available online via Imperial College Library Search.

(e) Find youtube videos about vector calculus and share the best one with
your tutor.

Fundamental theorem for line integrals, scalar potentials

4. (a) Find a scalar potential function for the following vector fields, and use
the fundamental theorem to calculate the line integral of the tangential
component of the field along any path from (1,0,0) to (1,1,0).

i. A(, y, z) = i + yj + zk
ii. A(, y, z) = yi + j + 2k

139
Are the line integrals of the tangential component of A path indepen-
dent?

(b) Calculate the line integrals again using parametric representations, over
a straight line r(t) = i + tj between the two points, and also over a
parabola r(t) = ti + t(t − 1)j between the two points, and check that
you get the same results.

Div

5. (a) Find an expression for the divergence of the following

i. 32 yi − zj + 2 zk

ii.  cos yi + yj − z cos k

(b) Consider the identity ∇ · (ϕA) = (∇


∇ ϕ) · A + ϕ(∇
∇ · A)

i. Verify the identity for the functions ϕ = 2yz 2 and A = i + 2yj +


3zk

ii. Prove that this vector identity is true for all scalar functions ϕ =
ϕ(, y, z) and vector functions A = A1 (, y, z)i + A2 (, y, z)j +
A3 (, y, z)k

(c) Find the Laplacian of the function ϕ = 2yz 2 sin 

(d) Look back at previous problems about stationary points of functions of


two variables and inspect the Laplacian to see if it is zero, positive or
negative. Discuss your findings with other students.

Normal vectors and surface integrals

6. (a) For the surface r(s, t) = si + tj + (4 − s2 )k

i. Find an expression in terms of the parameters s and t for a normal


vector, n, a unit normal, n̂ and a surface area element, dS. (Hint:
dr dr dr dr
n= ds
× dt
and dS = | ds × dt
| dsdt).

ii. Find the two unit normal vectors to the surface at the point (1, 1, 3)

(b) For the surface r(s, t) = (1 + cos s)i + 2tj + sin sk

140
i. Find expressions for n and dS.

ii. Find the two unit normal vectors to the surface at the point (1, 2, 1)

(c) What are the two unit normal vectors to each of the following surfaces?
(You do not need to use vector calculus methods to find these): A hori-
zontal disc; the xz-plane; a vertical unit square in the yz-plane.

(d) Let A be the vector field

A(, y, z) = ( + z)i + 2(y + 2 )j + 3zk


H
Show that the flux integral S
A · n̂dS, over the surface of the unit cube
0 ≤ , y, z ≤ 1 is equal to 6. (Hint: six separate surface integrals are
needed. The flux out of the left, right, front, back, bottom and top are
− 12 , 32 , − 32 , 83 , 0, 3 respectively.)

The divergence theorem

7. (a) Verify the divergence theorem for the following vector fields and volumes.

i. A(, y, z) = (+ z)i+ 2(y + 2 )j+ 3zk, the unit cube 0 ≤ , y, z ≤


1 (Hint: use your answer to 6d for the surface integral),

ii. A(, y, z) = 4i − 2y 2 j + z 2 k, the cylinder bounded by 2 + y 2 =


4, z = 0, z = 3. (Hint: use parametric representations based on
R 2π
cylindrical polar coordinates and note that that 0 sin3 θ dθ = 0).

(b) Use the divergence theorem to calculate the flux of the following vector
fields out of the boundary surface of the given volumes

i. A is the vector field in (a)i., and the volume is a hemisphere with


radius 1. (Hint: no parametric representation is required to calculate
the volume integral because the divergence is constant throughout
the solid volume).

ii. A = 4i − 2yj + z 2 k, and the volume is the cylinder in (a)ii. (Hint:
in this case you will need to find a parametric representation for the
volume, because the divergence varies in space.)

141
Curl

8. (a) Find the curl of the following vector fields.

i. 2z 2 i − yzj + 3z 3 k.


ii.  cos yi − y cos j + zk.

(b) Consider the force field F = (2y + z 3 )i + 2 j + 3z 2 k.

i. Show that it is irrotational.


ii. Find a scalar potential function for F.
iii. Find the work done by the force field if it moves an object along any
curve from the point (1, −2, 1) to (3, 1, 4) (Hint: use the funda-
mental theorem).

(c) Use the definitions of the derivatives in Cartesian coordinates to show


that gradient fields are irrotational, and that curl fields are incompress-
ible. Hint: Let ϕ = ϕ(, y, z) be a scalar function, and let A = A1 (, y, z)i+
A2 (, y, z)j + A3 (, y, z)k be a vector function and use the definitions
to show

∇ × ∇ ϕ = 0 and ∇ · ∇ × A = 0

Stokes’ theorem

9. (a) Verify Stokes’ theorem for the following.

i. F(, y, z) = yi + ze j + 5k, and S is a vertical disc with radius 2


and centre (3, 0, 0) in the plane  = 3.
ii. F(, y, z) = (y − z + 2)i + (yz + 4)j − zk, and S is the surface
of the cube 0 ≤ , y ≤ 2 and 0 < z ≤ 2 above the y-plane (Hint:
four separate line integrals and five separate surface integrals are
required - the surfaces are the top and four sides of the cube.)

(b) Use Stoke’s theorem to calculate the (macroscopic) circulation of the


vector field F(, y) = z 3 i + (y + 3z 2 )k around a unit square in the yz-
plane, centred at the origin. (Hint: just calculate the equivalent surface
integral).

142
Green’s theorem

10. (a) For both i. and ii., find the work done by the force field F(, y) in moving
a particle along the specified path C in the following two different ways

F1 d + F2 dy (= F · dr)
R H
• Calculate the line integral C
RR € ∂F ∂F1
Š R
2
• Calculate the surface integral ∂
− ∂y
ddy (= ∇×F·
k dS) over the region enclosed by the path C

i. F(, y) = y 2 i + 3 yj
C is the square with vertices at (0, 0), (2, 0),(2, 2), (0, 2).

ii. F(, y) = (2 +y 2 )i+2yj and C consists of the arc of the parabola
y = 2 from (0, 0) to (2, 4), then the line segment from (2, 4) to
(0, 0)

(b) Use Green’s theorem to calculate the (macroscopic) circulation of F(, y) =


( − y)i + 9j around a circle of radius 5, centred at anywhere in the
y-plane . (Hint: just calculate the equivalent area integral).

ANSWERS

Tangents, vector elements, line elements

dr
1. (a) i. Tangent is dt
= i + 2tj + 3t 2 k
Vector element is dr = (i + 2tj + 3t 2 k) dt
p
Line element is ds = |dr| = 1 + 4t 2 + 9t 4 dt
z

1
2
−2 −1 
1
2
−2 sketch just shows 0<t<1
dr(t)
ii. Tangent is dt
= − sin ti + cos tj
Vector element is dr = (− sin ti + cos tj) dt
Æ
Line element is ds = |dr| = sin2 t + cos2 t dt = dt

143
2 z


2
−2 

−2 2
circle in y-plane with centre (−1, 2)

(b) 8
1€ p Š
(c) sinh−1 (1) + 2 = 1.15
2

Line integrals

2. (a) i. 12π

ii. 20π

(b)

(c) i. 5 (Joules)
13
ii. 3
(Joules)

Grad

3. (a) i. 32 y 2 z 6 i + 23 yz 6 j + 63 y 2 z 5 k

ii. 3i + 2j + 6k
8
iii. 3

 y r
(b) i. 2 +y 2 +z 2
i + 2 +y2 +z 2 j + 2 +yz2 +z 2 k = r2
y
ii. − 
3 i− 3 j− z
3 k = − rr3
(2 +y 2 +z 2 ) 2 (2 +y 2 +z 2 ) 2 (2 +y 2 +z 2 ) 2
iii. 3rr

Fundamental theorem for line integrals, scalar potentials

2 y2 z2
4. (a) i. ϕ(, y, z) = 2
+ 2
+ 2
+ C. Integral is 12 .

ii. ϕ(, y, z) = y + 2z + C. Integral is 1.

144
Div

5. (a) i. 6y + 2

ii. cos y − cos  + 1

(b) i. 30yz 2

ii.

(c) 2y(2 − z 2 ) sin 

Normal vectors and surface integrals

6. (a) i. n = 2si + k
1
n̂ = p (2si + k)
4s2 +1 p
dS = |2si + k| dsds = 4s2 + 1 dsdt

ii. n̂ = ±( p2 i + 1
p k)
5 5

(b) i. n = −2 cos si − 2 sin sk


dS = | − 2 cos si − 2 sin sk| dsds = 2dsdt

ii. n̂ = ±k

(c) ±k; ±j; ±i

The divergence theorem

7. (a) i. 6

ii. 84π

(b) i. 4π

ii. 60π

Curl

8. (a) i. Use a computational knowledge engine such Wolfram Alpha to check


your answers

ii.

145
(b) i. ∇ × F = 0

ii. 2 y + z 3 (you can include +C but it is not necessary).

iii. 202

Stokes’ theorem

9. Note the following answers could all be positive or negative - depending on


which orientation you choose.

(a) i. 4πe3

ii. 4

(b) 1

Green’s theorem

10. (a) i. 8

ii. 0

(b) 250π

146
15 INTRODUCTION TO DIFFERENTIAL EQUATIONS

15.1 Occurrence of Differential Equations

Example 15-1: Suppose that a water tank has one inlet and one outlet valve which
when open lead to water flow rates of 3 and 5 litres per minute (l/min) respectively.
The tank has initially both valves shut and contains 20 l of water. What is the water
content of the tank when both valves are opened for a period of 5 min?
This is a trivial problem. One could solve it with simple arithmetic, i.e. estimating
that the total water flow rate out of the tank is 2 l/min (5 going out and 3 going in).
Therefore, in 5 minutes, the decrease in water volume would be 2x5 = 10 l which
when subtracted from the initial 20 l, gives the answer, i.e. 10 l.
The above process can be written in terms of a mathematical equation as follows

d
= −2 (15.1)
dt
where w is the water volume and t is time. The negative sign on the RHS de-
notes that the water volume is decreasing with time. In order to solve for w, equa-
tion (15.1) needs to be integrated once with respect to time

 = −2t + C (15.2)

where C is a constant of integration. To find C we make use of the initial con-


dition, i.e. at t=0, w=w 0 =20. This leads to C being equal to w 0 . Therefore
equation (15.2) becomes

 = −2t + 20 (15.3)

Equation (15.3) can be used to determine the water volume after 5 minutes, by
substituting t=5, which gives w 5 =10 l.

Equation (15.1) is called a differential equation because it contains a differential


coefficient (dw/dt). It is perhaps the simplest form of a differential equation pos-
sible (the problem could be easily solved using simple arithmetic). In most cases,
the solution to a problem is not as straight forward, so systematic ways of solving
differential equations are needed.

147
Example 15-2: The flow rate at the outlet valve is now proportional to the water
volume present in the tank, let’s say it is equal to 0.08 times the water volume. With
all other parameters staying unchanged, what is the differential equation describing
the process and what is the water content in the tank after 5 minutes?
The problem is now more complicated. The differential equation is changed to

d
= 3 − 0.08 (15.4)
dt
We can solve by separating the variables, integrating and rearranging

d
Z Z
= dt
3 − 0.08
ln (3 − 0.08)
=t+C
−0.08
e−0.08(t+C) − 3
(t) =
−0.08
e−0.08C
Then, simplifying and replacing the constant −0.08
with C, we obtain

(t) = Ce−0.08t + 37.5

Finally, C can be found using the initial condition, at t = 0,  = 0 = 20, so

(t) = −17.5e−0.08t + 37.5

and then t = 5, leads to the answer (w 5 =25.8 l).

A differential equation can be visualised as a slope field, with a short line indicating
the slope (gradient) at a point, as shown in Figure 30. A solution to the differential
equation is a curve for which, at every point along its length, the tangent is equal
to the slope.

The particular solution corresponding to a given boundary condition is the curve


which intersects the point representing that condition. In this example, the bound-
ary condition is an initial condition, t = 0,  = 20, and the particular solution is
the curve (t) = −17.5e−0.08t + 37.5, which intersects (0, 20).

The general solution to the differential equation can be considered to be the en-
tire family of curves corresponding to all possible boundary conditions. Two other

148
60

(0,40)
40

(0,20)
20

0
(0,0)
C = 2.5
C = −17.5
−20 C = −37.5

−20 0 20 40 60
t
d
Figure 30: Slope field of dt
= 3 − 0.08, with solutions (t) = Ce−0.08t + 37.5

particular solutions corresponding to initial conditions (0, 0) and (0, 40) are also
shown in Figure 30.

d
Note that in this particular example the slope, dt
, is only a function of the depen-
dent variable,, and not the independent variable t, so the slope for a fixed value
of  is the same for all for different values of t. In other examples the slope may
also depend on the independent variable.
Example 15-3: Write down (but don’t solve) the differential equations which de-
scribe the following processes:

a) A body moves with a velocity which is inversely proportional to its dis-


placement s from a fixed point.

b) The rate at which a certain plant height increases is proportional to the


natural logarithm of the difference between its present height and its
final height, H.

149
c) A body falling under gravity feels an air resistance which causes a de-
celeration proportional to the square of its speed.

Example 15-4: A body is moving with a constant acceleration, a. Solve the rele-
vant differential equations to find the distance travelled, s, as a function of time t.
The initial velocity is u and the body starts from the origin, i.e. s=0 at t=0.

Note that in this problem, a second derivative (i.e. d2 s/dt 2 ) was involved in the
differential equation and two integrations were needed, resulting in two constants of
integration. Therefore we needed two initial conditions to determine the constants.

In general, the solution of differential equation involving dn y /dx n requires n inte-


grations. These will introduce n constants of integration. As a result n boundary
conditions, that is values of y or dy/ d for a given values of  will be needed to
determine these constants.

If the independent variable is time, and if the boundary conditions are given for
when time is equal to zero, then they are usually referred to as initial conditions.
So initial conditions are special type of boundary conditions.

15.2 Formation of Differential Equations

Consider the family of curves described by

y = C 2 + 

(15.5)

150
where C is an arbitrary constant. It is possible to find the differential equation
whose general solution is equation (15.5). Differentiation of (15.5) leads to

dy
= C (2 + 1) (15.6)
d
The constant C can then eliminated from equations (15.5) and (15.6), to give

dy (2 + 1) y
= (15.7)
2 + 

d

or, equivalently

 dy
2 +  − (2 + 1) y = 0 (15.8)
d
Equation (15.8) and (15.7) are differential equation whose general solution is equa-
tion (15.5). All curves, described by equation (15.5) and corresponding to various
values of C are possible solutions.
If the boundary conditions for example when x=1, y =2, are prescribed, then C is
found to be equal to 1, and we have the particular solution

y = 2 +  (15.9)

2
(1,2)

1
(-0.5,0.5)

0
y

−1

(-3,-1.5)
−2 C=1
C = −0.25
C = −2
−3
−3 −2 −1 0 1 2

dy (2+1)y
Figure 31: Slope field of d
= 2 +
, with solutions y() = C(2 + )

151
15.3 Slope Fields Examples

On each slope field, sketch any three particular solutions and find the correspond-
ing

(a) differential equation (b) general solution

δy
δ
= y y = ke −  − 1
δy y
δ
= −
2
δy y = ke y = k
= − y δy 
2
δ
δ
= y
k
δy y=
δ
=+y y 2 − 2 = k 

δy y
δ
= 
y 2 + 2 = k

1. 2. 3.

4. 5. 6.

Use the interactive Desmos slope field generator to check your answers if you wish

152
15.4 Classification of Differential Equations

The need to classify differential equations arises from the fact that we seek a sys-
tematic approach to solving them. We will learn various solution methods which
will apply to one class of differential equations and not to another.
The following terms are used to classify differential equations:

a) ordinary or partial

An ordinary differential equation is one where only one independent


variable is present whereas a partial differential equation in one where
two or more independent variables are present.

Examples:
∂z ∂z
=z+ is a partial differential equation
∂ ∂y
dy
 + y = 3 is an ordinary differential equation
d
b) order

The order of a differential equation is the order of the highest differential


coefficient appearing in the differential equation

Examples:
dy
 + y = 3 is a first order differential equation
d
d2 y dy
+ 3y + 2 = 0 is a second order differential equation
d2 d
c) degree

The degree of a differential equation is the power to which the high-


est order differential coefficient is raised when fractional powers are re-
moved and fractions cleared.

NOTE: This applies only to differential equations which can be written


as a polynomial in the differential coefficients.

Examples:
dy
 + y = 3 is a first degree differential equation
d

153
Œ2 3
d2 y
‚
dy

+ + 3y = 2 is a second degree differential equation
d2 d
2 ™3/ 2
d2 y
–
dy

= 3 1+ is a second degree differential equation
d2 d
(since we need to clear the square root).
dy dy
e d + =  degree does not apply (since differential equation is not
d
in a polynomial form)

d) linear or non-linear

A differential equation is said to be linear if it is linear in the terms y,


dy /dx, d2 y /dx 2 and all higher order derivatives. If this condition is not
satisfied, the differential equation is non-linear.

Examples:
dy
 + y = 3 is a linear differential equation
d
d2 y dy
+ 3y + 2 = 0 is a non-linear differential equation
d2 d
dy
 + y 2 = 3 is a non-linear differential equation
d
Example 15-5: Classify each of the following ordinary differential equations as to
order and degree. Which are linear?

d3 y dy 3
 
a) + + y 2 = e
d3 d
v
t dr
u
b) + r = sin t
dt
−3
dy dy

c) += y−
d d
In this course we will only cover ordinary, first and second order, mainly linear
differential equations.

154
15.5 Problems: Introduction to Differential Equations

Q1) Find the differential equations that describe:


The decay of a radioactive species;
The decay of voltage (V) across a capacitor (C) as it discharges through
a resistor (R);
Newton’s Law of cooling.

Q2) Classify the differential equations:

d3 y d2 y
a) + y 2 = 0.
d3 d
1 d dy
 
b) 2  2
= e− .
 d d
∂ ∂ ∂2 
c) + .=ν
∂t ∂ ∂2
d2  d
d)  2 + b + cy = 0.
dy dy

[Answer: a) 3rd order, ode, nonlinear(NL), b) 2nd order, ode, linear(L),


c) 2nd order, pde, NL, d) 2nd order, ode, L]

Q3) Find the differential equation whose general solution is:

a) y = A + 2,

b) y 2 = A ln  + y,

where y = y() and A is a constant.


dy y 2 dy
[Answer: a) − = − , b) y 2 =  (2y − 1) ln  + y ]
d   d
Q4) Find the differential equation whose general solution is:

a) y() = Ae2 + Be− + 2,

b) (t) = Ae−t cos(3t + B).

where A and B are constants.


.
[Answer: a) y ′′ − y ′ − 2y = −2(1 + 2), b) ̈ + 2  +10 = 0]

155
16 FIRST ORDER ORDINARY DIFFERENTIAL EQUA-
TIONS

First order differential equationss are of the type:

dy
= F (, y) (16.1)
d
where F is an arbitrary function of  and y.

16.1 Variables Separable Equations

These are equations where F can be expressed as a product of a function of  only


and a function of y only:

F (, y) = X()Y (y) (16.2)

Then we can separate the variables such that all the terms involving y can be
arranged on one side of the equation and all those involving  can be arranged on
the other side:
dy
= X()d (16.3)
Y (y)
The solution is then given by integration:

dy
Z Z
= X()d + C (16.4)
Y (y)
where C is a constant of integration.
We have used this method already to solve (15.4).

156
dy
Example 16-1: Solve 2 = y 3 (Note that this is a non-linear D.E.)
d

16.2 Homogeneous Equations

A first order ordinary differential equation is said to be homogeneous if the function


F in equation (16.1) can be expressed in terms of the single variable y/x, the ratio
of the dependent to the independent variable. In other words, the equation takes
the form:
dy y‹
= F (, y) = ƒ (16.5)
d 
The way to proceed is to make the substitution () = y()/  and change the
variables of the D.E. from (y, ) to (, ). Therefore, dy/ d needs to be substituted
as well in terms of ,  and d/ d. To achieve this, the equation  = y/  is
differentiated once:
dy d
y() = () =⇒ =+ = ƒ () (16.6)
d d
There is no need to memorise equation (16.6), it is best to derive it when needed.
d ƒ () − 
Hence = which is a variables separable differential equation (for  in
d 
terms of ).

157
dy
Example 16-2: Find the general solution of: 2 = y − y 2
d
(Note that this is a non-linear equation and that it can not be solved using the
variables separable approach).
We first check if the D.E. can be written in the form of equation (16.5):

dy y − y 2 y y2 y‹
= = − =ƒ (16.7)
d 2  2 
So the differential equation is a homogeneous equation. We proceed by using the
substitution  = y/ , hence:

dy d
= +  =  − 2
d d
d
 = − 2
Z d Z
−−2 d = −1 d

−1 = ln || + C
1
=
ln || + C

and


y = =
ln || + C

158
dy q
Example 16-3: Find the general solution of  =y+ 2 − y 2
d
(Note that this is a non-linear equation of degree 2 and that it can not be solved
using the variables separable approach).

159
16.3 Exact Differential Equations

Equation (16.1), the general form of a first order ordinary differential equation, can
be written in the alternative form

P (, y) d + Q (, y) dy = 0 (16.8)

The solution to this equation can be written as z(, y) = C, where C is a constant


of integration. Now, for small changes δ and δy in the variables  and y, the
corresponding change in function z (, y), which depends on both  and y, is:
∂z ∂z
δz = δ + δy = 0 (16.9)
∂ ∂y
The result is zero because z is equal to C (a constant). If equations (16.8) and (16.9)
are identical, in which case equation (16.8) is said to be an exact equation, then:
∂z ∂z
P (, y) ≡ Q (, y) ≡ (16.10)
∂ ∂y
But
∂ ∂z ∂ ∂z
   
= (16.11)
∂y ∂ ∂ ∂y
which requires that:
∂P ∂Q
= (16.12)
∂y ∂
Equation (16.12) is a necessary and sufficient condition for (16.8) to be exact.
If equation (16.8)) is exact, then:
Z
z= P (, y) d + ƒ (y)
y const

and
Z
z= Q (, y) dy + g() (16.13)
 const
where the integrations are partial integrations (the reverse of partial differentia-
tion), keeping in the first case y constant, and in the second  constant. If the
equation was exact, functions ƒ (arbitrary function of y introduced upon partial in-
tegration w.r.t. ) and g (arbitrary function of  introduced upon partial integration
w.r.t. y) can be chosen to make these two alternative forms of expression for z
identical, and hence the solution is obtained.

160
Example 16-4: Find the general solution of the following first order differential
equation (note that it is non-linear and that it is not a variables separable nor a
homogeneous equation)

dy 2y 2 + sin 
+ =0
d 22 y + cos y

can be rearranged as

2y 2 + sin  d + 22 y + cos y dy =0


 

Therefore,

P (, y) ≡ 2y 2 + sin  Q (, y) ≡ 22 y + cos y


 
(16.14)
∂P ∂Q
= = (16.15)
∂y ∂

check to see if

∂P ∂Q
= (16.16)
∂y ∂
and if so the equation is exact. The solution z(, y) = C can be obtained from:
Z Z
z= P (, y) d + ƒ (y) = 2y 2 + sin  d + ƒ (y)

y const y const

=2 y 2 − cos  + ƒ (y)

and
Z Z
z= Q (, y) dy + g() = 22 y + cos y dy + g()

 const  const

=2 y 2 + sin y + g()

These two results for z can be made identical by choosing

ƒ (y) = sin y g() = − cos 

and the solution is then:

2 y 2 − cos  + sin y = C

161
dy 2 + y + 1
Example 16-5: Find the general solution of =− (Note that this
d  + 2y + 1
a non-linear equation and that it is not a variables separable nor a homogeneous
equation)

4
C = −0.33
3 C=1
C=5
2

0
y

−1

−2

−3

−4
−4 −3 −2 −1 0 1 2 3 4

dy 2+y+1
Figure 32: d
= − +2y+1 slope field, with solutions 2 + y 2 + y +  + y = C

162
If the D.E. is not exact , it can be made exact by multiplying by a function λ(x,y),
known as an integrating factor. Determining the form of λ in such cases can
be quite difficult and it will not be dealt with in this course. However, you might
be given ‘hints’ as to the form of λ and you will then be asked to determine it. In
addition, note that in the special case where the D.E. is linear, the integrating factor
is a function of  only. The method of determining λ() in such cases will be dealt
with in the following section (section 16.4: Linear Equations).
Example 16-6: Show that the function λ(y) = y n is a suitable integrating factor
 dy
which will make 4y + 3 d + y 2 + 2 y = 0 exact and hence determine n.


y n y 2 + 2 y d + y n 4xy + 3 dy =0
 

y n+2 + 2 y n+1 d + 4xyn+1 + 3 y n dy =0


 

∂P
= (n + 2) y n+1 + (n + 1) 2 y n
∂y
∂Q
=4y n+1 + 32 y n
∂
Therefore n has to be equal to 2 for the modified (multiplied by λ) D.E. to be exact,
∂P ∂Q
i.e. such that ∂y
= ∂
. The modified equation can then be solved using the usual
method applying to exact equations:

163
16.4 Linear Differential Equations

The general form of a linear first order ordinary differential equation, which is a
particular case of equation (16.1), can be expressed as:
dy
ƒ1 () + ƒ0 ()y = g() (16.17)
d
The equation is first arranged in the form:
dy
+ R()y = S() (16.18)
d
where R() = ƒ0 ()/ ƒ1 () and S() = g()/ ƒ1 (). This is then re-arranged to
the form used for exact equations (equation (16.8)):

[R()y − S()] d + dy = 0 (16.19)

Equation (16.19) is not exact, unless R() is zero, in which case the solution of
equation (16.18) is straight forward. Why?
It is possible to make it exact, however, by multiplying through by an integrating
factor, λ(). Note that in the case of linear equations dealt with in this section,
λ() is a function of  only. In section 16.3, where the analysis was not constrained
to linear equations only, λ could, in general, be a function of both  and y.
So the modified D.E. is:

λ() [R()y − S()] d + λ()dy = 0 (16.20)

P (, y) ≡λ() [R()y − S()] , Q (, y) ≡ λ()

where
∂P ∂Q dλ
=λ()R(), =
∂y ∂ d
and for exactness:

=λ()R()
d
This is a variables separable equation, which can be solved to find the integrating
factor:

Z R
R()d
= R()d =⇒ ln λ = R()d =⇒ λ() = e
λ()

164
With this form of the integrating factor, equation (16.20):

λ() [R()y− S()] d + λ()dy = 0

becomes:
R R R
R()d R()d R()d
e R()yd+e dy − e S()d = 0

or
R
R()d
R
R()d
dy R
R()d
e R()y+e =e S() (16.21)
d

The first two terms form an exact derivative, i.e.:


R
R()d
R
R()d
dy d ” R
R()d
—
e R()y+e = e y (16.22)
d d

so equation (16.21) becomes:

d ” R
R()d
— R
e y =e R()d S() (16.23)
d

and integrating both sides leads to:


R
Z R
R()d R()d
ye = e S()d + C

which gives the solution for y

1
Z R

R()d
y= R e S()d + C
R()d
e

1
Z 
y= λ()S()d + C
λ()
R
You should memorise λ() = e R()d
so that you can use it directly without proof.

165
Example Find the general solution of the linear first order equation:

dy
+ y tnh  = sinh 
d
Note that this is already in the standard form (i.e. equation (16.18)). The integrating
R
factor is: λ = e tnh xdx
= eln|cosh | = cosh 
and the equation becomes:

dy
cosh  + y sinh  = sinh  cosh 
d
d sinh 2
(y cosh ) =
d 2

and integrating:

cosh 2
y cosh  = +C
4

or

cosh 2
 
y =sech +C
4

dy
Example 16-7: Find the solution of  + 3y = 3 given y=1/6 when =1.
d

166
16.5 Summary of possible methods of solving first order dif-
ferential equationss

We have covered four methods which can be used to solve first order differential
equations:

a) variables separable (leads to two integrations, one w.r.t  and one w.r.t.
y)

b) homogeneous (use y/= and solve resulting variables separable equa-


tion)

c) exact (use partial integration to determine the function z=z(,y)=C)

d) linear (use integrating factor to make equation exact and integrate)

One would generally not be given the method to solve the equation so there is a
need for a systematic approach. The simplest method is the variables separable
so that would be the first choice. If the D.E. is not a variables separable, then check
if it is linear. If it is, find the integrating factor to make equation exact and solve. If
the D.E. is not linear, check if it is homogeneous or an exact equation.

167
dy
Example 16-8: Find the general solution of + y cot  = sec 
d

dy
Example 16-9: Find the general solution of  − y = y2
d

168
dy +y
Example 16-10: Find the general solution of =
d −y

dy
Example 16-11: Find the general solution of  cos y d + sin y = cos 

Example 16-12: Find the general solution of

y 3 cos (xy) d + [2y sin (xy) + xy2 cos (xy) + 1]dy = 0

169
16.6 Problems: First Order Differential Equations

Variable Separable

Q1) Solve the following problems by separating the variables:

dy 1
a) =1+ with y(1) = 0;
d y2
dy 2
b) = with y(0) = 1.
d y(1 + 3 )

.
2
[Answer: a) y − tn−1 y =  − 1, b) y 2 = 1 + 3
ln(1 + 3 )]

Homogeneous Equations

Q2) Find the general solution of the differential equations:

dy
a) 2 + y − y 2 = 0;
d
dy 2 + 3y + y 2
b) = .
d 2

.
[Answer: a) y = −2 K2−1 , b) − +y

= ln  + C]

Exact Differential Equations

Q3) Determine which of the following equations are exact and integrate those
that are:

dy
a) 2y d + 32 + y 2 = 0;

b) (92 + y − 1)d + ( − 4y)dy = 0;

c) (e sin y + 3y)d + (e sin y − 3)dy = 0;


dy
d) sinh  sinh y d + cosh  cosh y = 0.

.
[Answer: a) 3 + y 2 = C, b) 33 + y −  − 2y 2 = C, c) Not exact,
d) sinh  cosh y = C.]

170
Q4) Show that the differential equation

dy
(3 − 2y) +  + 2y 2 = 0
d
is not exact but can be made so by multiplying throughout by a suitable
power of . Hence find its general solution.
[Answer: Integrating factor −3 , y − −1 − −2 y 2 = C]

Q5) Show that the differential equation

dy
 cos y + ( + 2) sin y = 0
d
is not exact but can be made so by multiplying throughout by a suitable
power of  times e . Hence find its general solution.
[Answer: Integrating factor e , 2 e sin y = C]

Linear Equations

Q6) Solve the following linear differential equations:


dy
a) (2 + 1) + y = ;
d
dy
b) ( + ) − 3y = ( + )5 ;
d
dy
c) + 2 tn  y = sin  with y(π/ 3) = 0.
d
.
C 1
[Answer: a), y = 1 + p , b) y = 2
( + )5 + C( + )3 , c) y =
2 +1
cos (1 − 2 cos ) ]
dy
Q7) By substituting y() = 1/ (), show that the non-linear equation +
d
d
2y = y 2 reduces to the linear equation − 2 = −. Hence find
d
the general solution of the non-linear equation.
€ 2
Š
[Answer: 1y = 21 C′ e + 1 ]

171
General Problems

Q8) Find the general solution of the following differential equations:


dy y y2
a) = + ;
d  2
dy 2 + 1
b) y = 2 ;
d y −1
dy
c)  − y = y 2 e2 [Hint: the substitution y() = 1/ () might
d
be useful.]

.
[Answer: a)− = y ln C′ , b) y 4 − 2y 2 = 22 + 4 ln  + C′ , c) − =
€ Š
y 12 e2 + C ]

Q9) Find the solution of the following problems:


dy
a) (1 + 2 )+ 4y = 1 with y(0) = 1;
d
dy y + e−
b) +y= with y(0) = 1;
d +1
.
3
[Answer: a) (1 + 2 )2 y =  + 3
+ 1, b) y = e− (2 + 1)]

Q10) Show that the substitution  = y 1−n makes the following non-linear
equation linear
dy
+ P()y = Q()y n n>1
d
Use this result to solve:
dy 2 y3
+ y=
d  2

Q11) A spherical balloon is being inflated by the injection of air through a


small hole, such that at any instant the rate of increase of the enclosed
volume is proportional to the radius, r.

Obtain a differential equation for r and hence find r(t).

If it takes five seconds for the balloon to double its original volume, show
15
that the original radius is doubled in 2/ 3 seconds.
(2 − 1)

172
€ Š
d d 1 2
Q12) Show that the acceleration, dt
can be written as ds 2
 , where , s
and t are the speed, distance and time respectively.

A ball of mass, m, is projected vertically upwards with an initial speed,


U, in a medium in which the resistance is proportional to the square of
the speed and the acceleration due to gravity, g, is a constant. On its
upwards motion, the speed of the ball is governed by the equation of
motion m d
dt
= −mg − mk 2 , where k is a constant.

Show that the ball rises to a height

kU2
‚ Œ
1
s= ln 1 +
2k g

above the point of projection before beginning to fall.

Q13) A radio-active element A with mass A(t) decays into element B with
mass B(t) at a rate equal to α times the mass of A present at time t.
The element B changes into an element C at a rate equal to β times the
mass of B present at time t, B(t).

If, initially, only A is present with and mass Ao , show that the mass of C
present at time t is

1
 
−αt −βt
C(t) = Ao 1 + (βe − αe ).
(α − β)
dA dB dC
Hint: Deduce expressions for ,
dt dt
and dt
. Note that A + B + C =
constant.

173
17 SECOND ORDER ORDINARY DIFFERENTIAL EQUA-
TIONS

Three special types of second orderODEs will be dealt with in this course. These
are the equations with the dependent variable absent, the equations with the inde-
pendent variable absent and the linear equations with constant coefficients.

17.1 Equations with the Dependent Variable Absent

Example 17-1:

d2 y dy
 + = 4
d2 d

(There is no term involving the dependent variable y ).


Let

dy dp d2 y
p= =⇒ =
d d d2

and the differential equation then becomes

d2 y dy
 + = 4
d2 d
dp
 + p = 4
d

The equation is a first order equation for the variables p and x.


This first order equation is not of the variables separable type but it is linear and
exact (and hence no need for integrating factor). So,

dp
 + p = 4
d
d (p)
= 4
d
p = 22 + C1

dy C1
=⇒ = 2 +
d 

174
y = 2 + C1 ln || + C2

Note that the general solution to a second order ordinary differential equation
should contain two constants of integration.
2
d2 y dy

Example 17-2: Find the general solution of =
d2 d

175
17.2 Equations with the Independent Variable Absent

Example 17-3:

d2 y
−y=0
d2

There is no term involving the independent variable x. As in the case of the previous
type of equation (dependent variable absent), the appropriate form of substitution
is for the first derivative p = dy/ d
If

dy d2 y dp dp dy dp
p= =⇒ = = =p
d d2 d dy d dy

and the differential equation becomes:

d2 y
−y=0
d2
dp
p −y=0
dy

This first order equation of the variables p and y and is of the variables separable
type, i.e.:

dp
p −y=0
dy
p dp = y dy
p2 y2
= + C1
2 2

q
p= y 2 + 2C1

dy q
=⇒ = y 2 + 2C1
d
dy
Æ = d
y 2 + 2C1

176
Integrating leads to the following solution (LHS is a standard integral, use a sinh
substitution or look it up in the Data and Formula Book):
y
 
−1
p
sinh p =  + C2 =⇒ y = 2C1 sinh ( + C2 )
2C1

d2 y dy
Example 17-4: Find the general solution of =y
d2 d

177
17.3 Linear Equations with Constant Coefficients

A linear second order ordinary differential equation with constant coefficients can
be written in the standard form:

d2 y dy
 +b + cy = ƒ () (17.1)
d2 d

where a, b and c are constants, and ƒ () is an arbitrary function of . Equa-


tion (17.1) is said to be homogeneous when f (x)=0 and to be inhomogeneous
when f (x)̸=0.

17.4 Linear Homogeneous Equations with Constant Coefficients

In this section we will study ODE’s of the form:

d2 y dy
 +b + cy = 0 or y ′′ + by ′ + cy = 0 (17.2)
d2 d

The solution to such an equation can be assumed to be of the form y = Ceμ ,


where C is a constant. The reason for this choice is that the derivatives of such
a function only differ from the original function by a constant number, which is the
form required in the constant coefficient differential equation.

′ ′′
Iƒ y = Ceμ =⇒ y = μCeμ = μy, y = μ2 Ceμ = μ2 y

Substitution into equation (17.2) gives:

(μ2 + bμ + c)y = 0

therefore (because y = 0 is a trivial solution):

μ2 + bμ + c = 0 (17.3)

This is known as the auxiliary equation, and is a quadratic equation, with two
roots for μ, say α and β, where:
p p
−b + b2 − 4c −b − b2 − 4c
α= and β=
2 2

178
These two roots, which may be real or complex, imply two possible solutions:

y1 = C1 eα and y2 = C2 eβ

Since y1 and y2 are two independent solutions of the equation (17.2), clearly the
linear combination:

y = y1 + y2 = C1 eα + C2 eβ for α ̸= β (17.4)

where C1 and C2 are arbitrary constants, is also a solution since substituting (17.4)
and its derivatives:
′ ′ ′ ′′ ′′ ′′
y = y1 + y2 and y = y1 + y2

into the L.H.S. of equation (17.2) leads to:

€ ′′ ′′
Š € ′ ′
Š
 y1 + y2 + b y1 + y2 + c (y1 + y2 )

which is equal to:


′′ ′
€ Š € ′′ ′
Š
y1 + by1 + cy1 + y2 + by2 + cy2

This last expression vanishes as each bracket is zero in virtue of y1 and y2 being
solutions of equation (17.2). This illustrates a general property of any linear ODE,
not necessarily a second order or a constant coefficients type:
“The general solution of a linear homogeneous equation is given by a linear com-
bination of the independent solutions”.
The case when α = β (equal roots of the auxiliary equation) is a special one, which
will be treated shortly. The constants C1 and C2 (note two integration constants
for second order ODE) can be found from the boundary or initial conditions applied
to equation (17.4).
Example 17-5: Find the general solution of

y ′′ − 5y ′ + 6y = 0

The auxiliary equation is:


and the roots are:

α= β=

179
Therefore the solution is.:

y = C1 eα + C2 eβ =

In the case when α and β are complex, say α, β = m ± n, the general solution is:

y = C1 eα + C2 eβ = C1 e(m+n) + C2 e(m−n) = em C1 en + C2 e−n




(17.5)

The above is normally written in a different form using the relations:

en = cos n +  sin n e−n = cos (−n) +  sin (−n)

= cos n −  sin n

In this way equation (17.5) becomes:

y = em (D1 cos n + D2 sin n) (17.6a)

or

y = E1 em cos (n + E2 ) (17.6b)

In the special case when α = β then equation (17.4) can be written as:

y = C1 eα + C2 eα = (C1 + C2 ) eα = C3 eα

where C3 is simply the sum of constants C1 and C2 . There are no longer two
independent constants, and the solution cannot be the required general solution.

180
Clearly, the exponential function eα  is likely to feature in the general solution,
which may be assumed to take the form:

y =  () eα

such that:

′ ′
y =  eα + αeα

and

′′ ′′ ′
y =  eα + 2α eα + α 2 eα

′ ′′
Substituting y, y and y into equation (17.2):

′′ ′ ′
 eα + 2α eα + α 2 eα + b eα + bαeα + ceα = 0

which simplifies to:

′′ ′
 + (2α + b)  + α 2 + bα + c  = 0

(17.7)

By virtue of α being a root of the auxiliary equation (17.3), the last bracket of
equation (17.7) vanishes. In addition, since both roots of equation (17.3) are equal
to α and α = −b/ 2, the second term of equation (17.5) also vanishes. Therefore,
the second derivative of the function u(x) is zero which means that u takes the form:

() = C1  + C2

and the required general solution is:

y = (C1  + C2 ) eα (for α = β)

where C1 and C2 are constants of integration.

181
Example 17-6: Find the general solution of

′′ ′
y − 6y + 25y = 0

The auxiliary equation is:


and the roots are:

α= β=

Therefore the solution is.:

y=

Example 17-7: Find the general solution of

′′ ′
y − 2y + y = 0

The auxiliary equation is:


and the roots are:

α= β=

Therefore the solution is.:

y=

182
Example 17-8: Summarise the possible forms of the general solution of

y ′′ + by ′ + cy = 0

by filling in the table below (the table ought to be memorised).

b2 -4ac General solution


positive y=

zero y=

negative y=

Table 2: Summary Table

183
17.5 Linear Inhomogeneous Equations with Constant Coeffi-
cients

In this section we will study the general solution of the inhomogeneous equation:

d2 y dy
 +b + cy = ƒ () (17.8)
d2 d
where a, b and c are constants, and f (x) is an arbitrary function.
Let y1 () be any one solution of equation (17.8). This on its own, cannot be the
general solution, since it does not contain any arbitrary constants; two arbitrary
constants are needed in a general solution of a second order ODE Let the general
solution be y() = y1 () + (), where (), must contain the two arbitrary
constants.
Substituting, we obtain:
€ ′′ ′′
Š € ′ ′
Š ′′ ′ ′′ ′
 y1 +  + b y1 +  + c (y1 + ) = y1 + by1 + cy1 +  + b + c = ƒ

Since y1 () satisfies (17.8), we have:

′′ ′ ′′ ′
y1 + by1 + cy1 = ƒ =⇒  + b + c = 0

In other words, the function () is the solution of the corresponding homoge-
neous equation, with ƒ () set to zero. Therefore, () can easily be found as
outlined in the previous section for homogeneous equations (section 17.4). When
() is added to y1 (), the general solution of equation (17.8) is obtained. The
solution y1 () is called the particular integral (P.I.) while the function u is called
the complementary function (C.F.). Hence, the general solution is given by the
sum: C.F.+P.I.
The method for finding the P.I. which is adopted in this course is the method of
undetermined coefficients. This only works if the function ƒ () in (17.8) is of the
form:

ƒ () = (A0 + A1  + . . . + An n )ep cos(q)


(17.9)

or

ƒ () = (A0 + A1  + . . . + An n )ep sin(q) (17.10)

184
where A0 , A1 , · · · An , p and q are constants. Note that equations (17.9) and
(17.10) are general forms and we will rarely have equations where A0 , A1 , · · · An ,
p and q all appear, i.e. in many problems many of these constants are zero and
the form of ƒ () is much simpler than (17.9) or (17.10).
Now, if neither of the roots of the auxiliary equation is equal to p + q, then we try
a P.I. of the form:

y1 () = B0 + B1  + . . . + Bn n ep sin(q)




+ C0 + C1  + . . . + Cn n ep cos(q)

(17.11)

where B0 , B1 , . . . Bn and C0 , C1 , . . . Cn are called the undetermined coefficients.


These can be found by substituting equation (17.11) into (17.8) and equating co-
efficients of the resulting equation. Again note that the form p+iq is general, i.e. it
could be a real number (q=0), imaginary (p = 0) or complex (p ̸= 0 and q ̸= 0).
If one of the roots of the auxiliary equation is equal to p + q, then we try or guess
that the P.I. is of the similar form as in (17.11) but multiplied by , i.e.:

y1 () =  B0 + B1  + . . . + Bn n ep sin(q)




+  C0 + C1  + . . . + Cn n ep cos(q)

(17.12)

If both of the roots of the auxiliary equation are equal to p + q, then we try or
guess that the P.I. is of the similar form as in (17.11) but multiplied by 2 , i.e.:

y1 () = 2 B0 + B1  + . . . + Bn n ep sin(q)




+ 2 C0 + C1  + . . . + Cn n ep cos(q)

(17.13)

185
17.6 Summary of the method for finding the General Solution
of Linear Homogeneous and Inhomogeneous Equations
with Constant Coefficients.

To minimise the chances of making mistakes in the finding the solution of 2nd Order
Linear Homogeneous and Inhomogeneous equations it is wise to follow the follow-
ing procedure. In both cases the homogeneous equation is solved first, i.e. the
complementary function (C.F.) is found.

1. Solve the Homogeneous problem,

a) Write down the auxiliary equations and find the two roots, α and β.

b) Form the complementary function (C.F.) from α and β.

The General solution of the homogeneous equation is the complementary


function.

2. Solve the Inhomogeneous equation, i.e. use the method of undetermined


coefficients.

a) Check that the right-hand-side of the differential equation is of the


general form.

b) Identify p and q and form p + q.

c) Check p + q against the values of α and β and then construct the


appropriate form of the trial solution.

d) Substitute the trial function into the original differential equation and
find the values of the undetermined coefficients.

e) Substitute the coefficients found into the trial function and thus form
the particular integral (P.I.).

The general solution of the inhomogeneous equation is the complementary


function + particular integral. Once the general solution has been found the
specific solution can be found by using the boundary conditions to find the un-
known constants, note that in both cases (homogeneous and inhomogeneous) the
unknown constants appear in the complementary function.

186
Example 17-9: Find the general solution of y ′′ − 5y ′ + 6y =  + 22
The auxiliary equation is:
and the roots are:

α= β=

Therefore the C.F. is.:

=

ƒ () is of the required form with p = ,q = i.e. p + q = and n = .

So we try:

y1 =

then


y1 =

and

′′
y1 =

′ ′′
and substituting y1 , y1 and y1 into the differential equation:

Because this equation must hold for all values of x, coefficients of 2 , 1 and 0
(that is, constants) on the two sides of this equation can be equated:
coefficients of 2 :

187
coefficients of 1 :

coefficients of 0 (constants):

and the P.I. is:

y1 =

The general solution is

y =  + y1 =

188
Example 17-10: Find the general solution of y ′′ + y ′ = 1
The auxiliary equation is:
and the roots are:

α= β=

Therefore the C.F. is.:

=

ƒ () is of the required form with p = ,q = i.e. p + q = and n = .

So we try:

y1 =

then


y1 =

and

′′
y1 =

′ ′′
and substituting y1 , y1 and y1 into the differential equation:

and the P.I. is:

y1 =

The general solution is

y =  + y1 =

189
Check what would have happened if we had tried y1 =C as a P.I.

Example 17-11: Find the general solution of y ′′ − 5y ′ + 6y = e4


The auxiliary equation is:
and the roots are:

α= β=

Therefore the C.F. is.:

=

ƒ () is of the required form with p = ,q = i.e. p + q = and n = .

So we try:

y1 =

then


y1 =

and

′′
y1 =

190
′ ′′
and substituting y1 , y1 and y1 into the differential equation:

Coefficients of e4x on the two sides of this equation can be equated:


from which:

and the P.I. is:

y1 =

The general solution is

y =  + y1 =

191
Example 17-12: Find the general solution of y ′′ − 2y ′ + y = e
The auxiliary equation is:
and the roots are:

α= β=

Therefore the C.F. is.:

=

ƒ () is of the required form with p = ,q = i.e. p + q = and n = .

So we try:

y1 =

then

y1 =

and
′′
y1 =

′ ′′
and substituting y1 , y1 and y1 into the differential equation:

Coefficients of e on the two sides of this equation can be equated:


from which:

and the P.I. is:

y1 =

192
The general solution is

y =  + y1 =

Example 17-13: Find the general solution of y ′′ − 5y ′ + 6y = 3 sin 4


The auxiliary equation is:
and the roots are:

α= β=

Therefore the C.F. is.:

=

ƒ () is of the required form with p = ,q = i.e. p + q = and n = .

So we try:

y1 =

then


y1 =

and

′′
y1 =

193
′ ′′
and substituting y1 , y1 and y1 into the differential equation:

The coefficients of sin4x and cos4x on the two sides of this equation can be
equated:
coefficients of sin4x:

coefficients of cos4x:

and the P.I. is:

y1 =

The general solution is

y =  + y1 =

Example 17-14: Find the general solution of y ′′ + y = cos 


The auxiliary equation is:
and the roots are:

α= β=

Therefore the C.F. is.:

=

ƒ () is of the required form with p = ,q = i.e. p + q = and n = .

194
So we try:

y1 =

then


y1 =

and

′′
y1 =

′ ′′
and substituting y1 , y1 and y1 into the differential equation:

The coefficients of sin  and cos  on the two sides of this equation can be
equated:
coefficients of sinx:
coefficients of cosx:
from which:

and the P.I. is:

y1 =

The general solution is

y =  + y1 =

195
Finally, if f (x) consists of the sum (or difference) of any two or more functions whose
form is as in (17.9) or (17.10), then each part may be dealt with separately, and the
results added. Therefore the differential equation

′′ ′
y + by + cy = ƒ1 + ƒ2

has a general solution:

y =  + y1 + y2

′′ ′
where u is the C.F. (i.e the solution of y + by + cy = 0), y1 is the P.I.1 (i.e.
′′ ′ ′′
the solution of y + by + cy = ƒ1 ) and y2 is the P.I.2 (i.e. the solution of y +

by + cy = ƒ2 ). To prove this, we substitute the assumed general solution into the
differential equation:

′′ ′
y + by + cy =

€ ′′ ′′ ′′
Š € ′ ′ ′
Š
  + y1 + y2 + b  + y1 + y2 + c ( + y1 + y2 ) =

€ ′′ ′
Š € ′′ ′
Š ′′ ′
y1 + by1 + cy1 + y2 + by2 + cy2 +  + b + c =


ƒ1 + ƒ2 + 0 =

ƒ1 + ƒ2

i.e it satisfies the differential equation.

196
′′ ′
Example 17-15: Find the general solution of y − 3y + 2y =  + e− .
The auxiliary equation is:
and the roots are:

α= β=

Therefore the C.F. is.:

=

′′ ′
First find the particular integral, y1 () for y − 3y + 2y = 
ƒ () is of the required form with p = ,q = i.e. p + q = and n = .

So we try:

y1 =

then


y1 =

and

′′
y1 =

′ ′′
and substituting y1 , y1 and y1 into the differential equation:

The coefficients of  and the constants (0 ) on the two sides of this equation can
be equated:
coefficients of 1 :
coefficients of 0 (constants):

197
and the P.I. is:

y1 =
′′ ′
Then find the particular integral, y − 3y + 2y = e−
ƒ () is of the required form with p = ,q = i.e. p + q = and n = .

So we try:

y1 =

then

y1 =

and
′′
y1 =

′ ′′
and substituting y1 , y1 and y1 into the differential equation:

The coefficients of e− and e− on the two sides of this equation can be equated:
coefficients of e−: :
coefficients of e− :
and the P.I. is:

y2 =

The general solution is

y = +y1 +y2 =

Note that in all cases, the arbitrary constants of integration can be found by substi-
tuting two prescribed initial conditions in the general solution.
Another case where ƒ () is a sum (or difference) of functions is when ƒ () consists
of hyperbolic functions, sinh  and cosh . These can be treated as a sum (or
difference) of exponentials.

198
17.7 Problems: Second Order Differential Equations

Equations with the Dependent Variable Absent

Q1) Find the general solutions of the following differential equations:

2
d2 y dy
a)  + 2 − 1 = 0;
d2 d
d2 y dy
b)  +
= 1;
d2d
2y 2
d dy

c) 2 2 = ;
d d

.
C1
[Answer: a) y = ln  − 
+ C2 , b) y =  + C1 ln  + C2 , c) y =
ln|C1 −1| 
− − + C2 ]
C21 C1

Equations with the Independent Variable Absent

Q2) Find the general solutions of the following differential equations:


2
d2 y dy

2
a) 2y + 2y = 1;
d2 d
2
d2 y dy

b) y + = 0;
d2 d

.
2p
[Answer: a) 3
y + C1 (y − 2C1 ) =  + C2 , b) y 2 = C1  + C2
]

Linear Homogeneous Equations with Constant Coefficients

Q3) Find the general solutions of the following differential equations:

d2 y dy
a) −3 + 2y = 0;
d2 d
d2 y dy
b) +2 + 2y = 0;
d2 d
d2 y dy
c) +4 + 4y = 0.
d2 d

199
.
[Answer: a) y = C1 e + C2 e2 , b) y = e− (D1 cos  + D2 sin ), c)
y = (C1  + C2 ) e−2 ]

Q4) The position (t) of a particle, moving on the -axis, is governed by the
equation of motion

d2  d
+2 +=0
dt 2 dt

a) Find the General Solution to the given equation.


d
b) Determine the solution if at t = 0,  = −1 and dt
= U(> 0).

c) Verify that (t) < 0 if U < 1.

d) If U = 5, find the maximum positive displacement of the par-


ticle and sketch (t) for this case.

.
[Answer: a) (t) = (C1 t + C2 ) e−t , b) (t) = ((U − 1)t − 1) e−t , c)
−,
d) max at t = 5/ 4,  = 4e−5/ 4 . ]

Linear Inhomogeneous Equations with Constant Coefficients

Q5) Find the particular integral of the following differential equations.

d2 y dy
a) −3 + 2y = 6e− ;
d2 d
d2 y dy
b) 2 −3 + y = 2 ;
d2 d
d2 y dy
c) +4 + 4y = e−2 ;
d2 d
d2 y dy
d) +2 + 4y = 12e2 ;
d2 d
d2 
e) +  = sin 2t;
dt 2
d2 
f) +  = sin t.
dt 2

200
.
1
[Answer: a) y1 = e− , b) y1 = 14 + 6 + 2 , c) y1 = 2
2 e−2  , d)
€ Š
y1 =  − 12 e2  ,
e) y1 = − 13 sin 2t, f) y1 = − 21 t cos t ]

Q6) Find the solution of each of the following differential equations:

d2 y dy
a) −3 + 2y = e ,
d2 d
d2 y dy
b) −3 + 2y = e ,
d2 d
d2 y
c) − y = e sin ,
d2
dy
which satisfies the conditions  = 0: y = 1, d
= 0.
[Answer: a) y = e (1 − ), b) y = − 12 2 + 2 − 2 e ,


2 2 1
c) y = e + 5
e− − 5
e cos  − 5
e sin  ]

d2 y dy
Q7) Find the general solution of + 6y = (1 + 4)e−3 .
+5
d2 d
[Answer: y = D0 e−2  + D1 e−3  −  (5 + 2 ) e−3  ]

Application

Q8) The radial temperature distribution T(r) in a cylindrical fuel rod of a


d2 T 1 dT
nuclear reactor is governed by the differential equation + =
dr 2 r dr
−A in the range 0 < r < ro where A and ro are constants. Solve
this equation to find the temperature distribution in the rod given that
dT
T(ro ) = To , and = 0 at r = 0.
dr
€ Š
[Answer: T = To + A4 ro2 − r 2 ]

201
18 SERIES SOLUTION OF DIFFERENTIAL EQUATIONS

18.1 Introduction

In section 17.3, we saw how to solve linear homogeneous differential equations


with constant coefficients. For example the equation:

d2 y dy
−5 + 6y = 0
d2 d

has an auxiliary equation μ2 − 5μ + 6 = 0 with roots α=2 and β=3. Therefore the
general solution is:

y = Ae2 + Be3

where A and B are arbitrary constants. The above solution can alternatively be
written in the form of a power series of x by using the Maclaurin expansion for the
exponential terms, i.e.:

   
2 2
(2) (3)
y = A 1 + (2) + + . . . + B 1 + (3) + + . . .
2! 2!

We next assume that we can extend the above idea to linear homogeneous D.E.’s
with variable coefficients, i.e. equations of the form:

′′ ′
ƒ ()y + g()y + h()y = 0 (18.1)

where f (x), g(x) and h(x) are polynomials in x. That is, we assume that equa-
tion (18.1) has a solution which is also in the form of a power series in x. The next
sections describe how to determine the power series solutions of such D.E.’s.
Series solutions are only useful when convergence of the series is rapid (only a
small number of terms in the series have to be included to obtain accurate values of
the function). This usually only occurs near where the boundary or initial conditions
are defined, and it is in such regions that series solutions are most useful.

202
18.2 Method 1: Method of Undetermined Coefficients

A straightforward method for obtaining a series solution to a differential equation


is to first assume a power series, and then to substitute this into the differential
equation in order to find the coefficients of the terms in the series (similar to the
method used for determining the coefficients of the P.I.).
Example 18-1: Use the series solution method to find the general solution of

′′ ′
y + 2y + 3y = 0


with the initial conditions y (0)=1 and y (0) = 0, up to and including the term x 5 .
(Note that this is a variable coefficients D.E. and can not be solved by any of the
methods we studied so far).
Assume the solution can be represented by a power series of the form:


X
y= n n = 0 + 1  + 2 2 + 3 3 + 4 4 + 5 5 . . . (18.2)
n=0

where the an are constants.


Now, provided the power series is absolutely convergent with a radius of con-
vergence R, it can be proven that the series obtained by differentiating term by
term is also a convergent power series having the same radius of convergence

R and it represents the derivative y of y for all x within R. Therefore, if (18.2) is
absolutely convergent:



X
y = nn n−1 = 1 + 22  + 33 2 + 44 3 + 55 4 . . . (18.3)
n=1

and

′′
X
y = n(n − 1)n n−2 = 22 + 63  + 124 2 + 205 3 + . . .
n=2
(18.4)

203
Substituting (18.2), (18.3) and (18.4) into the differential equation:

′′ ′
y + 2y + 3y = 0

(22 + 63  + 124 2 +205 3 + . . .)

+ 2(1 + 22  + 33 2 + 44 3 + 55 4 . . .)

+ 3(0 + 1  + 2 2 + 3 3 + 4 4 + 5 5 . . .) = 0

Then we collect like powers of x, finding:

(22 + 30 ) + (63 + 21 + 31 )+2 (124 + 42 + 32 )

+ 3 (205 + 63 + 33 ) + . . . = 0

Equating the coefficients of each power of x to zero, we have:

22 + 30 = 0, 63 + 51 = 0, 124 + 72 = 0, 205 + 93 = 0

from which:

3 5 7 7 9 3
2 = − 0 , 3 = − 1 , 4 = − 2 = 0 , 5 = − 3 = 1
2 6 12 8 20 8

The above can be substituted in (18.2) to give the general solution of the D.E.:

3 5 7 3
y = 0 + 1  − 0 2 − 1 3 + 0 4 + 1 5 . . .
2 6 8 8
or (18.5)
3 7 5 3
   
y = 0 1 − 2 + 4 + . . . + 1  − 3 + 5 + . . .
2 8 6 8

i.e. we have two independent solutions involving two arbitrary constants, a0 and
a1 .
These constants can be found from the given boundary conditions, y (0)=1 and

y (0) = 0. From (18.2) the value of y at x = 0 is equal to a0 , so 0 = 1. Similarly,

from (18.3), the value of y at x = 0 is equal, so 1 = 0.
Substituting the values of 0 = 1 and 1 = 0 in (18.5) gives:

3 7
y=1− 2 + 4 − .... (18.6)
2 8

204
18.3 Method 2: Use of Maclaurin series and Leibniz formula

An alternative method for obtaining a series solution to a differential equation is


to construct the Maclaurin series for the dependent variable, with the aid of the
differential equation.
Example 18-2: Solve the same D.E. as the previous question with the same initial
conditions, using the Leibniz formula.
This time we write the D.E. in D operator notation:

D2 y + 2Dy + 3y = 0 with y(0) = 1, Dy(0) = 0 (18.7)

With the initial conditions being given at x = 0, it is appropriate to assume as a


solution the expansion of y about the point x=0, namely the Maclaurin series for y :


X n n ′ 2 ′′ n
y() = D y(0) = y(0) + y (0) + y (0) + . . . + y n (0) (18.8)
n=0
n! 2! n!

Note that the first two terms of the series are given by the initial conditions. The
differential equation may be used to find the second and higher derivatives required
for the other terms in the following way:
We apply the Leibniz rule to the D.E. :

D2 y+ 2Dy+ 3y = 0

Dn+2 y+ 2Dn+1 y + 2nDn y+ 3Dn y = 0

and, setting x = 0

Dn+2 y+ +2nDn y+ 3Dn y = 0

=⇒ Dn+2 y = −(2n + 3)Dn y (18.9)

and, setting x = 0

Dn+2 y(0) = −(2n + 3)Dn y(0) (18.10)

205
Values of the individual derivatives can be found by setting n = 0, 1, 2, ..... noting
that D0 y(0) = y(0) and D1 y(0) = Dy(0) are the initial conditions given in 18.7.

n = 0 : D2 y(0) = −(2 × 0 + 3)D0 y(0) = −3 × 1 = −3

n = 1 : D3 y(0) = −(2 × 1 + 3)D1 y(0) = −5 × 0 = 0

n = 2 : D4 y(0) = −(2 × 2 + 3)D2 y(0) = −7 × (−3) = 21

n = 3 : D5 y(0) = −(2 × 3 + 3)D3 y(0) = −9 × (0) = 0

and so on. The solution is then given by putting these values into the Maclaurin
series (18.8):
2 4 3 7
y=1−3 + 21 − ··· = 1− 2 + 4 − · · ·
(18.11)
2! 4! 2 8
Therefore we get the same answer as before, i.e. equations (18.6) and (18.11) are
the same.
In order to check for convergence of the above series solution, we apply the ratio
test, i.e. we need to evaluate the ratio of successive non-zero terms (see page 65,
Autumn term notes). In this case the ratio is equal to:
Dn+2 y(0) n+2
n+2 (n+2)!
 Dn+2 y(0) 2
= Dn y(0) n
=
n  Dn y(0) (n + 2)(n + 1)
n!
Substituting equation (18.10) in the above ratio and applying the ratio test gives:
n+2 2
L = Lim = Lim − (2n + 3) =0
n→∞ n n→∞ (n + 2) (n + 1)
for all finite x
As L<1, we say that the series is absolutely convergent for all x, i.e. the radius of
convergence is infinity.

18.4 Boundary conditions at non-zero values of x.

In the description of the methods in Sections 18.2 and 18.3 the series solutions
were constructed around  = 0 and the boundary conditions prescribed at the

same location i.e. y(0) and y (0).

206
If the boundary conditions of the problem were prescribed at x equal to some

number other than zero, say  =  then y (a) and y (a) are given instead of y (0)

and y (0), then:

• The form of the series solution (Method 1) assumed in (18.2) would not be
suitable for determining the constants a0 and a1 . This is because when x=a
is substituted in (18.2) and (18.3), the terms of order higher than x 0 do not
vanish, therefore a0 and a1 can not be readily evaluated.

• Similarly, the use of a Maclaurin expansion of y (Method 2) would not be


suitable as, by definition the series is constructed about  = 0.

To accommodate for cases where the boundary conditions are prescribed at non-
zero values of , e.g.  =  two possible approaches are:

a) Rewrite the differential equation and the solution in terms ( − ), and
then proceed as before, i.e. Method 1 or Method 2 (using a Taylor Series
instead of a Maclaurin series.)

b) Change the independent variable from  to  where  = ( − ) and


then proceed as before.

To illustrate the two approaches the previous example will be modified so that that
boundary values are given at  = 2, i.e.:

y ′′ + 2y ′ + 3y = 0, y(2) = 1, y ′ (2) = 0

18.4.1 Rewrite the differential equation and the solution in terms ( − )

First rewrite the differential equation in terms of ( − ): here ( − 2), i.e.

y ′′ + 2{( − 2) + 2}y ′ + 3y = 0 (18.12)

207
Method 1: Method of Undetermined Coefficients
In such cases we assume the power series solution:

X
y= n ( − 2)n = 0 + 1 ( − 2) + 2 ( − 2)2 + 3 ( − 2)3 + . . .
n=0


X
y = nn ( − 2)n−1 = 1 + 22 ( − 2) + 33 ( − 2)2 + . . .
n=1

and similarly for the second derivative.

′′
y =

The above are then substituted in the modified D.E. (18.12):

such that like powers of (x-2)0 , (x-2)1 etc. can be set to zero and proceed as
before to find the coefficients,  .
Method 2: Use of Taylor series and Leibniz formula
Alternatively, the series solution can be constructed using the Taylor series for the
dependent variable.
In such cases we assume the power series solution:

X ( − 2)n
y() = Dn y(2)
n=0
n!
′ ( − 2)2 ′′ ( − 2)n
=y(2) + ( − 2)y (2) + y (2) + . . . + y n (2)
2! n!
(18.13)
We apply the Leibniz rule to the D.E. :

D2 y+ 2Dy+ 3y = 0

208
Dn+2 y+ 2Dn+1 y + 2nDn y+ 3Dn y = 0

and, setting x = 2

Dn+2 y+ 4Dn+1 y + 2nDn y+ 3Dn y = 0

Dn+2 y = −4Dn+1 y − (2n + 3)Dn y (18.14)

Values of the individual derivatives can be found by setting n = 0, 1, 2, .....

n = 0 : D2 y(2) = −4D1 y(2) − (2 × 0 + 3)D0 y(2) = −4 × 0 − 3 × 1 = −3

n = 1 : D3 y(2) = −4D2 y(2) − (2 × 1 + 3)D1 y(2) = −4 × (−3) − 5 × 0 = 12

n = 2 : D4 y(2) = −4D3 y(2) − (2 × 2 + 3)D2 y(2) = −4 × (12) − 7 × (−3) = −27

n = 3 : D5 y(2) = −4D4 y(2) − (2 × 3 + 3)D3 y(2) = −4 × (−27) − 9 × 12 = 0

and so on. The solution is then given by putting these values into the Taylor se-
ries (18.13):

( − 2)2 ( − 2)3 ( − 2)4


y=1−3 + 12 − 27 ··· (18.15)
2! 3! 4!

18.4.2 Change the independent variable from  to  where  = ( − )

Alternatively we can change the independent variable from x to u where:


u = x-2
such that the initial conditions are now given at u=0.
With this substitution we have:
d
=1
d
and

209
dy dy d
dy
= =
d d d d
2
d y d dy
 
d dy
 
d dy d
 
d2 y
= = = =
d2 d d d d d d d d2
The D.E. written in terms of the new variables y and u would then become:

d2 y dy
+ 2( + 2) + 3y = 0
d2 d
Finally, a power series is assumed of the form:

X
y= n n = 0 + 1  + 2 2 + 3 3 + 4 4 + . . .
n=0

and the solution proceeds as before (section 18.1), making use of the boundary
conditions at u=0. The result is finally transformed in terms of powers of (x-2), by
substituting u=x-2 in the above equation.

18.5 Examples
′′ ′
Example 18-3: Find the series solution of the D.E. y + 5y − 2y = 0 in as-
cending powers of (x-2), as far as the term in (x-2)3 , that satisfies the boundary

conditions y (2)=A and y (2) = B. (Exam question 1996).
Let’s solve this using the method of undetermined coefficients (section 6.2.2). The
boundary conditions are given at a non-zero values of x hence assume a solution
in the form:

y=

Using the boundary condition y( = 2) = A we get 0 =


y =


Using the boundary condition y ( = 2) = B we get 1 =

′′
y =

′ ′′
Substitute y, y andy in the D.E. we get:

210
We collect like powers of (x-2)0 and (x-2)1 and setting their coefficients to zero:

( − 2)0 =

From which 2 =

( − 2)1 =

From which 3 =

Therefore the series solution is:

211
Example 18-4: Find the series solution in powers of x of the differential equation
′′
(1 − 2 )y + y = 0 with boundary conditions y =1 and dy /dx=0 at x=0 (part of
exam question 1997).

212
18.6 Problems: Series Solution of Differential Equa-
tions

Q1) By assuming a power series expansion in the form, y() = 0 + 1  +


2 2 + 3 3 + · · · , where 0 , 1 , 2 , 3 · · · are all constant, show that
the equation
d2 y dy
4 +2 − y = 0,
d2 d
has a solution
2
‚ Œ

y() = 0 1 + + + ··· .
2! 4!
Verify by direct substitution that the equation has a solution
p
y() = 0 cosh( ).

d2 y
Q2) A function y() satisfies the differential equation d2
+ y = 0 and the
dy
conditions y = 1 and d
= 0 at  = 0.

Show that the derivatives of y() at  = 0 satisfy the recurrence relation


‚ n+2 Œ  n 
d y d y
= − , n = 0, 1, 2, 3, · · ·
dn+2 =0 dn =0
Hence determine the first four non-zero terms in a Maclaurin series ex-
pansion for y() and verify that y() = cos  is the solution. Use the
ratio test to show that the series converges for all values of .
2 4 6
[Answer: y() = 1 − 2!
+ 4!
− 6!
]

d2 y dy
Q3) Differentiate the equation − + 5y = 0 n-times to derive the
d2 d
recurrence relation
‚ n+2 Œ
d y dn y
 
= (n − 5) , n = 0, 1, 2, 3, · · ·
dn+2 =0 dn =0

and hence find the solution of the equation, which satisfies the condi-
dy
tions y = 0 and d
= 1 at  = 0, in the form of a polynomial of degree
5.

Verify that the solution that you have found satisfies the differential equa-
tion and the given conditions.
[Answer: y() =  − 23 3 + 1 5
15
 ]

213
Q4) Find the first five non-zero terms of the series solution in powers of − 1
of the equation

d2 y dy
( − 2) + 3( − 1) −y=0
d2 d
dy 1
with y = 1 and d
= 2
at  = 1.
1
[Answer: y() = 1 + 2
( − 1) − 12 ( − 1)2 + 16 ( − 1)3 − 7
24
( − 1)4 ]

214

You might also like