Vectors for Engineering Students
Vectors for Engineering Students
ENG1091 Vectors
Lecture 1 vector arithmetic revision dot product cross product
Text Reference: §4.1 - 4.2
Many quantities in nature are completely speci…ed by one number (called the magnitude of the
quantity) and are usually referred to as scalar quantities. Some examples are temperature, time,
length, and mass.
However, certain quantities require both a magnitude and a direction to specify them. To
say that a boat sailed 10 kilometers (km) does not specify where it went. It is necessary to
give the direction too; perhaps it sailed 10 km northwest. We then describe the position of the
boat by giving its displacement relative to some point, a quantity that involves distance as
well as direction. Quantities that require both a magnitude and a direction to describe them are
called vectors. Other examples include velocity and force. Vector quantities will be denoted by
boldface type: u; v; w, and so on. In handwritten work vectors are denoted by v or by ! v : The
! e
vector that joins the two points A and B is denoted AB or by AB:
A vector v can be represented geometrically as a directed line segment or arrow. The magnitude
of a vector v will be denoted by kvk and is sometimes referred to as the length of v because it
is represented by the length of the arrow.
Should it happen that vectors add together forming a loop, so that the end point is the same as
the initial point, then the vector sum is 0. Thus for example if A; B; C are any three points in
! ! !
space AB + BC + CA = 0:
We can also add two vectors u and v geometrically by drawing them from the same point and
completing a parallelogram with the two vectors as adjacent sides. The diagonal vector drawn
from the common tail to the common head point is then the vector u + v:
p
In two dimensions the length of v = ai + bj is given by jvj = kai + bjk = a2 + b2 :
In the previous section we saw how vectors can be added/subtracted together, and we saw how
to multiply them by scalars. The question naturally arises: is it possible to multiply two vectors
together?
In fact there are two types of vector multiplication that are useful-the scalar or dot product
and the vector or cross product. Now for a word of warning. Many of the rules we take for
granted in ordinary arithmetic don’t hold when it comes to vector multiplication. When we look
at the vector cross product later this lecture we will see that a b 6= b a: We will also see that
there is no such thing as vector division-vectors don’t have reciprocals! Of course we don’t just
multiply vectors for fun-we do it because it has useful applications.
First, consider the scalar product. One modern use of the scalar product is the projection of
a 3D image on a 2D screen and to do it in such a way as to convince the viewer that he/she is
looking at a 3D image.
Historically the reason that the scalar product was studied is that in physics the work done by
a force F in moving an object a displacement d is the dot product of force with displacement,
i.e. W = F d:
(i) a a = kak2 (because the angle between a vector a and itself is 0:)
(ii) If a ? b then a b = 0
The dot products of the unit coordinate vectors i; j and k:
a b = (a1 i + a2 j + a3 k) (b1 i + b2 j + b3 k)
= a1 i (b1 i + b2 j + b3 k) + a2 j (b1 i + b2 j + b3 k) + a3 k (b1 i + b2 j + b3 k)
= a1 i b1 i + a2 j b2 j + a3 k b3 k (since i j = j k = i k = 0)
= a1 b1 + a2 b2 + a3 b3 (since i i = j j = k k = 1)
Example: This next example should convince you that there is no such thing as being able to
‘cancel’a dot product.
a b = (2) ( 1) + ( 1) (0) + (4) (2) = 6 and a c = (2) (3) + ( 1) (0) + (4) (0) = 6:
However b 6= c so we conclude it is not possible to cancel out vectors (even non-zero vectors)
from a dot product like we can in ordinary arithmetic.
As a geometrical application we use the dot product to …nd the angle between two vectors:
a b
cos = :
kak kbk
Example: Find the angle between the main diagonal of a cube and the diagonal of a face which
it meets:
This angle will be the same regardless of the cos = p 2p from which = 35:26
2 3
size of the cube so lets assume the cube has
side length = 1:
The dot product provides a very easy way of telling when two vectors are perpendicular. If
a b = 0 then = 90o and we write a ? b:
Example: Show that the points P (2; 1; 3) ; Q (4; 2; 5) and R (3; 3; 1) are the vertices of a
right angled triangle:
! ! !
P Q = OQ OP = (4i + 2j 5k) (2i + j 3k) = 2i + j 2k
! ! !
P R = OR OP = (3i + 3j k) (2i + j 3k) = i + 2j + 2k
! ! !
QR = OR OQ = (3i + 3j k) (4i + 2j 5k) = i + j + 4k;
! !
and from these it is clear that P Q P R = 0 so we conclude the triangle is right angled at P:
Note: (i) a b= b a
(ii) If = 0o then a b=0
(iii) If = 90o then ka bk = kak kbk
The cross products of the unit coordinate vectors i; j and k:
i j = k
j k = i
k i = j
So if a = a1 i + a2 j + a3 k, and b = b1 i + b2 j + b3 k then
Two vectors a and b; if drawn from the same point, de…ne a parallelogram:
Now we can determine the area of the parallelogram by breaking it up into two identical triangles.
1
Area = 2 2 base perpendicular height
A = kak kbk sin
= ka bk
Examples
(a) Let P; Q; R be the points P (2; 1; 3) ; Q (3; 4; 7) and R (1; 2; 3). Find the area of the
parallelogram which has P Q and P R as adjacent sides.
! ! !
P Q = OQ OP = (3i + 4j + 7k) (2i + j 3k) = i + 3j + 10k
! ! !
P R = OR OP = (i 2j + 3k) (2i + j 3k) = i 3j + 6k
i j k
! ! 3 10 1 10 1 3
So P Q PR = 1 3 10 =i j +k
3 6 1 6 1 3
1 3 6
= ((3) (6) ( 3) (10)) i ((1) (6) ( 1) (10)) j + ((1) ( 3) ( 1) (3)) k
= 48i 16j
q p p
! !
Hence Area = P Q PR = (48)2 + ( 16)2 = 16 32 + 1 = 16 10:
1 ! ! p
(b) Find area 4QP R = 2 P Q P R = 8 10:
We are all quite familiar with the two-dimensional representation of a line as y = mx + b; (called
its Cartesian equation) where m is the slope and b is the y-intercept. Students should also be
familiar with the point-slope equation of a straight line:
(y y0 ) = m(x x0 ) (1)
Given any two points (x1 ; y1 ) and (x2 ; y2 ) in the x-y plane, we can readily get the equation of
(y1 y2 )
the line passing through these two points by …nding the slope m = (x1 x2 ) ; and using this value
in the equation (1) above. The basic equation of a straight line is unique up to a scalar factor,
regardless of which point is chosen as (x0 ; y0 ) :
It would be natural to try to extend the equation of line in 2D space to 3D space. Perhaps one
might consider z = m1 x + m2 y + b. Unfortunately, this does not work, indeed, we will see in a
future lecture that this is actually the Cartesian equation of a plane in three-dimensional space.
In three-dimensional space, the concept of a slope is not so easily de…ned. Instead of slope, a
straight line will have an orientation associated with it that can be represented as a vector. The
line is then fully de…ned by a point on the line, say A, and an orientation vector, say v: Note
that the magnitude of the orientation vector doesn’t actually matter, as long as we travel in the
right direction, we should stay on the line. Working in Cartesian coordinates, we can de…ne the
point A = (a; b; c), by its position vector and v as a vector with components (p; q; r): Then the
! ! ! ! !
position vector OP of any point P is given by OP = OA + AP where AP = tv for some scalar
t We can de…ne the equation of a line r(t) as:
! !
r(t) = OP = OA + tv:
This is the vector equation of a line. The variable t; which can take on any real value, is known
as the parametric [Link] this up into the three components we get any point on the
line (x; y; z) being de…ned as:
x(t) = a + pt;
y(t) = b + qt;
z(t) = c + rt:
(Note: students may have actually been informally introduced to parametric variables when
learning trigonometry. We know that the circle of radius a centred at the origin can be represented
by the parametric equations x = a cos(t) and y = a sin(t), where t can represent the angle from
the x-axis.)
Example1: De…ne the (vector and parametric) equation of the line between the points A (2; 3; 4)
and B (1; 1; 1) :
!
AB = (i + j + k) (2i + 3j + 4k) = i 2j 3k = v
! !
Equation of line: OP = OA + tv = (2i + 3j + 4k) + t ( i 2j 3k)
= (2 t) i + (3 2t) j + (4 3t) k
Parametrically:
x(t) = 2 t;
y(t) = 3 2t;
z(t) = 4 3t:
In the previous example, notice how the parametric variable works. If t = 0; we are at one point,
A (2; 3; 4) ; and if t = 1 we are at the other point, B (1; 1; 1) :
Example 2: From the previous example, …nd the value of t that de…nes the point (0; 1; 2) :
Again, any value of t de…nes some point on the line. The value t = 1=2 de…nes the mid-point of
AB:
Equate x values: solve 2 t = 0 from which t = 2: If this value of t gives matching y and z values
we know the point (0; 1; 2) is on the line. Otherwise the point lies o¤ the line.
With t = 1=2; x( 21 ) = 2 1
2 = 32 ; y( 12 ) = 3 1 = 2; and z( 12 ) = 4 3
2 = 52 ; so 3 5
2 ; 2; 2 is the
midpoint of AB:
Also note, however, that the equation of a line is not unique. The line between the points (2; 3; 4)
and (0; 1; 2) is equivalent to the equation found in the …rst example, but the equation looks
di¤erent: v = (( j 2k) (2i + 3j + 4k)) = 2i 4j 6k
! !
OP = OA+tv = (2i + 3j + 4k)+t (( j 2k) (2i + 3j + 4k)) = (2 2t) i+(3 4t) j+(4 6t) k
So
x(t) = 2 2t;
y(t) = 3 4t;
z(t) = 4 6t:
Now of course the choice of zero is completely arbitrary; we can of course equate each fraction
to 1 (or any real number)
we do this:
x+2
= 1 giving x = 1
1
y
= 1 giving y = 2
2
z 3
= 1 giving z = 5
2
Thus the point ( 1; 2; 5) is also on the line.
Importantly, a direction vector for the line can also be read o¤ namely: v = i 2j + 2k: This
choice of v is unique up to scalar multiplication, (i.e. the only other direction vectors for this
line are non-zero scalar multiples of i 2j + 2k).
We have a problem if the orientation vector is parallel to any of the axes. In such a case p; q
or r would be equal to zero. For that reason it is best to initially work with the parametric
representation and then …nd the algebraic form.
After understanding the basic principles of lines, more sophisticated problems can be attempted.
Example 4: Find the minimum distance between the point B (1; 2; 3) and the line de…ned by
x+2 y z 3
= =
1 2 2
Which point on the line is closest to the point B (1; 2; 3)?
Solution: A point on the line is A ( 2; 0; 3) and a direction vector for the line is v = i 2j + 2k:
The point B (1; 2; 3) is not on the line. (Check this.)
!
! AB v
The shortest distance between the point B and the line is d = AB sin = kvk ; (draw
a diagram)
Solution 2: (Slicker)
x= 2+t y= 2t z = 3 + 2t
When de…ning a straight line in three-dimensional space, we needed a point on the line and an
orientation vector.
To de…ne a plane in three-dimensional space, we need a point in the plane and a normal vector,
to the plane. Here n is the normal to the plane. For our immediate purpose, the magnitude of
n is not important, only its direction.
So let’s assume that we have some point on the plane which we label A (a; b; c) and we have a
normal vector n = pi + qj + rk: We take a general point on the plane P (x; y; z) : Now the vector
!
AP lies in the plane and hence is normal to n:
!
Thus AP n = 0:
Explicitly this becomes (x a) p+(y b) q +(z c) r = 0; which can be simpli…ed to the general
form:
Ax + By + Cz = D:
Example 1: Find the equation of the plane that contains the point (2; 2; 3) and is normal to
the vector h 1; 1; 2i :
!
Solution:AP = hx; y; zi h2; 2; 3i = hx 2; y 2; z 3i
!
AP n = hx 2; y 2; z 3i h 1; 1; 2i = x 6 + y + 2z
Example 2: Find the equation of the plane going through the points ( 1; 0; 4) ; (2; 5; 0) ;
(2; 2; 1) :
Solution: Label the points A ( 1; 0; 4) ; B (2; 5; 0) ;and C (2; 2; 1) : A normal vector n is given
! !
by n = AB AC:
! !
Now AB = h2; 5; 0i h 1; 0; 4i = h3; 5; 4i and AC = h2; 2; 1i h 1; 0; 4i = h3; 2; 5i :
i j k
5 4 3 4 3 5
Thus n = 3 5 4 =i j +k = 17i + 3j 9k:
2 5 3 5 3 2
3 2 5
!
Now AP = hx; y; zi h 1; 0; 4i = hx + 1; y; z 4i and
!
AP n = hx + 1; y; z 4i h 17; 3; 9i = 0
that is 17x 17 + 3y 9z + 36 = 0
A ( 1; 0; 4) : 17x 3y + 9z = 17 + 36 = 19 X
B (2; 5; 0) : 17x 3y + 9z = 34 15 = 19 X
There are two observations that can be made. Firstly, the equation of a plane in three-dimensional
space is unique (up to multiplication by a scalar constant). Secondly, parallel planes have the
same normal vector and hence will only di¤er by the constant D:
Example 3: Find the minimum distance between the parallel planes 2x + 3y z = 6 and
2x + 3y z = 0:
The distance between two parallel planes with normal n is then (diagram)
!
! PQ n
d = P Q cos =
knk
! !
OQ OP n
=
knk
! !
OQ n OP n
=
knk
! !
however OQ n = 2x2 + 3y2 z2 = 0 and similarly OP n = 2x1 + 3y1 z1 = 6:
0 6 6
d= q =p
22 + 32 + ( 1)2 14
Combining the knowledge of lines, planes and basic vector operations allows for a wide range of
problems to be addressed in three-dimensional space. For example, we can …nd:
Example 4: Find the line de…ned by the intersection of the planes x + y + z = 2 and x + 2y = 4
and the angle of intersection.
Solution: A direction vector of the line of intersection is easily found: it is normal to both
i + j + k and i + 2j and hence could be obtained using the cross product. To …nd the equation
The angle between two planes is de…ned as being the angle between its normals (diagram).
( i + j + k) (i + 2j) = 1 + 2 = 1
q p p
k( i + j + k)k = ( 1)2 + 12 + 12 = 3 and k(i + 2j)k = 5
The angle between the planes is then given by cos = p 1p ; hence = 75:04 :
3 5
Recall that straight lines have parametric equations giving x; y; z as function of one parametric
variable (usually t). Planes have parametric equations where x; y; z are given as functions of two
parametric variables (usually u and v):
Suppose we know a point P0 (a; b; c) in the plane and two non-parallel direction vectors
w1 = pi + qj + rk; and w2 = li + mj + nk also in the plane: (diagram):
vw2 r(x,y,z)
w2
w1 uw1
P0
Let r = xi + yj + zk denote the position vector of an general point P (x; y; z) in the plane, so
!
that r = OP0 + uw1 + vw2 where u; v are any scalars (parameters).
x (u; v) = a + pu + lv;
y (u; v) = b + qu + mv;
z (u; v) = c + ru + nv:
Theses 3 equations are the parametric equations of a plane. The fact that two parameters (u
and v) are needed to describe it indicates that a plane is a 2 dimensional surface.
In more advanced mathematics (i.e. 2nd level maths), it will be imperative to represent surfaces
parametrically.
Check that these are non-parallel X: (Otherwise the three points are collinear and the ques-
tion cannot be answered properly-there will be an in…nite number of planes.)
r = ( 1; 0; 4) + u (3; 5; 4) + v (3; 2; 5)
= ( 1 + 3u + 3v; 5u + 2v; 4 4u 5v)
Hence
x (u; v) = 1 + 3u + 3v;
y (u; v) = 5u + 2v;
z (u; v) = 4 4u 5v:
2x + y + z + w = 4
4x + y + 3z + 2w = 7
2x + z w = 9:
Such a system is called linear because each of the equations on the left hand side is a linear
function of the unknown variables x; y; z and w. Simple linear systems of 2 or 3 variables
are commonly encountered in secondary school and is instructive to view an example before
discussing a more general procedure.
x + 2y = 3 (1)
2x 3y = 8 (2)
One way to proceed is to multiply equation 1 by 2 and subtract this from equation 2:
x + 2y = 3 (1)
7y = 14 (2(a))
The reason why this is e¤ective is that one of the variables is eliminated. Equation (2a) is now
easily solved giving y = 2; and substituting this into equation 1 we …nd x = 1: Geometrically,
the equations x + 2y = 3 and 2x 3y = 8 represent two straight lines in the x y plane which
intersect at the point ( 1; 2).
x + 2y = 3 x + 2y = 3
The important point is that both of the systems and have identical
2x 3y = 8 7y = 14
solutions. Think about the operations we could perform on the two original equations. We could
Now performing any of these operations without thinking is not guaranteed to be e¤ective but
at least we are assured that the resulting system of equations has an identical set of solutions.
x + 2y = 3
Notice that the names of the variables is irrelevant: solving is exactly the same
2x 3y = 8
u + 2v = 3
as solving the system ; only the coe¢ cients are important.
2u 3v = 8
1. The …rst step in solving a linear system is to write the system in augmented matrix form.
This is simply a way of writing the system using only the coe¢ cients.
2x + y + z + w 4=0
4x + y + 3z + 2w = 7
2x + z w=9
2 3
2 1 1 1 4
6 7
as 6
4 4 1 3 2 7 7
5:
2 0 1 1 9
Notice each equation is written as a single row and that coe¢ cients belonging to the same variable
are written directly underneath each other. (Equation 3, which appears to have no y; has in fact
a y coe¢ cient of zero.) Each constant term must be placed on the right hand side of the ‘equals’
sign (the ‘ 4’ becomes +4 on the right hand side of equation 1) and the vertical partition is
used to separate the left hand side from the right hand side. (Think of it as replacing all of the
equals’signs.)
r + s + 2t = 0
Example: Write the system 2r 3t = 1 in augmented matrix form.
6s 5t = 0
2 3
1 1 2 0
6 7
6 2 0 1 7
Solution: 4 3 5:
0 6 5 0
2. Gaussian elimination
Gaussian elimination is a systematic method of solving linear equations by …rst reducing the
corresponding system into an equivalent system, called row echelon form, where the unknowns
can be calculated by back substitution.
r + s + 2t = 0
Example: Given the system s 3t = 1 …nd solutions to each of the variables
5t = 5
using back substitution.
5
Solution: t = 5 = 1 s = 1 + 3t r = 2t s
= 2 =2+2 2 3
1 1 2 0
=4 6 7
The system of equations in the last example has the augmented matrix 6
4 0 1 3 1 7 and
5
0 0 5 5
which is one that is already in row echelon form. We saw how easy it is to …nd solutions of
systems in this form.
the leading (non-zero) coe¢ cient of each row (called the pivot entry) has zeros below
it, and
the pivot entries of following rows are located in columns further to the right.
any rows which have no pivot (and therefore consist entirely of zeros) must come last.
2 3 2 3 2 3
2 1 2 0 1 1 2 0 1 0 0 0 0
6 7 6 7 6 7
D. 6 0 3 3 6 7 E. 6 0 3 13 1 7 F. 6 0 1 1 0 0 7
4 5 4 5 4 5
0 0 2 5 0 0 0 5 1 0 0 1 0
yes yes no
2 3
1 2 0 1 3 1 0
6 7
G. 6 0 0 0 1 2 3 1 7
4 5
0 0 0 0 0 1 5
yes
To obtain the equivalent row echelon form of a system we apply a sequence of the three elementary
row operations on the augmented matrix. As discussed above these row operations do not change
the solution set of the corresponding system of linear equations.
2. Ensure that the top entry of this column is a non-zero entry. If necessary, interchange top
row with another row to achieve this.
3. Multiply this top row by the appropriate constant so that the …rst non-zero entry of this
row is 1. This entry is the pivot for that column. (It is not absolutely necessary that the
value of each pivot be 1 but this is certainly the most convenient value to have. As an
alternative to multiplying each row by a constant we can add/subtract multiples of other
rows to obtain a 1.)
4. Add a suitable multiple of this …rst row to each row below, so that all entries below this
pivot are 0.
5. Consider the submatrix obtained by removing the top row, and apply to this matrix steps
1 to 4.
2 3
0 0 2 0 12
6 7
6 3 6 15 9 42 7
4 5
2 4 5 6 1
2 3 2 3
0 0 2 0 12 1 2 5 3 14
6 7 13 R2 ! R2 6 7
Solution: 6 3 6 15 9 42 7 6 0 0 2 0 12 7
4 5 R $R 4 5
1 2
2 4 5 6 1 2 4 5 6 1
2 3 2 3
1 2 5 3 14 1 2 5 3 14
6 7 6 7
R3 2R1 ! R3 6
4 0 0 2 0 12 7 5
1 6
2 R2 ! R2 4 0 0 1 0 6 75
0 0 5 0 29 0 0 5 0 29
2 3
1 2 5 3 14
6 7
R3 6
5R2 ! R3 4 0 0 1 0 6 7 row echelon form
5
0 0 0 0 1
Exercise: Find a row echelon form of the matrix
2 3
1 0 1 0
6 7
6 2 1 0 8 7
6 7
6 7
6 0 1 2 0 7
4 5
1 1 2 6
2 3 2 3
1 0 1 0 1 0 1 0
6 7 6 7
6 2 1 0 8 7 6 7
6 7 R2 2R1 ! R2 6 0 1 2 8 7
Solution: 6 7 6 7
6 0 1 2 0 7 6 7
4 5 R4 R1 ! R4 4 0 1 2 0 5
1 1 2 6 0 1 1 6
2 3 2 3
1 0 1 0 1 0 1 0
6 7 6 7
6
R3 R2 ! R3 6 0 1 2 8 77 6 0 1 2 8 7
1 6 7
6 7 R
4 3 !R 3 6 7
R4 + R3 ! R4 6
4 0 0 4 7
8 5 6
4 0 0 1 2 7
5
0 0 1 2 0 0 1 2
2 3
1 0 1 0
6 7
6 0 1 2 8 7
6 7
R4 R3 !R4 6 7 row echelon form
6 0 0 1 2 7
4 5
0 0 0 0
x + 3y + 2z = 1
2x + 7y + 3z = 2
3x 10y 6z = 5
2 3
1 3 2 1
6 7
1. we write the augmented matrix: 6
4 2 7 3 2 75
3 10 6 5
2. by performing appropriate row operations we …nd an equivalent row echelon form:
2 3 2 3
1 3 2 1 1 3 2 1
R2 2R1 ! R2 6 6 0
7 6 7
4 1 1 0 75 R3 +R2 !R3 6 4 0 1 1 0 75
R3 + 3R1 ! R3
0 1 0 2 0 0 1 2
2 3
1 3 2 1
6 7
( 1)R3 !R3 6 4 0 1 1 0 7
5
0 0 1 2
3. Use back substitution to …nd the values of the unknowns, in this case:
z = 2; y = z = 2 and x=1 2z 3y = 1 4 6= 9
Note: The pivot in a column does not need to be equal to 1 any non-zero number would do.
Exercise:
(a) 2a 2b + 3c = 1
2a 2b + c = 1
a + b c = 3
5 11
ANS: Solution is: a = 2; b = 2 ;c = 5
(b) r + s + 2t = 0
2r + 4s 3t = 1
3r + 6s 5t = 0
Example: Find a vector equation for the line which forms the solution set of x+y z=3
2x + y + 2z = 1
(You will recall an example similar to this at the end of lecture 3.)
Writing the augmented matrix of this system and taking the system to row echelon form:
" # " # " #
1 1 1 3 1 1 1 3 1 1 1 3
R2 2R1 !R2 ( 1)R2 !R2
2 1 2 1 0 1 4 5 0 1 4 5
Here is a system of equations with an in…nite solution set.
Example: (from last lecture) Find the line de…ned by the intersection of the planes x+
y + z = 2 and x + 2y = 4:
" #
1 1 1 2
Augmented matrix:
1 2 0 4
" #
1 1 1 2
R2 + R1 ! R2 (now in echelon form)
0 3 1 6
1
z is free, y = 2 3 z; x = 2 + z + y = 32 z
set z = 3t; y = 2 t; x = 2t and hence (x; y; z) = (0; 2; 0) + t (2; 1; 3) : (Compare with the
direction vector found in that example.)
The equation systems given in the last lecture were rather special in the sense that they all had
solutions.
x + 2y = 3
An example of this is the equation system ; which consists of two straight lines
2x 3y = 8
intersecting in the point ( 1; 2).
x + 2y = 3
But of course straight lines do not always intersect. The equation system represents
2x + 4y = 1
two parallel straight lines and has no solution.
Notice what happens when we employ Gauss elimination to solve the system of equations like
x + 2y = 3
2x + 4y = 1
" #
1 2 3
Augmented matrix:
2 4 1
" #
1 2 3
Converting to row echelon form: (one step only), .
0 0 5
Notice that in the last row all entries left of the partition are zero, and that there is a non zero
number to the right of the partition. Since it is impossible for 0x + 0y = 5 we know that the
system has no solution.
neither of the planes is parallel but each pair of planes intersects in a line parallel to the
others.
Geometrically the situation for higher dimensions (>3 unknowns) is even more complex still but
algebraically very easy to sort out provided we apply Gauss elimination.
To put it another way, the row echelon form of an inconsistent linear system will have a row of
h i
type 0 0 0 0 where is some non-zero number.
Moreover, the test is completely diagnostic: if no such row exists then the equation system must
have solutions.
Example: The following partitioned matrices are row echelon forms corresponding to various
systems of linear equations. Which linear systems are inconsistent?
2 3
2 3 2 3 1 1 3 0 2 3
1 1 2 0 1 0 2 0 2 6 7 2 1 2 1
6 7 6 7 6 4 7 6 7
6 0 2 1 7
A.64 0 1 13 1 7 6
5 B.4 0 1 3 0 1 7
5 C.6 7 D.6
4 0 0 0 0 7
5
6 0 0 0 1 7
0 0 0 5 0 0 0 0 0 4 5 0 0 0 0
0 0 0 0
2 3 2 3 2 3
1 0 2 0 1 0 0 0 0 1 2 0 1 3 1 0
6 7 6 7 6 7
E.6
4 0 2 0 1 7
5 F.6
4 0 1 1 0 0 7
5 G.6
4 0 0 0 1 2 3 1 7
5
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 5
Example: Show that the following system of equations is inconsistent by forming its augmented
matrix and then using row operations convert it to a matrix in row echelon form:
x + 2z = 1
y z = 0
x + y + z = 2
Solution
2 3
1 0 2 1
6 7
Augmented matrix: 6
4 0 1 1 0 7
5 (not in echelon from)
1 1 1 2
2 3
1 0 2 1
6 7
6 0 1 1 0 7
R3 R1 ! R3 4 5
0 1 1 1
2 3
1 0 2 1
6 7
6 0 1 1 0 7
R3 R2 ! R3 4 5
0 0 0 1
The shaded row indicates inconsistency.
Answer: Since none of the three planes are parallel (why?) we conclude that each pair of planes
intersects in a line parallel to the others.
[Examine the normal vectors (1; 0; 2) ; (0; 1; 1) ; (1; 1; 1) : Since no two of these is parallel neither
is there a pair of parallel planes.]
A system of linear equations that does not have solutions is said to be inconsistent, so obviously
a consistent system is one that does have solutions.
Now we encounter a remarkable fact: either a consistent linear system has a unique solution
(exactly one solution for each of the unknowns) or else it possesses in…nitely many! To put it
another way, if a linear system of equations is known to have two di¤erent solutions (say) then
that system must have in…nitely many solutions.
x 3y + z = 1
2x 6y + 3z = 4
x + 3y = 1
The third row is entirely zero and in e¤ect is totally redundant. We simply ignore rows that
consist entirely of zeros.
So z = 2 and x = 1 + 3y where the choice for y is completely arbitrary. There are in…nitely
many solutions, one for each value of y:
It is customary to assign a parameter to the free variable y: We can then write the solution set
2x + y + z + w = 4
4x + y + 3z + 2w = 7
2x + 2y + z w = 9
Solution:
We write the system in augmented matrix form and use elementary row operations to convert
the system to an equivalent one in echelon form. (Gauss elimination.)
Augmented matrix: 2 3
2 1 1 1 4
6 7
[A j b] = 6
4 4 1 3 2 7 7
5
2 2 1 1 9
2 3 2 3 2 3
2 1 1 1 4 2 1 1 1 4 2 1 1 1 4
6 7 6 7 6 7
6 4 1 3 2 7 7 R2 2R1 !R2 6 0 1 1 0 1 7 R3 + R1 !R3 6 0 1 1 0 1 7
4 5 4 5 4 5
2 2 1 1 9 2 2 1 1 9 0 3 2 0 13
2 3
2 1 1 1 4
6 7
6
R3 + 3R2 !R3 4 0 1 1 0 1 7
5
0 0 5 0 10
This time the pivot variables are x; y and z (since the pivot entries occur in columns 1,2, and 3,
corresponding to the variables x; y; z):
w = free = t (say)
from row 3: 5z = 10 )z=2
from row 2: y+z = 1 )y =z+1=3
from row 1: 2x + y + z + w = 4 )x=2 1
2z
1
2y
1
2w = 1
2
1
2t
2 3
1 1 0 1 1
6 7
6 0 0 1 1 1 7
6 7
6 7
6 0 0 0 0 0 7
4 5
0 0 0 0 0
Describe the solutions of the system.
ANS: in…nite number of solutions with s and u free t = 1 u; r = 1 t s
) (r; s; t; u) = (1 t s; s; 1 u; u) where s; u are arbitrary.
(a)
x y 2z = 3
x + 2y z = 0
2x y + z = 5
x y z = 3
(b)
x + y + z = 2
x y + z = 1
2x + 2z = 4
ANS: no solution
(c)
a + b + c + 2d + e = 0
a c + d e = 1
2b + c d 2e = 1
A matrix has rows, running left to right, and columns running form top to bottom.
The matrix A has three rows and four columns and consists of 12 entries.
A matrix with m rows and n columns is called a m n matrix; the matrix A in the
example is a 3 4 matrix.
The position of each entry is determined by the column and row numbers. We use
subindices to indicate this: for example,
Sometimes we use the notation A = [aij ] which simply indicates that A is a matrix (hence the
square brackets) whose entries are generically indicated as aij : The notation A = [aij ]m n means
that A is an m n matrix.
Special matrices
h i
1. A 1 n matrix is a row matrix or row vector, e.g. 1 2 4 3 is a 1 4 row vector.
is a 3 1 column vector.
3. A matrix with the same number of rows and columns is called a square matrix; e.g.
" #
1 3
is a 2 2 matrix
2 4
2. Multiplication by scalars
Given a matrix A and a number k; the multiplication of A by the scalar2k and is obtained
3
1 1
6 7
by multiplying each entry of A by k: For example let k = 3 and A = 6 4 3 5 75, then
4 8
2 3 2 3
1 1 3 3
6 7 6 7
6
3A = 3 4 3 7
5 5=4 9 6 15 75
4 8 12 24
3. Multiplication
Two matrices A and B can be multiplied together only when the number of columns in
A equals the number of rows in B: To …nd the ij entry in the product AB we multiply
the entries along the ith row of A pairwise with entries on the j th column of B and then
add: 2 3 2 3
1 1 " # 1
6 7 1 1 3 6 7
A=6
4 3 5 7
5, B = ,C=6 7
4 2 5
2 4 2
4 8 3
(a)
2 3 2 3
1 1 " # 1 1+ 1 2 1 1+ 1 4 1 3+ 1 2
6 7 1 1 3 6 7
AB = 6
4 3 5 7
5 =6
4 3 1+5 2 3 1+5 4 3 3+5 2 75
2 4 2
4 8 4 1+8 2 4 1+8 4 4 3+8 2
2 3
1 5 5
6 7
=6
4 13 17 1 75
12 36 28
To illustrate:
2 3 2 32 3
::: ::: ::: ::: ::: ::: ::: ::: ::: b1j ::: :::
6 7 6 76 7
6 ::: ::: ::: ::: 7 7 6 76 ::: ::: 7
6 6 ::: : : : : : : : : : 76 : : : b2j 7
6 7 = 6 76 7
6 ::: cij : : : : : : 7 6 ai1 ai2 : : : aip 7 6 ::: ::: ::: 7
4 5 4 54 : : : 5
::: ::: ::: ::: ::: ::: ::: ::: ::: bpj : : : : : :
m n m p p n
2 3
::: ::: ::: :::
6 7
6 ::: ::: ::: ::: 7
6 7
= 6 7
6 : : : ai1 b1j + ai2 b2j + + aip bpj ::: ::: 7
4 5
::: ::: ::: :::
p
X
So cij = ai1 b1j + ai2 b2j + + aip bpj = aik bkj
k=1
4. Examples: 2 3
" # " # " # 1 1 3
2 3 1 2 1 2 3 6 7
6 0 2 1 7
1 5 2 3 4 5 6 4 5
3 5 4
2 2 2 2 =2 2
2 3 3 3 =2 3
" # " #
2 ( 1) + 3 ( 2) 2 (2) + 3 (3) 1+9 1 4 + 15 3 + 2 + 12
= =
1 ( 1) + 5 ( 2) 1 (2) + 5 (3) 4 + 18 4 + 10 + 30 12 5 + 24
" # " #
8 13 8 12 17
= =
9 13 22 36 7
A(B + C) = AB + AC
(B + C)A = BA + CA
(AB)C = A(BC)
k(AB) = (kA)B = A (kB)
AB 6= BA in general.
Exercises
2. The product in the reverse order, although possible, leads to a di¤erent matrix:
" # " # " #
3 1 2 1 9 2
=
2 4 3 5 16 18
3. Given
2 3 2 3
" # 0 " # 9 8 7 6
1 3 6 7 2 4 6 6 7
A= ;B = 6 7
4 7 5; C = ;D = 6 7
4 5 4 3 2 5
1 2 8 10 12
8 1 0 9 8
determine which of the following are de…ned and give their sizes (orders).
The transpose of a matrix is obtained by interchanging its rows and columns. That is, the entries
of the ith row become the entries of the ith column.
So, if A is a m n matrix, then its transpose, denoted AT , is a n m matrix.
Example:
2 3
1 3
6 7
Let A be the 3 2 matrix 6 7
4 2 4 5:
5 8
2 3T
1 3 " #
6 7 1 2 5
Then AT is the 2 3 matrix: AT =6 7
4 2 4 5 = :
3 4 8
5 8
Special matrices
Some types of matrices appear more often and so they have their own name:
Diagonal matrices are matrices where any non-zero entries occur on the main diagonal:
2 3
" # 1 0 0
1 0 6 7
Identity matrices for example I2 = , I3 = 6
4 0 1 0 7
5:
0 1
0 0 1
1 1
Warning: A does not mean A:
row operations 1
Schematically: [A jI ] ! IjA
If there is a stage where C has a column consisting entirely of zeros, we stop immediately:
2.
A has no inverse.
3. Ensure that the top left entry of C is a non-zero entry, which we will label as a: (If necessary,
interchange the top row with another row to achieve this.)
1
4. Multiply this row by a so that the …rst non-zero entry of this row is 1. This entry is the
pivot for that column. (Alternatively this can sometimes be a¤ected by row interchange.)
5. Add a suitable multiple of this …rst row to the rows below row so that all entries in the
column below the pivot become 0.
If there is a stage where there the sub-matrix of C left of the partition has a row consisting
entirely of zeros, we stop immediately: the matrix A has no inverse.
6. Consider the submatrix of C found by removing its 1st row and 1st column, regard this
as a new matrix C: Repeat steps 2-6 until the next submatrix under consideration has no
rows left.
7. Provided the algorithm has not been exited at steps 2 or 5 the full matrix is now in echelon
form. The pivots are all 1 and located on the main diagonal of the matrix left of the
partition.
1. Notice that all pivots are 1 and are located on the main diagonal of the matrix left of the
partition. Locate the row containing the right-most pivot, (which must be in the bottom
row).
2. Add suitable multiples of this row to the rows above so that all entries in the column above
become 0.
3. Locate the next pivot by moving up the diagonal and repeat steps 2 and 3.
4. This procedure is repeated until the top left pivot is reached, at which point the full matrix
is I j A 1 :
2 3
1 1 1
6 7
but since this new matrix has a column of zeros, we conclude the matrix 6
4 1 1 0 7
5 has no
1 1 1
inverse. (Exiting the algorithm at step 2.)
" # " #
a b 1 1 d b
The inverse of a 2 2 matrix: A = ,A = :
c d ad bc c a
" #
a b
Notes: The matrix A = is invertible provided ad bc 6= 0: This number is called the
c d
a b
determinant of A and is denoted by or det (A) :
c d
The determinant of any square matrix A is also de…ned (see next lecture) and this number
determines whether or not A is invertible:
2x1 + 7x2 + x3 = 1
x1 + 4x2 x3 = 4
x1 + 3x2 = 5
2 32 3 2 3
2 7 1 x1 1
6 76 7 6 7
which can also be written in matrix form 6
4 1 4 1 7
54
6 x2 7 = 6 4 7 :
5 4 5
1 3 0 x3 5
Any n n linear system can be written in the form Ax = b; where x and b are column vectors
(matrices).
Ax = b
1 1
A Ax = A b
1
Ix = A b
1
giving x = A b
The main advantage to using matrix inverse method occurs when working with mul-
tiple equations with the same set of coe¢ cients.
Example:
2x1 + 7x2 + x3 = 1 2x1 + 7x2 + x3 = 2
Solve: (a) x1 + 4x2 x3 = 4 and (b) x1 + 4x2 x3 = 4
x1 + 3x2 = 5 x1 + 3x2 = 6
2 3 2 3 12 3 2 3 2 3 12 3
x1 2 7 1 1 x1 2 7 1 2
6 7 6 7 6 7 6 7 6 7 6 7
In (a) we have 6 7 6
4 x2 5 = 4 1 4 1 7
5
6 4 7,
4 5 and in (b) 6 7 6
4 x2 5 = 4 1 4 1 7
5
6 4 7:
4 5
x3 1 3 0 5 x3 1 3 0 6
2 3 1 2 3
2 7 1 3 3 11
6 7 6 7
Now 6
4 1 4 1 7
5 = 1
2
6 1
4 1 3 7
5 (shown above),
1 3 0 1 1 1
2 3 2 32 3 2 3
x1 3 3 11 1 20
6 7 6 76 7 6 7
giving the solution to (a): 6
4 x2
7=
5
1
2
6 1
4 1 3 7 6 7 6
54 4 5 = 4 5 7
5
x3 1 1 1 5 4
2 3 2 32 3 2 3
x1 3 3 11 2 30
6 7 6 76 7 6 7
and to (b): 6 7
4 x2 5 =
1
2
6 1
4 1 3 7 6 7 6
54 4 5 = 4 8 7
5:
x3 1 1 1 6 6
Exercise: Solve the following system of equations using matrix inversion followed by matrix
multiplication:
2x + 3y = 7
4x + y = 3
" #" # " #
2 3 x 7
In matrix form: =
4 1 y 3
" # 1 " # 1" #" # " # 1" #
2 3 2 3 2 3 x 2 3 7
If exists we may write =
4 1 4 1 4 1 y 4 1 3
" # 1 " # " #
1 3
2 3 1 1 3 10 10
Now = h i 1 2 12 = 2 1
4 1 [not zero so 2
4
3
1 exists] % 4 2 5 5
" #" # " #" # " #
1 3 1
1 0 x 10 10 7 5
So = 2 1
= 11
; giving x = 1=5 and y = 11=5
0 1 y 5 5 3 5
Determinants
" #
a b a b
The determinant of a 2 2 matrix A = is de…ned by det A = = ad bc:
c d c d
As we noted in the previous lecture determinants are used to determine whether a square matrix
is invertible or not.
Determinants can also be used to solve n n systems of linear equations using a rule known as
Cramer’s rule.
2x + 3y = 5
For example the system : has the solution:
7x + 11y = 13
5 3 2 5
13 11 7 13
x= ; y=
2 3 2 3
7 11 7 11
The denominator is always the determinant of coe¢ cients and the determinant on the top line
replacing the column containing the coe¢ cients of the variable in question with the numbers on
the right hand side.
Cramer’s rule works provided determinant of coe¢ cients (the denominator) is non-zero, when it
is zero Cramer’s rule fails and the system of equations has either no solutions or in…nitely many.
The determinant is a number we assign to any square matrix. It plays an important role in
…nding the inverse of a matrix, solving systems of equations, multiplication of vectors, …nding
areas of triangles, etc.
To …nd the determinant of larger matrices we need to know about cofactors. A cofactor of a
particular entry in a matrix is the (smaller) determinant consisting of those elements which
remain if we removed the row and column belonging to that entry, together with a sign, + or ;
depending on where the entry is located.
2 3
1 3 7
6 7
Example In the matrix A = 6 4 4 2 2 7
5 the cofactor of the (2; 3) entry, namely 2; is the
5 6 9
4 3 7
This is clearly 3 9 1 :
8 6 1
Note that the ‘ ’comes from the position not the sign of the entry.
2. For each position in the selected row or column, calculate the corresponding cofactor.
3. Form the product of each cofactor with the corresponding entry. The determinant is the
sum of these products.
1 3 7
Example Find det A = 4 2 2 :
5 6 9
We choose to expand along the second row.
3 7 1 7 1 3
det A = 4 +2 2
6 9 5 9 5 6
If we chose instead to expand along the 1st column the answer is the same.
2 2 3 7 3 7
det A = 1 +4 +5 = 30 + 4 15 + 5 20 = 70
6 9 6 9 2 2
As a practical consideration we would do well to choose that row/column that has the greatest
number of zeros.
1 4 3 7
0 3 9 1
Example: Find the 4 4 determinant :
0 0 6 1
0 0 0 10
An obvious choice is to expand along the 1st column:
1 4 3 7
3 9 1
0 3 9 1
= 1 0 6 1 + other terms all zero.
0 0 6 1
0 0 10
0 0 0 10
3 9 1
6 1
And again: 1 0 6 1 = 1 3 + other terms all zero
0 10
0 0 10
= 1 3 ( 6 10 0) = 1 3 6 10 = 180
2 1 1
(notice the di¤erent bracketing which distinguishes
det B = 1 3 3
a matrix from its determinant)
10 5 2
1 1 2 1 2 1
= (1) + (3) (3) (expanding along row 2)
5 2 10 2 10 5
= ( 3) + 3 14 3 20
=3 42 + 60 =
= 21:
To illustrate
2 the following
3 properties of determinants we will work with an arbitrary 3 3 matrix
a1 a2 a3
6 7
A=6 4 b1 b2 b 3
7 : We stress that the all the following properties are true regardless of size.
5
c1 c2 c3
1. Transpose property: det (A) = det AT
a1 a2 a3 a1 b1 c1
b1 b2 b3 = a2 b2 c2
c1 c2 c3 a3 b3 c3
3. Interchange property: Swapping any two rows, or two columns, changes the sign of the
determinant
a1 a2 a3 a1 a2 a3
e:g: b1 b2 b3 = c1 c2 c3
c1 c2 c3 b1 b2 b3
Hence a matrix with two identical rows or columns has determinant = zero
a1 a2 a3
a1 a2 a3 = 0:
c1 c2 c3
4. Elimination property: Adding a multiple of a row to another row does not alter the
value of a determinant. Similarly for columns.
a1 a2 a3 a1 a2 a3
e.g. b1 + kc1 b2 + kc2 b3 + kc3 = b1 b2 b3 :
c1 c2 c3 c1 c2 c3
5. Matrix multiplication property: Let A and B be square matrices of the same size (both
n n); then
det (AB) = det A det B
1 a a2
1 b b2
1 c c2
1 a a2
= 0 b a b2 a2 R2 R1 ! R2
1 c c2
1 a a2
= 0 b a b2 a2 R3 R1 ! R3
0 c a c2 a2
1 a a2
taking out common factor of (b a) from row 2
= (b a) (c a) 0 1 b + a
and (c a) from row 3
0 1 c+a
1 a a2
= (b a) (c a) 0 1 b + a R3 R1 ! R2
0 0 c b
= (b a) (c a) (c b) multiplying down the main diagonal to evaluate the determinant
x + 2y + z = 1
2x 3y + 7z = 4
x+y 3z = 1
Solution:
1 2 1 1 1 1 1 2 1
4 3 7 2 4 7 2 3 4
1 1 3 1 1 3 1 1 1
x= ;y = ;z = :
1 2 1 1 2 1 1 2 1
2 3 7 2 3 7 2 3 7
1 1 3 1 1 3 1 1 3
1 2 1 1 2 1 1 1 1 1 1 1
5 11
4 3 7 = 0 5 11 = = 43 2 4 7 = 0 6 5 = 12
3 2
1 1 3 0 3 2 1 1 3 0 0 2
1 2 1 1 2 1 1 2 1 1 2 1
2 3 4 = 0 7 6 = 18 2 3 7 = 0 7 5 = 14 15 = 1
1 1 1 0 3 0 1 1 3 0 3 2
43 12 18
giving x = = 43 y= = 12 z= = 18
1 1 1
Generally speaking, when the determinant of an n n system of equations is zero, we can only
deduce that the system has no solutions or in…nitely many.
A homogeneous system of equations, introduced earlier (i.e. Ax = 0), always has the trivial
solution x = 0: If the determinant of coe¢ cients of a homogeneous system is zero the system
must have in…nitely many solutions.
Example 1: Let
2 3
a 1 3
6 7
A=6
4 2 2 1 7
5;
2 a 1
…nd the values of a; such that Ax = 0 has non-trivial solutions.
To quote from the textbook, “such problems arise naturally in many branches of engineering.
For example, in vibrations the eigenvalues and eigenvectors describe the frequency and mode of
vibration respectively, while in mechanics they represent principal stresses and the principal axes
of stress in bodies subject to external forces.”
Note also that if we multiply of the sides of this equation by the scalar t we get
" #" # " # " #
2 1 t 3t t
= =3
1 2 t 3t t
We write instead: (A I)x = 0; this is a homogeneous system of equations. Now we know the
trivial solution x = 0 is always available, but we are interested only in the non-zero solutions
(called eigenvectors). This is the requirement that a homogeneous system has in…nite number of
solutions which happens precisely when
det (A I) = ( 1)n ( 1) ( 2) ( n) = 0:
Here the eigenvalues are simply 1; 2; : : : ; n. The common convention is to label from the
largest in magnitude to the smallest in magnitude. Note that it is possible for the roots of the
polynomial to be repeated or complex.
1 2
Solution: The characteristic polynomial: det (A I) = = + 1 = 0 for = i:
1
Example 4: Find the eigenvalues of
2 3
1 1 2
6 7
A=6
4 1 2 1 7
5
0 1 1
2 3 2 3 2 3
1 1 2 1 0 0 1 1 2
6 7 6 7 6 7
Solution: A I=6
4 1 2 1 75
6 0 1 0 7=6
4 5 4 1 2 1 7
5
0 1 1 0 0 1 0 1 1
1 1 2
The characteristic polynomial: det (A I) = 1 2 1
0 1 1
1 2 1
= 1 1 2 R1 $R2
0 1 1
1 2 1
= 0 (1 ) (2 )+1 1 R2 + (1 )R1 !R2
0 1 1
(1 ) (2 )+1 1
= ( 1) expanding along col1
1 1
(1 ) (2 )+1 1
=( 1 ) factoring col2
1 1
=( 1 ) [(1 ) (2 )+1 1] = ( 1 ) (1 ) (2 ) : Hence eigenvalues: = 1; 2; 1
Having solved the nth order polynomial (characteristic equation) for the n roots (eigenvalues),
it still remains to …nd the corresponding eigenvectors. For the moment let’s assume that the
eigenvalues are distinct (non-repeated.)
Solving Ax = 2x :
2 32 3 2 3
1 1 2 x1 x1
6 76 7 6 7
6 1 2 1 7 6 7 6 7
4 5 4 x2 5 = 2 4 x2 5
0 1 1 x3 x3
x2 = 3x3 = 3t from row 2, and x1 = x2 2x3 = t from row 1, giving (x1 ; x2 ; x3 ) = t (1; 3; 1)
hence an eigenvector corresponding to = 2 is h1; 3; 1i :
2 32 3 2 3 2 3
1 1 2 1 2 1
6 76 7 6 7 6 7
Check 6
4 1 2 1 7 6 7 6 7 6 7
54 3 5 = 4 6 5 = 24 3 5:
0 1 1 1 2 1
If the eigenvalues of the matrix A are distinct, then it can be shown that the corresponding
eigenvectors are linearly independent. If, however, the eigenvalues are repeated, it may not be
possible to …nd n linearly independent eigenvectors. By repeated roots of the characteristic
equation, we simply mean that two or more of the eigenvalues are the same.
0 1
Solution: Characteristic polynomial is det (A I) = 0 1 2 = (1 )2
0 0 1
which has roots = 0 and = 1 (multiplicity = 2)
In the previous example, it is not clear how many independent eigenvectors exist when = 1: The
eigenvalue has a multiplicity of 2, but that doesn’t assure us that there will be two independent
eigenvectors.
Example 6: In the previous example, …nd the eigenvector(s) corresponding to each eigenvalue.
Example 7: Find the eigenvalues and corresponding eigenvectors for the matrix
2 3
0 0 0
6 7
A=6 4 0 1 0 5
7
1 0 1
0 0
Solution: Characteristic polynomial is det (A I) = 0 1 0 = (1 )2
1 0 1
which has roots = 0 and = 1 (multiplicity = 2)
The eigenvectors:
=1:
2 3 2 3
1 0 0 1 0 0
6 7 6 7
A I=A I=64 0 0 0 7
5 R +R !R 4
6 0 0 0 7 which is in echelon form.
5
3 1 3
1 0 0 0 0 0
2 32 3 2 3
1 0 0 x1 0
6 76 7 6 7
Solving 6
4 0 0 0 754
6 x2 7 6 7
5 = 4 0 5 we have x1 = 0; x2 and x3 are free so we set x2 = s
0 0 0 x3 0
and x3 = t:
2 3 2 3 2 3 2 3
x1 0 0 0
6 7 6 7 6 7 6 7
Thus the eigenvectors for = 1 are 64 x 2
7 = 6 s 7 = s 6 1 7 + t 6 0 7 ; that is, the sums of
5 4 5 4 5 4 5
x3 t 0 1
non-zero multiples of (0; 1; 0) and (0; 0; 1) :
5. Properties of eigenvalues
Property 1: The sum of the eigenvalues of A is equal to the sum of the elements of the diagonal
of A:
n
X n
X
i = 1 + 2 + ::: + n = aii
1 1
Property 3: The eigenvalues of the inverse matrix A 1, provided they are non-zero, are:
1 1 1
; ; ::: ;
1 2 n
Property 4: The eigenvalues of the transposed matrix AT are the same as those of A.
k k k k
1; 2; 3; :::; n
Functions such as f (x) = x sin x express f (x) explicitly in terms of x: Expressions of the form
x2 + y 2 = 4; or 2y + x = 11; de…ne an implicit relationship between x and y:
Illustrative example
The implicit relation x2 + y 2 = 4 is the equation of a circle, centre (0; 0), radius 2. Solving for
p p
y gives y 2 = 4 x2 and hence y = 4 x2 or y = 4 x2 : The equation x2 + y 2 = 4 thus
p
represents two functions of x : y1 = 4 x2 .
and
p
y2 = 4 x2
Both these forms are readily di¤erentiated using the chain rule:
dy1 dy2
: :
dx dx
du du
let u = 4 x2 = 2x let u = 4 x2 = 2x
dx dx
dy1 dy1 du dy2 dy2 du
= =
dx du dx dx du dx
1 1=2 1 1=2
= u 2x = u 2x
2 2
1=2 1=2
= x 4 x2 = x 4 x2
x x
= =
y1 y2
dy2 x
Note that both results can be expressed in terms of y; indeed as the same expression. ( = :)
dx y
Examples
1. x2 + y 2 = 4:
This equation implicitly de…nes y as a function of x; so we can di¤erentiate both sides with
respect to x :
d
2x + dx y2 = 0
d dy
2x + dy y2 dx = 0 by the chain rule
dy
2x + 2y dx =0
dy
Now solve for dx :
dy x
ANS: = : Compare this answer with that obtained in the illustrative example above
dx y
3
y
-3 -2 -1 1 2 3
x
-1
-2
-3
Di¤erentiate both sides with respect to x; taking care with the product xy and a double chain
rule on 5y 2 :
dy d
10x 6 y + 6x dx + dx 5y 2 = 0 using the product rule
dy d dy
10x 6y 6x dx + dy 5y 2 dx = 0 using the chain rule
dy dy
10x 6y 6x dx + 10y dx =0
dy
Grouping: 10x 6y + dx (10y 6x) = 0
dy
Now solve for dx :
dy 6y 10x 3y 5x
ANS: = = : (Observe also the faint lines 3y 5x = 0 where the curve is
dx 10y 6x 5y 3x
horizontal and 5y 3x = 0 where the curve is vertical.)
-5 -4 -3 -2 -1 1 2 3 4 5
-1 x
-2
-3
-4
-5
Di¤erentiate both sides with respect to x; taking care with the chain rules on x3 and y 3 :
x3 + y 3 = 6xy
d dy
3x2 + dx y 3 = 6 y + 6x dx
d dy dy
3x2 + dy y3 dx = 6y + 6x dx
dy dy
3x2 + 3y 2 dx = 6y + 6x dx
dy
dx 3y 2 6x = 6y 3x2
dy 6y 3x2 2y x2
ANS: = 2 = 2
dx 3y 6x y 2x
4. Problem type: Find the point(s) on the curve (x 1)2 + (y + 2)2 = 4
where the gradient of the tangent is 1.
Di¤erentiate both sides with respect to x : 1
y
dy
2(x 1) + 2(y + 2) dx =0
dy x 1
so dx = y+2 -2 -1 1 2 3 4
x
This is equal 1 where (x 1) = y + 2,
-1
i.e. along the line y = x 1 (Sketch)
-2
Intersection with the curve (x 1)2 + (y + 2)2 = 4
(x 1)2 + ( x + 1)2 = 4 -3
(x 1)2 + ( 1)2 (x 1)2 = 4
2(x 1)2 = 4 or (x 1)2 = 2 -4
p
so (x 1) = 2
p p
giving x = 1 + 2 or x = 1 2 -5
= 4 ln (x) + 21 ln x2 + 1 6 ln(2x + 3)
ln y = ln (3x )
= x ln 3
Hence the derivative of an exponential function is a constant multiple of the exponential function.
4
y
-1.0 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
x
-1
dy d2 y
Find both dx and dx2
implicitly:
loge y = x loge x;
1. De…nitions: Trig functions are often called ‘circular’functions because (cos t; sin t) lies on
the curve x2 + y 2 = 1; (i.e. the unit circle).
Hyperbolic functions have a very similar relationship with the hyperbola x2 y 2 = 1; with the
point (cosh t; sinh t) lying on the right branch of this curve.
y y
0 x
Q 0 x
2
x 2 + y =1
2
x 2 - y =1
The Hyperbolic functions arise from certain combinations of exponential functions, and occur
frequently in applications of mathematics. For example, the shape of a hanging wire (a catenary
curve) is described by a ‘cosh’expression.
ex + e x
De…nitions: cosh x = pron. ‘cosh’
2
ex e x
sinh x = pron. ‘shine’
2
sinh x ex e x
tanh x = = x x
pron. ‘tanch’
cosh x e +e
The reciprocal functions can also be de…ned:
1 2
sech x = = x x
pron. ‘sech’as in fetch
cosh x e +e
1 2
csch x = = x x
pron. ‘cosech’as in go-fetch
sinh x e e
1 cosh x ex + e x
coth x = = = x x
pron. ‘coth’as in goth
tanh x sinh x e e
5
y
-5 -4 -3 -2 -1 1 2 3 4 5
x
-1
y = cosh x; y = 12 ex ; y = 21 e x
5
y
4
-5 -4 -3 -2 -1 1 2 3 4 5
-1 x
-2
-3
-4
-5
y = sinh x; y = 12 ex ; y = 1
2e
x
-3 -2 -1 1 2 3
x
-1
-2
y = tanh x; y = 1; y = 1
5
y
4
-5 -4 -3 -2 -1 1 2 3 4 5
-1 x
-2
-3
-4
-5
y = csch x; y = sinh x
Hyperbolic identities hold in similar ways to the trig identities; some of these include
a) cosh2 x sinh2 x = 1
b) 1 tanh2 x = sech2 x
Osborn’s rule: In general, to obtain the formula for hyperbolic functions from the analogous
identity for circular functions, replace each circular function by the corresponding hyperbolic
function and change the sign of every product (or implied product) of two sines.
Examples
cos2 x + sin2 x = 1 becomes cosh2 x sinh2 x = 1
8 8
> 2 2 > 2 2
< cos x sin x
> < cosh x + sinh x
>
cos 2x = 2 cos2 x 1 cosh 2x = 2 cosh2 x 1
>
> >
>
: 1 2 sin2 x : 1 + 2 sinh2 x
sin2 x
2 2 because tan2 x = cos2 x
is an
1+ tan2 x = sec2 x 1 tanh x = sech x
implied product of two sines
4. Relationship between circular and hyperbolic functions
Since (i) ei = cos + i sin and (ii) e i = cos ( ) + i sin ( ) = cos i sin
adding: 2 cos = ei + e i
from which cos = cosh (i )
ei e i sinh (i )
and subtracting (ii) from (i) gives sin = =
2i i
Then cosh i = cos
sinh i = i sin
cos i = cosh
sin i = i sinh
These are easily found using di¤erentiation of exponentials ( again note the similarities with trig
function derivatives).
d
(sinh x) = cosh x (apply de…nition and use derivatives of ex and e x)
dx
d
(cosh x) = sinh x (apply de…nition and use derivatives of ex and e x)
dx
d cosh x
(csch x) = = csch x coth x (apply de…nition and quotient rule, use identity
dx cosh2 x 1
cosh2 x sinh2 x = 1)
d sinh x
(sech x) = = sech x tanh x (apply de…nition and quotient rule, use identity
dx cosh2 x
cosh2 x sinh2 x = 1)
d sinh2 x cosh2 x
(coth x) = = csch2 x (apply de…nition and quotient rule, use identity
dx sinh2 x
cosh2 x sinh2 x = 1)
Examples
p
1. Find the derivative of f (x) = cosh x.
1 1=2 d
f 0 (x) = 2 (cosh x) dx (cosh x) (applying the chain rule)
1 1=2
= 2 (cosh x) (sinh x) (applying the rule obtained 4 (ii))
sinh x
= p
2 cosh x
p
2. Find the derivative of f (x) = cosh x.
p d p
f 0 (x) = sinh ( x) dx ( x) (applying the chain rule)
p
= (sinh ( x)) 12 (x) 1=2
p
sinh ( x)
= p
2 x
3. Find f 0 (x) if f (x) = sinh x + cosh x.
There is only one function f which is equal its derivative and which satis…es f (0) = 1: Namely
f (x) = ex : It must be therefore that cosh x + sinh x = ex :
Since the hyperbolic sine, sinh, and the hyperbolic tangent, tanh, are one-to-one, their inverses
are fully de…ned without needing to consider domain restrictions. For the hyperbolic cosine,
cosh, which is not one-to-one, we use a restricted domain of [0, 1) to de…ne its inverse.
Since the hyperbolic functions are de…ned in terms of exponentials, their inverses can be de…ned
in terms of natural logarithms. This de…nition is often called the logarithmic form of the inverse.
Examples
1. Find the logarithmic form, domain and range of the inverse of the principal branch of
f (x) = cosh x.
Sketch the graph of y = cosh(x) and its inverse on the same axes.
1
(restricted) cosh x : domain: [0; 1) cosh x: domain: [1; 1)
range: [1; 1) range: [0; 1)
1 1
deriving the log form of cosh x: y = cosh x so cosh y = x
1
x= 2 (ey + e y)
2x = ey + e y
2xey = e2y + 1
0 = e2y 2xey + 1
p
y 2x 4x2 4
e = (quadratic formula)
2
p
ey = x + x2 1
1
p
y = cosh x = ln x + x2 1
5
y
-1 1 2 3 4 5
x
-1
1
cosh x and cosh x
The derivatives of the inverse functions can be found by di¤erentiating the logarithmic form, or
by implicit di¤erentiation.
y 4
-4 -2 2 4
x
-2
Domain: Range: -4
1
p 1
sinh x R R ln(x + x2 + 1) p
1 + x2
5
y
4
Domain: Range: -1 1 2 3 4 5
-1
x p 1
1
cosh x [1; 1) [0; 1) ln(x + x2 1) p
x2 1
2
y
1
-2 -1 1 2
x
-1
Domain: Range:
1 -2 1 1+x 1
tanh x ( 1; 1) R ln( )
2 1 x 1 x2
y 4
-4 -2 2 4
x
-2
Domain: Range: -4 r !
1 1 1 1
csch x Rn f0g Rn f0g ln + +1 p
x x2 jxj x2 + 1
Domain: Range: -1 1 2 3 4 5 r !
1 -1
x 1 1 1
sech x (0; 1) [0; 1) ln + 1 p
x x2 x 1 x2
4
y
2
-4 -2 2 4
x
-2
Domain: Range:
1 -4 1 1+x 1
coth x Rn [ 1; 1] Rn f0g ln
2 x 1 1 x2
Examples
1
1. Show that f (x) = tanh x is always increasing.
d 1 1
tanh x =
dx 1 x2
1
and 1 x2 is positive on the domain of tanh ; namely ( 1; 1) : Thus
d 1 1
tanh x = >0
dx 1 x2
1
and hence tanh x is always increasing.
1
2. Find the derivative of tanh (sin x).
d 1 1
tanh (sin x) = cos x
dx 1 sin2 x
1
= cos x using 1 sin2 x = cos2 x
cos2 x
= sec x
Z 1
dx
3. Evaluate p .
0 1 + x2
Z 1
dx 1 1
p = sinh x 0
0 1 + x2
1 1
= sinh (1) sinh 0
1
p 1
= sinh (1) = loge 1 + 2 using the log form of sinh
1
6. Find the derivative of sinh (tan x). Comment in light of Q.2
d 1 1
sinh (tan x) = p sec2 x
dx 1+ tan2 x
1
= sec2 x using 1 + tan2 x = sec2 x
sec x
= sec x
d
= tanh 1 (sin x) from example 2
dx
1 1
Notice also sinh (tan (0)) = 0 and tanh (sin 0) = 0:
1 1
Provided sinh (tan (x)) and tanh (sin x) are de…ned on the same interval, and one which
includes x = 0 (for example 2; 2 ); we must conclude that they are the same function
on this interval.
Di¤erentiation techniques are usually fairly routine, following set rules and patterns. This is
not the case for antidi¤erentiation, where it can be far more challenging to …nd the appropriate
technique; some careful thinking must often be done to …nd the antiderivative. Sometimes an
antiderivative can’t be found in terms of elementary functions! Remember that all antiderivatives
can be checked by di¤erentiation, be prepared to have a go (even guess the answer?) and check
it back through by di¤erentiation.
R
e.g. Guess the answer for x cos xdx
The formula for Integration by Parts arises from the Product Rule for Di¤erentiation:
d du dv
(u(x)v(x)) = v(x) + u(x) so
Z dx dx dx
du dv
v(x) + u(x) dx = u(x)v(x)
dx dx
Z Z
du dv
vdx + u dx = uv
dx dx
Z Z
du dv
vdx = uv u dx
dx dx
R
This e¤ectively means that we are replacing the problem of …nding u0 (x)v(x)dx with the (eas-
R
ier?) problem of …nding u(x)v 0 (x)dx. To use this rule e¤ectively, we have to be careful in
choosing u and v. There are no general rules for choosing u and v, but the purpose is to obtain
a simpler integral.
Integration by parts is often used when integrating a product (but not always) and is usually
the second technique we would think to employ. (The method of substitution, covered in the
ENG1090 and specialist maths syllabus, being the …rst.)
Examples:
R Z Z
x cos xdx d
x cos xdx = x(sin x) dx
dx
Z
= x sin x 1 sin xdx
= x sin x + cos x + c
R Z Z
xex dx x d x
xe dx = x(e ) dx
dx
Z
= xex 1 ex dx
= xex ex + c
R Z Z
ln xdx d
ln xdx = ln x
(x) dx
dx
Z
1
= x ln x (x) dx
x
Z
1
= x ln x dx
2
= x ln x x + c
R
x2 ex dx
Z Z
2 x d x
x e dx = x2
(e ) dx
dx
Z
= x2 ex 2x ex dx
Z
2 x
= x e 2 xex dx
R Z Z
1 xdx 1 1 d
tan tan xdx = tan x (x) dx
dx
Z
1 d
= x tan x x tan 1 x dx
dx
Z
1 x
= x tan x dx
1 + x2
Z
1 1 2x
= x tan x dx
2 1 + x2
1 1
= x tan x loge 1 + x2 + c
2
Z
Complex numbers are extremely useful in obtaining integrals of the type eax cos bxdx or
Z
eax sin bxdx; and are usually much quicker than integration by parts.
Examples
R x Z Z
x
e cos xdx e cos xdx = Re ex (cos x + i sin x) dx
Z
= Re ex eix dx
Z
= Re ex+ix dx
Z
= Re ex(1+i) dx
Z
1 x+ix
Now ex(1+i) dx = e
1+i
1 x
= e (cos x + i sin x)
1+i
1 i x 1 1 1 i
= e (cos x + i sin x) : (using =
2 1+i 1+i 1 i
1 i
= )
Z 2
1 x
Taking the real part: ex cos xdx = e (cos x + sin x)
2
Z
1 x
Hence: ex cos xdx = e (cos x + sin x) + c:
2
R Z Z
e3x cos xdx e 3x
cos xdx = Re e3x (cos x + i sin x) dx
Z
= Re e3x eix dx
Z
= Re ex(3+i) dx
Z
1 3x
Now ex(3+i) dx = e (cos x + i sin x)
3+i
3 i 3x
= e (cos x + i sin x)
Z 10
1 3x
Taking the real part: e3x cos xdx = e (3 cos x + sin x) + c
10
The limit laws are listed below. Essentially they allow ‘common sense’ manipulation of limit
expressions, following normal algebraic operations, e.g. the limit of a sum is the same as the sum
of its limits. It is important to note that these laws can only be applied when the combining
functions have an existing limit.
Suppose that c is a constant and the limits limx!a f (x) and limx!a g(x) exist. Then
6. To evaluate limits we will make frequent use of the continuous function rule: :
To make e¤ective use of rule 6 we will take it as known that the elementary functions (poly-
nomial, exponential, logarithmic, trigonometric and hyperbolic functions) are continuous
on their respective domains.
Examples: (examples 1-4 are evaluated using the limit laws above)
x2 (6x + 3)(2x 7)
1. Evaluate lim :
x!1 (x3 + 4)(x + 17)
1
x x
lim
x!1 1 1
x
1 x2
= lim
x!1 1 x
(1 x) (1 + x)
= lim
x!1 1 x
= lim (1 x)
x!1
= 0
1 1
x+4 4
3. Find lim
x!0 x
1 1
x+4 4
lim
x!0 x
4 (x + 4)
= lim
x!0 x (x + 4) 4
x
= lim
x!0 x (x + 4) 4
x
= lim
x!0 x (x + 4) 4
1
= lim
x!0 (x + 4) 4
= 1 lim (x + 4) 4
x!0
1
=
16
p p
2 t 2
4. Find lim :
t!0 t
p p p p p p
2 t 2 2 t 2 2 t+ 2
lim = lim p p
t!0 t t!0 t 2 t+ 2
2 t 2
= lim p p
t 2 t+ 2
t!0
t
= lim p p
t!0 t 2 t+ 2
1
= lim p p
t!0 2 t+ 2
p p
= 1 lim 2 t+ 2
t!0
1
= p
2 2
The last four examples demonstrate the use of algebra in evaluating limits. However in
evaluating most limits the use of algebra alone will not be su¢ cient. The next technique
we introduce is much more powerful than algebraic methods.
Applying the limit techniques (particularly direct substitution) discussed earlier can often lead
0 1
to ‘meaningless’expressions of the type 0 or 1. These are called indeterminate forms, since
they have not correctly determined the true limit value.
However, if we ‘zoom in’ around x = a for 2 functions f and g, such that f (a) = g(a) = 0 we
f (x) f 0 (x)
can see that the value of g(x) g 0 (x) .
y
f
x
0 a
This forms the basis of L’Hopital’s Rule: Suppose f and g are di¤erentiable, with f (a) =
g(a) = 0. If f 0 and g 0 are continuous (but g 0 (x) 6= 0), then
f (x) f 0 (x)
lim = lim 0 :
x!a g(x) x!a g (x)
This rule can be applied for two-sided and one-sided limits, approaching a …xed value a or 1,
0 1
which give the indeterminate form or . To reduce expressions to a meaningful term, it may
0 1
be necessary to apply L’Hopital’s Rule two or more times.
Examples
sin 2x sin 2x 0
lim lim is of the form ` ’so that L’Hopital’s rule may be applied:
x!0 x x!0 x 0
2 cos (2x)
= lim
x!0 1
2
= lim
x!0 1
= 2
ln x ln x 1
lim lim is of the form ` ’so that L’Hopital’s rule may be applied:
x!1 x x!1 x 1
1
x
= lim
x!11
1
= lim
x!1 x
= 0
There are other types of indeterminate forms, involving combinations of 0 and 1, dealt with as
follows:
Indeterminate Product 0: 1
f (x)
If lim f (x)g(x) = 0 1 re-arrange f (x)g(x) to 1=g(x) , then apply L’H Rule.
x!a
lim x ln x lim x ln x is of the form `0 1’so that some rearrangement is necessary
x!0+ x!0+
ln x 1
= lim is now of the form ` ’so that L’Hopital’s rule may be applied
x!0 (1=x) 1
x 1
= lim
x!0 x 2
x2
= lim
x!0 x
x
= lim
x!0 1
= 0
Indeterminate Di¤erence 1 1
If limx!a [f (x) g(x)] = 1 1, convert the expression to a single fraction, using common
0 1
denominators, factorisation, or rationalisation, to produce a 0 or 1 form. Then apply L’H Rule.
Examples
lim [ 1 1
] 1 1
x!0 x sin xlim [ sin x ] is of the form `1 1’so that some rearrangement is necessary
x!0 x
sin x x 0
= lim is now of the form ` ’so that L’Hopital’s rule may be applied
x!0 x sin x 0
cos x 1 0
= lim sin x+x cos x a ‘ ’form’
x!0 0
sin x
= lim cos x x sin x+cos x applying L’Hopital’s rule
x!0
limx!0 sin x
= limx!0 (cos x x sin x+cos x) applying rule (5)
= lim 0
x!0 2
= 0
Indeterminate Powers 00 , 11 , 10 .
Examples
then ln lim xx = ln L
x!0+
x
2
lim 1+ = a ‘10 ’form
x!0 x
2 x 2
suppose for the moment that lim (1 + ) exists, so let lim (1 + )x = L
x!0 x x!0 x
2
then ln lim (1 + )x = ln L
x!0 x
2 2
since ln is continuous ln lim (1 + )x = lim ln(1 + )x
x!0 x x!0 x
2
so lim ln(1 + )x = ln L
x!0 x
2 x 2
now lim ln 1 + = lim x ln(1 + ) = ::::a ‘0 1’form
x!0 x x!0 x
2
ln(1 + x ) 1
= lim = ::::a form
x!0 1=x 1
1=(1 + x2 ) 2=x2
= lim applying L’Hopital’s rule
x!0 1=x2
1
= lim 2
x!0 (1 + x2 )
= 2
2
ln L = 2 giving L = e :
x
2
Hence lim 1+ = e 2
x!0 x
If a function g(x) is ‘trapped’between 2 other functions f and h such that f (x) g(x) h(x),
and lim f (x) = lim h(x) = L, then lim g(x) = L:
x!a x!a x!0
L g
f
a x
We can use this to evaluate limits of expressions where Limit Laws cannot successfully be applied:
Example:
Show that
1
lim x sin = 0:
x!0 x
1
Can we solve this by …nding lim x lim sin ?
x!0 x!0 x
1
graph of y = sin x
1
Remember that to apply the Limit Laws both limits must exist. Clearly lim sin does not exist.
x!0 x
1
We know that 1 sin 1, so we can introduce a ’squeeze’situation by using
x
1
jxj x sin jxj
x
1
Now lim jxj = 0 and limx!0 jxj = 0, so we have lim x sin
= 0.
x!0 x!0 x
Example: A very common limit encountered by engineering students is
x
lim e sin x
x!1
x x x
e e sin x e
x x x sin x
Now lim e = 0 and similarly lim e = 0 hence lim e = 0:
x!1 x!1 x!1
1
ANS: The function f (x) = x2
is always positive. The de…nite integral of a positive function can
never be negative. (De…nite integrals give the ‘signed’area between a curve and the x axis.
For a curve which is always positive this signed area must also be positive.)
However this introduces a new problem. The integrands in both these integrals are not Riemann
integrable in the normal sense because they are not bounded. (The function is unbounded near
x = 0:)
Z 1
There are two types of improper integrals: an expression like ex dx is improper
1
because the domain of integration, in this case [1; 1) ; is not bounded,
Z 1
1
and expressions like 2
dx where the range of the integrand is unbounded on
0 x
1
the interval of integration. (In this case the function 2 is unbounded on [0; 1] :
x
When the domain of integration is not …nite we have a Type 1 improper integral.
When the integrand is unbounded at a particular point, but continuous elsewhere, we have a
Type 2 improper integral.
For these integrals, we are attempting to …nd the area of an ‘in…nite space’. To do this, we
evaluate the de…nite integral over a …nite interval, and investigate the limit of the integral as the
interval is extended.
1
= lim + 1 = 1:
t!1 t
Z 1
1
We say that dx is convergent.
1 x2
We use the following de…nitions to evaluate these integrals:
Z 1 Z t
To de…ne f (x)dx we require two things, (i) that f (x)dx exists for every number t a
a 1 Z t
(ii) that the limt!1 f (x)dx exists and is …nite.
Z t 1
provided the two improper integrals on the right are convergent independently.
Note: In each of these cases, if the integral exists, we say that the improper integral is convergent
and that the limit becomes the value of the improper integral. If the limit fails to exist, the
improper integral is divergent.
Example Z 1
2x
Determine if e dx is convergent or divergent.
0
Z 1
e 2x dx
0
Z t
2x
= lim e dx
t!1 0
t
1 2x
= lim e
t!1 2 0
1 2t 1
= lim e +
t!1 2 2
1
= : (The integral is convergent.)
2
Example
Z 1
1
Evaluate dx
1 1 + x2
Z 1 Z 1
1 1
If dx is to converge we require the (independent) convergence of both dx
1 1 + x2 0 1 + x2
Z 0
1
and dx.
1 + x2
Z1 1 Z t
1 1
Now 2
dx = lim 2
dx
0 1+x t!1 0 1+x
1 t
= lim tan x 0
t!1
1 1
= lim tan t tan (0)
t!1
= 0= :
2 2
Z 1
1
So dx converges
0 1 + x2
1 0
= lim tan x t
t! 1
1
=0 lim tan t
t! 1
=0 = :
2 2
Z 0
1
So dx also converges.
1 1 + x2
Z 1 Z 0 Z 1
1 1 1
We write dx = dx + dx = .
1 1 + x2 1 1 + x2 0 1 + x2
Type 2 - integrand unbounded at a single point
Z b Z b Z t
Provided limx!b f (x)dx exists, we de…ne f (x)dx = lim f (x)dx [correct typos]
a a t!b a
[an analogous de…nition can be made when f is not bounded at a]
Z 1
1
Now we see why we have the apparent contradiction in the example: dx.
1 x2
Z 1 Z 1 Z 0
1 1 1
The integral dx is unde…ned because neither dx nor dx exists
1 x2 0 x2 1 x2
Z 1
1
dx
0 x2
Z 1
1
= lim dx
t!0+ t x2
1 1
= lim x t
t!0+
1
= lim 1+
t!0+ t
= 1: (The integral is divergent.)
Z 0
1
Similarly 2
dx diverges.
1 x
(Of course the failure of just one of these limits to exist results in the integral being unde…ned.)
Example
Is the area under the curve y = p1 from x = 0 to x = 1 …nite? If so, what is it?
x
If the integral contains a discontinuity, we attempt to evaluate the integral to the left and/or to
the right of the discontinuous point.
Examples: Evaluate each of the following when they exist and explain the situation otherwise:
Z 1
1
Find p dx
0 1 x2
Z t
1
= lim p dx
t!1 0 1 x2
1 t
= lim sin x 0
t!1
1
= lim sin t 0
t!1
1
= sin (1)
= =2
Z e
Find ln xdx
0
Z e
= lim ln xdx
t!0+ t
Z
= lim [x ln x x]et (see lecture 14: ln xdx = x ln x x),
t!0+
= e ln e e lim (t ln t t)
t!0
=e e 0 since lim t ln t = 0:
t!0
Example
Z 1
x2
Show that e dx is convergent. (This integral cannot be evaluated by elementary means
1
since the antiderivative of e x2 is not an elementary function).
2
Solution:We compare the integrand e x with e x :
1 1 2
Since x2 x for all x 1 we have x2 (in fact e x approaches 0 at a much faster rate
e ex
than does e x ):
Z 1 Z 1
x2
So, using the comparison test, e dx converges if we can show e x dx converges.
1 1
Z 1
e x dx
1
Z t
x
= lim e dx
t!1 1
x t
= lim e 1
t!1
t 1
= lim e +e :
t!1
Z 1 Z 1
t x x2
since lim e exists (in fact = 0) the integral e dx converges and hence e dx
t!1 1 1
also converges. Its value (whatever it might be) is a number < e 1:
Volumes of solids
Most regular solids have a ‘formula’to use to calculate their volume
Where do these formulae come from, and how do we …nd volumes of other solids?
V = A(x) x:
Z b
V = A(x)dx
a
Example 1 Find the volume of a sphere of radius r with centre at the origin.
V = A(x) x
= [y (x)]2 x
So that
Z r p 2
V = r2 x2 dx
r
Z r p
= 2 r2 x2 dx since r2 x2 is an even function
0
r
21 3
= 2 r x x
3 0
1 3
= 2 r3 r
3
4 3
= r
3
Slab method:
The sphere is an example of a solid of revolution. These are formed when a region (in this
case the region bounded by the x -axis and the upper half of the circle centred at the origin and
A = r2 = f (x)2 ; where f (x) = height of each slice above the x -axis and therefore the radius
of each slab.
Thus, for a volume of a solid of revolution bounded by the x-axis, y = f (x); x = a and x = b; we
have
Zb
V = [f (x)]2 dx
a
Washer method
The volume formed by rotation around the x -axis of an area between 2 curves can often be
determined by using the washer method. For this we use
Z b h i
V = f (x)2 g(x)2 dx
a
The shape created will be a washer, sitting perpendicular to the x -axis.
Example 2 Find the volume of the solid formed when the region bounded by y = x and y = x2
is rotated through 2 radians about the x -axis.
V = A(x) x
= [f (x)]2 [g(x)]2 x
Z b h i
V = f (x)2 g(x)2 dx
a
Z 1
2
= x2 x2 dx
0
1 3 1 5 1
= x x
3 5 0
1 1 2
= =
3 5 15
Example 3 Find the volume of the solid formed when the region bounded by y = x and y = x2
is rotated through 2 radians about the y-axis.
V = A(y) y
= [x2 (y)]2 [x1 (y)]2 y
Z 1h i
p
V = ( y)2 y 2 dy the y terminals are y = 0 and y = 1
0 p
the outer radius x2 is y = x2 or x2 (y) = y
and the inner radius is x1 (y) = y
Z 1
= y y 2 dy
0
1 2 1 3 1
= y y
2 3 0
1 1
= =
2 3 6
In …nding the volume of a solid of revolution which has been rotated about the y-axis, it may
sometimes be more useful to …nd the volume using cylindrical (hollow) shells, where the shells
will be thin with axis the y-axis.
Z b
V = 2 (shell radius) (shell height) dx
a
Z b
= 2 xf (x)dx
a
1. Draw the diagram, including a line to represent the radius perpendicular to the axis of
revolution.
3. Integrate the product 2 (shell radius) (shell height) to give the total volume.
Example 4 Find the volume of the solid obtained by rotating about the y-axis the region
bounded by y = x(x 1)2 and y = 0: (To attempt this example using the washer method would
be almost impossible.)
V = 2 x x(x 1)2 x
Z 1
0.3
4 3 2
=2 x 2x + x dx 0.2
0
0.1
1
1 5 1 4 1 3
=2 x x + x -1.0 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
5 2 3 0 x
-0.1
1 1 1 -0.2
=2 +
5 2 3 -0.3
-0.4
=
15 -0.5
Example 5 (Example 3 again but this time via shell method.): Find the volume of the solid
formed when the region bounded by y = x, and y = x2 is rotated through 2 radians about the
y-axis.
V =2 x x x2 x
Z 1
V = 2 x x x2 dx
0
1
1 3 1 4
= 2 x x
3 4 0
1
= 2
12
= same as that obtained previously
6
The answers obtained by either method are identical, but the shell method avoids the use of
squaring.
Example 6 Find the volume of the solid generated when the region bounded by y = x1 ; y = 0,
x =1 and x = 10 is rotated about the y-axis, using cylindrical shells.
1
V = 2 x 0 x
x
= 2 x
Z 10
V = 2 1dx
1
= 2 9
= 18
The next example shows that the shell method can also be used to …nd volumes of revolution
about the x axis.
V = 2 y (4 x) y
= 2 y 4 y2 y
Z 2
V = 2 y 4 y 2 dy note use of y values as terminals
0
2
1 4
= 2 2y 2 y
4 0
= 8
R4 p 2
Here the shell method is more complicated than the washer method: V = 0 ( x) dx = 8 :
2. Examples:
1 n 1 1 1 1
(a) an = = ; ; ; ; :::
2 2 4 8 16
n 1 1 2 3
(b) an = = 0; ; ; ; :::
n 2 3 4
(c) an = ( 1)n 1
= f1; 1; 1; 1; :::g
n2 1 9 25 9
(d) an = n
= ; 1; ; 1; ; ; :::
2 2 8 32 16
n
cos 2 1 1 1
(e) an = = 0; ; 0; ; 0; ; :::
n 2 4 6
( )
1 n 3 2 4 3 5 4
(f) an = 1+ = 2; ; ; ; ::: :
n 2 3 4
3. De…nition: An in…nite sequence has a limit L if the terms of the sequence tend to that
limit. This is all very well but it doesn’t say very much. A real (or complex) number L
is the limit of a sequence fan g if for any number > 0 there is a number N such that all
terms of the sequence beyond N are within of L: Consult the picture on page 439 of your
text for a visual illustration of this de…nition. When an in…nite sequence fan g has a limit
L we write
lim an = L:
n!1
We are not going to use this de…nition in any formal sense because we are going to establish
convergence or divergence of sequences using the limit theorems which follow. However it
is important to bear in mind that the proofs of these theorems depend ultimately on this
de…nition.
Not all sequences have limits and those that do are said to be convergent to their limit.
If a sequence has no limit we say it diverges.
Many people have a false idea of a limit as a number which the terms of the sequence ‘get
closer to’somehow. Notice example (e) above which has the limit 0. Notice also that it is
not true to say that successive terms are getting closer to zero, in fact each non-zero term
is farther away from zero than its predecessor, which of course is exactly zero.
1 n 1 1 1 1
(a) an = = ; ; ; ; ::: converges to 0:
2 2 4 8 16
n 1 1 2 3
(b) an = = 0; ; ; ; ::: converges to 1:
n 2 3 4
(c) an = ( 1)n 1
= f1; 1; 1; 1; :::g diverges since it oscillates inde…nitely between 1
and 1:
n2 1 9 25 9
(d) an = n
= ; 1; ; 1; ; ; ::: converges to 0:
2 2 8 32 16
n
cos 2 1 1 1
(e) an = = 0; ; 0; ; 0; ; ::: converges to 0:
n 2 4 6
( )
1 n 3 2 4 3 5 4
(f) an = 1+ = 2; ; ; ; ::: ; converges to e:
n 2 3 4
(g) an = n = f1; 2; 3; 4; :::g ; diverges since an ! 1; we also say that an is unbounded.
(a) If we can show that the sequence is unbounded the sequence diverges. A sequence
fan g is unbounded if for all numbers M > 0 we may …nd an n such that jan j > M:
However, please remember that many bounded sequences are also divergent.
(b) If a sequence appears to have two or more di¤erent ‘limits’the sequence diverges. It
may happen, for example, that the sequence of odd terms of a converges to a limit
which is di¤erent to the limit of the sequence of even terms. This behaviour is apparent
in the example (c) above.
(c) Many divergent sequences behave like the divergent sequence an = sin (n) : The range
of this sequence is dense in the set [ 1; 1] which means we can pick any number in
[ 1; 1] and specify any positive distance we like, then there exists an n such that
sin (n) is as close as we please to our chosen number.
Suppose that c and p are constants and (unless stated otherwise) the limits limn!1 an
and limn!1 bn exist. Then
7. The following examples illustrate how the various properties listed above can be used to
establish convergence of sequences and …nd their limits.
3 1
limn!1 1 n + n2
So lim an = 1 (apply rule (e))
n!1 limn!1 2 + n2
(1 0 + 0)
= (apply rule (a))
(2 + 0)
1
=
2
Exercises Find the limits of the following sequences if they exist, or if they are divergent explain
why.
p
1. an = n2 + 2n n ANS: convergent: limn!1 an = 1:
n2 4 n2 4
2. an = ANS: divergent: an = n+5 is not bounded.
n+5
3. an = ln (n + 1) ln (2n 1) ANS: convergent: limn!1 an = ln 12 = ln 2:
An important sequence
x n
Show lim 1 + = ex :
n!1 n
This is quite di¢ cult, it uses the continuous function theorem and the de…nition of derivatives.
x n
Now lim 1 + clearly depends on x so we denote it by L (x) :
n!1 n
x n
Let L (x) = lim 1+
n!1 n
h x ni h x ni
loge (L (x)) = loge lim 1+ = lim loge 1 + since loge is continuous
n!1 n n!1 n
1
loge (L (x)) =x x jx=1
= x:
So L (x) = ex as required.
1. An in…nite series is a formal sum of in…nitely many terms; for example a1 + a2 + a3 + a4 + :::
1
X
is a series formed by adding the terms of the sequence fan g : This series is also denoted an :
n=1
1
X
an = a1 + a2 + a3 + a4 + :::
n=1
Examples:
1
X n 1
X
1 1 1 1 1 n2 1 9 25 9
1. = + + :::: 4. = +1+ +1+ + + :::
2 2 4 8 16 2n 2 8 32 16
n=1 n=1
1
X 1
X
n 1 1 2 3
2. = 0 + + + + ::: 5. n = 1 + 2 + 3 + 4 + :::
n 2 3 4
n=1 n=1
1
X 1
X 1 1 1 1
3. ( 1)n 1
=1 1+1 1 + ::: 6. = + + + :::
ln n ln 2 ln 3 ln 4
n=1 n=2
1
X
To every series an there is an associated sequence called the sequence of partial sums fsn g
n=1
whose nth term is the sum of the …rst n terms of the series:
s 1 = a1
s 2 = a1 + a2
s 4 = a1 + a2 + a3
s 4 = a1 + a2 + a3 + a4
..
.
Xn
sn = ak
k=1
..
.
1
X
De…nition: We say that the series an converges to the sum s if the sequence of partial
n=1
n
X 1
X
sums fsn g ; where sn = ak ; converges to s: If this is the case we write an = s:
k=1 n=1
1
X
If the sequence of partial sums is a divergent sequence then the series an is said to diverge.
n=1
Recall what it means for a sequence fsn g to converge. Given any > 0 there exists N such that
jsn Lj < for all n > N: In particular the distance between any two terms sn and sn+1 must
But jsn+1 sn j = jan+1 j so the sequence fan g converges to zero. Thus we have the following
necessary condition for convergence.
P1
Theorem: The in…nite series n=1 an converges only if the parent sequence
fan g converges to zero.
1
X n 1
Example: Discuss the convergence or divergence of the series :
n+1
n=1
n 1
We have lim an = lim
n!1 n!1 n+1
1
X n 1
= 1: Since this is not zero the series diverges.
n+1
n=1
Important note: The test lim an = 0 is a condition necessary for convergence; it is not
n!1
su¢ cient.
1
X 1 1
Later on we show that the series is a divergent series despite the fact that lim = 0:
n n!1 n
n=1
2. Geometric series
where a 6= 0 is called a geometric series. The number a is its …rst term and the number r is
called the common ratio since it is the value of the ratio of any term to its predecessor.
and
rsn = ar + ar2 + ar3 + :::: + arn (18.2)
hence
a (1 rn )
sn =
1 r
For r > 1 the sequence arn 1 is unbounded and hence the geometric series diverges.
For r = 1; and a 6= 0 we have the divergent constant series a + a + a + :::: and for r = 1
we have the series a a+a a + :::: which alternates between a and 0; and hence also
diverges.
1
X a
Exercise Use the formula arn 1
= to …nd the fraction equivalent of the repeating
1 r
n=1
decimal 0:1_ 2:
_
1 1 1
1. Use partial fractions to show = : Use this to …nd a formula for its nth
n (n + 1) n n+1
X1
1
partial sum sn . Hence show converges by …nding its limit.
n (n + 1)
n=1
Xn
1 1 1 1 1 1 1
The nth partial sum is sn = = + + ::: +
n (n + 1) 1 2 2 3 n n+1
k=1
1
=1
n+1
X1
1 1
Hence = lim 1
n (n + 1) n!1 n+1
n=1
= 1:
X1
n 1
2. p :
n 2+1
n=1
The convergence or divergence of the geometric series was determined by …nding a formula for
the sequence of partial sums fsn g : This is not always possible for more general series and hence
the need to establish some tests which are su¢ cient to determine convergence or divergence.
1
X
For now we deal exclusively with positive series, that is series of the type an where an 0
n=1
for all n:
1. Integral Test.
1
X 1
Example: Consider the series : Notice that all of the terms of the series are positive. The
n2
n=1
X1 Z 1
1 1
essential idea of the integral test is that the series 2
and the improper integral dx
n 1 x2
n=1
either both converge, or both diverge (to 1).
Z 1
1
Now a quick calculation shows 2
dx converges:
1 x
X1 Z 1 X1 Z 1
1 1 1 1
Notice that 2
< 2
dx (diagram) so that 2
<1+ dx
n 1 x n 1 x2
n=2 n=1
1
Since an = n2
is always positive, the sequence of partial sums is increasing (since sn+1 sn =
an+1 > 0):
Z 1
1
The series is bounded above by 1 + dx:
1 x2
1
X 1
An increasing sequence fsn g that is bounded above converges, hence the series converges.
n2
n=1
1
X 1
Example: Consider the series : Notice once again that all of the terms of the series are
n
n=1 Z 1
1
positive. This time the corresponding improper integral dx which diverges (to 1).
1 x
Calculation:
1
X Z 1
1 1
Notice that > dx (diagram).
n 1 x
n=1
X1
1
diverges for p 1 and,
np
n=1
X1
1
converges for p > 1:
np
n=1
1
X
n
Exercise: Show the series ne converges using an integral test comparison. (A more
n=1
e¢ cient test for this series is the ratio test discussed next lecture.)
The integral test works by comparing an in…nite series with the corresponding improper integral.
Why not compare two series? This then is the comparison test.
X1 X1 X1
1 1 1 1 1
Example The series because for all n: We know
n2 + 1 n2 n2 + 1 n2 n2
n=1 n=1 n=1
X1
1
converges and since it dominates this series must also converge. (Once again the fact
n2 + 1
n=1
1
X X1
1 1
that 2
and are both series of positive terms is crucial here.)
n +1 n2
n=1 n=1
The precise statement of the comparison test is as follows:
Warning: When using the comparison test it is important to get the inequalities the correct
way about and avoid using too coarse a comparison.
P1 1
For example, it is also true that n21+1 1
n for all n and that n=1 n diverges. What can we say
P1 1
about the behaviour of n=1 n2 +1 on the basis of this comparison? Absolutely nothing!
1
X 1
1. :
n ln n
n=2
1 n
X e cos2 n
2. n
:
n=1
1 p
X n 1
3. 2
:
n +1
n=1
1
X n 1
4. :
2n (n + 1)
n=1
P1 n 1
Recall that the in…nite geometric series n=1 ar = a + ar + ar2 + ::: converges for r < 1
and diverges for r > 1; where the common ratio r is the ratio of two consecutive terms of the
an+1
geometric sequence, i.e. r = an :
The ratio test for convergence of a series is a generalisation of this to other types of series.
X1
an+1
Ratio Test: Suppose we have a series an where an > 0 for all n; and for which lim
n!1 an
n=1
either exists or is in…nite.
an+1
Let = lim :
n!1 an
1
X
If < 1 then an converges. (As a consequence we get lim an = 0:)
n!1
n=1
1
X
If > 1 then lim an = 1 and an diverges.
n!1
n=1
If = 1; then the ratio test fails as the series may converge, or diverge to 1:
Notice that this test could also be used to test for convergence of a geometric series since in this
an+1 an+1
case limn!1 an = an = r; a constant.
1
X 1
1.
n2
n=1
( = 1 and therefore ratio test fails, but we know this series converges by earlier tests)
1
X 2n
2.
n!
n=1
All of the series in the previous section were series of positive terms. We can now drop this
restriction and allow arbitrary terms an : We can obtain a series of positive terms from an arbitrary
series by replacing all the terms with their absolute values.
X1 1
X
De…nition: The series an is said to be absolutely convergent if the series jan j con-
n=1 n=1
verges.
Absolute convergence Theorem: If a series converges absolutely then the series converges.
Thus the tests for series of positive terms can be used to determine the convergence of a series
converges by it showing converges absolutely.
X1
( 1)n
Example: Show the series converges absolutely.
n2
n=1
X1
( 1)n
However the alternating harmonic series converges (conditionally) as we will show.
n
n=1
P ( 1)n
We cannot use any of the tests previously discussed to show that the series 1 n=1 n converges
as these tests apply only to series of positive terms. Generally speaking, to demonstrate conver-
gence where the convergence is not absolute is usually quite di¢ cult. We will discuss but one of
many tests that do the job; this test is very easily applied but is quite restrictive as it can only
be used on special types of series.
1
X
The Alternating series test. Suppose we have a series of the form ( 1)n an where the
n=1
sequence fan g satis…es:
(i) The series is of the required form with an = n1 : Clearly an > 0 for all n:
1
(ii) limn!1 n = 0;
1 1 1
(iii) an an+1 = n n+1 = n(n+1) > 0 for all n and hence an+1 an :
1
X ( 1)n
The three parts of the alternating series test are satis…ed and we deduce that converges.
n
n=1
(i) Since cos n = ( 1)n the series is of the required form with an = 1
loge n : Since loge n > 0
for all n 2; we have an > 0:
1
(ii) Also, limn!1 loge n = 0;
1 1
(iii) To show an an+1 = loge n loge (n+1) > 0 for all n; is a little more awkward than that for
the previous example but all we need show is that the function 1= loge (x) is decreasing for
all x 2: This is easy using calculus:
1
This is clearly negative, and hence 1= loge (x) is a decreasing function. Thus loge n
1
loge (n+1) > 0 for all n 2:
1
X cos n
All three parts of the alternating series test are satis…ed and we deduce that converges.
loge n
n=2
The alternating series test is quite restrictive as it cannot be used to show the conditional
convergence of series whose terms do not strictly alternate in sign.
P
For example, the series 1 sin n
n=1 n is also convergent conditionally, but its terms do not strictly
alternate in sign. A suitable test for this series is Dirichlet’s test but will not be examined in
this course.
The pragmatic reason for spending all this time on sequences and series was to get to Taylor
series. The idea of the Taylor series is to approximate a function with a power series. This series
can then be used to …nd values of the original function in an e¢ cient manor. Calculators and
computers regularly use Taylor series expansions for more sophisticated functions.
To begin with, let’s construct an approximation to the function f (x) at the point a, given the
value of the function at the point and it’s slope. If we don’t really know anything about the
shape of the function, then we will stick with the basic approximation of a straight line.
If we are also given the second derivative evaluated at the point x = a, then we have an extra
constraint. Instead of a straight line, we can approximate f (x) with a parabola.
(x a)2
f (x) f (a) + (x a) f 0 (a) + f 00 (a)
2!
Example: Given, f (0) = 2; f 0 (0) = 1; f 00 (0) = 3 and f 000 (0) = 1 …nd the 3rd order polynomial
approximation to f (x) about x = 0:
Now
(x a)2 (x a)3
f (x) f (a) + (x a) f 0 (a) + f 00 (a) + f 000 (a)
2! 3!
with a = 0 this becomes:
(x)2 00 (x)3 000
f (x) f (0) + xf 0 (0) + f (0) + f (0)
2! 3!
3 1
= 2 x + x2 + x3
2 6
Example: Given f (2) = 1; f 0 (2) = 0; f 00 (2) = 1, …nd the 2nd order polynomial approxima-
tion to f (x) about x = 2:
(x a)2
f (x) f (a) + (x a) f 0 (a) + f 00 (a)
2!
and with a = 2 becomes
(x 2)2
f (x) f (2) + (x 2) f 0 (2) + f 00 (2)
2!
1
= 1 (x 2)2 :
2
where h = x a:
(x a)n+1 (n+1)
where the term f (a + h) is known as the remainder or error term.
(n + 1)!
Example: Find the Taylor series for f (x) = ex about x = 1:
f (x) = ex f (1) = e
f 0 (x) = ex f 0 (1) = e
f 00 (x) = ex f 00 (1) = e
f 000 (x) = ex f 000 (1) = e
f (4) (x) = ex f (4) (1) = e
In the instance when the expansion is about the point x = 0, the Taylor series is then called a
Maclaurin series.
x2 00 xn (n)
f (x) = f (0) + xf 0 (0) + f (0) + + f (0) +
2! n!
Example: Find the Maclaurin series for f (x) = ln (1 + x) about x = 0:
f (x) = ln (1 + x) f (0) = 0
1
f 0 (x) = f 0 (0) = 1
1+x
1
f 00 (x) = f 00 (0) = 1
(1 + x)2
2
f 000 (x) = f 000 (0) = 2
(1 + x)3
2 3 3!
f 000 (x) = = f (4) (0) = 3!
(1 + x)4 (1 + x)4
Example: Find the Maclaurin series for f (x) = cos (x) about x = 0:
f (x) = cos x f (0) = 1
f 0 (x) = sin x f 0 (0) = 0
f 00 (x) = cos x f 00 (0) = 1
f 000 (x) = sin x f 000 (0) =0
f 000 (x) = cos x f (4) (0) = 1
The text lists a number of common Taylor (Maclaurin) series expansions. It is also worth noting
that these same power series are most e¤ective in derivatives. Here the power series is simply
di¤erentiated term by term. Given that the functions are of the form xn , this is quite simple.
1
Example: Find the Maclaurin series expansion to f (x) = , given the expansion of f (x) =
1+x
ln (1 + x) from the earlier example.
Giving
x2 x4 x6
cosh x = 1 + + + + :::
2! 4! 6!
Note that the Maclaurin series for cos x can also be obtined by the identity cos x = cosh (ix) :
Now integrating term by term we obtain
Z Z
x2 x4 x6
cosh xdx = 1+ + + + :::dx
2! 4! 6!
x3 x5 x7
= x+ + + + ::: + C
3! 5! 7!
x3 x5 x7
with C = 0 we obtain the Maclaurin series expansion to sinh x = x + + + + ::::
3! 5! 7!
(This may be obtained directly of course from the Taylor series formula.)
Throughout our discussions on di¤erentiation and integration we have examined functions with
only one independent variable. Yet we can think of any number of examples in engineering in
which a quantity is de…ned by two or more independent variables. The volume of a cylinder is a
function of the height of the cylinder and the radius of its base:
V = r2 h
The density of ocean water is a function of its temperature and salinity: density:
= (T; )
For the moment let us focus on functions with two independent variables, x and y. For further
convenience, we can assume that x and y are our familiar Cartesian coordinates. Given an
arbitrary function of our two independent variable, z = f (x; y); it is possible to view the variable
z as the height above the x-y plane. This function of two variables is thus a three-dimensional
surface above the x-y plane, which, unfortunately, is very di¢ cult to graph on a piece of paper. In
graphing f (x; y), it is common to draw lines of constant height z (i.e. contours). Such diagrams
are completely analogous to contour maps used in bushwalking and mountaineering.
It is worth the time to graph a few simple functions to help with future lectures.
p
z1 = 16 x2 y2 z2 = 16 x2 y2
and
z4 = cos (x) cos (y) (not examinable)
It is worth noting that the function f (x; y) is often called a scalar …eld in vector calculus. Also,
we can readily extend this material to three dimensions and beyond; only it isn’t simple to draw
such functions on paper.
Thinking back to one independent variable, if f is a function of a single variable, x say, then we
de…ne the derivative of f with respect to x as
df f (x + x) f (x)
= lim
dx x!0 x
Now if f is a function of two independent variables, x and y; then we can de…ne the derivative
of f with respect to each of these variables as follows
@f f f (x + x; y) f (x; y)
= lim = lim (1)
@x x!0 x y=const x!0 x y=const
In this operation we treat y as a constant. It is basically ignored. Note the special notation used
for the partial derivative. We will …nd that
@f df
and
@x dx
di¤erent meanings in multivariable calculus, so we need to be careful. The partial derivative
with respect to y is similarly de…ned as
@f f f (x; y + y) f (x; y)
= lim = lim (2)
@y y!0 y x=const y!0 y x=const
The basic concepts of di¤erentiation (e.g. the product rule,quotient rule, associative and distrib-
utive properties) extend across to higher dimensions as expected.
@f @f 2
= cos (xy) y + 2x + 1=y = cos (xy) x xy
@x @y
= y cos (xy) + 2x + 1=y = x cos (xy) xy 2
Example: Given
f (x; y) = sin(xy) + x2 + x=y;
@f @f
…nd both @x and @y at the point ( ; 1) :
@f @f
j ;1) = cos ( ) + 2 + 1 j ;1) = cos ( )
@x ( @y (
=2 = 2
As the text notes, partial di¤erentiation can readily be extending to instances of more than two
independent variables.
…nd
@f @f @f
; and :
@x @y @z
@f @f @f
= yz 2 + 3y = xz 2 + 3x = 2xyz 1
@x @y @z
Suppose we want to evaluate the partial derivative at a speci…ed point. That is, we want to
quantify the slope given a choice of x and y. Just as in one dimension, we must take the derivative
…rst before plugging in the variable. Note that since y is held constant in calculating @f
@x ;, it doesn’t
really matter when we substitute in the given value of y:
@f @f
rf (x; y) = i+ j (3)
@x @y
where i and j are the unit vectors in the direction of x and y; respectively. The gradient of the
…eld f is often simply abbreviated as ‘gradf ’and given the notation rf .
p
f (x; y) = 16 x2 y2;
Solution:
@f @f 1 1=2 1 1=2
rf (x; y) = i+ j= 16 x2 y2 2xi + 16 x2 y2 2yj
@x @y 2 2
1
= p (xi + yj)
16 x2 y 2
Note that the gradient vector is always perpendicular to a level curve at a given point and
points towards the direction of increasing function value.
The previous example revealed a noteworthy point about the gradient. At all points the vectors
of the gradient are at right angles to the contour lines. In this two-dimensional, Cartesian
coordinate picture, the gradient points us in the direction of greatest change of our scalar …eld
f (x, y). Going back to our analogy of f (x, y) representing the contours of height on a map, the
gradient of f (x, y) gives us a vector that tells us the direction of the maximum slope and its
magnitude.
Example: Given the scalar …eld f (x; y) = xy; draw the contour …eld, calculate rf and sketch
the gradient vectors over the contour lines.
@f @f
rf = @x i + @y j = yi + xj 5
y
4
-5 -4 -3 -2 -1 1 2 3 4 5
-1 x
-2
-3
-4
-5
ENG1091 Mathematics for Engineering page 110
Please note that the gradient can readily be extended to higher dimensions.
f (x; y; z) = z + (x2 + y 2 )
calculate rf . Sketch a level surface f (x; y; z) = k for some suitable value of k and plot rf at
a point on this surface. (The graphic illustrates the case k = 1; i.e. the surface z + (x2 + y 2 ):)
3
2
1
-4
4
2z 0 -2
0 0
2-1 -2
-4
4x y
-2
-3
We’ve seen that rf is a vector that tells us the direction and magnitude of the rate of change
of the scalar …eld f (x, y). We can also use rf to …nd the rate of change of the scalar …eld f (x,
y) in some arbitrary direction. This is known as the directional derivative. Speci…cally, if we are
given a scalar …eld f (x, y) and a speci…ed orientation to follow, say
v = vx i + vy j
where the operation entails the dot product between two vectors, and jvj is the magnitude of
the vector v.
Example: Given the scalar …eld f (x; y) = xy, …nd the directional derivative in the direction of
v = 3i + 4j
Hence Dv f (x; y) = rf v = 53 y + 54 x:
Dv f (1; 1) = 75 ; Dv f (1; 1) = 51 ; Dv f ( 4; 3) = 7
5:
The de…nition of the directional derivative presented here is di¤erent, in notation, than that
presented in the text. One would …nd that the de…nitions are identical in practice since:
0 1 0 1
v vx i + vy j v x A i + @q y v
=q = @q A j = cos( )i + sin( )j (5)
kvk 2
v +v 2 2
v +v 2 v2 + v2
x y x y x y
where is the angle that the vector v makes with the x axis. Using the dot product, eq.(4)
becomes:
v @f @f
rf = i+ j (cos( )i + sin( )j)
kvk @x @y
@f @f
= cos + sin (6)
@x @y
Equation (6) is the de…tintion of directional derivative (of functions of two variables) given in
the text.
The vector de…nition presented in these notes is, in general, far more widely used in mathematics
and engineering as it can readily be extended to other coordinate systems and higher dimensions.
In one dimension the chain rule was employed when f (x ) and x (t). In such a case,
df df dx
= :
dt dx dt
When moving to multiple dimensions, the basic concept is extended but one must be careful
with the nature of the independent variables.
Suppose that we have z = f (x, y) and that x (s, t) and y(s, t). Here we have f as a function of
two variables, and each of these variables, in turn is a function of two variables. In this case we
may …nd an expression for the change in f with regards to s and t.
@z @f @x @f @y
= +
@s @x @s @y @s
and
@z @f @x @f @y
= +
@t @x @t @y @t
As the text notes, a good example of this is when undertaking a coordinate transformation. If
a function is de…ned in Cartesian coordinates, and we wish to change over to polar coordinates
(r; ) then we need to recall the relations
In calculating the partial derivatives, one can either completely change coordinate systems …rst,
and then compute the partial derivatives, or simply apply the chain rule.
@z @z
= y cos (xy) = x cos (xy)
@x @y
From x = r cos ; and y = r sin we have:
@x @x @y @y
= cos = r sin = sin = r cos
@r @ @r @
Now
@z @z @x @z @y @z @z @x @z @y
= + = +
@r @x @r @y @r @ @x @ @y @
= y cos (xy) cos + x cos (xy) sin = y cos (xy) r sin + x cos (xy) r cos
= 2r cos sin cos (xy) = cos (xy) r2 cos2 r2 sin2
= r cos (xy) sin (2 ) = r2 cos (xy) cos (2 )
Changing the con…guration slightly, suppose that we have z = f (x; y) and that x(t) and y(t):
Here we might think of x and y being our Cartesian coordinates again, but these values are
function of an independent time. (Thus x (t) and y(t) de…ne some path along the x -y plane.)
We can then de…ne a derivative of z with regards to t as follows:
dz @f dx @f dy
= +
dt @x dt @y dt
Note that use of notation here.
@
x2 y y ln x 2x dx
@x = 2t
y dt
= 2xy 2
x = 2 when t =
@ dy
x2 y y ln x 2x = sin t
@y dt
= x2 ln x = 0 when t =
3 2
= 4 + 4
We can extend the partial di¤erentials to higher order derivatives. Given the function f (x, y),
we could create four second order derivatives.
@f @f @2f
= = fxx (1)
@x @x @x2
@f @f @2f
= = fyy (2)
@y @y @y 2
@f @f @2f @
= = (fx ) = fxy (3)
@y @x @y@x @y
@f @f @2f @
= = (fy ) = fyx (4)
@x @y @x@y @x
Please note the order of the notation in these equations. The partial derivative within the
brackets is the …rst operation, so in equation (3) the partial derivative with respect to x is …rst
undertaken, and then with respect to y. Also note, as stated in the text, that there are cases
when equations (3) and (4) are NOT equal. However, for our purposed in engineering, we will
neglect these special cases and assume that order of di¤erentiation can readily be swapped. I.e.,
we will assume that
@f @f @f @f
= :
@y @x @x @y
Example: Find given
f (x; y) = x3 y 3 + sin (y)
@ @
fx = @x x3 y 3 + sin (y) fy = @y x3 y 3 + sin (y)
= 3x2 y 3 = 3x3 y 2 + cos y
@ @ @ @
fxx = @x 3x2 y 3 fxy = @y 3x2 y 3 fyx = @x 3x3 y 2 + cos y fyy = @y 3x3 y 2 + cos y
= 6xy 3 = 9x2 y 2 = 9x2 y 2 = 6x3 y sin y
Suppose we are given a function z = f (x; y); and we wish to appreciate the change in z given a
small change in x and y:
u = f (x + x; y + y) f (x; y)
@f @f
u = f (x + x; y + y) f (x + x; y) + f (x + x; y) f (x; y) x+ y (5)
@x @y
If we turn the change of independent variables into a vector
v = ( xi + yj)
then the total di¤erential can be written succinctly as rf v. The only di¤erence between this
and the directional derivative is that the direction derivative assumed that the displacement
vector was normalised. Again, this notation is readily extended to higher dimensions and is
commonly used throughout engineering and science.
and
y!0
Example (from text): Find the total di¤erential for the function z(x; y) = x2 y 3 .
@f @f
dz = dx + dy
@x dy
=
The text notes that the concept of the total di¤erential is commonly used in setting error esti-
mates given some uncertainty in the independent variables. The relative error is de…ned as
du u
u u
3 Exact di¤erentials
In the previous topic, we started with a well-de…ned function z = f (x; y) and developed the
total di¤erential in equation (23.6). The idea now is to start with something in the form of the
right-hand side of equation (23.6) and see if it is, indeed, an exact di¤ erential. Assume we have
This isn’t necessarily true, but it is easy enough to test for it by using the second derivatives.
Assuming that f (x; y) has continuous second derivatives then if
@P @ @ @Q
= (fx ) = (fy ) =
@y @y @x @x
then our original expression (23.7) may be considered an exact di¤erential. Note that this
test does not tell us how to recover the original function f (x; y): This must be done through
integrating both parts of (23.8) to …nd a common function.
Taylor series can readily be extended to functions of two (or more variables). For a function of
two independent variables, f (x, y), we can make an extension around the point (a, b) as follows.
2
1 @ @ 1 @ @
f (a + h; b + k) = f (a; b) + h +k f (x; y)(a;b) + h +k f (x; y)j(a;b) +
1! @x @y 2! @x @y
n
1 @ @
::: + h +k f (x; y)j(a;b) + ::: (25.1)
n! @x @y
Some new notation has been introduced here
( ! !
@ @ r r @
r r @r r @r
h +k f (x; y)j(a;b) h + hr 1
k + ::: + hr s s
k + :::
@x @y @xr 1 @xr 1 @y
s @xr s @y s
! )
r @r @r
+ hk r 1
+ kr r f (x; y)j(a;b)
r 1 @x@y r 1 @y
For example:
3
@ @ @3f @3f 3
2 @ f
3
3@ f
h +k f (x; y)j(a;b) = h3 j(a;b) +3h 2
k j(a;b) +3hk j (a;b) +k j
@x @y @x3 @y@x3 @y 2 @x @y 3 (a;b)
= (x a)3 fxxx (a; b) + 3 (x a)2 (y b) fyxx (a; b) + 3 (x a) (y b)2 fyyx (a; b) + (y b)3 fyyy (a; b)
Here we have assumed that all of the nth order partial derivatives exist and are continuous in
some domain close to the point (a; b):
Example: Up to second order, …nd the Taylor series expansion to the function ln(xy) about the
point (1; 1) :
1 @ @
T (x; y) = f (a; b) + (x a) + (y b) f (x; y)j(a;b)
1! @x @y
1
= f (a; b) + ((x a) fx (a; b) + (y b) fy (a; b))
1!
The equation
z = f (a; b) + ((x a) fx (a; b) + (y b) fy (a; b))
is the equation of the tangent plane in 3-D to the surface z = f (x; y) at the point (a; b; f ((a; b)) :
This is analogous to earlier work with functions of one independent variable, f (x); in which the
…rst order Taylor series approximation returned the tangent line.
We’ve learned that the local extrema of a continuous function of one independent variable f (x)
occur at critical points where the derivative f 0 (x) is equal to zero. If the derivative is equal to
zero, then we can have a local minimum, maximum or point of in‡ection. We then used the
second derivative to, hopefully, tell help us classify the extrema. We wish to extend this work to
a function of two independent variables, f (x; y):
Using the Taylor series expansion just presented, we see that in the neighbourhood of the point
(a, b) the change in f (x, y) is simply
2
@ @ 1 @ @
f = f (a + h; b + k) f (a; b) = h +k f (x; y)j(a;b) + h +k f (x; y)j(a;b) + : : :
@x @y 2! @x @y
f must be either strictly negative or positive for an extrema. Notice that the …rst term on the
right-hand side depends linearly on h and k: Since these values can be either positive or negative,
the …rst partial derivatives
@f @f
and
@x @y
must be zero for f to be strictly positive or negative. This is a necessary condition, which
then leaves our di¤erence depending on the second order partial derivatives. Since we are only
interested in very small values of h and k, we can ignore the higher order partial derivatives, as
these will involve terms like h 3 , which is much less than h 2 . Ultimately we require
1 2
f h fxx (a; b) + 2hkfxy (a; b) + kfyy (a; b) (25.2)
2
to be either positive or negative. This expression can be manipulated as follows
1 2
fxx (a; b) f h (fxx (a; b))2 + 2hkfxx (a; b) fxy (a; b) + k 2 fxx (a; b) fyy (a; b)
2
Let (a, b) be an interior point of the domain for the function f and suppose that the …rst and
second partial derivatives of f exist and are continuous on some circular disk with (a, b) as its
centre and contained in the domain of f. Assume that (a, b) is a critical point of f, so that
fx (a; b) = fy (a; b) = 0: De…ne
Then:
1. If > 0 and fxx (a; b) < 0 or fyy (a; b) < 0; then (a; b) is a local maximum.
2. If > 0 and fxx (a; b) > 0 or fyy (a; b) > 0; then (a; b) is a local minimum.
A saddle point, as the name suggests, is a point on the domain of f (x, y) where a minimum is
approached in one direction, but a maximum is approached from a di¤erent direction.
Example 1: Verify that the point (2; 1) is a local maximum for the function f (x; y) = 1
(x 2)2 (y + 1)2
Solution: fx = 2 (x 2) 1 and fy = (y + 1) 1 and these are zero when x = 2 and when
y= 1: Hence there is a single stationary point of (2; 1) :
fxx fxy 2 0
D (x; y) = = =2>0
fyx fyy 0 1
Since fxx = 2 < 0 we have that (2; 1) is a local maximum point and that the local maximum
value of f is f (2; 1) = 1:
Solution:
2x 5y = 0
5x + 6y = 13
we have
0 5 2 0
13 6 5 13
x= = 5 and y = =2
2 5 2 5
5 6 5 6
So there is one stationary point: (5; 2) :
Its nature:
fxx fxy 2 5
D (x; y) = = = 12 25 < 0
fyx fyy 5 6
so (5; 2) is a saddle point.
Example 3: Show that the function f (x; y) = x3 3xy + y 3 has two stationary (critical) points.
Find the second order partial derivatives of f and evaluate the determinant
fxx fxy
D (x; y) =
fyx fyy
at each stationary point. Hence determine the nature of each stationary point.
Solution:
x4 x = x (x 1) x2 + x + 1 = 0; namely at x = 0 and x = 1:
On the other hand D (1; 1) > 0 and fxx (1; 1) > 0 indicating that f has a local minimum at
(1; 1) ; and its minimum value is f (1; 1) = 1.
In this section we wish to explore the optimisation of a function of several independent variables,
given a constraint. In two dimensions this is often straightforward. For example, suppose we
wanted to …nd the maximum of the function
subject to the constraint g(x; y) = x=y = 3. Visually, this could be done by drawing the contour
map of f (x, y) and then drawing the hyperbola x = 3y over the top of the contours, on the
say sheet of paper. The maximum contour value along the hyperbola is the solution we want
to …nd. Mathematically, we could attack this problem by simple substitution. The constraint is
equivalent to saying that x = 3y so the original function becomes
f 0 (y) = 20y + 10 = 0
solution: y = 1=2
substituting into x = 3y we get x = 3=2
Thus the point (3=2; 1=2) should be the maximum (or minimum) point to the function
subject to the constraint g(x; y) = x=y = 3. We get the value f (3=2; 1=2) = 1:5 as a solution
to the original problem.
d
8y + 2y 2 10y 3 = 8 + 4y 30y 2
dy
1 1p 1 1p
= 0 when y = + 61; or y = 61
15 15 15 15
substituting into x = 2 2y
1 1p 28 2p
= 2 2 + 61 = 61
15 15 15 15
1 1p 28 2p
or x = 2 2 61 = + 61
15 15 15 15
g(x; y; z) = 0: (26.1)
Sometimes we can manipulate the constraint and substitute it into the original function and
lower the number of independent variables.
f (x; y; z) = x2 + xy + xz + y 2 z 2 ;
then we could de…ne z = 2x2 + 3y 2 and substitute this into f to leave it with two independent
variables,
f (x; y) = x3 + xy + x(2x2 + 3y 2) + y 2 (2x2 + 3y 2)2
We are then back to optimising a function of two independent variables and we could approach
the problem as was done in the previous section.
Please note however that this can be very ugly. We can actually manipulate this problem to
present it in a manner that is usually easier to solve. Consider the constraint (26.1). This, in
general, represents a surface in 3-D space. We will de…ne small motions along this surface as
ds = (dx; dy; dz). Without any loss of generality, we can consider this to be a vector in the
3-D Cartesian space. Since g(x; y; z) is constrained to be zero, we know that motion along this
surface won’t change the value of g(x; y; z) :
@g @g @g
dg = rg ds = dx + dy + dz = 0
@x @y @z
Now assume that we are at the point that conditional stationary point that actually both satis…es
the constraint and optimises f (x; y; z) under this constraint. Then small motions along the
surface will also require
@f @f @f
df = rf ds = dx + dy + dz = 0
@x @y @z
Using our basic understanding of the vector dot product we know that both rf and rg is
perpendicular to ds. Thus they may be expressed as a linear combination of one another.
@f @f @f @g @g @g
rf rg = ; ; ; ; = (0; 0; 0) (26.2)
@x @y @z @x @y @z
Here is basically another unknown variable. At this point in time, some students might be
asking what the advantage in all of this is. We have moved from our initial optimisation problem
with three unknowns (x, y and z ) to a system with four equations [(26.1) and the three of (26.2)]
and four unknowns (x, y, z and ). Experience tells us that this new approach is often easier to
f (x; y; z) = x2 + y 2 + z 2
If = 1 (x is arbitrary) then the second component gives 2y = 4y hence y = 0; and the third
component 2z = 2z gives z = 0:
If = 1=2; then y can be arbitrary and equations 1 and 3 give x = z = 0: The constraint equation
p
x2 + 2y 2 z 2 1 = 0 with x = z = 0 gives y = 1= 2:
If = 1; then z can be arbitrary and equations 1 and 2 give x = y = 0: The constraint equation
x2 + 2y 2 z2 1 = 0 becomes z 2 = 1 which has no solution.
p
There are thus the 4 constrained extreme points ( 1; 0; 0) with f (x; y; z) = 1 and 0; 1= 2; 0
with f (x; y; z) = 1=2:
Example: Find the extrema of the function f (x; y; z) = xyz subject to the constraint g(x; y; z) =
x2 + y 2 + z 2 = 1:
1
x2 + y 2 + z 2 = 1 so 3x2 = 1 ) x = p
3
1 1
we have y = p ;z = p
3 3
1 1 1
so eight points: p ; p ; p
3 3 3
Example: Use the method of Lagrange multipliers to …nd the maximum possible volume of a
cone inscribed in a sphere of radius a.
The fact that the cone is inscribed in the sphere leads to the constraint:
a2 = r2 + (h a)2 = g (r; h) :
2 1
rV = rh; r2 = rg = (2r; 2 (h a))
3 3
2 1
rh r2
so = 3 = 3
2r 2 (h a)
2h r
hence = and hence 2h2 2ah + h2 2ah + a2 = a2
r h a
4a
3h2 4ah = 0 and hence h (3h 4a) = 0 ) h = (or h = 0)
3
dy d2 y d3 y
; ;
dx dx2 dx3
(or more concisely as y 0 ; y 00 ; y 000 ) for the …rst, second and third order derivatives.
Equations (or physical relationships) involving derivatives are simply known as di¤erential equa-
tions.
Examples:
dy
= 5x + 2 (27.1)
dx
y 000 + y cos x = 0 (27.2)
d2 s ds
2
+ t + t2 s = t (27.3)
dt dt
•x2 + t2 x_ = ln t
x (27.4)
Although these examples have no particular physical relevance, there are many simple examples
of relevant di¤erential equations. In basic calculus, the exponential function was commonly
de…ned through the di¤erential equation
dN
= N
dt
and was used to model ideal population growth.
Ordinary Di¤erential Equations (or ODEs) also have a number of basic engineering applications.
For example, Newtonian physics requires that the forces applied to it de…ne the rate of change
of momentum of a body. For simple gravity
dv d2 s
m = mg or = g
dt dt2
or
d2 s
= g
dt2
where g de…nes gravity, s is height, v is velocity and t is time. If a drag is considered, then the
equation becomes
dv
m = mg + bv 2
dt
or
2
d2 z b dz
= g+
dt2 m dt
3. Classi…cation of ODEs
The notation y(x ) has commonly been used to de…ne y as a dependent function of the inde-
pendent variable x. It is common to use x or t as the dependent variable to signify position or
time.
Given a di¤erential equation, if the dependent variable is a function of only one independent
variable, then the di¤erential equation will be classi…ed as an ordinary di¤erential equation
or sometimes simply ODEs. All of the examples discussed so far have been of ordinary di¤erential
equations.
In multivariable calculus the function y (also called the dependent variable) might be a function
of two or more independent variables. (For example y might be a function of the displacement
x and the time t; we write y(x, t)). The derivatives are partial derivatives:
@y @y
and
@x @t
Equations involving partial derivatives are logically referred to as partial di¤erential equa-
tions (or PDEs) and will be covered in 2nd level engineering maths. PDEs are commonly used
to study ‡uid dynamics, heat ‡ow and other engineering applications.
Di¤erential equations will be further classi…ed by their order, which is the degree of the highest
derivative that appears in the di¤erential equation. Example 27.1 is a …rst order, ordinary
di¤erential equation. Example 27.2 is a 3rd order ODE. Examples 27.3 and 27.4 are both 2nd
order ODEs.
Another important quali…cation of di¤erential equations is linear versus non-linear. “We may
informally de…ne linear di¤erential equations as those in which the dependent variable or
variables and their derivatives do not occur as products, raised to powers or in non-linear func-
tions.” Note that this de…nition does not constrain the independent variable or variables.
•x2 term.
Examples 27.1, 27.2 and 27.3 are linear while example 27.4 is non-linear due to the x
Linear ODEs have a special quality that multiple solutions may be added together and still be
a solution to the initial ODE. If an ODE fails to be linear, then it is de…ned as non-linear.
In summary, example 27.1 is a …rst order, linear, non-homogeneous ordinary di¤erential equation.
Example 27.2 is a third order, linear, homogeneous ordinary di¤erential equation. 27.3 is second
order, linear, non-homogeneous ordinary di¤erential equation, and example 27.4 is a second
order, non-linear, non-homogeneous ordinary di¤erential equation.
t
N (t) = e
x
•+x=t
By inspection we can see that x(t) = t is a solution to the ODE since the second derivative of
x(t) would be zero. A more general solution, however, would be x(t) = A sin(t) + B cos(t) + t,
where A and B are arbitrary constants.
x(t)
_ = A cos(t) B sin(t)
x
•(t) = A sin(t) B cos(t)
x
• + x = [ A sin(t) B cos(t)] + [A sin(t) + B cos(t) + t] = t
In the second example, the 2nd order linear ODE requires two constraints to fully de…ne the
arbitrary constants. These two constraints could be at di¤erent points in the domain (e.g. x (0)
= 4 and x (10) = -2) or all the constraints could be given at the same point in the domain (e.g.
x (0) = 4 and x(0)
_ = 3.) The …rst set of constraints is called boundary conditions and the
later is called initial conditions. The de…nition typically re‡ects the physical nature of the
physical problem. As there is only one constraint for …rst order linear ODEs, it doesn’t really
matter what you call it (but it is common to refer to the single constraint as the initial condition.)
The statement of an ODE with the boundary (initial) conditions is commonly called a boundary
(initial) value problem.
The ODE x
• 4x = 4t will allow a general solution of
x(t) = Ae2t + Be 2t
t
x
• 4x = 4t; x(0) = 0; x(0)
_ =4
x(t) = e2t e 2t
t
(Again, this can be veri…ed through substitution.) In the coming lectures we will learn a number
of techniques for …nding analytic solutions to a select set of ODEs. When analytic solutions
are not possible, one may be interested in employing a graphical approach (for 1st order ODEs)
and/or numerical techniques for higher order problems.
Let us initially assume that we have a simple 1st order ODE that we can write in the form
dy
= F (x; y)
dx
with no initial condition speci…ed. These slopes can then be drawn and produce what is known
as a direction …eld.
2 2
-4 -2 2 4 -4 -2 2 4
-2 -2
-4 -4
dy dy x
Slope …eld for dx =y Slope …eld for dx = y
4 4
2 2
-4 -2 2 4 -4 -2 2 4
-2 -2
-4 -4
dy x dy y
Slope …eld for dx = y Slope …eld for dx = x
Given an initial condition, the solution can be mapped out graphically. This is known as a
solution curve. Di¤erent initial conditions will normally lead to di¤erent solutions. Simply
plotting a few arbitrary solution curves will produce a family of solution curves. In a preview
to a later lecture, this graphical technique is the basis of many common numerical techniques for
solving ODEs.
1. Separable equations
A number of techniques may be used to …nd analytic solutions of various ODEs. Perhaps the
most simple approach would for ODEs that are separable. By this we mean that the basic ODE
can be re-written with all components of the dependent variable on one side of the equation, and
all components of the independent variable on the other.
Example 1:
dy dy
= xy can be rewritten to = xdx
dx y
Both the left and right hand side of the equation can be readily integrated:
Z Z
dy
= xdx
y
which leads to
x2
ln y = +c
2
This can be further manipulated to
One can readily verify by substitution that this is the general solution to the original 1st order
linear ODE.
In general, the technique for separation of variables requires that the ODE be of the form
dx h(t)
= (28.1)
dt f (x)
which can be rewritten to f (x)dx = h(t)dt and that both integrals may be solved with F (x) =
R R
f (x)dx and H(t) = h(t)dt.
Moreover, even if a 1st order ODE is separable, that does not mean that the components can be
integrated to get a neat analytic solution.
Just as when we learned basic integration, simple substitutions may sometimes be able to trans-
form the given ODE into a separable 1st order ODE. The standard example of this pertains to
ODEs of the form:
dx x
=f
dt t
Here we can make the substitution w = x=t or x = tw.
t2 x_ = x2 + xt
x x 2 x
Write as a function of t : x_ = t + t
dx
use the substitution: x = tw so dt = w + t dw
dt :
x 2 x
x_ = t + t becomes w + t dw 2
dt = w + w
so that t dw
dt = w
2
now separate: dw
w2
= tdt
R dw R dt
integrate: w2 = t
w 1 = ln t + C
t
hence x = ln t + C
t
giving x (t) = C ln t :
**Note that the p(t) employed here is not the same as the p(t; x) used in the previous
lecture.**
At this point, we will try to …nd an integrating factor g (t) that will make the LHS of the ODE
the derivative of a product.
dx
g (t) + g (t) p (t) x = g (t) q (t)
dt
R
The integrating factor is g (t) = e p(t)dt
(29.2)
Z
1 3t 1 d 5t
= e + t e dt
3 5 dt
Z
1 3t 1 5t 1
= e + te e5t dt
3 5 5
1 1 1 5t
= e3t + te5t e +C
3 5 25
1 1 1
so x (t) = e 2t + t + Ce 5t
3 5 25
Now use the initial condition:
1 6
x ( 1) = e2 + Ce5 = 0, which gives C = [Link]
3 25
1 1 1
Hence x (t) = e 2t + t 0:015e 5t
3 5 25
x_ = 2x y
y_ = x + y
Now the …rst step in solving such a system is to write it in matrix form:
" # " #" #
dx
dt 2 1 x
dy
=
dt 1 1 y
x1 = y 1 = x2
x2 = y 1 = 5x1 + 2x3
x3 = y 2 = x4
x4 = y 2 = 2x1 2x3
We wont solve the system in this particular example but the general solution takes a remarkably
simple form provided we know the eigenvalues and eigenvectors of the matrix A:
1t 2t nt
x = c1 e v1 + c2 e v2 + : : : + cn e vn (30.3)
Proof: (part)
Using x = c1 e 1t v1 + c2 e 2t v2 + : : : + cn e nt vn we have
dx 1t 2t nt
= c1 1e v1 + c2 2e v2 + : : : + cn ne vn :
dt
Now, remembering that each v1 ; v2 ; : : : ; vn is an eigenvector so that Av1 = 1 v1 ;
= ( + 3) ( 2)
and hence the eigenvalues are = 3 and = 2:
We have c1 + c2 = 1 hence
1 1 1 1
4c1 + c2 = 6
6 1 4 6
c1 = and c2 =
1 1 1 1
4 1 4 1
5 10
so c1 = = 1 and c2 = =2
5 5
=( 7) ( 7)
and hence there is a single eigenvalue only, namely = 7:
Setting C1 = c1 + c2 ; and C2 = i (c1 c2 ) (notice that C1 and C2 are real if and only if c1 and
c2 are complex conjugates) we obtain
1. Linear ODEs.
Recall in the initial lecture on ODEs (lecture, we took the time to de…ne linear ODEs in contrast
to non-linear ODEs.
Another important quali…cation of di¤erential equations is linear versus non-linear. “We may
informally de…ne linear di¤erential equations as those in which the dependent variable or
variables and their derivatives do not occur as products, raised to powers or in non-linear func-
tions.” Note that this de…nition does not constrain the independent variable.
The next section of the notes moves on to second order linear ODEs. These are quite common in
engineering and science applications. The text more rigorously de…nes the principle of linearity
as “if x 1 and x 2 are both solutions of the homogeneous linear di¤erential equation, then so is ax 1
+ bx 2 , where a and b are arbitrary constants.” We could say that this solution has two linearly
independent components. We refresh this de…nition as it applies to our study of 2nd order linear
ODEs.
Gravitation Acceleration
Consider a stone dropped from a tall building. Neglecting air resistance, its acceleration is given
by
d2 s
a= =g
dt2
where g is gravity. This is a simple 2nd order linear non-homogeneous ODE. The velocity v of
the stone may readily be recovered to
ds
v= = v0 + gt
dt
where v0 is the initial velocity.
s = s0 + v0 t + gt2 =2
Hooke’s Law: If the spring is stretched (or compressed) s units from its natural length,
2
period (time for one complete oscillation) =
!
1 !
frequency = =
period 2
Example: A spring with a mass of 2 kg has natural length 0:5 m:. A force of 12:8 N is required
to maintain it stretched to a length of 0:6 m: If the spring is stretched to a length of 0:6 m and
then released with initial velocity 0; …nd the position of the mass at any time t:
Damped Oscillations
For a mass on a spring, the frictional force from air resistance increases with the velocity of the
mass. The frictional force is often proportional to the velocity, so we can introduce a damping
term of the form
D ds
dt , where D is a constant, called the damping constant, and
ds
dt is the velocity. The governing
ODE remains a 2nd order linear ODE with constant coe¢ cients.
d2 s ds
m = ks D
dt2 dt
or
d2 s ds
m 2
+ D + ks = 0
dt dt
3. Homogeneous 2nd order linear ODEs with constant coe¢ cients
For the moment let us focus on homogeneous 2nd order linear ODE with constant coe¢ cients.
d2 s ds
a 2
+ b + cs = 0 (32.3)
dt dt
where a; b; and c are constants.
The general solution to a 2nd order linear ODE will be a family of functions with two linearly
independent components meaning two arbitrary constants. In the example of the falling body,
the initial value problem requires a speci…cation of velocity and position at some point in time.
Since we are examining 2nd order ODEs, we could readily create a boundary value problem
instead of an initial value problem by de…ning either the velocity or the position at two di¤erent
points in time.
s(t) = Ae t ; (32.4)
where A is an arbitrary constant and will be a function of the coe¢ cients a; b and c: Note that
we do not have two linearly independent components at this point in time.
To some students it may be unsettling that equation (32.4) is just given instead of rigorously
produced as with the …rst order ODEs. One way to get to this general solution is through
transform methods, but we haven’t advanced to this level yet. At this point in time, the student
will have to accept the general form of the solution on faith.
Example: Verify that equation (32.4) is a solution to (32.3). Identify the constraint that is
placed on :
2 t
A a +b +c e =0 (32.5)
which requires
2
a + b + c = 0: (32.6)
Equation (32.6) is called the auxilliary or characteristic equation, and is simply a quadratic
equation and normally has two solutions. There are three cases to consider.
Case 1: b2 4ac > 0.
There are two distinct real solutions,
p !
b b2 4ac
1;2 =
2a
to the characteristic equation and so the general solution has the form
1t 2t
s (t) = C1 e + C2 e (32.7)
here C1 and C2 are arbitrary constants. Please note that we now have two linearly independent
components to the solution so (32.7) is a full general solution. Again, two further constraints
may be given to fully de…ne a boundary value or initial value problem.
Solution:
2
+3 +2 = 0
which factorises: ( + 2) ( + 1) = 0
the equation has two real (unequal) roots = 2; 1
hence the general solution consists of linear combinations of the two independent solutions
e t ; and e 2t
t 2t
i.e. s(t) = C1 e + C2 e
0:5 = C1 + C2
3 = C1 2C2
giving us C1 = 2 and C2 = 2: 5:
1
y
0
1 2 3 4 5
x
-1
Note that the solution passes over the t axis once and approaches it as t approaches in…nity.
With di¤erent initial conditions, the solution needn’t pass over the axis at all. This case is
sometimes called overdamped.
There is only one distinct real solution (m = -b/2a), and while s(t) = Ae t does satisfy the
ODE, it alone is not the general solution, as we need a second linearly independent component.
As another matter of faith, students must accept that in this case the general solution becomes:
t
s (t) = (At + B) e (32.8)
Solution:
hence the general solution consists of linear combinations of the two independent solutions
t t
i.e. s(t) = C1 e + C2 te
3 = C1 e 0 + 0
3 = C1
t t t
Now s_ (t) = C1 e + C2 e te
so 5 = s_ (0) = C1 + C2
5
y
0
0 1 2 3 4 5 6 7 8 9 10
x
Here there are no real solutions to the characteristic equation, but there are two complex conju-
gate solutions 1 = p + qi; 2 =p qi where p = b=2a and
p
q= 4ac b2 =2a
The general solution can be written in the form of (32.7) but is usually simpli…ed to
2
+ 0:4 + 4:04 = 0
0:2t
s(t) = e (C1 cos (2t) + C2 sin (2t))
Now
0:2t
s_ (t) = 0:2e (C1 cos (2t) + C2 sin (2t))
0:2t
+e ( 2C1 sin (2t) + 2C2 cos (2t))
hence
2C2 = 0:2 + 0:2 = 0
Graph:
y 1.0
0.8
0.6
0.4
0.2
0.0
1 2 3 4 5 6 7
-0.2 x
-0.4
-0.6
-0.8
-1.0
Note that while the solution is damped and s(t) will approach 0 as t approaches in…nity, the
solution oscillates about 0. This is sometimes called and underdamped system.
The examples worked through in the previous section were all initial value problems. While
boundary value problems are not in any way limited to homogeneous linear ODEs with constant
coe¢ cients, now is a good opportunity to solve one such problem.
The text notes that the method of solution developed here is not strictly limited to 2nd order
equations. In particular a homogeneous n th order linear ODE with constant coe¢ cients
dn s dn 1 s
an + an 1 + + a1 s + a0 = 0 (32.10)
dtn dtn 1
where a 0 through a n are constants, can be solved by assuming a solution in the general form of
s(t) = e t . As before this will lead to a characteristic equation, which is an n th order polynomial.
n n 1
an + an 1 + + a1 + a0 = 0 (32.11)
This polynomial will have n roots, which may be some combination of real, repeated and complex
conjugate pairs. As the ODE is linear, we must have n linearly independent components of the
general solution. Please note that it is not trivial to analytically solve a higher order polynomial.
...
x 2•
x 5x_ + 6x = 0:
which factorises to
2
( 1) 6 = 0 using the hint
( 1) ( 3) ( + 2) = 0 completing the factorisation
Since these roots are di¤erent there are no te t terms in the solution, and the solution is very
simply written:
x (t) = C1 et + C2 e3t + C3 e 2t
Example: Suppose a 4th order linear homogeneous ODE has the characteristic equation
2
( + 1)( + 1)2 = 0:
Solution:
2
The characteristic equation has roots = i from ( + 1) = 0 and two equal roots = 1; 1
from ( + 1)2 = 0:
and the two equal roots = 1; 1 provide the remaining part of the solution (eq. 32.8):
t
x (t) = C3 e + C4 te t :
t t
Combining: x (t) = C1 cos(t) + C2 sin(t) + C3 e + C4 te
We now write out the original form of the ODE. We need to expand the characteristic equation:
2
( + 1)( + 1)2
2 2
= ( + 1) +2 +1
4 3 2
= +2 +2 +2 +1=0
d4 x d3 x d2 x dx
4
+2 3 +2 2 +2 +1=0
dt dt dt dt
Moving from the homogeneous to non-homogeneous 2nd order linear ODE with constant coe¢ -
cients simply means adding a term f (t) to the right-hand side of the equation.
d2 s ds
a 2
+ b + cs = f (t) (34.1)
dt dt
where a; b; and c are constants.
The non-homogeneous term f (t) cannot involve the dependent variable s; but it can be non-linear
in the independent variable t: The function f (t) is commonly called the forcing term and this
course will deal with the situation in which f (t) is either a polynomial, exponential or a circular
function.
The general solution s (t) to (34.1) is the sum of the homogeneous solution sc (t) (called the com-
plementary solution) to the homogeneous equation (also called the complementary equation)
and a particular solution, sp (t) :
The particular solution thus accounts for the forcing term f (t): The complementary solution
sc (t) will already contain the two independent variables necessary for the general solution.
Much as we had to make a wise guess in …nding the solution to homogeneous problem, we will
have to make a wise guess for the nature of the particular solution. Having set the form of the
particular solution it will remain to …nd the coe¢ cient for this term. The technique for this is
commonly called the method of undetermined coe¢ cients.
A particular solution sp (t) must take the form sp (t) = A cos (t) + B sin (t) where A and B are
undetermined constants which need to be found.
Substituting (34.3) into the original ODE (34.2) allows us to de…ne the coe¢ cients A and B into
the di¤erential equation and try to …nd appropriate values of A and B:
A cos (t) B sin (t) ( A sin (t) + B cos (t)) 2 (A cos (t) + B sin (t)) = sin (t)
3A cos (t) 3B sin (t) + A sin (t) B cos (t) = sin (t)
( 3A B) cos (t) + (A 3B) sin (t) = sin (t)
This last equation states that ( 3A B) cos (t) + (A 3B) sin (t) = sin (t) must be true for all t.
A 3B = 1
3A B = 0
1 3 1 1
0 1 3 0
A = B=
1 3 1 3
3 1 3 1
1 3
= B=
10 10
L
E
d2 Q dQ
+ 40 + 625Q = 100 cos (10t)
dt2 dt
The homogeneous equation is
d2 Q dQ
+ 40 + 625Q = 0
dt2 dt
and this has characteristic equation
2
+ 40 + 625 = 0
p p
40 1600 4 1 625 b b2 4ac
= using the quadratic formula: =
p 2 2a
40 900
=
2
= 20 15i
20t
Qc (t) = e (C1 cos (15t) + C2 sin (15t))
For the particular solution we try Qp (t) = A cos (10t) + B sin (10t) where A and B are undeter-
mined constants which need to be found.
substituting into
d2 Q dQ
2
+ 40 + 625Q = 100 cos (10t)
dt dt
we obtain
100A cos (10t) 100B sin (10t) + 40 ( 10A sin (10t) + 10B cos (10t))
+625 (A cos (10t) + B sin (10t)) = 100 cos (10t)
(525A + 400B) cos (10t) + ( 400A + 525B) sin (10t) = 100 cos (10t)
4 16 21 4
0 21 16 0
A = B=
21 16 21 16
16 21 16 21
84 64
= B=
697 697
Substituting: Q (0) = 0
84
C1 + =0
697
Finding Q0 (t)
20t 84 464 84 64
Q (t) = e cos (15t) sin (15t) + cos (10t) + sin (10t)
697 2091 697 697
Note that e 20t ! 0 as t ! 1 and both cos (15t) and sin (15t) are bounded functions.
So for large values of t; Q (t) Qp (t) ; and for this reason, Qp (t) is called the steady state
solution.
Fortunately we can cover a little more ground than this. Experience tells us that the method
of undetermined coe¢ cients can readily be employed when the forcing function is a polynomial
or exponential, in addition to sinusoidal. Note that more complicated forcing may, hopefully, be
readily approximated by some series involving this base functions.
A particular solution xp (t) must take the form xp (t) = at2 + bt + c where a; b; c are undetermined
constants which need to be found.
Substituting:
d2 x dx
2
+6 + 9x = 2a + 6 (2at + b) + 9 at2 + bt + c
dt dt
= 9at2 + (9b + 12a) t + 2a + 9c + 6b t2
9a = 1
9b + 12a = 0
2a + 9c + 6b = 0
1 4 2
a = ;b = ;c =
9 27 27
3t 3t 1 4 2
x (t) = xc (t) + xp (t) = C1 e + C2 te + + t2 t+
9 27 27
If the forcing term f (t) is an exponential, we anticipate that the particular solution will be one
also.
x0p (t) = ae t
x00p (t) = ae t
d2 x dx t t t
2
+5 6x = ae 5ae 6ae
dt dt
t t
= 10ae e
Clearly
1
a=
10
1
x (t) = C1 et + C2 e 6t
e t
10
Problems arise if any term of xp (t) is a part of the complementary solution. In such a case
multiply xp (t) by t (or t2 in the case of repeated roots).
d2 x dx 2t
+5 6x = t + e sin t
dt2 dt
Solution:
d2 x dx
Consider the equation 2
+5 6x = t
dt dt
A particular solution xp (t) must take the form xp (t) = at + b
5 1
which leads to the particular solution: xp (t) = 36 6t
d2 x dx
While the equation 2
+5 6x = e 2t sin t
dt dt
has a particular solution xp (t) of the form: xp (t) = ae 2t cos t + be 2t sin t
d2 x
now substitute into dt2
+ 5 dx
dt 6x :
so 13a + b = 0
a 13b = 1
1 13
from which we obtain: a = 170 ; b = 170
2t
xp (t) = ae cos t + be 2t sin t
2t 1 13
xp (t) = e cos (t) sin (t)
170 170
d2 x dx 2t 5 1 2t 1 13
2
+5 6x = t + e sin t so xp (t) = t+e cos (t) sin (t)
dt dt 36 6 170 170
Note: inhomogenous terms such as ekt sin !t or ekt cos !t can be much better handled using the
complex exponential which is given as an alternative to the above working.
Now
d2 x dx
2
+5 6x = ( 2 + i)2 e( 2+i)t + 5 ( 2 + i) e( 2+i)t 6 e( 2+i)t
dt dt h i
= ( 2 + i)2 + 5 ( 2 + i) 6 e( 2+i)t
= [(4 4i 1) 10 + 5i 6] e( 2+i)t
notice this step
= ( 13 + i) e( 2+i)t
2t
now introduce the RHS: e eit = e( 2+i)t
( 13 + i) = 1
1
= 13+i
1 13 i
= 13+i 13 i
1
= 132 +1
( 13 i)
1
= 170 ( 13 i)
d2 x
So for the particular solution of dt2
+ 5 dx
dt 6x = e 2t sin t we use the imaginary part of
13 1
e( 2+i)t = 170 170 i e 2t (cos t + i sin t) :
1 13 2t
The ‘i’term is 170 i (cos t) + 170 i (sin t) e so the imaginary part of e( 2+i)t is
1 13 2t
170 cos (t) 170 sin (t) e = xp (t) as before.