ME1 Maths Notes Spring 2425
ME1 Maths Notes Spring 2425
-1 1
-1
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
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
ii
12 MATRICES
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
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
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,
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
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.
n
X
c11 = 11 b11 + 12 b21 + · · · + 1n bn1 = 1k bk1
k=1
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 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 = A2 = 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 .
6
12.1.6 Transposes
Example
3 1 5
If A = then AT =
2 3 4
1. (AT )T = A
7
12.1.7 Symmetric Matrices
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 }
Symmetrc Ant−symmetrc
Example
1 2 3
Express A =
4 5 6 as the sum of a symmetric and an anti-symmetric matrix.
7 8 9
(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
x′ = Ax
′ 11 12 13
y ′ = (12.7)
21 22 23
y
y y
P′
x x
It can be shown that straight lines are transformed by matrices to straight lines.
9
Example
Sketch the image of the unit squarewith 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
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
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
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
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
|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.
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
where the Aj 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
Mj .
Then the cofactor of j is denoted Aj and is Aj = (−1)+j Mj (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
1 + 32 = 0
21 + 42 = 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
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.
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.
18
12.3.6 3 × 3 Determinants,Triple Scalar Products and Linear Dependence
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
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
2 + 5y = 9
+ 3y = 5
Then since
Ax = p
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
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
21
12.4.4 Finding the Inverse using Adjoints and Determinants
1
A−1 = djA
|A|
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
1
3. |A−1 | =
|A|
23
12.5 Gaussian Elimination and Linear Systems
Example
Solve the linear system below using Gaussian elimination.
+ 2y + 3z = 7
2 + 3y + 4z = 9
3 + 4y − 5z = 1
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
+ 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
= −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
Table 1: Solution of Ax = p
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
1 −1 1 3
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)
|A − λ| = 0 (12.13)
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−λ
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
−1 1 3 1 1 0
35
12.6.3 Results on Eigenvalues
36
12.7 Applications
12.7.1 Diagonalisation
A = BDB−1
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
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
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Λ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
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.
If values of (0) and y(0) (initial conditions) are given, we can determine the
values of the constants c1 and c2 .
40
Summary
1. Recognise and use the terminology associated with matrices and matrix arith-
metic
41
12.8 Problems: Matrices
i. AB
ii. BA
iii. BC
iv. CD
42
(a) What is meant by a ’Linear Transformation’?
(b) What effect would transformations T1 and T2 have on the unit square?
(e) Find the image of the position vector -1i + 4j - 2k after transformation by
T3 with θ = π4 .
(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?
(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
43
(a) Find the inverses of matrix B and matrix C using the method of adjoints.
(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).
(d) Solve the linear system below and give a geometric interpretation.
x + 3y +z = 0, 2x -2z = 0 , x -3y-3z = 0 .
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
45
13 APPLIED INTEGRATION
δ
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
ƒ () δ.
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 ƒ ()
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.
X Z b
M = lim ρ() δ = ρ() d (13.5)
n→∞
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
49
13.1.4 Improper Integrals
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→∞
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
Total force experienced by the charge at (0, c) due to the infinite line of charge
along the −axis:
51
13.2 Double Integrals
z = ƒ (, y)
δV = ƒ (, y)δδy
=y=c δA = δδy
y=d
=b
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
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) = 22 y and R = [0, 3] × [1, 2].
R =3 R y=2
=0 y=1
22 y dy d =
R y=2 R =3
y=1 =0
22 y d dy =
R
The value of the integral R
22 y dA is the volume of the region bounded above by
54
the surface z = 22 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
22 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 22 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 = 22 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.
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
59
13.3 Triple Integrals
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
If the function ƒ (, y, ) gives the density of R, then ƒ (, y, z) dV is the mass of
R
R
R.
z y
z = G2 (, y)
z = G1 (, y)
y = ƒ2 ()
y = ƒ1 ()
a
b
61
Examples
iterated integral for the following three different regions D (but do not evaluate).
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
δA = δδy δV = δδyδz
δA = rδrδθ δV = rδrδθδz
64
Example
First sketch the domain of integration, then express the iterated integral in polar
coordinates, then evaluate.
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
R
• if ƒ ≥ 0, then R ƒ dA is volume
R
• if ƒ ≥ 0, then R ƒ dV does not have a geometric interpretation (unless
ƒ = 1)
• if ƒ = 1, then
R
R
ƒ dV is volume
67
13.4 Problems: Integration
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 ddydz
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 163
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.
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.
Stokes’ theorem
Z I
∇ × A · n̂ dS = A · dr
S C
70
14.1 Parametric Representations of Lines and Length of a Curve
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
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π
2π
t
= cos ti − sin tj + (1 − )k
2π
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
δ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 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.
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π
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
• 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
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.
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
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
F · dr
The total work done moving the particle along the curve is
Z
W= F · dr (14.3)
C
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 + 32 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 + 32 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.
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.
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
85
14.3 Grad
• find the rate of change with respect to distance of a scalar function in a given
direction
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
Nabla can operate on scalar and vector fields to find special kinds of derivatives,
namely the grad, divergence and curl.
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)
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 − 22 )e− i − 2ye− 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
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
dϕ
So along the straight line, dt
is the rate of change of ϕ with respect to distance,
and this is equal to ∇ ϕ · ̂.
∂ϕ ∂ϕ ∂ϕ
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
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
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)
• 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 =
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.
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
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
• 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
Figure 8: The vector field yi + j + 3k and two curves from (0, 0, 0) to(1, 1, 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 Joes
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 Joes
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) = tn−1
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) = tn−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).
99
14.5 Div and the Laplacian
y
Figure 13: A = −2i − 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 ddydz 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 ddz = flow out of the back face
dy
−2 (, y − 2
, z)dt ddz = flow out of the front face
dz
3 (, y, z + 2
)dt ddy = flow out of the top face
dz
−3 (, y, z − 2
)dt ddy = flow out of the bottom face
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.
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
∂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
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.)
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) =
22 − y 2 . Consider the physicial interpretation of the value of the Laplacian at the
stationary points.
2 −y 2
ϕ(, y) = e−
∂ϕ ∂ϕ 2 −y 2 2 −y 2
∇ϕ = i+ j = (1 − 22 )e− i − 2ye− 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
ϕ(, y) = e cos y
∇ ϕ = e cos yi − e sin yj
2
∂2 ϕ ∂2 ϕ
Δϕ = ∇ · ∇ ϕ = ∇ ϕ = + =0
∂2 ∂y 2
(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
• for a surface with parametric representation, find a normal vector to the sur-
face and an expression for a surface area element
• find the surface integral of the normal component of a vector field (flux inte-
gral)
Surfaces are represented parametrically with two parameters - often s and t are
used.
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.
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
3π
θ= 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
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
i j k
∂r ∂r
n(s, t) = ∂s
× ∂t
= sinh t cosh t 2s
s cosh t s sinh t 0
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
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.
ϕ y
θ x
∂r ∂r
dS, first find an expression for dS =
R
Then to evaluate S ∂θ
× ∂ϕ
dθdϕ
= 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
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
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 ).
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
q(, y, z) = 2i + j + k
∂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
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
= r 2 sin θ drdθdϕ
117
14.6.9 Summary
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.
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
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
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) = 2i + j + k
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
q · n̂ dS = 76
R
We already know that S1
120
q · n̂ dS + q · n̂ dS = 0
R R
Also S2 S3
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
q(, y, z) = 2i + 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 = 4zi − y 2 j + yzk over the surface of the cube
0 < , y, z < 1.
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.
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.
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ω
ω
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
Curl-free vector fields (those for which the curl is zero everywhere in the domain)
are called irrotational fields.
∇ ·∇ × A = 0
∇ × ∇ϕ = 0
Therefore any gradient field (i.e. a vector field which has a scalar potential fuction)
is irrotational.
126
14.9 Stokes’ Theorem
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.
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
H
First evaluate the line integral C
v · dr
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
i j k
∂r ∂r
n̂ dS = × dϕdθ = cos ϕ cos θ cos ϕ sin θ − sin ϕ dϕdθ
∂ϕ ∂θ
− sin ϕ sin θ sin ϕ cos θ 0
130
14.9.3 Direction of Normal Vectors to a Surface
If the incorrect normals are selected, the resulting integral will be of the wrong sign
(positive/negative).
1
I
cr A · n̂ = lim A · dr
dS→0 dS C
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
∂Q ∂P
ZZ I
− ddy = P d + Q dy
R ∂ ∂y C
∂Q ∂P
If A(, y) = P(, y)i + Q(, y)j is a vector field, then ∂
− ∂y
ddy 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.
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
)
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
− ddy = P d + Q dy
R ∂ ∂y C
134
14.11 Conservative Vector Fields
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.
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).
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.
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.)
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
4. =⇒ 1.
137
14.12 Problems: Vector Calculus
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
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 )
2. (a) Calculate the mass of a wire with line mass density ρ(, y) = 3 + + y
if it is
ii. A circular piece of radius 2m centred at (1, 1). (Hint: use a para-
metric representation similar to 1(a)ii)
(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) = (32 + 6y)i − 14yzj +
20z 2 k
138
Grad
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?
(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
∇ ƒ − ƒ∇
(e) Find youtube videos about vector calculus and share the best one with
your tutor.
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
i. 32 yi − zj + 2 zk
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
ii. Find the two unit normal vectors to the surface at the point (1, 1, 3)
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.
7. (a) Verify the divergence theorem for the following vector fields and volumes.
(b) Use the divergence theorem to calculate the flux of the following vector
fields out of the boundary surface of the given volumes
ii. A = 4i − 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
∇ × ∇ ϕ = 0 and ∇ · ∇ × A = 0
Stokes’ theorem
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
ddy (= ∇×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+2yj 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)
ANSWERS
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
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
2 y2 z2
4. (a) i. ϕ(, y, z) = 2
+ 2
+ 2
+ C. Integral is 12 .
144
Div
5. (a) i. 6y + 2
(b) i. 30yz 2
ii.
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
ii. n̂ = ±k
7. (a) i. 6
ii. 84π
(b) i. 4π
ii. 60π
Curl
ii.
145
(b) i. ∇ × F = 0
iii. 202
Stokes’ theorem
(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
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)
= −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.
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
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 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:
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.
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.
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
δ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
Examples:
∂z ∂z
=z+ is a partial differential equation
∂ ∂y
dy
+ y = 3 is an ordinary differential equation
d
b) order
Examples:
dy
+ y = 3 is a first order differential equation
d
d2 y dy
+ 3y + 2 = 0 is a second order differential equation
d2 d
c) degree
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
d2 d
2 3/ 2
d2 y
dy
= 3 1+ is a second degree differential equation
d2 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
Examples:
dy
+ y = 3 is a linear differential equation
d
d2 y dy
+ 3y + 2 = 0 is a non-linear differential equation
d2 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
d3 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
d3 y d2 y
a) + y 2 = 0.
d3 d
1 d dy
b) 2 2
= e− .
d d
∂ ∂ ∂2
c) + .=ν
∂t ∂ ∂2
d2 d
d) 2 + b + cy = 0.
dy dy
a) y = A + 2,
b) y 2 = A ln + y,
155
16 FIRST ORDER ORDINARY DIFFERENTIAL EQUA-
TIONS
dy
= F (, y) (16.1)
d
where F is an arbitrary function of and y.
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
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
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 2y 2 + sin
+ =0
d 22 y + cos y
can be rearranged as
Therefore,
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) = 2y 2 + sin d + ƒ (y)
y const y const
and
Z Z
z= Q (, y) dy + g() = 22 y + cos y dy + g()
const const
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 4y + 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
∂P
= (n + 2) y n+1 + (n + 1) 2 y n
∂y
∂Q
=4y n+1 + 32 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)):
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:
where
∂P ∂Q dλ
=λ()R(), =
∂y ∂ d
and for exactness:
dλ
=λ()R()
d
This is a variables separable equation, which can be solved to find the integrating
factor:
dλ
Z R
R()d
= R()d =⇒ ln λ = R()d =⇒ λ() = e
λ()
164
With this form of the integrating factor, equation (16.20):
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
d R
R()d
R
e y =e R()d S() (16.23)
d
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 tnh = sinh
d
Note that this is already in the standard form (i.e. equation (16.18)). The integrating
R
factor is: λ = e tnh 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)
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
169
16.6 Problems: First Order Differential Equations
Variable Separable
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 − tn−1 y = − 1, b) y 2 = 1 + 3
ln(1 + 3 )]
Homogeneous Equations
dy
a) 2 + y − y 2 = 0;
d
dy 2 + 3y + y 2
b) = .
d 2
.
[Answer: a) y = −2 K2−1 , b) − +y
= ln + C]
Q3) Determine which of the following equations are exact and integrate those
that are:
dy
a) 2y d + 32 + y 2 = 0;
.
[Answer: a) 3 + y 2 = C, b) 33 + y − − 2y 2 = C, c) Not exact,
d) sinh cosh y = C.]
170
Q4) Show that the differential equation
dy
(3 − 2y) + + 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]
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
171
General Problems
.
[Answer: a)− = y ln C′ , b) y 4 − 2y 2 = 22 + 4 ln + C′ , c) − =
y 12 e2 + C ]
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
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.
kU2
1
s= ln 1 +
2k g
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.
Example 17-1:
d2 y dy
+ = 4
d2 d
dy dp d2 y
p= =⇒ =
d d d2
d2 y dy
+ = 4
d2 d
dp
+ p = 4
d
dp
+ p = 4
d
d (p)
= 4
d
p = 22 + 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 =
d2 d
175
17.2 Equations with the Independent Variable Absent
Example 17-3:
d2 y
−y=0
d2
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 d2 d dy d dy
d2 y
−y=0
d2
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
d2 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)
d2 d
d2 y dy
+b + cy = 0 or y ′′ + by ′ + cy = 0 (17.2)
d2 d
′ ′′
Iƒ y = Ceμ =⇒ y = μCeμ = μy, y = μ2 Ceμ = μ2 y
(μ2 + bμ + c)y = 0
μ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 − 4c −b − b2 − 4c
α= and β=
2 2
178
These two roots, which may be real or complex, imply two possible solutions:
Since y1 and y2 are two independent solutions of the equation (17.2), clearly the
linear combination:
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
′′ ′′
′ ′
y1 + y2 + b y1 + y2 + c (y1 + y2 )
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
α= β=
179
Therefore the solution is.:
y = C1 eα + C2 eβ =
In the case when α and β are complex, say α, β = m ± n, the general solution is:
(17.5)
= cos n − sin n
or
In the special case when α = β then equation (17.4) can be written as:
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α + ceα = 0
′′ ′
+ (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
181
Example 17-6: Find the general solution of
′′ ′
y − 6y + 25y = 0
α= β=
y=
′′ ′
y − 2y + y = 0
α= β=
y=
182
Example 17-8: Summarise the possible forms of the general solution of
y ′′ + by ′ + cy = 0
zero y=
negative y=
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)
d2 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 = ƒ
′′ ′ ′′ ′
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:
or
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:
+ C0 + C1 + . . . + Cn n ep cos(q)
(17.11)
+ 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.:
+ 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.
a) Write down the auxiliary equations and find the two roots, α and β.
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.).
186
Example 17-9: Find the general solution of y ′′ − 5y ′ + 6y = + 22
The auxiliary equation is:
and the roots are:
α= β=
=
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):
y1 =
y = + y1 =
188
Example 17-10: Find the general solution of y ′′ + y ′ = 1
The auxiliary equation is:
and the roots are:
α= β=
=
So we try:
y1 =
then
′
y1 =
and
′′
y1 =
′ ′′
and substituting y1 , y1 and y1 into the differential equation:
y1 =
y = + y1 =
189
Check what would have happened if we had tried y1 =C as a P.I.
α= β=
=
So we try:
y1 =
then
′
y1 =
and
′′
y1 =
190
′ ′′
and substituting y1 , y1 and y1 into the differential equation:
y1 =
y = + y1 =
191
Example 17-12: Find the general solution of y ′′ − 2y ′ + y = e
The auxiliary equation is:
and the roots are:
α= β=
=
So we try:
y1 =
then
′
y1 =
and
′′
y1 =
′ ′′
and substituting y1 , y1 and y1 into the differential equation:
y1 =
192
The general solution is
y = + y1 =
α= β=
=
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:
y1 =
y = + y1 =
α= β=
=
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:
y1 =
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
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
196
′′ ′
Example 17-15: Find the general solution of y − 3y + 2y = + e− .
The auxiliary equation is:
and the roots are:
α= β=
=
′′ ′
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 =
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
2
d2 y dy
a) + 2 − 1 = 0;
d2 d
d2 y dy
b) +
= 1;
d2d
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
.
2p
[Answer: a) 3
y + C1 (y − 2C1 ) = + C2 , b) y 2 = C1 + C2
]
d2 y dy
a) −3 + 2y = 0;
d2 d
d2 y dy
b) +2 + 2y = 0;
d2 d
d2 y dy
c) +4 + 4y = 0.
d2 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
.
[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 . ]
d2 y dy
a) −3 + 2y = 6e− ;
d2 d
d2 y dy
b) 2 −3 + y = 2 ;
d2 d
d2 y dy
c) +4 + 4y = e−2 ;
d2 d
d2 y dy
d) +2 + 4y = 12e2 ;
d2 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 ]
d2 y dy
a) −3 + 2y = e ,
d2 d
d2 y dy
b) −3 + 2y = e ,
d2 d
d2 y
c) − y = e sin ,
d2
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
d2 d
[Answer: y = D0 e−2 + D1 e−3 − (5 + 2 ) e−3 ]
Application
201
18 SERIES SOLUTION OF DIFFERENTIAL EQUATIONS
18.1 Introduction
d2 y dy
−5 + 6y = 0
d2 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
′′ ′
y + 2y + 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
∞
′
X
y = nn n−1 = 1 + 22 + 33 2 + 44 3 + 55 4 . . . (18.3)
n=1
and
∞
′′
X
y = n(n − 1)n n−2 = 22 + 63 + 124 2 + 205 3 + . . .
n=2
(18.4)
203
Substituting (18.2), (18.3) and (18.4) into the differential equation:
′′ ′
y + 2y + 3y = 0
+ 3(0 + 1 + 2 2 + 3 3 + 4 4 + 5 5 . . .) = 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
∞
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+ 2Dy+ 3y = 0
and, setting x = 0
and, setting x = 0
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.
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.
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.
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.)
To illustrate the two approaches the previous example will be modified so that that
boundary values are given at = 2, i.e.:
First rewrite the differential equation in terms of ( − ): here ( − 2), i.e.
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 = nn ( − 2)n−1 = 1 + 22 ( − 2) + 33 ( − 2)2 + . . .
n=1
′′
y =
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+ 2Dy+ 3y = 0
208
Dn+2 y+ 2Dn+1 y + 2nDn y+ 3Dn y = 0
and, setting x = 2
and so on. The solution is then given by putting these values into the Taylor se-
ries (18.13):
209
dy dy d
dy
= =
d d d d
2
d y d dy
d dy
d dy d
d2 y
= = = =
d2 d d d d d d d d2
The D.E. written in terms of the new variables y and u would then become:
d2 y dy
+ 2( + 2) + 3y = 0
d2 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 + 5y − 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=
′
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 =
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
d2 y
Q2) A function y() satisfies the differential equation d2
+ y = 0 and the
dy
conditions y = 1 and d
= 0 at = 0.
d2 y dy
Q3) Differentiate the equation − + 5y = 0 n-times to derive the
d2 d
recurrence relation
n+2
d y dn y
= (n − 5) , n = 0, 1, 2, 3, · · ·
dn+2 =0 dn =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
d2 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