Sei sulla pagina 1di 538

Elminia University

Faculty of Engineering

Engineering Mathematics
Part 1

Dr. Ali Mohamed Eltamaly

Preface
Most complex scientific and engineering models of the real world are
Differential equations. Here are some that I know of: heat flow,
electrostatic potential, waves (radio, light, sound, water), metal beam
bending, quantum mechanics, hydrogen bombs, electrons in telegraph
wires, optics, classical mechanics, general relativity, distributions of
organisms, ice sheets, tsunamis, air flow, ocean currents, weather,
auroras, blood flow, plate tectonics, supernovas. For this reason we
introduce this notes for students in faculty of engineer.
By the end of the course the student should:
be familiar with the concept of a complex number and be able
perform algebraic operations on complex numbers, both with
numeric and symbolic entries, solve simple equations with
complex roots, and in particular describe geometrically the
roots of unity;
be familiar with the concept of a matrix and be able to perform
algebraic operations on matrices, both with numeric and
symbolic entries, be able to define a determinant and calculate
one both directly and by using row and column operations,
understand the definition and use of the inverse of a non-

singular matrix, and be able to solve simple systems both using


inverses and reduction to triangular form, and be able to
compute inverses using Gaussian reduction and explain the
method in terms of elementary matrices;
be familiar with many topics in calculus like limits,
differentiations, and all methods of integrations;
be familiar with first order differential equations (linear and
nonlinear) and their solution by many techniques;
be familiar with many engineering applications of first order
differential equations like falling bodies, the time rate of change
in temperature of an object varies as the difference in
temperature between the object and surroundings, Chemical
Applications, time required for liquid tanks to get empty, Half
Life Of Nuclear Materials, and Electrical Circuits;
be familiar with solution of higher order linear differential
equations with constant coefficients and Cuchy differential
equation and their solution by many techniques;
be familiar with many engineering applications of higher order
differential equations like, Free Oscillation of suspended
bodies, Bending of Beams, and Electrical Circuits;
be familiar with the benefits of Laplace and inverse Laplace
transforms, using Laplace transform for solving differential
equations, finding Laplace transform of any periodical and non

periodical waveforms, using Laplace transform to solve many


application problems like Free Oscillation of suspended bodies,
Bending of Beams, and Electrical Circuits;
be familiar with finding Fourier transform of any waveform by
advanced techniques like jump technique;
be familiar with curve fitting by using least square technique and
using this technique to fiend Fourier transform for any waveform
numerically;
be familiar with using power series for solving linear differential
equations of second order, and Bessel function;
be familiar with partial differentiation and solving partial
differential equations by many techniques as separation of
variables, Laplace transform, and Fourier transform;
be familiar with solving differential equations which governs the
conduction of heat in solids;
be familiar with eigen values and eigen vectors and using them
for solving simultaneous linear differential equations;
be familiar with special functions like Gamma and Beta functions;
be familiar with many topics in numerical analysis like Numerical
solution of equations by many techniques like Simple Iteration,
Bisection, false position, Newton Raphson and secant method; and

be familiar with polynomial interpolation and numerical solution of


differential equations by many techniques like Eulers and RungeKuttas method.

Contents

Part 1
Chapter

Title

No.

Page
No.

Mathematical Numbers

Matrices

42

Calculus

74

Ordinary Differential

101

Equations
5

Linear Differential Equations

151

Of Higher Order
6

Laplace Transforms

190

Fourier Series

238

Least Square Technique

259

References

Contents

Part 2
Chapter

Title

No.
9

Page
No.

Power Series Solution Of

285

Differential Equations
10

Partial Differential Equations

346

11

Simultaneous Linear

389

Differential Equations
12

Special Functions

459

13

Numerical Analysis

478

Appendix

543

References

574

Chapter 1
Mathematical Numbers
1.1 Natural Numbers
Natural numbers known as counting numbers are the numbers
beginning with 1, with each successive number greater than its
predecessor by 1. If the set of natural numbers is denoted by N, then
N = { 1, 2, 3, ......}
1.2 Whole Numbers
Whole numbers are the numbers beginning with 0, with each
successive number greater than its predecessor by 1. It combines the
set of natural numbers and the number 0. If the set of whole
numbers is denoted by W, then
W = { 0, 1, 2, 3, .......}
1.3 Integer Numbers
Integers are the numbers that are in either (1) the set of whole
numbers, or (2) the set of numbers that contain the negatives of the
natural numbers. If the set of integers is denoted by I, then
I = {......, -3, -2, -1, 0, 1, 2, 3, ......}
Positive integers are the numbers in I greater than 0. Negative
numbers are the numbers in I less than 0.
The number zero is neither positive nor negative, i.e., it is both
non-positive and non -negative.

2 Mathematical Numbers
Given the above definitions, the following statements about integers
can be made:
(1) N is the set of positive integers.
(2) W is the union of N and the number 0.
(3) The set of numbers that contain the negatives of the numbers in
N is the set of negative integers.
(4) I is the union of W and the set of negative integers.
1.4 Real Number Line
The set of real numbers can be pictorially represented by the real
number line. It is a straight line, whose "origin" is designated by the
number 0, and continues in both directions. All the positive integers
are ordered, in ascending order from left to right, to the right side of
0; all the negative integers are ordered, in descending order from
right to left, to the left side of 0. Notches are marked to denote the
position of these integers in the following figure (Fig.1).

Fig.1
Every point on the line corresponds to a real number, and every
real number can be paired with a point on this number line. If the
real number is an integer, its point on the number line coincides with
one of the notches for an integer; otherwise, its point lies between
two successive notches. All real numbers represented by points to

Chapter One

3
the right of the number 0 are positive, while all real numbers
represented by points to the left of the number 0 are negative.
1.5 Absolute Values
The absolute value of a real number is the distance between its
corresponding point on the number line and the number 0. The
absolute value of the real number a is denoted by |a|.
From the diagram shown in Fig.2, it is clear that the absolute
value of non-negative numbers is the number itself, while the
absolute value of negative integers is the negative of the number.
Thus, the absolute value of a real number can be defined as follows:
For all real numbers a,
(1) If a > 0, then a = a .
(2) If a < 0, then a = a .

Fig.2
Example 1:
|2|=2
| -4.5 | = 4.5
|0|=0

4 Mathematical Numbers
1.6 Complex Numbers
1.6.1 Introduction
The solution of a second order equation ax 2 + bx + c = 0 can be

b b 2 4ac
obtained by the famous formula, x =
2a
For example, if x 2 + x 2 = 0 , then we have:

x=

(1 + 8)
2

x = 1 or

1 9 1 3
=
2
2

As we see there is no problems with solving the above equation. But


if we solve the equation 5 x 2 6 x + 5 = 0 in the same way, we get:

x=

(36 100)
10

6 64
10

And the next stage is now to determine the square root of (-64).
Is it (i) 8, (ii) -8, (iii) neither?
It is, of course, neither, since + 8 and 8 are the square roots of
64 and not of (-64). In fact,

( 64)

cannot be represented by an

ordinary number, for there is no real number whose square is a


negative quantity. However, 64 = 1 * 64
And therefore we can write:

( 64) = ( 1 * 64) =

1 * 64 = 8 1

Chapter One

( 1) ,

Of course, we are still faced with

which cannot be

evaluated as a real number, for the same reason as before, but, if we

1 with the letter j, then

can replace

( 64) = ( 1) * 8 =

j8

We now have a way of finishing off the quadratic equation we


started before as following:

5x 2 6x + 5 = 0
x=

(36 100)
10

x = 0.6 + j 0.8

6 64 6 j8
=
10
10

or x = 0.6 j 0.8

1.6.2 Powers of j

j = 1
j 2 = 1

( )
2
j 4 = ( j 2 ) = ( 1)2 = 1

j 3 = j 2 * j = 1 * j = j

Note especially the last result: j 4 = 1 . Every time a factor j 4


occurs, it can be replaced by the factor 1, so that the power of j is
reduced to one of the four results above. In the same way we can
replace j 2 = 1 with 1.
The complex number x = 1 + j 4 , consists of two separate terms,
1, and j 4 These terms cannot be combined any further, since the
second is an imaginary number (due to its having the factor j).

6 Mathematical Numbers
In such an expression as x = 1 + j 4

1 is called the real part of x


4 is called the imaginary part of x
The two together form what is called a complex number.
So, a Complex number= (Real part) + j(Imaginary part)
Complex numbers is very important especially in some
engineering application like electrical and mechanical engineering.
So we have to fully understand how to carry out the usual
arithmetical operations.
1.6.3 Addition and Subtraction of Complex Numbers.
Addition and Subtraction are quite easy as shown in the following

example:
Example 2 Find the results of the following arithmetical operations.

(3 +

j 7 ) + (6 j 2 ) .

Solution :

(3 +

j 7 ) + (6 j 2 ) = 3 + j 7 + 6 j 2 = (3 + 6 ) + j (7 2 ) = 9 + j 5
So, in general, (a + jb ) + (c + jd ) = (a + c ) + j (b + d )
1.6.4 Multiplication of. Complex Numbers

The following example illustrate the multiplication process in


complex numbers.
Example 3 Find the results of the following arithmetical operations.

(2 + j3)(5 + J 7 )

Chapter One

7
Solution: These are multiplied together in just the same way as

you would determine the product (2 + j 3)(5 + j 7 ) . Form the product


terms of

(2 + j3)(5 + j 7 ) = 2 * 5 +

j3 * 5 + j 2 * 7 + j 2 3 * 7

= 10 + j15 + j14 + j 2 21
= 10 + j 29 21
= 11 + j 29
If the expression contains more than two factors, we multiply the
factors together in stages:

(2 + j3)(5 +

j 7 )(1 j 2) = 10 + j15 + j14 + j 2 21 (1 j 2)


= (10 + j 29 21)(1 j 2)
= ( 11 + j 29 )(1 j 2)
= 22 + j 22 + j 29 j 2 58
= 22 + j 51 + 58 = 36 + j 51

Example 4 Find the results of the following arithmetical

operations. (5 + j8)(5 j8)


Solution:

(5 + j8)(5 j8) = 25 +

j 40 j 40 j 2 64

= 25 + 64 = 89
In spite of what we said above, here we have a result containing no
imaginary term. The result is therefore entirely real. This is rather an
exceptional case. If we look at the two complex numbers we can

8 Mathematical Numbers
find that they are identical except for the middle sign in the brackets

are different. These two complex numbers called conjugate complex


numbers and the product of two conjugate complex numbers is
always entirely real. In general we can say:

(a + b )(a b ) = a 2 b 2

difference of two squares and there is no

any imaginary part.


1.6.5 Divison of. Complex Numbers

Division of a complex number by a real number is easy enough.

5 j4 5
4
= j = 1.67 j1.33
3
3
3
But how do we manage with dividing complex number with other
complex one? If we could, somehow, convert the denominator into a
real number, we could divide out as in the above example. So our
problem is really, how can we convert (4 + j3) into a completely real
denominator and this is explained in the previous item. We know
that we can convert (4 + j3) into a completely real number by
multiplying it by its conjugate (4 - j3). But if we multiply the
denominator by (4 j 3) , we must also multiply the numerator by
the same factor.

7 j 4 (7 j 4)(4 j 3) 28 j 37 12 16 j 37
=
=
=
4 + j 3 (4 + j 3)(4 j 3)
16 + 9
25

16
37
j
= 0.64 j1.48
25
25

Chapter One

9
Then, to divide one complex number by another, therefore, we

multiply numerator and denominator by the conjugate of the


denominator. This will convert the denominator into a real number
and the final step can then be completed.
Example 5 Simplify the following expression:

(2 + j3)(1 j 2)
3 + j4

Solution:

(2 + j3)(1 j 2) = 2
3 + j4

8 j 3 j4
j +6 8 j
=
=
*
3 + j4
3 + j4 3 + j4 3 j4
24 j 35 4 20 j 35
=
=
= 0.8 j1.4
9 + 16
25

Equal Complex Numbers

Now let us see what we can find out about two complex
numbers which we are told are equal.
Let the numbers a + jb, and c + jd are equal
a + jb = c + jd
Rearranging terms, we get a c = j (d b )
In this last statement the quantity on the left hand side is entirely
real, while that on the right hand side is entirely imaginary, i.e. a
real quantity equals an imaginary quantity. This seems contradictory
and in general it just cannot be true. But there is one special case for
which the statement can be true. That is when each side is zero.

a c = j (d b ) can be true only if a c = 0, ie. a = c


and if d b = 0, ie. b = d

10Mathematical Numbers
So we get this important result, If two complex numbers are equal

then,
(i) the two real parts are equal
(ii) the two imaginary parts are equal
For example, if x + jy = 5 + j 4 , then we know x = 5 and y = 4 .
1.6.6 Graphical Representation of a Complex Numbers

Although we cannot evaluate a complex number as a real number,


we can represent it diagrammatically, as we shall now see.
In the usual system of plotting numbers, the number 4 could be
represented by a line from the origin to the point 4 on the scale.
Likewise, a line to represent (-4) would be drawn from the origin to
the point (-4). These two lines are equal in length but are drawn in
opposite directions. Therefore, we put an arrow head on each to
distinguish between them as shown in Fig.3.
-4
-4

-3

-2

4
-1

Fig.3
A line which represents a magnitude (by its length) and direction
(by the arrow head) is called a vector. We shall be using this word
quite a lot. Any vector therefore must include both magnitude (or
size) and direction. If we multiply (+4) by the factor (-1), we get
(-4), i.e. the factor (-1) has the effect of turning the vector through
180o as shown in Fig.4.

Chapter One

11

180 o
4

-4
-4

-3

-1

-2

Fig.4
Multiplying by (-1) is equivalent to multiplying by j 2 , i.e. by the
factor j twice. Therefore multiply in a single factor j will have half
the effect and rotate the vector through only 90o . So, the factor j
always turns a vector through 90o in the positive direction
measuring angles, i.e. anticlockwise. If we now multiply j 4 by a
further factor j, we get j 2 4 , i.e. (-4) and the following diagram
(Fig.5) agrees with this result. If we multiply (-4) by a further
factor j, sketch showing this new vector ( j 4 ) is shown in Fig.6.
4
3
j4

1
-4

180

-4
-4

-3

-2

-3

-2

4
0

-1

-1

-2
-j4

4
-1

-4

j4
2
1

180

-3

Fig.5

-4

Fig.6

Let us denote the two reference lines by XX, and YY, as usual.
You will see that:
(i) The scale on the X-axis represents real numbers, XX1 is
therefore called the real axis.

12Mathematical Numbers
(ii) The scale on the Y-axis represents imaginary numbers, YY1 is

therefore called the imaginary axis.


If we now wish to represent 2+ 3 as the sum of two vectors, we
must draw them as a chain, the second vector starting where the first
one finishes as shown in Fig.7.
5
2

Fig.7
The two vectors, 2 and 3 are together equivalent to a single vector
drawn from the origin to the end of the final vector (giving naturally
that 2+3=5).
If we wish to represent the complex number (3 + j2), then we add
together the vectors which represent 3 and j2. Notice that the 3 is
now multiplied by a factor j which turns that vector through 90o .
The equivalent single vector to represent (2 + j3) is therefore the
vector from the beginning of the first vector (origin) to the end of
the last one. This graphical representation constitutes an Argand

diagram as shown in Fig.8.


3
j3

2
1
2
0

Fig.8

Chapter One

13
Example 6 Draw an Argand diagram to represent the following

vectors: z1 = 3 + j 2 , z 2 = 3 + j1 , z3 = 2 j 4 , and z 4 = 4 j 4
Solution: The Argand diagram of the above vectors are shown in

the following Fig.9.


3

z1

2
j1

z2

j2

1
3

-4

-3

j4

-2

3
-1

-1

4
j4

-2
-j4
-3

z4

-4

z3

Fig.9.

1.6.7 Graphical Addition of Complex Numbers

Let us find the sum of z1 = 3 + j 2 and z 2 = 2 j 4 by Argand


diagram. If we are adding vectors, they must be drawn as a chain.
We therefore draw at the end of z1 , a vector representing z2 in
magnitude and direction, and is parallel to it. In the same way, we
therefore draw at the end of z2 , a vector representing z1 in
magnitude and direction, and is parallel to it. Therefore we have a
parallelogram. Thus the sum of z1 and z2 is given by the vector
joining the starting point to the end of the last vector.

14Mathematical Numbers

The complex numbers z1 and z2 can thus be added together by


drawing the diagonal of the parallelogram formed by z1 and

z 2 .Thus, z1 + z 2 = 3 + j 2 + 2 j 4 = 5 j 2 which is clear that this


results is the same as obtained from Fig10. So the sum of two
vectors on an Argand diagram is given by the diagonal of the
parallelogram of vectors.

z1

j2

1
3
0

-1

z1 + z2

-2
-j4
-3
-4

z2
Fig.10

Regarding to the subtraction it is quite similar to addition but the


only trick is simply this: z1 z 2 = z1 + ( z 2 )
That is, we draw the vector representing z1 and the negative
vector of z2 and add them as before. The negative vector of z 2 is
simply a vector with the same magnitude (or length) as z 2 but
pointing in the opposite direction.

Chapter One

15

Example 7 If z1 = 3 + j 2 and z 2 = 2 j 4 Find z1 z 2


Solution:

It is clear from Argand diagram (Fig.11) that

z1 z 2 = 1 + j 6 . We can now check for the above results:

Z1 Z 2 = 3 + j 2 (2 j 4) = 3 + j 2 + (2 + j 4) = 1 + j 6
6

z1 z 2

5
4

Fig.11

z2

z1

j2

1
3
3

3
-1

-2

-1

-2
-j4
-3
-4

z2

1.6.8 Polar Form of a Complex Numbers

Complex numbers in the form a + jb is called rectangular form.


Sometimes, it is convenient to express it in a different form. On an
Argand diagram shown in Fig.12, let OA be a vector a + jb . Let r
= length of the vector and the angle made with OX. Since

z = a + jb ,

this

can

be

written

z = r cos + jr sin

or

z = r (cos + j sin ) This is called the polar form of the complex


number a + jb , where: r =

(a 2 + b 2 ),

b
and , = tan 1
a

16Mathematical Numbers

y
r

Fig.12
Example 8 Express z = 4 + j 3 in polar form.
Solution: First draw a sketch diagram (that always helps). We can

3
see that: r = 4 2 + 32 = 16 + 9 = 5 and = tan 1 = 36.87 o
4

z = a + jb = r (cos + j sin ) z = 5 cos 36.87 o + j sin 36.87 o

(i) r is called the modulus of the complex number z and is often


abbreviated to mod( z ) or indicated by z

Thus if z = 3 + j 4 , z = 32 + 4 2 = 9 + 16 = 5
(ii) is called the argument of the complex number and can be
abbreviated to arg ( z ) . So, if z = 5 + j 5 then arg( z ) = = 45o
Warning: In finding , there are of course two angles between 0o

and 360 o , the tangent of which has the value . We must be


careful to use the angle in the correct quadrant. Always draw a
sketch of the vector to ensure you have the right one. The follwing
table and Fig.13 show the correct angle range and quadrant.

Chapter One

17

Value of a

Value of b

Angle range

Quuadrant

+ve

+ve

0o < < 90o

First

-ve

+ve

90 o < < 180 o

Second

-ve

-ve

180o < < 270o

Third

+ve

-ve

270o < < 360o

Fourth

First

Second

0 < < 90o

90 o < < 180o


o
o

180 < < 270

270 < < 360

Fourth

Third

Fig.13
Example 9 Find arg( z ) when z = 3 j 4
Solution: The vector has been drawn as shown in Fig. 14.

is measured from OX to OP. We first find E the equivalent

acute angle from the trinngle shown.

tan E =

4
= 1.3333 then E = 53.13o
3

18Mathematical Numbers

But from Fig.14. This angle is 180 o < < 270 o then we have
to add 180o to the angle E to get angle .

= 180o + E = 233.13o

Fig.14
Example 10 Find arg( z ) when z = 5 + j 2
Solution: The vector has been drawn as shown in Fig.15.

Fig.15

tan E =

2
= 0.4 E = 21.8o
5

In this particular case, = 180 E o = 158.2 o


Complex numbers in polar form are always of the same shape and
differ only in the actual values of r and . We often use the

Chapter One

19

shorthand version r o to denote the polar form as shown in the


following examples:
Then, if z = 5 + j 2 r =

= 158.2 .

above

Then,

(25 + 4) =
the

29 = 5.385 and from

full

polar

form

is

z = 5.385 cos158.2 o + j sin 158.2 o and this can be shortened to


z = 5.385158.2o .
Example 11 express 4 j 3 in shortened form.
Solution: r =

(42 + 32 ) = 5

tan E = 0.75 , E = 36.87 o = 360 E = 323.13o

z = 5 cos 323.13o + j sin 323.13o = 5323.8o


Of course, given a complex number in polar form, you can convert
it into the basic rectangular form a + jb simply by evaluating the
cosine and the sine and multiplying by the value of r.
Example 12 Find the rectangular form of the following: z = 535o

z = 5 cos 35o + j sin 35o = 5(0.8192 + j 0.5736)


Solution:
= 4.096 + j 3.868
1.6.9 Exponential Form of a complex numbers

There is still another way of expressing a complex number which


we must deal with. We shall Expalin it this way:
Many functions can be expressed as series. For example,

20Mathematical Numbers

xm
x 2 x3 x 4
=1+ x +
+
+
+ ......
e =
!
2
!
3
!
4
!
m
m=0
x

(1)

(1) m x 2 m
x2 x4
cos x =
=1
+
+.........
(
2
)!
2
!
4
!
m
m=0

(2)

(1) m x 2 m +1
x3 x5
sin x =
= x
+
+.........
(
2
+
1
)!
3
!
5
!
m
m=0

(3)

If we now take the series for e x and write j in place of x, we get


the following series

=1+

(
j )2 ( j )3 ( j )4 ( j )5
+
+
+
j +
2!

3!

4!

5!

(4)

j 2 ( )2 j 3 ( )3 j 4 ( )4 j 5 ( )5
= 1 + j +
+
+
+
++
2!
3!
4!
5!
= 1+

(
)2 j ( )3 ( )4 j ( )5
j

+
+

2!

3!

( )2 ( )4
= 1
+
.... +

2!
4!

4!

5!

j ( )3 j ( )5

j
+
....

3!
5!

(5)

It is clear from (2),(3) and (5) that the first bracket is in the form of
cosine and the second bracket in the form of sine.

e j = cos + j sin

(6)

Therefore, r (cos + j sin ) can now be written as re j . This is


called the exponential form of the complex number. It can be

Chapter One

21
obtained from the polar form quite easily since the r value is the

same and the angle is the same in both.


The three ways of expressing a complex number are therefore
(i) z = a + jb
(ii) z = r (cos + j sin )

(Rectangular form)
(Polar form)

(iii) z = re j
(Exponential form)
And now a ward about negative angles. We know that:

e j = cos + j sin
if we replace by in this result, we get the following:

e j = cos( ) + j sin ( )
= cos j sin
So, e j = cos + j sin And e j = cos j sin
There is one operation that we have been unable to carry out with
complex numbers before this. That is to find the logarithm of a
complex number. The exponential form now makes this possible,
since the exponential form consists only of products and powers.
For, if we have z = r.e j we can say: ln z = ln r + j
Example 13 Express e1 j / 4 in the rectangular form:
Solution: Well now, we can write


e1 j / 4 = e1e j / 4 = e cos j sin
4
4

1
e
1
(1 j )
= e
j
=
2
2
2

22Mathematical Numbers
Since every complex number in polar form is of the same shape,

i.e. r (cos + j sin ) = r o and differs from another complex


number simply by the values of r and , we have a shorthand
method of quoting the result in polar form.
Example 14 Express z = 4 j 3 in the polar form.
Solution: The vector has been drawn as shown in Fig. 16.

r=

(42 + 32 ) = 5

Fig.16

3
= 0.7, E = 36.87 o
4
= 360 o 36.87 o = 323.13o

From this r = 5 , tan E =

Then, the polar form is z = 5 cos 323.13o + j sin 323.13o .


And the polar form is z = 5.e
form is

j 323.13o

And the the shortened

z = 5323.13o . In this last example, we have

z = 5 cos 323.13o + j sin 323.13o

Chapter One

23

Fig.17.
But the direction of the vector, measured from OX, could be given
as 36.87 o , the minus sign showing that we are measuring the
angle in the opposite direction sense from the usual positive

( (

))

direction. We could write z = 5 cos 36.87 o + j sin 36.87 o .


But

you

already

sin ( ) = sin ( ) .

( (

known

as

z = 5 cos 36.87 o j sin 36.87 o

cos( ) = cos( )

and

))

i.e. very much like the polar form but with a minus sign in the
middle. This comes about whenever we use negative angles.
In the same way we can say the following:

) ( (

z = 5 cos 250o + j sin 250o = 5 cos 110o + j sin 110o

))

It is sometimes convenient to use this form when the value of is


greater than 180 o , i.e. in the 3rd and 4th quadrants. In the same
way we can write the following:

24Mathematical Numbers

(
) (
)
z = 4(cos 290o + j sin 290o ) = 4(cos 70 o j sin 70 o ) = 4 70 o .

z = 3 cos 230o + j sin 230o = 3 cos130o j sin130o = 3 130o

The polar form at first sight seems to be a complicated way of


representing a complex number. However it is very useful as we
shall see.
Suppose we multiply together two complex numbers in this form:
Let z1 = r1 (cos 1 + j sin 1 ) and z 2 = r2 (cos 2 + j sin 2 )

z1 * z 2 = r1 (cos 1 + j sin 1 ) * r2 (cos 2 + j sin 2 )

z1 * z 2 = r1.r2 (cos 1 cos 2 + j sin 1 cos 2


+ j cos 1 sin 2 + j 2 sin 1 sin 2

Rearranging the terms and remmembering j 2 = 1 we get:

(cos 1 cos 2 sin 1 sin 2 )


z1 * z 2 = r1.r2

+ j (sin 1 cos 2 + cos 1 sin 2 )


Now

the

brackets

(cos1 cos 2 sin 1 sin 2 ) and

(sin 1 cos 2 + cos 1 sin 2 ) ought to ring the bell. What are they?
(cos 1 cos 2 sin 1 sin 2 ) = cos(1 + 2 )

(sin 1 cos 2 + cos 1 sin 2 ) = sin (1 + 2 )


z1 * z 2 = r1.r2 [cos(1 + 2 ) + j sin (1 + 2 )]
Note: This is important result. Then we can say that to multiply

together two complex numbers in the polar form,


(i) Multiply the r's together,
(ii) Add the angles, , together it is just easy as that.

Chapter One

25
Example 15 Find the result of the following in the polar form:

230 * 340
Solution: It is easy to do that as we get:

230 * 340 = (2 * 3) 30o + 40 o = 670o


Now let us see if we can discover a similar set of rules for
division. We already know that to simplify 5 + j 4 we first
obtain a denominator that is entirely real by multiplying top and
bottom by the conjugate of the denominator i.e (5 j 4 ) Right.
Then let us do the same thing with z1 and z2 as following:

z1
r (cos 1 + j sin 1 )
= 1
z 2 r2 (cos 2 + j sin 2 )

z1
r (cos 1 + j sin 1 ) (cos 2 j sin 2 )
= 1
*
z 2 r2 (cos 2 + j sin 2 ) (cos 2 j sin 2 )

z1 r1 (cos1 cos 2 + j sin 1 cos 2 j cos1 sin 2 + sin 1 sin 2 )


=
z 2 r2
cos 2 2 + sin 2 2

z1 r1 (cos1 cos 2 + sin 1 sin 2 ) + j (sin 1 cos 2 cos1 sin 2 )


=
1
z 2 r2

z1 r1
r
= (cos(1 2 ) + j sin (1 2 )) = 1 (1 2 )
z 2 r2
r2

So, for division the rule is divide the r's and subtract the angles 's.
Example 16 Simplify the following expressions:
Solution:

1095o
244 o

= 5 95o 44 o = 551o

1095o
244 o

26Mathematical Numbers
1.6.10 DeMoivres Theorem

There is very important rule is called DeMoivres Theorem. It says


that to raise a complex number in polare form to any power n, we
raise the r to the power n and multiply the angle by n.

[r (cos + j sin )]n = r n (cos n + j sin n )


Example 17 Use DeMoivres Theorem to find the results of the

following expression in polar form:


Solution:

[3(cos110

+ j sin 110o

)]3

[3(cos110 + j sin 110 )] = 3 (cos(3 *110 ) + j sin (3 *110 ))


[3(cos 110 + j sin 110 )] = 27(cos(330 ) + j sin (330 )) = 27330
o 3

o 3

This is where the polar form really comes into its own. For

DeMoivre's theorem also applies when we are raising the complex


number to a fractional power, i.e. when we are finding the roots of a
complex number as shown in the following example.
Example 18 Find the square root of z = 944 o
Solution:

44o
= 322o
We have z = 944 = 9
2

Expansion of sin n and cos n


o

By DeMoiver's theorem, we know that:

cos n + j sin n = (cos + j sin )n where n is a positive integer.

Chapter One

27
The method is simply to expand the right hand side as a binomial

series, after which we can equate real and imaginary parts. An


example will soon show you how it is done.
Example 19 To find expansions for cos 3 and sin 3
Solution: We have cos 3 + j sin3 = (cos + j sin )3 = (c + js)3

Where c = cos and s = sin just for simplicity.


Now expand this by the binomial series so that:

cos 3 + j sin 3 = (cos + j sin )3 = c 3 + 3c 2 ( js ) + 3c( js )2 + ( js )3

cos 3 + j sin 3 = c 3 + j 3c 2 s 3cs 2 js 3

) (

cos 3 + j sin 3 = c 3 3cs 2 + j 3c 2 s s 3

Now equating real parts and imaginary parts we get:

cos 3 = cos3 3 cos sin 2


sin 3 = 3 cos 2 sin sin 3
If

we

wish,

we

can

replace

sin 2 = 1 cos 2

and

cos 2 = 1 sin 2 . So that we could write the results above as


following: cos 3 = 4 cos3 3 cos , sin 3 = 3 sin 4 sin 3 .
While these results are useful, it is really the method that counts. So
now do this one in just the same way as done before, obtain an
expansion for cos 4 in terms of cos .

cos 4 + j sin 4 = (cos + j sin )4 = (c + js )4

28Mathematical Numbers

= c 4 + 4c 3 ( js ) + 6c 2 ( js )2 + 4c( js )3 + ( js )4
= c 4 + j 4c 3 s 6c 2 s 2 j 4cs 3 + s 4

) (

= c 4 6c 2 s 2 + s 4 + j 4c 3 s 4cs 3
Equating real parts:

cos 4 = c 4 6c 2 s 2 + s 4

) (

= c 4 6c 2 1 c 2 + 1 c 2

)2

= c 4 6c 2 + 6c 4 + 1 2c 2 + c 4
= 8c 4 8c 2 + 1
= 8 cos 4 8 cos 2 + 1

Similarly, sin 4 = 4c 3 s 4cs 3 = 4cs c 2 s 2

(
)
= 4cs (1 s 2 ) = 4cs * c 2 = 4c 3 s
= 4cs c 2 s 2 c 2 s 2 + 1

sin 4 = 4 cos3 * sin


Expansions for cos n and sin n in terms of sines and cosines
of muiltiples of .

1
= z 1 = cos j sin
z
1
1
z + = 2 cos and , z = j 2 sin
z
z
Also by DeMoivre's theorem z n = cos n + j sin n

z = cos + j sin ,

Chapter One

29

= cos n j sin n
zn
1
1
z n + n = 2 cos n And, z n
= j 2 sin n
z
zn
And,

Let us collect theses four results together: z = cos + j sin

1
= 2 cos
z
1
z n + n = 2 cos n
z

z+

1
= j 2 sin
z
1
z n n = j 2 sin n
z
z

Example 20 Expand cos 3


Solution: From the previous results,
3

1
1

Q z + = 2 cos z + = (2 cos )3
z
z

1 1
1
(2 cos )3 = z 3 + 3z 2 + 3z 2 + 3
z
z z
1 1
= z 3 + 3z + 3 + 3
z z
Now here is the trick: we rewrite this, collecting the terms up in
pairs from the two extreme ends, thus:

(2 cos )3 = z 3 +

1
1
+
+
3
z

z
z3

But from the previous results

z +

1
1
= 2 cos , and z 3 +
= 2 cos 3
3
z
z

30Mathematical Numbers

(2 cos )3 = 2 cos 3 + 3 * 2 cos

8 cos3 = 2 cos 3 + 6 cos


1
cos3 = (cos 3 + 3 cos )
4
Example 21 Expand sin 4
Solution:
1
1
Q z = j 2 sin , and, z n n = j 2 sin n
z
z

( j 2 sin )

= z
z

1
1 1
1
= z 4 4 z 3 + 6 z 2 2 4 z 3 + 4
z
z
z z
1
1

= z 4 + 4 4 z 2 + 2 + 6

z
z
Now, Q z n +

1
zn

= 2 cos n

1
1

( j 2 sin )4 = z 4 + 4 4 z 2 + 2 + 6

z
z
= 2 cos 4 4 * 2 cos 2 + 6
16 sin 4 = 2 cos 4 4 * 2 cos 2 + 6

sin 4 =

1
(cos 4 4 cos 2 + 3)
8

Chapter One

31

1.6.11 The Roots of Unity

The problem here is to solve the equation z n = 1 , where n is usually


a positive whole number.
Write both sides of the equation in polar form. Let z have polar form

z = r (cos + j sin ) z n = r n (cos n + j sin n )


We know that 1 = 1(cos 0 + j sin 0 ) . So our equation becomes:

z n = r n (cos n + j sin n ) = 1 * (cos 0 + j sin 0)


Now two complex numbers in standard polar form are equal if and
only if their modulus and arguments are equal. In the case of the
argument this statement has to be handled with care. It means are
equal if reduced to the proper range. So, for example 10o and 370 o
count as equal from this point of view. So we can say that r n = 1
and that n and 0 are equal up to the addition of some multiple of

2 radians. r n = 1

n = 0 + 2k Where k is some whole

number. Since r is real and positive, the only possibility for r is r= 1.


The other equation gives us: = 0 + 2

k
n

This, in principle, gives us infinitely many answers one for each


possible whole number k. But not all the answers are different.
Remember that changing the angle by 2 does not change the
number z.
The distinct solutions, of which there are n, are given by r = 1and

32Mathematical Numbers

= 2

k
,
n

k = 0, 1, 2, 3,.........n 1

and we can write these

solutions as following: z k = cos k + j sin k


Where = 2

k
,
n

k = 0, 1, 2, 3,.........n 1

That looks rather complicated. It becomes a lot simpler if you think


in terms of the Argand diagram. All the solutions have modulus 1
and so lie on the circle of radius 1 centered at the origin. The
solution with k = 1 is just z = 1. The other solutions are just n 1
other points equally spaced round this circle, with angle 2 / n
between one and the next. This is shown in Fig.18 for n = 17 .

Fig.18 The n roots of 1.


Let's look at some specific examples. The cube roots of unity are the
solutions to z 3 = 1 . There are three of them and they are:

zo = 1,

z1 = cos 2 / 3 + j sin 2 / 3,

z 2 = cos 4 / 3 + j sin 4 / 3

Chapter One

33

Fig.19: The three cube roots of 1.


Note that z 2 = z1 , z 2 = z12 and 1 + z1 + z 2 = 0 . The roots are
shown in Fig.19.
Similarly the fourth roots of unity are the solutions of z 4 = 1 and
these are: z = 1 , z = j , z = 1 , and z = j
A picture for n = 4 together with those for n = 5 and n= 6 is given
in Fig.20.

Fig.20 The nth roots of 1 for n = 4;5;6.


We can do other equations like this in much the same way.

34Mathematical Numbers
Example 22 Find the solutions of the equation z 4 = j .
Solution:

Put z = r (cos + j sin ) . Then z 4 = r 4 (cos 4 + j sin 4 ) . We


know that: j = 1(cos / 2 + j sin / 2 ) . So our equation becomes:

z 4 = r 4 (cos 4 + j sin 4 ) = 1(cos / 2 + j sin / 2 )


Therefore; r = 1 and 4 =

+ 2k

or =

k
2

There are 4 distinct solutions, given by k = 0;1;2;3. They form a


square on the unit circle.
1.7 Polynomials

We have learned how to manipulate complex numbers, and


suggested that they will prove valuable in engineering calculations.
The original motivation for introducing them was to give the
equation x 2 = 1 two roots, namely j and j , rather than it having
no roots. It turns out that this is all we have to do to ensure that
every polynomial has the right number of roots. We now discuss
this, and a number of other basic results about polynomials that are
quite useful to know.
A polynomial in x is a function of the form:

p ( x ) = an x n + an 1 x n 1 + .... + a1 x + ao

Chapter One

35

where the a's are (real or complex) numbers and an 0 . For


example: p ( x ) = x 3 2 x + 4,

q (t ) = 5t 8 t 4 + 6t 3 1

The highest power in the polynomial is called the degree of the


polynomial. The above examples have degrees 3 and 8.
A number a (real or complex) is said to be a root of the polynomial

p( x ) if p (a ) = 0 . Thus x = 1 is a root of x 2 2 x + 1 = 0
The first important result about polynomials is that a number a (real
or complex) is a root of the polynomial p ( x ) if and only if ( x a )
is a factor of p(x), in the sense that we can write p ( x ) as:

p ( x ) = ( x a )q( x ) . Where q( x ) is another polynomial. This result


is often called the remainder theorem . For example, x = 2 is a root
of p ( x ) = x 3 + x 2 7 x + 2 and it turns out that

p(x ) = (x 2) x 2 + 3x 1

Note that necessarily the polynomial q has degree one less than the
degree of p. It may be the case that you can pull more than one
factor of x a out of the polynomial. For example, 2 is a root of

p ( x ) = x 3 x 2 8 x + 12 and it turns out that


p ( x ) = ( x 2 )( x 2 )( x + 3)
In such cases a is said to be a multiple root of p ( x ) . The multiplicity
of the root is the number of factors ( x a ) that you can take out. In
the above example, 2 is a root of multiplicity 2, or a double root. A

36Mathematical Numbers
root is called a simple root if it produces only one factor. Multiple

roots are a considerable pain in the neck in many applications.


There is a simple test for multiplicity. Suppose a is a root of

p( x ) , so that p (a ) = 0 . If, in addition, p(a ) = 0 (derivative) then a


is a multiple root. To take the above example:

Q p ( x ) = x 3 x 2 8 x + 12 p( x ) = 3 x 2 2 x 8

and

p (2 ) = 0

and we have p(2 ) = 0 , so we know that 2 is a multiple root.


2.9. Theorem (Fundamental Theorem of Algebra).

Let p be any polynomial of degree n. Then p can be factored into a


product of a constant and n factors of the form ( x a ) , where a
may be real or complex.
Also, the factorization is unique; you cannot find two essentially
different factorizations for the same polynomial. The factors need
not all be different because of multiple roots.
The fact that there cannot be more than n such factors is fairly
obvious, since we would have the wrong degree. What is not at all
obvious is that we have all the factors that we want. Note that this
result does not tell you how to find these factors; just that they must
be there!
The result is often stated loosely as: a polynomial of degree n
must have exactly n roots. You have to allow complex roots or the
theorem is not true. For example p ( x ) = x 2 + 1 has no real roots at

Chapter One

37

all. Its roots are x = j and it factorizes as p ( x ) = ( x j )( x + j ) . In


fact, if 0 then p ( z ) = z n

(n 1)

always has exactly n

distinct roots because we know that it must have n roots in all and it
cannot have any multiple roots because p( z ) = nz n 1 has only 0 as
a root and 0 is not a root of p ( z ) .
There is one other result about roots of polynomials that is worth
knowing. Suppose we have a polynomial with real , as opposed to
complex, coefficients. Suppose that the complex number z is a root
of the polynomial. Then the complex conjugate z is also a root. So
you get two roots for the price of one. You can see this in the
example of the previous paragraph. x 2 + 1 has j as a root, so it
automatically must have j as a root as well.
Example 23 Let p ( z ) = z 4 4 z 3 + 9 z 2 16 z + 20 . Given that 2 +

j is a root, express p( z ) as a product of real quadratic factors and


list all four roots, drawing attention to any conjugate pairs.
Solution:

Since p has real coefficients, and complex roots occur in pairs


consisting of a root and its complex conjugate. Given that 2 + j is a
root, it follows that 2 j must also be a root, and so the quadratic:

38Mathematical Numbers

(z (2 + j ))(z (2 j )) = z 2 4 z + 5

must be a factor. Dividing

the given polynomial by this factor gives

)(

p ( z ) = z 4 4 z 3 + 9 z 2 16 z + 20 = z 2 4 z + 5 z 2 + 4

The roots of z 2 + 4 are 2j and its complex conjugate, 2 j . Thus


the given polynomial, of degree four, has two pairs of complex
conjugate roots.
Example 24 Express z 5 1 as a product of real linear and quadratic

factors.
Solution:

We rely on our knowledge of the nth roots of unity from the


previous section. Let

2
2
2
= cos + j sin
5
5
5

= exp j

Then the roots of z 5 1 = 0 are , 2 , 3 , 4 , and, 1.

)(

)(

z 5 1 = ( z 1) z 4 + z 3 + z 2 + z + 1 = ( z 1)( z ) z 2 z 3 z 4

For convenience, write = 2 , and note that = 3 while

= 4 . Our problem is to factorize z 4 + z 3 + z 2 + z + 1 as a


product of real quadratic factors. We know the roots are

, , , and . Now construct the quadratic with roots and .


We have: ( z )( z ) = z 2 ( + ) + = z 2 2( ) + 1

Chapter One

39

where ( ) is the real part of . Since ( z )(z ) behaves in


the same way, we have:

)(

z 5 1 = ( z 1) z 2 2( ) + 1 z 2 2( ) + 1

2
4
z 5 1 = ( z 1) z 2 2 cos + 1 z 2 2 cos + 1
5
5

and this is a product of real linear and quadratic factors.


Problems

) Express the complex number z = 1 3 j exactly in


modulus - argument form. Hence find the modulus
and principal argument of z 4 .
) Find all solutions w to the equation 3 = 27 j and
mark them on an Argand diagram.
) Let z = 1 j 2 = 3 + j be complex numbers.
Express each of the following complex numbers in
the rectangular form z ,

z+2+ j

1 + 3 j zz

) Express the complex number 2 + 2 j exactly in

modulus - argument form. Hence find all solutions

w to the equation 3 = 2 + 2 j and mark them on


an Argand diagram.

40Mathematical Numbers

) Let z = 3 + j and = 1 7 j . Express


rectangular form. Find also z ,

+z

in a

) Express the complex number 2 + 2 j in polar


form. Hence solve the equation

z 3 = 2 + 2 j

expressing the solutions in polar form and marking


them in the Argand Diagram.
) Let p ( z ) = z 5 5 z 4 + 8 z 3 2 z 2 8 z + 8
Show that p (2 ) = 0 . Show also that z 2 2 z + 2 is a factor of p ( z ) .
Hence write p as a product of linear factors.
) Show that z (1 + j ) is a factor of the real
polynomial p ( z ) = z 3 + 2 z 2 6 z + 8
Hence write p as a product of linear factors.
) Let p ( z ) = z 4 3 z 3 + 5 z 2 27 z 36 Show that

p (3 j ) = 0 . Hence write p as a product of linear


factors.
)

Express in polar z = 5 j 3

Express in rectangular 2156 o and 5 37 o

If z1 = 12 cos 125o + j sin 125o and

Chapter One

41

z 2 = 5 cos 72 o + j sin 72 o Then, find (i) z1 * z 2 and


results in polar form

z1
giving the
z2

If z1 = 12 cos 125o + j sin 125o , find z 3 and

)
1
z3

If z = x + jy , find the equations of the two loci

defined by: (i) z 4 = 3 and (ii) arg( z + 2 ) =


)

If z = x + jy , find the value of x and y when :

3z
3z
4
+
=
1 j
j 3 j
)

Express 2 + j 3 and 1 j 2 in polar form and

apply DeMoivers theorem to evaluate

(2 + j 3)4 .
1 j2

Express the result in rectangular and exponential


form.
)

Find the fifth roots of 3 + j 3 in polar and

exponential form.
)

Express 5 + j12 in polar form and hence

evaluate the principle value of 3 (5 + j12 ) giving


the results in rectangular form.

42Mathematical Numbers
) Obtain the expansion of sin 7 in terms of

sin .

Chapter 2
Matrices
2.1 Introduction
A matrix is, by definition, a rectangular array of numeric or
algebraic quantities, which are subject to mathematical operations.
So a real matrix is an arrangement of real numbers into rows and
columns. Matrices can be defined in terms of their dimensions
(number of rows and columns). Let us take a look at a matrix with 4
rows and 3 columns (we denote it as a 4x3 matrix and call it A):

7
5
A =
2

6
8
12
5

1
1

The dimensions of this matrix are 4 by 3. The dimensions of a


matrix tell you the size of the matrix because they tell you the
number of rows and columns in the matrix. By convention, we list
the number of rows before the number of columns.
Definition 1 The dimensions of a matrix are the number of rows
and columns (listed in that order) of the matrix.
Each element of the matrix is named according to its position.
Typically, capital letters represent matrices and small letters with
subscripts represent elements in the matrix. Since vectors can be

Chapter Two

43
considered to be matrices with only one row or one column, they
could be labeled with capital letters also. However, small letters
usually represents vectors. The element 6 is in the position a12 (read
a one two) because it is in row 1 and column 2. Also by convention,
we list the row number of the element before the column number.
An element in row i and column j would be denoted by aij . This
gives us a compact way to refer to specific elements of a matrix.
Can you represent the same information as before in a 3 by 4
matrix? Yes, you can. It would look like the matrix B which follows.

7
B = 6

8
1

12
0

9
5

Matrix B is the transpose of A, and A is the transpose of B.


Transposing a matrix results in writing the columns as rows and the
rows as columns, but what really happens is that element aij is
placed in the position b ji of the new matrix. Therefore, a12 moves
to the position b12 when we form the transpose of A. The transpose
of A is denoted by AT (read A transpose). Therefore, matrix B is

AT .
Definition 2 By the transpose of the m by n matrix A, denoted by

AT , we mean the n by m matrix, which has aij as its (i, j )th


element.

44 Matrices
Definition 3 We say that two m by n matrices, A and B are equal
if their corresponding elements are equal.
In other words, A = B if A and B have the same dimensions and

a11 = b11 , a12 = b12 , etc. Is A = AT ? Usually not, but we have a


special word for a matrix which satisfies A = AT .
Definition 4 A matrix is said to be symmetric if A = AT .
Observe that the following matrix is symmetric:

9
2
A=
5

2 5 1
7 0 8

0 4 6

8 6 3

Notice that aij = a ji for all i and j; as is true for all symmetric
matrices. Symmetric matrices are easy to spot because if you draw a
line down the main diagonal (from 9 to 3 in this matrix), then the
two halves are mirror images of each other. Symmetric matrices
have many special qualities that will be used when you study
matrices in more detail. The matrix A, given above, has another
special property; it is a square matrix because A has the same
number of rows as columns. Notice that A is a 4 by 4 square matrix.
We said that the main diagonal for A runs from 9 to 3. For any
square matrix, the main diagonal runs from the upper left corner to
the lower right corner.
Definition 5 We say that an m by n matrix is square if m = n .

Chapter Two

45

2.2 Addition and Subtractions of Matrices


Definition 6 Matrices of the same dimensions are added by adding
corresponding elements.
For instance, aij corresponds to bij because they both lie in the ith
row and jth column of their respective matrices. Therefore, we would
add, aij + bij to obtain the (i, j ) th element of A + B :
Example 1 Find the result of the following:

7
5
A+ B =
2

9
Solution:

6
8
12
5

1 8
1 9
+
0 5

0 11

6
6
9
4

1
0

6+6
1 + 1 15
12
2
7+8
5+9
8+6
1 + 0 14
14
1
=

A+ B =
2+5
12 + 9
0 + 1 7
21
1

5+4
0 + 0 20
9
0
9 + 11
Think about the similarities between addition and subtraction. How
do you think matrices are subtracted?
Definition 7 Matrices of the same dimensions are subtracted by
subtracting corresponding elements.
2.3 Multiplication of Matrices
Multiplying a matrix by a scalar value involves multiplying every
element of the matrix by that value. Here we multiply our 4x3
matrix A by a scalar value k:

46 Matrices

7
5
k * A =k *
2

9
The multiplication

1 k * 7
k *6
1 k * 5
k *8
=
12 0 k * 2
k *12

5
0 k * 9
k *5
operation on matrices differs
6
8

k *1
k *1

k * 0

k * 0
significantly from

its real counterpart. One major difference is that multiplication can


be performed on matrices with different dimensions. The first
restriction is that the first matrix has to have the same amount of
columns as the second has rows. The reason for this will become
clear shortly. Another thing to note is that matrix multiplication is
not commutative i.e, (CD) does not equal (DC).
The procedure for matrix multiplication is rather simple. First, we
determine the dimensions of the resultant matrix. All we require is
that there are as many columns in the first matrix as there are rows
in the second. A simple way of determining is to look at the nearest
and farthest dimensions of two matrix symbols written next to each
other, for instance: C[2x3] D[3x2]. The nearest dimensions are both
equal to 3, and so we know that the operation is possible. The
farthest dimensions will give us the dimensions of the product
matrix, so our result will be a 2x2 matrix. The general rule says that
in order to perform the multiplication AB, where A is a mxn matrix
and B a kxl matrix, we must have n=k. The result will be a mxl
matrix.

Chapter Two

47
Performing the operation product involves multiplying the cells

of a particular rows in the first matrix by the cells of a particular


column in the second matrix, adding the products, and storing the
result in the cell of the resultant matrix whose coordinates
correspond to the row of the first matrix and the column of the
second matrix. For instance, in AB = C, if we want to find the value
of c12, we must multiply the cells of row 1 in the first matrix by the
cells of column 2 in the second matrix and sum the results.
There are several interesting things to notice about matrix
multiplication. We multiplied a 1 by 3 matrix by a 3 by 4 matrix and
got a 1 by 4 matrix. The following picture expresses the
requirements on the dimensions:

Let's also look closely at how we multiply the matrices because we


will multiply matrices with larger dimensions later. This is a hands
on activity. Take your left pointer finger and place it at the
beginning of the first row of the first matrix (the only row we have
in this case). Take your right pointer finger and place it on the first
number of the first column of the second matrix. Multiply the two
numbers to which you are pointing. Each time you move, your left

48 Matrices
hand will go across the row, and your right hand will go down the
column. When you reach the end of the row and column, add the
numbers you have obtained from the multiplications. This number
goes in the first row and first column of your product matrix. This is
the same as taking the inner product of the first row of first matrix
and the first column of the second matrix. Now you can move to the
first row, second column doing the same thing. This number will go
in the first row, second column of your product matrix. In short,
position ij of your product matrix consists of the inner product of the
ith row of your first matrix and the jth column of the second matrix.
This is a lot easier to do than it is to describe! Your left hand will
move across and your right hand will move down. Do this for every
row and column combination to get your product matrix.

This

picture depicts the motions necessary to find a product: Inner


product of row i with column j equals position ij
Definition 8 An identity matrix is a square matrix with ones along
the main diagonal and zeros elsewhere.
Example 2

2
1
If S = [1 4 3] And R = 2
4
2

2
0
1

1
3
4
1
1
3

0 Find S * R

Chapter Two

49

Solution:

2
1
2
1
3
S * R = [1 4 3] 2
0
4
4
1
2
1 1

3
1
Column 1 of S , R
= 1 * 2 + 4 * 2 + 3 * 2 = 17
4
Column 2 of S , R

= 1 * 2 + 4 * 0 + 3 *1 = 5

Column 3 of S , R

3
1
= 1 *1 + 4 * + 3 *1 = 8
3
4

Column 4 of S , R

= 1* 0 + 4 * 0 + 3 * 2 = 6

S * R = [17 5 8 6]
Example 3 Multiply the following matrices

2
1
2
4
2

2
0
1

1
3
4
1
1
3

0 17
8
0 *
13

2 4

2 * 17 + 2 * 8 + 1 * 13 + 0 * 4

63

1
3
= 2 * 17 + 0 * 8 + * 13 + 0 * 4 = 48

4
4
67 1

1
2 * 17 + 1 * 8 + 1 * 13 + 2 * 4 3
3

50 Matrices
Example 4 Multiply the following matrices

2
1
R * F = 2
4
2

2
0
1

1
3
4
1
1
3

0 17
8
0
13

2 4

510 63 1250

70
= 48 1215
90

1
120
67
1450

2.4 Equations
Solving equations is an important part of mathematics. If we are
working with more than one unknown at a time, we need to solve
systems of equations. You may already know how to solve a system
of linear equations, but matrices provide a more compact way to
arrive at the solution. Matrices are also easier to manipulate on a
computer or calculator. Both of these facts will become more
important when you work with larger systems.
Example 5
Solve the following system of equations:

5 x1 + 3 x2 = 93
4 x1 2 x2 = 66
Solution: Let's look at a system of linear equations:

5 x1 + 3 x2 = 93
4 x1 2 x2 = 66
Can be written in matrix form as AX = B where

Chapter Two

5
A=
4

51

3
x1
93
; X = , and B =

2
66
x2

When you learned to solve systems of linear equations, you


learned that
(a) You arrive at the same solution no matter which equation you
write first,
(b) The solution doesn't change if you multiply an equation by a
scalar other than zero, and,
(c) You can replace an equation with the sum of that equation and
another equation without changing the solution.
These may not be exactly the words you used when you were
solving a system of linear equations, but you did all these things.
Experiment with the system above to convince yourself that these
statements are true. We can also solve this system entirely in matrix
form. We use the same rules, and we call them Elementary Row
Operations (EROs). The EROs tell us that we can
(a) Interchange any two rows;
(b) Multiply any row by a non-zero scalar; and
(c) Replace any row by the sum of that row and any other row.
Proper use of EROs will leave us with a system that has the same
solution as our original system, but is much easier to solve. If you
were presented the system

x1 = a, x2 = b

52 Matrices
You would be able to solve it instantly because you only have to
read the solution. If this system were written using matrix notation,
it would look like this:

1
0

0 x1 a
The matrix
=
1 x2 b

1
0

0
is the 2 by 2 identity
1

matrix. Because you can just read of the solution when a system is
in this form, our first goal is to transform our system into this form.
Let's solve the system above using matrices. We can represent
this entire system with a 2 by 3 matrix, which looks like this:

93
. This is called an augmented matrix because we
2 66
3

combined 2 matrices (a matrix and a vector for this system). In this


case, we combined the 2 by 2 coefficient matrix which is made of
the coefficients for our unknowns and the 2 by 1 matrix from the
right-hand side of the equations into one 2 by 3 matrix. In other
words, we put A to the left of the bar and put b to the right of the
bar. The application of an ERO to the augmented matrix does not
change the solution set of the linear system that the augmented
matrix represents because whatever you do to the left side of an
equation, you also do to the right side. Therefore, we will arrive at
the same solution whether we use augmented matrices or not, and
augmented matrices are more compact to write. Using matrix
notation, our goal is to transform our system into one that looks like
the following form:

Chapter Two

53

0 a

1 b

In other words, we want the identity matrix to the left of the bar and
the solution to the right of the bar.
Remark 1 The bar is not a formal part of the matrix, so it is not
necessary. It is placed there so that we can refer to the different
parts of the augmented matrix and easily move back and forth
between the augmented matrix and the linear system that it
represents. In this book, r1 represents row 1 and so on.

93
Original augment matrix
2 66

0.6 18.6
r1 5
2 66

0.6 18.6
4 r1 + r2
0. 4 8. 4

0.6 18.6

1
21

0 6

1 21

r2 0.4
0.6 * r2 + r1

When we convert this from augmented matrix notation back to the


algebraic notation for a system of equations, it looks like this:

54 Matrices

1x1 + 0 x2 = 6
0 x1 + 1x2 = 21
This tells us that x1 = 6 and x2 = 21 . Substitute this solution into
the system to assure yourself that we are correct. If we
systematically use elementary row operations (ERO) to obtain the
identity matrix to the left of the bar, we call this the Gauss Jordan
Elimination Method.
Example 6
Now, let's solve the system using Gauss Jordan elimination.

5 x1 + 3 x2 = 70
4 x1 2 x2 = 56
5

70
Original augmented matrix.
2 56

0.6 14

2 56

0
1

0.6 14

0. 4 0
0.6 14

1
0

r1 5

4 * r1 + r2
r2 4

0 14
1
0.6r2 + r1

0
1
0

Let's look at the scalar version of this equation, ax = b ; to help us


find a general method for matrices. We know that x = a 1b if

Chapter Two

55

A 0 because a 1 = 1 / a where a 1 is called the multiplicative


inverse or the reciprocal. There is something analogous to this with
matrices. It is also called the inverse. With scalars, a 1a = aa 1 = 1.
Definition 9 The matrix A1 (called A inverse) is the inverse of a
square matrix A if A 1 A = AA1 = I where I is the identity matrix.
Once we find A1; Ax = b can be solved by matrix multiplication
rather than Gauss Jordan elimination. We follow the algebraic steps
below to find an expression for x:

Ax = b

A1 Ax = A1 b

I * x = A1 b

This means that if we find A1 ; we only need to multiply to solve


systems with the same matrix A for different b vectors. Please
remember that A1b b A1 , so you must multiply in the correct
order.
Remark 2 In computational mathematics, the inverse is very
seldom found because other methods exist that serve the same
purpose and require fewer steps. However, the inverse will serve
our needs at this level and is important in the theory of matrices.
Example 7 Using the Gauss Jordan elimination method, let's find

A1

0 2 4
where A 4 2 3

1 3 6

Solution:

56 Matrices

0 2 4 1 0 0

4
2
3
0
1
0

Original augmented matrix.


1 3 6 0 0 1

Switch r1 and r3 because we cannot have a zero on the main


diagonal, and we would prefer 1 rather 4.

0
0
1

0
0
1

0
0
1

0
0

3
6 0 0 1

10 21 0 1 4 4r1 + r2
2
4 1 0 0
3 6 0
0
1

1 2.1 0 0.1 0.4 r2 / ( 10 )


2 4 1
0
0
1

1 2.1 0 0.1 0.4 2r2 + r3


0 0.2 1 0.2 0.8
3

0
1

0.1 0.4 r3 / ( 0.2 )


1 5 1
4

3 6 0
1 2.1 0
0

Chapter 3
Calculus
3.1 Limits
The concept of limits is essential to calculus. A good understanding
of limits will help explain many theories in calculus. So, it is
recommended to start studying calculus from limits.
Consider a function f defined for values of x, as x gets close to a
number a, not necessarily true for x = a . If the value of f ( x )
approaches a number b as x approaches a, then the limit of f ( x ) as
x approaches a is equal to b, denoted as :

lim f ( x) = b

(1)

xa

Example 1 Find the limit of f ( x) = 5 x + 2 as x approaches 3.


Solution: It is clear that as x approaches 3, 5x approaches 15, and

5 x + 2 approaches 17. Thus; lim 5 x + 2 = 17


x 3

Example 2 Find the limits of f ( x) =

1
as x approaches 5.
2 x 10

Solution: It is clear as x approach 5, 2 x 10 approaches zero the

1
1
approaches which is undefined. Thus;
2 x 10
0
1
= (undefiend )
x 5 2 x 10
lim

Chapter Three

75

This limit lim f ( x) = f ( x) represents a horizontal line, which


xa

says that as x approaches a, and f ( x) = f ( x) or c = c where c is a


constant. Then, lim f ( x) = c
xa

Then, as x approaches a, f ( x ) also approaches c.


Limits can be approached from the negative ( or left ) or the
positive ( or right ) side of a number denoted as:

lim f ( x) = b or lim f ( x) = b

xa

xa +

If lim f ( x) lim f ( x ) Then,


xa

xa +

lim f ( x) = does not exist

xa

lim f ( x) = lim f ( x) = b

xa

xa +

lim f ( x) = b

xa

If the value of f ( x ) gets larger and larger without bound as x


approaches a, then: lim f ( x) =
xa

Similarly; If the value of f ( x ) gets smaller and smaller without


bound as x approaches a, then: lim f ( x) =
xa

Consider a function f defined for large positive ( or negative )


values of x, as x increases indefinitely in the positive ( or negative )
direction. If the value of f ( x ) approaches a number b as x increases

76 Calculus

(or decreases ) indefinitely, then the limit of f ( x ) as x increases (or


decreases ) indefinitely is equal to b, denoted as :

lim

x +

f ( x) = b

or

lim

f ( x) = b

A function f ( x ) is continuous at x = a if f is defined at x = a and


either; f is not defined anywhere near a, or f is defined arbitrarily
near x = a and, lim f ( x) = f ( x)
xa

Conversely, A function f ( x ) is discontinuous at x = a if f ( x ) is


defined at x = a and f ( x ) is not continuous at x = a .
3.2 Derivatives
Suppose y = f (x) is shown in Fig.1, the slope of the curve is the
slope of the secant line between point A and another point P on the
graph is shown in the following equation:

m AP =

( f (x + h ) f (x )) = ( f (x + h ) f (x ))
(x + h ) x
h

Notice that h can change and with it the location of point P,


therefore h is the limiting factor of the slope of the curve. As h gets
close to point A, the slope of the curve becomes the tangent of the
graph at point A.
The tangent line of f at point A is: lim

( f (x + h ) f (x ))

h 0

So,

the Differentiation
( f (x + h ) f (x ))
lim
h
h 0

of

function

h
f

at

is:

Chapter Three

77
If this limit exists, then it is called the derivative of function f

at x, which is denoted by f ( x) or
So, f ( x) or

dy
= lim
dx h 0

dy
.
dx

( f (x + h ) f (x ))
h

Fig.1 The Approximate slope of the curve at point A.

Fig.2 The slope of the curve at point A.


So, general rules of differentiation are shown in the appendix of this
book before going in the following example you have to take a look
to the rules of differentiation in the appendix.
Example 3 Find from the first principles

d tan ( x )
e
dx

78 Calculus
Solution: Put u = tan ( x ) y = eu
But from chain rule,

dy
du
= eu and
= sec 2 x
du
dx

dy dy dy
=
. ,
dx du dx

d tan ( x )
e
= e tan ( x ) * sec 2 x
dx

Example 4 Find

d 3 2
x

dx

Solution:
2

d 3 2
2 3 1
2 3
= x
x = x

3
3
dx
Example 5 Find

d 3
dx x 2 1

Solution:
1
3

3
d 3 d
2
2
=
3 * x 1 2 = * x 1 2 * 2x

2
2
dx x 1 dx

3x
3x * x 2 1
d 3

=
=
2
dx x 2 1 x 2 1 x 2 1
x2 1

Example 6
Solution:

Find

d
(5 x + 7 )4
dx

d
(5 x + 7 )4 = 4(5 x + 7)3 * 5 = 20(5 x + 7 )3
dx

Chapter Three

79

Example 7 Find
Solution:

d
(sin (5 x + 6)) = 5 cos(5 x + 6)
dx

Example 8 Find
Solution:

( ( ))

d
cos x 2
dx

( ( ))

( )

d
(ln(3 4 cos x ))
dx

d
1
4 sin x
(ln(3 4 cos x )) =
* (4 sin x ) =
dx
3 4 cos x
3 4 cos x

Example 10 Find
Solution:

( )

d
cos x 2 = sin x 2 * 2 x = 2 x * sin x 2
dx

Example 9 Find
Solution:

d
(sin (5 x + 6))
dx

d
(log10 (2 x 1))
dx

d
1
2
(log10 (2 x 1)) =
*2 =
(2 x 1) ln(10)
(2 x 1) ln(10)
dx

Example 11 Find

d 5x
e * ln (2 x 1)
dx

Solution: Assume y = e5 x * ln (2 x 1) , u = e5 x and v = ln (2 x 1)

y = uv ,

dy
dv
du
=u +v
dx
dx
dx

1
dy
= e5 x
* 2 + ln (2 x 1) * 5 e5 x
(2 x 1)
dx

dy
2e 5 x
=
+ 5 e5 x ln (2 x 1)
dx (2 x 1)

80 Calculus
Example 12 Find

d
3 x 5 ln(sin x )
dx

Solution: Assume y = 3 x 5 ln (sin x ) , u = 3 x 5 and v = ln (sin x )

y = uv ,

dy
dv
du
=u +v
dx
dx
dx

d
1
* cos x + ln (sin x ) * 3 * 5 x 4
3x 5 ln (sin x ) = 3x 5
dx
sin x

d
3x 5 ln (sin x ) = 3 x 5 cot x + 15 x 4 * ln (sin x )
dx

d e 2 x
Example 13 Find
dx ln (3x )
e2x
, u = e 2 x and v = ln(3 x )
Solution: Assume y =
ln (3x )
dv
du
u
v
dy
= dx 2 dx
dx
v
3
2x
e2x *
2 x ln (3 x ) * 2e

d e
3x
=

2

dx ln (3 x )
(ln(3x ))
1
e 2 x (2 ln ( x ) + 2 ln (3) )
e 2 x (2 x ln ( x ) + 2 x ln (3) 1)
x
=
=
2
(ln(3x ))
x(ln (3 x ))2
d x 2 sinh( 2 x)
Example 14 Find
dx cosh (3 x )

Chapter Three

81

x 2 sinh( 2 x)
Solution: Assume y =
, u = x 2 , v = sinh (2 x ) ,
cosh (3 x )
and w = cosh (3x )
d uv uv 1 du 1 dv 1 dw
Where
+

=
.
dx w w u dx v dx w dx
d x 2 sinh( 2 x) x 2 sinh( 2 x) 1
1

=
* 2 * 2x +
* 2 cosh (2 x )
dx cosh (3 x )
cosh (3 x ) x
sinh (2 x )

1
* 3 sinh (3 x )
cosh (3 x )

d x 2 sinh(2 x) x 2 sinh(2 x) 2 2 cosh(2 x ) 3 sinh (3x )


=

* +

dx cosh(3 x )
cosh(3 x ) x sinh (2 x )
cosh(3 x )

d x 2 sinh(2 x) x 2 sinh(2 x) 2 2 cosh (2 x ) 3 sinh (3x )


* +

dx cosh (3 x )
cosh (3x ) x
sinh (2 x )
cosh (3x )
d x 2 sinh( 2 x) 2 x sinh(2 x) x 2 2 cosh (2 x )
=
+

dx cosh (3x )
cosh (3x )
cosh (3x )
3x 2 sinh(2 x) tanh (3x )

cosh (3x )
Example 15 Find

d 5
x sin 2 x cos 4 x
dx

Solution:
Assume y = uvw = x 5 sin 2 x cos 4 x , where u = x 5 , v = sin 2 x , and

w = cos 4 x
Take the logarithm for both sides we get:

82 Calculus

) ( )

ln ( y ) = ln x 5 sin 2 x cos 4 x = ln x 5 + ln ( sin 2 x ) + ln ( cos 4 x )


By differentiating both sides of the above equation we get:

1 dy 1
1
1
( 4 sin 4 x )
2 cos(2 x ) +
= 5 5x 4 +
( cos 4 x )
sin 2 x
y dx x
1 dy 5

= + 2 cot 2 x 4 tan 4 x
y dx x
dy

5
= x 5 sin 2 x cos 4 x * + 2 cot 2 x 4 tan 4 x
dx

Example 16 Find

d
(1 + tan 2 x )3
dx

d
(1 + tan 2 x )3 = 3(1 + tan 2 x )2 * d (1 + tan 2 x )
dx
dx
d
d

(1 + tan 2 x )3 = 3(1 + tan 2 x )2 * 0 + sec 2 (2 x ) (2 x )


dx
dx

d
(1 + tan 2 x )3 = 3(1 + tan 2 x )2 * 2 * sec 2 (2 x )
dx
d
(1 + tan 2 x )3 = 6 sec 2 (2 x ) * (1 + tan 2 x )2
dx
d
2 x
1

cot
Example 17 Find

dx
3
Solution:

Solution:
1
1
2 x 2

d
2 x 1

1
cot
= 1 cot
dx
3 2
3

d
x
1 cot 2
dx
3

Chapter Three

d
2 x

1
cot
=
dx
3

83

x d x
0 2 cot * cot
3 dx 3

x
2 1 cot 2
3

d
dx

x 1
x
2 cot * csc 2
x
3 3
3
1 cot 2 =
3

x
2 1 cot 2
3

d
dx

x
x
cot * csc 2
x
3
3
1 cot 2 =
3

x
3 * 1 cot 2
3

3.2.1 Implicit differentiation


So far, all the functions being differentiated are explicit functions,
meaning that one of the variables was specifically given in terms of
the other variable.

f ( x) = 5 x + 2, then f ( x) = 5
However, not all functions are given explicitly and are only
implied by an equation.
Example 18 xy = 1 is an equation given implicitly, explicitly it is

y = 1 / x . Now to find dy / dx for xy = 1, simply solve for y and


differentiate.

84 Calculus
Solution: y =

1
= x 1
x

y = x 2 =

1
x2

But, not all equations are easily solved for y, as in the equation

2 y + xy 3 = 6 xy + y 2
This is where implicit differentiation is applied. Implicit
differentiation is taking the derivative of both sides of the equation
with respect to one of the variables. Most commonly, used is the
derivative of y with respect to x. or dy / dx . Since we have not
solved for y as a function of x, the derivative of y must be left as

dy / dx .
Example 19 Find the slope of 3 x + y 3 = y 2 + 4 at point (1,3)
Solution:

3 + 3y2

dy
dy
= 2y
dx
dx

y (2 3 y )

d
d 2
3x + y 3 =
y +4
dx
dx
2y

)
dy
dy
3y2
=3
dx
dx

dy
=3
dx

dy
3
=
dx y (2 3 y )

Then the slope of the curve at point (1,3) is

dy
3
3
1
=
=
=
dx (1,3) y (2 3 y ) (1,3) 3(2 3 * 3)
7

Chapter Three

85

3.3 Integration
3.3.1 Introduction
You are now familiar with differentiation principles and have had a
lot of examples about the differentiation in the previous sections.
Now we are going to do the same work with integration.
Integration is the reverse of differentiation. In differentiation we
start with a function and proceed to find its differential coefficient.
In integration, we start with the differential coefficient and have to
work back to find the function from which it has been derived. The
following example clearify the meaning of Integration.

d 5
x + 4 = 5x 4
dx
Therefore it is true, in this case, to say that the integral of 5x 4 , with
respect to x, is the function from which it came,
So,

5 x 4 dx = x 5 + c

Where c is constant and always called the constant of integration.


This constant is very important to be included in the result of
integration. If you don t put the constant of integration the results is
not genuine.

dy
= f ( x ) , then y is the function whose derivative is f ( x )
dx
and is called the anti-derivative of f ( x ) or the indefinite integral of
So, if

f ( x ) , denoted by

f (x )dx .

Similarly, if y = f (u )du , then

86 Calculus

dy
= f (u ) . Since the derivative of a constant is zero, all indefinite
du
integrals differ by an arbitrary constant.
There is some important integration rules are shown in the
Appendix of this book.
3.3.2 Definite Integrals
Let f ( x ) be defined in an interval a x b . Divide the interval
into n equal parts of length x = (b a ) / n . Then the definite
integral of f ( x ) between x = a and x = b is defined as:
b
[ f (a )x + f (a + x )x + f (a + 2x )x + ..... + f (a + (n 1)x )x]
a f (x )dx = nlim

f (xi ) x

= lim

n i =1

If f ( x ) =

d
g ( x ) . Then by the fundamental theorem of the integral
dx

calculus the above definite integral can be evaluated by using the


result.
b

d
b
(
g ( x ))dx = g ( x ) a = g (b ) g (a )
a dx

f ( x )dx =

Properties of definite integration:


b

a f (x )dx = b f (x )dx
b
b
(
)
kf
x
dx
=
k
a
a f (x )dx
b
b
b
a [ f (x ) g (x )]dx = a f (x )dx a g (x )dx
b
c
b
(
)
(
)
f
x
dx
=
f
x
dx
+
a
a
c f ( x ) dx where a < c < b

Chapter Three

87

3.3.3 Methods of Integrations:


1- Substitution
Sometimes it s not easy to solve some integrals without using
intermediate function and we can integrate with respect to this
function and then we can substitute to get the results in terms of x.
Example 20 Find the results of:

)2

2 x x 2 + 3 dx

Solution: Substitute u = x 2 + 3 and take its derivative with


respect to du = 2 xdx substitute for the values of u and du in the
above integral we get:

u3
u du =
+c
3
2

Once the solution has been found in terms of u, substitute back into
terms of x, the final solution is:
3
2
(
)
3
x
+
2
+c
2 x(x + 3) dx =
2

Example21 Find the results of the following integral:

x x 1 dx = u 2 + 1 . u . 2udu

x x 1 dx

x 1 , then u 2 = x 1 and x = u 2 + 1

Solution: Substitute u =
So, 2udu = dx

= x x 1. dx = u 2 + 1 2u 2 du = 2u 4 + 2u 2 du

2
2u 5 2u 3
=
+
+ c = u 3 3u 2 + 5 + c
5
3
15
Substitute in the above equation for u =

x 1,

88 Calculus

) (

x x 1 dx =

2
15

x x 1 dx =

2
(x 1)3 / 2 (3(x 1) + 5) + c
15

x x 1 dx =

3
2
x 1 3 x 1 + 5 + c

2
(x 1)3 / 2 (3x + 2) + c
15

2- Substitution Involving Trigonometric Integrals


Example 22 Find the results of the following:

sin 2 x cos x dx

Solution: Assume u = sin x then du = cos x dx substitute in the


above integral, we get:

sin x cos x dx =

u3
u du =
+c
3
2

Substitute in the above equation for u = sin x we get:

sin 3 x
sin x cos x dx =
+c
3
2

In the following table there is the suitable trigonometric


substitution for different forms of integrals.
Terms involving in the integral

Substitution

1-

a2 u2

u = a sin

2-

a2 + u2

u = a sinh

3-

u2 a2

u = a cosh

Chapter Three

89

Example 23 Find the results of the following integral:

4 x 2 dx
Solution: Assume x = 2 sin then dx = 2 cos d .
It is clear that sin =

that cos =

x
then from the following figure, it is clear
2

4 x2
,
2

Substitute in the above integral, we get:

4 x 2 dx =

But cos 2 = 1 sin 2 then,

4 x2

4 x 2 dx = 4 cos 2 d

1
(1 + cos 2 )
2

sin 2

4 x 2 dx = 2 +
+c
2

But sin 2 = 2 sin cos

4 x 2 dx = 2( + sin cos ) + c

As we know from our assumption that:


= sin

= 4 1 sin 2 * cos d

But cos 2 =

4 4 sin 2 * 2 cos d

x
x
, sin = , and cos =
2
2

4 x2
2

90 Calculus

4 x2
1 x x

4 x dx = 2 sin + *

2
2 2

1 x x 4 x

4 x dx = 2 sin +

4
2

+c

+c

x 4 x2
+c
4 x dx = 2 sin +
2
2
2

1 x

Example 24 Find the results of the following integral:

x 2 + 4 dx

Solution: Assume x = 2 sinh then dx = 2 cosh d substitute


in the above integral, we get:

x 2 + 4 dx =

But cosh 2 =

4 sinh 2 + 4 2 cosh d

1
(1 + cosh 2 )
2

x 2 + 4 dx = 4

1
(1 + cosh 2 ) d = 2 + sinh 2 + c
2
2

But sinh 2 = 2 sinh * cosh . Substitute in the above equation,


we get:

x 2 + 4 dx = 2[ + sinh cosh ] + c

But cosh 2 = 1 + sinh 2 , Then, cosh = 1 + sinh 2


Substitute that in the above equation we get:

Chapter Three

91

x 2 + 4 dx = 2 + sinh 1 + sinh 2 + c

x
x
x

1
x + 4 dx = 2 sinh + 1 + + c

2 2
2

Example 25 Find the results of the following integral:

x 2 4 dx

Solution: Assume x = 2 cosh then dx = sinh d substitute in


the above integral, we get:

x 2 4 dx =

4 cosh 2 4 2 sinh d

x 2 4 dx = 4

cosh 2 1 2 sinh d

But cosh 2 1 = sinh 2

x 2 4 dx = 4 sinh 2 d

But sinh 2 =

1
(cosh 2 1) ,
2

x 2 4 dx = 2 (cosh 2 1) d

But sinh 2 = 2 sinh cosh ,

x 2 4 dx = 2[sinh cosh ] + c

But we know that sinh 2 = cosh 2 1, sinh = cosh 2 1

92 Calculus
Substitute in the above equation we get:

cosh 2 1 * cosh + c

x 2 4 dx = 2

But cosh =

x
,
2

x 4 dx = 2

x x2 4

1 x
+c
x 4 dx =
2 cosh
2
2

x2
x
1 x
+c
1 * cosh
4
2
2

3- Integration By Parts
If u and v are functions of x. Then we know that:

d
(uv ) = u dv + v du
dx
dx
dx
Now integrate both sides with respect to x. On the left, we get back
to the function from which we started

d
(uv )dx = u dv dx + v du dx
dx
dx
dx

uv = u

dv
du
dx + v dx
dx
dx

And rearranging the terms, we have

dv
du
dx = uv v dx
dx
dx

Chapter Three

93
On the left-hand side, we have a product of two factors to
integrate. One factor is chosen as the function u; the other is thought
of as being the differential coefficient of some function v. To find v,
of course, we must integrate this particular factor separately. Then,
knowing u and v we can substitute in the right-hand side and so
complete the routine.
You will notice that we finish up with another product to integrate
on the end of the line, but, unless we are very unfortunate, this
product will be easier to tackle than the original one.
This is the key to the routine:

dv
du
dx = uv v dx or
dx
dx

u dv = u v v du

This method is called integration by parts.


Example 26 Find the results of the following integral:

x cos x dx

Solution :
Assume u = x

dv = cos x

du = dx and
From this formula

v = sin x

u dv = u v v du , we get:

x cos x dx = x sin x sin x dx = x sin x ( cos x ) + c

x cos x dx == x sin x + cos x + c

94 Calculus
Example 27 Find the results of the following integral
Solution:
Assume
Then,

u=x

dv = ln x

du = dx and

v = x ln x x

From this formula

u dv = u v v du we get:

x ln x dx = x 2 ln x x 2 ( x ln x x )dx

x2
+c
2 * x ln x dx = x 2 ln x x 2 +
2
x2
+c
2 * x ln x dx = x ln x
2
2

x 2 ln x x 2
x ln x dx =

+c
2
4

Example 28 Find the results of: I = x 2 sin x dx


Solution:
Assume

u = x2

dv = sin x dx

Then,

du = 2 xdx and

v = cos x

From this formula

u dv = u v v du we get:

I = x 2 sin x dx = x 2 cos x + 2 x cos xdx


Assume u = x

dv = cos xdx

x ln x dx

Chapter Three

95

du = dx and,
From this formula

v = sin x
u dv = u v v du we get:

I = x 2 sin x dx = x 2 cos x + 2 x sin x 2 sin x dx


I = x 2 sin x dx = x 2 cos x + 2 x sin x + 2 cos x + c
Sometimes, when integrating by pacts, an integral comes up that is
similar to the original one, if that is the case, then this expression
can be combined with the original

Example 29 Find the results of the following: I = e x sin x dx


Solution:
Assume

u = ex

dv = sin x dx

du = e x dx and
From this formula

v = cos x

u dv = u v v du we get:

I = e x sin x dx = e x sin x + e x cos x dx + c


Assume u = e x

dv = cos x dx

du = e x dx and
From this formula

v = sin x

u dv = u v v du we get:

96 Calculus

I = e x sin x dx = e x sin x + e x sin x e x sin x dx + c


142
4 43
4
I

Add

e x sin x dx = I to the both sides. Then,

2 I = 2 e x sin x dx = e x sin x + e x sin x + c


I = e x sin x dx =

1
e x sin x + e x sin x + c
2

Example 30 Find the results of the following: I = e5 x cos 3 x dx

u = e5 x

Solution: Assume

dv = cos 3 x dx

du = 5e5 x dx and
From this formula

v=

sin 3x
3

u dv = u v v du we get:

e 5 x sin 3 x 5
I = e cos 3 x dx =
e 5 x sin 3 x dx
3
3
u = e5 x
dv = sin 3 x dx
5x

du = 5e5 x dx and
From this formula

I=

e 5 x cos 3 x dx =

v=

cos 3x
3

u dv = u v v du we get:

e 5 x sin 3 x 5 e 5 x cos 3 x 5
*
+ e 5 x cos 3 x dx

3
3
3
3

Chapter Three

I= e

5x

97
2

e5 x sin 3 x 5 5 x
5
cos 3 x dx =
+ e cos 3 x e5 x cos 3 x dx
3
9
3 1442443
I

e
25
25
5x
1 + * I = 1 + * e cos 3 x dx =
9
9

5x

sin 3x 5 5 x
+ e cos 3x
3
9

e 5 x sin 3 x 5 5 x
34
34
5x
* I = * e cos 3 x dx =
+ e cos 3 x
3
9
9
9

I = e

5x

5x

9 e sin 3 x 5 5 x
cos 3 x dx =
+ e cos 3 x + c

3
9
34

1
I = e 5 x cos 3 x dx = 3e 5 x sin 3 x + 5e 5 x cos 3 x + c
34
1
I = e 5 x cos 3 x dx = 3e 5 x sin 3 x + 5e 5 x cos 3 x + c
34
3 sin 3 x + 5 cos 3 x
I = e 5 x cos 3 x dx = e 5 x
+c
34

4- Integration By Partial Fractions


In case we have integration like this one

7 x + 12
dx we can use
x( x + 2 )

the method of partial fraction to break it to be like that

3
4
+
dx . So that it is easy to integrate it. So,
(
)
x
x
+
2

3
4
+
dx = 3 ln x + 4 ln( x + 2) + c
x (x + 2)

98 Calculus
The method, of course, hinges on one's being able to express the
given function in terms of its partial fractions. The rules of partial
fractions are as follows:
(i) The numerator of the given function must be of lower degree
than that of the denominator. If it is not, then first of all divide out
by long division.
(ii) Factorize the denominator into its prime factors. This is
important, since the factors obtained determine the shape of the
partial fractions.
(iii) A linear factor (ax + b ) gives a partial fraction of the form

A
ax + b
A
B
+
ax + b (ax + b )2

(iv) Factors (ax + b )2 gives partial fractions


(v)

Factors

(ax + b )3

give

partial

fractions

A
B
C
+
+
ax + b (ax + b )2 (ax + b )3
(iv) a quadratic factor

(ax 2 + bx + c)

gives partial fractions

Ax + B
ax 2 + bx + c
Example 31 Find the results of the following:

dx
(x + 1)(x + 3)

Chapter Three

99

Solution : Breaking into partial fractions we get:

A
B
+
(x + 1) (x + 3)

(x + 1)(x + 3)
Multiply ( x + 1)( x + 3) to both sides of the equation, Then:
1 = A( x + 3) + B( x + 1) = Ax + 3 A + Bx + b
1 = Ax + Bx + 3 A + b

1 = ( A + B )x + 3 A + B
The coefficients on both sides of the equation must be the same that
is that the coefficient of x on the left side of the equation must equal
the coefficient of x on the right side of the equation.

A + B = 0 and 3 A + B = 1
Solving the above equations for A and B,

1
A= ,
2

and B =

1
2

So the integral is equal to:

( 1 / 2)
dx
1/ 2
(x + 1)(x + 3) = (x + 1) + (x + 3) dx

dx
1
1
1

dx
dx
=
(x + 1)(x + 3) 2 (x + 1)
( x + 3)

dx
1
= (ln( x + 1) ln( x + 3)) + c
(x + 1)(x + 3) 2

100Calculus
Problems:
1- Find the slope of the tangent line to the following function at
(a) y = 3 x + 4 , at x = 2 (b) y =

x + 1 at x = 1

2- Find

dy
for the following functions:
dx

a)

y = (1 + tan 2 x ) 3

(b) y = sin 1 x

Find the following integrals

(a)

x3 + 2 x 2 x
dx
3 x

(c)

x 2 sin xdx

(d)

x 2 e5 x dx

(e)

e3 x sin 2 x dx

(f)

e3 x ln (5 x )dx

(g)

sin 2 x cos 3x dx

(h)

x sin 2 x dx

(i)

ln(sin 2 x ) dx

(j)

e 2 sin 5 x dx

+ sin x dx
3 cos x

(b)

Chapter 4
Ordinary Differential Equations
4.1 Definition:
Differential equation is an equation, which contains at least one
derivatives or differential of unknown function.
Many important and significant problems in the physical science
when formulated in mathematical terms require the determination of
a function satisfying a differential equation containing derivatives of
unknown function. This function can be obtained by solving the
differential equation. The following are examples of different
differential equations:

dy
= sin x
dx
d2y
+ ky = cos x
dx 2
x 3 y 7 x 2 y + 24 x y 36 y = 0
2

( y 2 e x y + 4 x 3 )dx + (2 xy e x y 3 y 2 )dy = 0

2 y

(1)
(2)
(3)
(4)

2 y

2 y
(5)
+
=
x 2 t 2 tx
Variables that denote values of a function are often called dependant
variables. The one may take on any value in the domain of the
function which the dependant variables stand for is called
independent variables. Thus in (1) and (2) y is the dependant
variable. In (3) and (4) either x or y can be the dependant variable,
the other variable then being independent.

102 Ordinary Differential Equations


4.2 Classifications Of Differential Equations
The differential equations can be classified according to its type,
order and linearity as following:
4.2.1 Classification By Type
The differential equation contains only ordinary derivatives of one
or more dependant variables, with respect to a single independent
variable; it is called ordinary differential equation. For example (1),
(2), (3) and (4) are ordinary differential equation. But, the
differential equation contains partial derivatives of one or more
dependent variables is called partial differential equation. Equation
(5) is an example of partial differential equation:
4.2.2 Classification By Order
The order of the highest derivatives in a differential equation is
called the order of differential equation. It is clear that (1) and (4)
are first order differential equation, (2) and (5) are second order and
(3) is third order differential equation.
4.2.3 Classification By Linearity
A differential equations is said to be linear if it has the following
form:

f n (x)

dny
n

dx

+ f n1(x)

d n1y
n1

dx

+ .................f1(x)

d1 y
1

dx

+ f0 (x)

d0y
0

dx

= g(x) (6)

The linear differential equations are characterized by two properties:

Chapter Four

103
- The dependant variable y and all off its derivatives are of the
first degree.
- Each coefficient depends on only the independent variable x.

The differential equations not in the previous form are called


nonlinear differential equations.
According to the above two properties (1), (2) and (3) are linear
differential equation but (4) and (5) are nonlinear.
4.3 Solution Of Differential Equation
A solution of differential equations is functions which satisfy the
differential equation. Whereas all variables which appear in
algebraic or transcendental equation are called (unknowns). The
solution of differential equation can be obtained by different
methods which will be detailed in the following items:
4.3.1 Graphical Solution Of Differential Equations
At each point in xy plane where f ( x, y ) is dependant, the following
differential equation y = f ( x, y ) provides a value of y , which can
be thought of as the slope of linear segment through that point. The
totality of all such line segments form the direction field for the
given differential equations. The integral curves which, at every
point are tangent to the element of the direction field associated with
the point.

104 Ordinary Differential Equations


The general shape of the integral curves can sometimes be
visualized by drawing the elements of the direction field at a
sufficiently large number of points.
The task of constructing the direction field for a given differential
equation y = f ( x, y ) is usually carried out in the following
manner:
Note that the direction field has the same slope C at all points on
the curve f ( x, y ) = C , where C is constant. The family of curves

f ( x, y ) = C , for all possible values of C, are the level curves of


f ( x, y ) , in the present context are known as the isoclines of the
differential equation y = f ( x, y ) .
Example 1 Solve the following differential equations graphically:

y = xy
Solution: For the linear differential equation y = xy , the
isoclines are shown in Fig.1. The direction field is constructed by
drawing line segments having the appropriate slope at a number of
points on each isocline. Thus on the curve y = 1 / x , corresponding
to C = 1 , the line segments are drawn with slope one each point.
The process can be continued until the direction field is sufficiently
well exhibited. Drawing curves tangent to the direction field at each
point can show the general behavior of the integral curves. The
process is applicable in the same manner in the general equation

y = f ( x, y ) .

Chapter Four

C=4
C=3
C=2
C=1
C=1
C =2
C=3
C=4

105

C=4
C=3
C =2
C=1
C=1
C=2
C=3

C=4

Fig.1 The isoclines and direction field of y = xy .


4.3.2 Separable Differential Equations
The differential equation that can be reduced to be as shown in (7) is
called separable differential equation. Sometimes, this equation can
be called equation with separable variables.

dy L( x)
or
(7)
=
L( x)dx = g ( y ) dy
dx g ( y )
If y = f (x) is a solution of the equation, then by integrating both
sides of (7) we obtain: L( x)dx = g ( y ) dy
By evaluating the above integral we get the general solution of (7).

106 Ordinary Differential Equations


Example 2 Solve the following differential equation:

xdx + 2 y dy = 0
Solution: By integrating both sides directly we get:

xdx + 2 y dy = c1
x2
+ y 2 = c1 or x 2 + 2 y 2 = c
2
Where c = 2c1 and c, and c1 are constants.
Example 3 Solve the following differential equation:

xydx + (2 xy 2 + 4 y 2 x 2)dy = 0
Solution: The above differential equation can be reduced to be as
following: xydx + (2 y 2 1)( x + 2)dy = 0
Dividing the above equation by y ( x + 2) we get:

(2 y 2 1)
x
2
1
dx + 2 y dy = 0
dx +
dy = 0 Or 1
( x + 2)
y
y
( x + 2)

Integrating both sides we have:

2
1
1
2

dx
+

dy = C
( x + 2)
y

x Ln( x + 2) 2 + y 2 Ln y = LnC

x + y 2 = Ln cy ( x + 2) 2 Or

e x + y = cy ( x + 2) 2

Example 4 Solve the following differential equation:

4 xy 2 dx + ( x 2 + 1)dy = 0
Solution: First, divide throughout by y 2 ( x 2 + 1) .

Chapter Four

4x
( x 2 + 1)

dx +

107

dy
y2

=0

Now the solution can be obtained by integrating each term


separately, it is as the following:

2 Ln( x 2 + 1)

1
=C
y

Example 5 Solve the following differential equation:

dy
= 1 + x + y 2 + xy 2
dx
Solution:
dy
dy
= (1 + x ) + y 2 (1 + x ) = (1 + x )(1 + y 2 )
dx
dx
By separating variables we get the following:

dy

= (1 + x ) dx
(1 + y 2 )
By integrating both sides of the above equation we can get the
x2
1
+c
following: tan y = x +
2
2

1 x
y = tan
+ x + c

Example 6 Solve the following differential equation:

(x ln(x ))dy ydx = 0


Solution: By separating the variables and take logarithm of both
sides we can get the following equation:

108 Ordinary Differential Equations

dy
dx
=
y
x ln x

or

dy
1 / x dx
=
y
ln x

ln y = ln (ln x ) + ln c or ln y = ln(c ln x )
By taking the exponential of both sides we can get the following
form: y = c ln ( x )
Example 7 Solve the following differential equation:

x dx y e x dy = 0 where, y (0) = 1
Solution: x dx y e x dy = 0 can be changed to be in the
following form: x dx = y e x dy
By integrating both sides we get the following:

ydy = xe x dx + c

y2

= xe x e x + c y 2 = 2 e x xe x + c1
2
But y (0 ) = 1 , then by substituting in the above equation we can get
2
c1 = = 1
the value of c1 , 1 = 2(1 0 ) + c1
2
y 2 = 2 e x xe x 1 y = 2 e x xe x 1
4.3.3 Equation Reducible To Separable Form
In the case of the differential equations not separable but it can be
made separable by a simple change of variable, the following
procedures can be used to solve this kind of differential equations:
Let the differential equation can be has the following form for
example:

Chapter Four

109

y
(8)
y = g
x
Where g is any given function of y / x .The form of the equation
suggests that we set:

y
=u
x
y = ux , by differentiation

(9)

y = u + u x
By substituting (10) into (8) we have:

(10)

u + u x = g (u )

(11)

Now we separate the variables u and x we get the following:

du
dx
(12)
=
g (u ) u
x
If we integrate (12) as we make with normal separable equation then
replace u by y / x , we get the general solution of (8)
Example 8 Solve the following differential equation:

(y xy 2 )dx (x + x 2 y )dy = 0

(13)

Solution: The above equation can be reduced to have the following


form: y (1 xy ) dx x(1 + x y ) dy = 0
Assume u = xy Then, y = u / x and y =

xu u

x2
Substitute the values of u , y, y in the differential equation (13) we
get:

u
xu u
(1 u ) x(1 + u )
=0
x
x2

110 Ordinary Differential Equations

2u xu (1 + u ) = 0
2

du
(1 + u ) = 2u
dx

(1 + u ) du + c
dx
=
1
x
u

2 Ln ( x ) = Ln (u ) + u + Ln (c)

x2
=u
Ln
uc

x 2 = xyce xy
x = yce xy
Example 9 Solve the following differential equation:

dy
= ( y 4 x )2
dx
Solution: - Assume u = y 4 x Then y = u + 4 x and

dy du
du
=
+ 4, + 4 = u2
dx
dx dx

du
u2 4

= dx + c1

1
u 2
u 2
4x
Ln
= x + Ln(c2 )
= ce
4
u + 2
u + 2
But, u = y 4 x

y 4x 2
= Ce 4 x
y + 4x + 2

Chapter Four

111

Example 10 Solve the following differential equation:

(x3 + y3 ) dx 3xy 2dy = 0

Solution: - Divide both sides by x 3


2
y 3
y

1 + dx 3 dy = 0
x
x

Assume u = y / x y = ux

dy du
=
x+u
dx dx

du

1 + u 3 3u 2 x + u = 0
dx

1 + u 3 3u 3 3u 2

du
x=0
dx

1 2u 3 3u 2

du
x=0
dx

1 2u 3 = 3u 2

du
x
dx

3u 2
1 2u

du =
3

dx
+ c1
x

1 2 * 3u 2
dx
=
+ c1
du

2 1 2u 3
x

1
ln 1 2u 3 = ln x + ln c = ln (cx )
2

ln 1 2u 3 = 2 ln (cx ) = ln (cx )2

112 Ordinary Differential Equations

1 2u 3 = (cx )2

u3 =

1
1 kx 2
2

Substitute in the above equation for u = y / x


3

1
y
= 1 kx 2
2
x
y3 =

1 3
x 1 kx 2
2

y=x

(1 kx 2 )
2

4.3.4 Exact Differential Equations:


If there is a differential equation in the form of (14) in which
separation of variables may not be possible. The following method
can be used to solve this kind of equations which is called exact
differential equation.

M ( x, y )dx + N ( x, y )dy = 0

(14)

Suppose that a function F ( x, y ) can be found which has its total


differential the expression M ( x, y )dx + N ( x, y )dy , that is:

dF = M ( x, y )dx + N ( x, y )dy = 0

(15)

Then certainly F ( x, y ) is the general solution of (14). For form (15)


it follows that dF = 0 , in view of (14) M ( x, y )dx + N ( x, y )dy = 0
as desired. Then,

F ( x, y ) = c where c is constant.

(16)

Chapter Four

113

Two things then are needed:


To find out under what conditions on M and N a function F
exists

such

that

its

total

differential

is

exactly

M ( x, y )dx + N ( x, y )dy = 0 ,
If these conditions are satisfied, actually to determine the
function F. If there exists a function F such that

M ( x, y )dx + N ( x, y )dy is exactly the total differential of F,


are call equation (14) an exact equation.
If equation (14) is exact, then by definition F exists such that:

dF = M ( x, y )dx + N ( x, y )dy = 0
But from calculus (chain rule) if F ( x, y ) is total differential, then,

dF =

F
F
dx +
dy
x
y

M =

F
x

and N =

F
y

By differentiating the first equation with respect to y and the second


one with respect to x, these two equations lead to:

M 2 F
N 2 F
=
=
and
y yx
x yx
M N

=
y x
Thus for (14) to be exact it is necessary that (17) be satisfied.

(17)

Let us now show that, if condition (17) is satisfied, then (14) is an


exact equation.

114 Ordinary Differential Equations


If (14) is exact, the function F ( x, y ) can be found by the
following way:

F = M ( x, y ) dx + k ( y )

(18)

In this integration, y is to be regarded as a constant, and k ( y ) plays


the role of constant of integration.
To determine k ( y ) we drive
where,

F
from (18), and equate it to N,
y

k
F
= N , Then we can get
, and integrate it with respect
y
y

to y to get k ( y ) .
In the same way we can make the above integration (18) with
respect to y to get k ( x ) as following:
If (14) is exact, the function F ( x, y ) can be found by the
following way: F ( x, y ) = N ( x, y ) dy + k ( x )

(19)

In the above integration, x is to be regarded as a constant and k ( x )


plays the rule of constant of integration.
To determine k ( x ) we drive
then we can get

F
from (19) and equate it to M,
x

k
and integrate it with respect to x to get k ( x ).
x

The following example has been solved by the two different


methods for students to be familiar with both of them.

Chapter Four

115

Example 11 Solve the following differential equation

3 x( xy 2)dx + ( x 3 + 2 y )dy = 0

(20)

Solution: M = 3 x( xy 2) and N = ( x 3 + 2 y )

M N
=
= 3x 2
y x

(21)

Then (20) is exact. Therefore, its solution is F = c , where,

F
= M = 3x( xy 2)
x
And

(22)

F
= N = ( x3 + 2 y)
y

(23)

Let us attempt to determine F from (22)

F = 3 x 2 y 6 x dx + k ( y )
F = x 3 y 3x 2 + k ( y )

(24)

In order to determine k ( y ) we use the fact that F of equation (24)


must also satisfy equation (14).

F
k ( y )
= x3 +
= x3 + 2 y
1
424
3
y
y
N

k ( y )
= 2y
y

k ( y ) = 2 y dy

k ( y) = y 2

F = x3 y 3x 2 + y 2 = c

116 Ordinary Differential Equations


Solving this example by using the other method:
Let us attempt to determine F from (23)

F = x 3 + 2 y dy + k ( x )
F = x3 y + y 2 + k (x )

(25)

In order to determine k ( x ) we use the fact that F of (25) must also


satisfy (14). Hence

F
k ( x )
= 3x 2 y +
= 3x 2 y 6 x
1424
3
x
x
M

k ( x )
= 6 x
x
k ( x ) = 3x 2 Substitute this value in (25) we get the following

result: F = x 3 y y 2 3 x 2 = c
It is clear that we get the same solution as we get in the above
solution.
Example12 Solve the following differential equation:
2

( y 2 e x y + 4 x 3 )dx + (2 xy e x y 3 y 2 )dy = 0
1442443
1442443
M
N
2
2
M N
Solution:
=
= 2 y e x y + 2 xy 3e x y
y x
Then according to the condition (17), the equation is exact.
2
F
= M = y 2 e x y + 4 x3
x
2
F
= N = 2 xy e x y 3 y 2
And
y

(26)

(27)
(28)

Chapter Four

117

2
F = y 2 e x y + 4 x 3 dx + k ( y )

F = e x y + x 4 + k ( y)

(29)

2
F
k ( y)
= N = 2 xy e x y +
y
y

Compare the above value with the value of N in (26) we get the
value of

k ( y)
.
y

k ( y)
= 3 y 2
y

k ( y) = y 3
2

F = e x y + x4 y3 = C
Example 13 Solve the following differential equation:

dy 4 2 x cos y 2 y 3 sec 2 2 x
=
dx
3 y 2 tan 2 x x 2 sin y

(30)

dy 4 2 x cos y 2 y 3 sec 2 2 x
=
Solution:
dx
3 y 2 tan 2 x x 2 sin y

4 2 x cos y 2 y 3 sec 2 2 x dx = 3 y 2 tan 2 x x 2 sin y dy (31)


14444244443
144424443
M

M
= 2 x sin y + 6 y 2 sec 2 2 x
y

(32)

N
= 6 y 2 sec 2 2 x 2 x sin y
x

(33)

118 Ordinary Differential Equations


It is clear that,

M N
=
y x

Then, the differential equation is exact. Integrate (33) with

respect to y. F = 3 y 2 tan 2 x x 2 sin y dy + k ( x)


144424443
N

F = y 3 tan 2 x + x 2 cos y + k ( x)
By differentiating the above equation with respect to x and then
equate it with M as in (31) we can obtain

k ( x)
. Then by
x

integration with respect to x we can obtain k ( x ) as follows:

k ( x)
F
= 2 y 3 sec 2 2 x + 2 x cos y +
= 4 2 x cos y 2 y 3 sec 2 2 x
14444244443
x
x

k ( x)
= 4,
x

k ( x) = 4 x

F = y 3 tan 2 x + x 2 cos y 4 x = constant


Example 14 Solve the following differential equation

y
1

3 yx 2 2 dx + x 3 + cos y + dy = 0
x

(34)

Solution:

y
1

M = 3 yx 2 2 and N = x 3 + cos y +
x

1
M N
= 3x 2 2
=
y x
x

(35)

Chapter Four

119

Then (34) is exact. Therefore, its solution is F = c where,

F
y

= M = 3 yx 2 2
x
x

And

(36)

F
1

= N = x 3 + cos y +
y
x

(37)

Let us attempt to determine F by integrating (36) with respect to x.

y
+ k ( y)
x
1 k ( y ) 3
1
F

= x3 + +
= x + cos y +
x
x
y
y
1442443
F = x3 y +

k ( y )
= cos y
y

k ( y ) = cos y dy

k ( y ) = sin y
F = x3 y +

y
+ sin y = C
x

Example 15 Solve the following differential equation:

(3e3x y 2 x)dx + e3x dy = 0


Solution: M = (3e3 x y 2 x ) and

(38)

N = e3 x

M N
=
= 3e3 x
y x

Then (38) is exact. Therefore, its solution is F = c where,

(39)

120 Ordinary Differential Equations

F
= M = 3e3 x y 2 x
x
And

(40)

F
= N = e3 x
y

(41)

Let us attempt to determine F by integrating (40) with respect to x.

F = 3e3 x y 2 x dx +k ( y ) = y e3 x x 2 + k ( y )

(42)

In order to determine k ( y ) we use the fact that F of equation (42)


must also satisfy N of equation (39).

F
dk
= e3 x +
= e3 x
y
dy
k ( y )

= 0 , k ( y ) = c1
y

F = y e3 x x 2 + c1 = C
F = y e3 x x 2 = c
Example 16 Solve the following differential equation:

sinh x cos y dx cosh x sin y dy = 0

(43)

Solution: M = sinh x cos y

(44)

and N = cosh x sin y

M N
=
= sinh x sin y
y x
Then (43) is exact. Therefore, its solution is F = c where,

F
= M = sinh x cos y
x
F
= N = cosh x sin y
And
y

(45)

(46)
(47)

Chapter Four

121

Let us attempt to determine F from (46)

F = cosh x cos y + k ( y )

(48)

In order to determine k ( y ) we use the fact that F of equation (48)


must also satisfy equation (44). Hence,

F
k ( y )
= cosh x sin y +
= cosh x sin y
14
4244
3
y
y
N

k ( y )
=0
y

k ( y ) = c1

F = cosh x cos y + c1 = C
F = cosh x cos y = c* Where c* = c c1
Example 17 Solve the following differential equation

(tan y sin x ) dx + x sec 2 y

dy = 0

Solution: M = (tan y sin x )

(49)

and N = x sec 2 y

M N
=
= sec 2 y
y x
Then the differential equation is exact. Therefore, its solution is
F
= M = (tan y sin x )
F = c where,
x
F
= N = x sec 2 y
And
y

F = (tan y sin x ) dx + k ( y ) = x tan y + cos x + k ( y )


In order to determine k ( y ) we use the fact that F of the above
equation must also satisfy equation (49). Hence,

122 Ordinary Differential Equations

F
k ( y )
= x sec 2 y + 0 +
= x sec 2 y
1
424
3
y
y

k ( y )
= 0 , k ( y ) = c1
y
F = x tan y + cos x + c1 = C

F = cosh x cos y = c* Where c* = c c1


4.3.5 Linear First Order Differential Equations
First order differential equations, which are linear form, an
important class of differential equations, which can always be
routinely solved by the use of special formula. By definition, a
linear, first-order differential equation cannot contain products,
powers, or other nonlinear combinations of y or y .
The standard form of the linear first order differential equations is:

dy
+ f ( x) y = r ( x)
(50)
dx
If r ( x) = 0 in (50) so it is called homogeneous, linear, first order
differential equation; otherwise it called non-homogeneous, linear,
first order differential equation.
For the homogeneous differential equation the solution is very
simple. By separating variables we have:

dy
= f ( x) dx
y

Ln( y ) = f ( x)dx + C *

y ( x) = Ce f ( x ) dx
*
Where, C = e c and c, and c * are constants.

(51)

Chapter Four

123
In case of non-homogeneous differential equation, using the
method of exact equation can solve it. Where the general solution
takes the following form:

y ( x ) = e h e h r dx + C Where h = f ( x) dx

(52)

Example 18 Solve the following differential equation:

x y + y x 4 = 0
Solution: The above differential equation can be written as:
y +

1
y = x 3 This equation in the form of (52)
x

f ( x) =

1
1
, r ( x) = x 3 and h = dx = Ln( x)
x
x

Substitute in (52) we get the following result.

y ( x) = e Ln ( x ) e Ln ( x ) x 3 dx + C

1
y ( x) =
x

x4 C
1 x5
x dx + C = x 5 + C = 5 + x

Example 19 Solve the following differential equation:

y 2 y = x 2 e5 x
Solution: This equation is linear first order differential equation
from (50). Then we can use the general solution (52) to solve it.

f ( x) = 2 , r ( x) = x 2 e5 x

[
[ x

and h = 2 dx = 2 x

y ( x) = e 2 x e 2 x x 2 e 5 x dx + C

y ( x) = e 2 x

e3 x dx + C

124 Ordinary Differential Equations

e5 x
y ( x) =
3

2
2 2
2x
x 3 x + 9 + C e

Example 20 Solve the following differential equation:

xy = y + ( x + 1)2
Solution: The above equation can be reduced to be as the following
form: y

(
1
x + 1)2
y=
x
x

This equation is linear first order differential equation. Then we


can use the general solution, (52) to solve it.

(
1
x + 1)2
1
1
f ( x) = , r ( x) =
And h = dx = ln x = ln
x
x
x
x
y ( x) =

1
ln
e x

1
ln
e x

(x + 1)2 dx + C
x

1 ( x + 1)2

y ( x) = x
dx + C
x
x

( x + 1)2
dx
C
y ( x) = x
+

x2

2 1
y ( x) = x 1 + + 2 dx + C
x x

y ( x) = x x + 2 ln x + C
x

y ( x) = x 2 + x ln x 2 1 + Cx

Chapter Four

125

4.4 Engineering Applications


4.4.1 Newtons Second Low Of Motion
The product of the mass and the acceleration equal to the external
force. In symbols,

F = ma

(53)

Where F is the external force, m is the mass of the body, and a is


its acceleration in the direction of F. Equation (53) can be put in the
following from:

F =m

dv
dt

(54)

Where v is the velocity of the body.


Example 21 Consider a vertically falling body of mass m that is
falling only by gravity g. The force due to gravity given by the
weight W of the body, which equal to mg. The force due to air
resistance is given by kv , where k > 0 is a constant. The minus
sign is required because this force opposes the velocity. Therefore,
the external force is: F = mg kv

(55)

Then from (54) we obtain the following equation:

dv
dv k
= mg kv Or
+ v=g
(56)
dt
dt m
Which is linear first order differential equation and in the form of
m

(50). So, the solution will be in the form of (52). Thus:

f (t ) =

k
,
m

r (t ) = g and h =

k
k
dt = t
m
m

126 Ordinary Differential Equations


k
k

kt

t m
t
m
m
m
ge + C1
e g dt + C1 v = e
v

t
mg
v =
1 + Ce m

t
mg
But v(0) = 0 then C = 1 v =
1 e m

k
t
=e m

dx
in the
dt
above equation and integrate and use the second initial condition
x(0) = 0 , gives:
k

t
mg m 2 g
x =
t 2 1 e m
k

Which is the position of the body at any time t.


To obtain the position x of the body we replace v by

4.4.2 Newtons Law Of Cooling


Newtons law of cooling states that: the time rate of change in
temperature of an object varies as the difference in temperature
between the object and surroundings.
Example 22 an object cools from 100oC to 70oC in 20 min. find the
o
20
C.
temperature in 40 minutes if the surrounding temperature is

Solutions: Let T (t ) is the temperature of object after t minutes.


dT
= k (T 20)
Then, from Newton law we can say that:
dt
Where k is the constant of proportionality.

Chapter Four

127
By solving the above equation by using separable variable

method we get: T (t ) = 20 + Ce kt
Substitute the initial conditions [T(0)=100, T(20)=70] in the
above equation we get: T (0 ) = 100 = 20 + C e k *(t = 0 )

C = 80 . Also, T (20 ) = 70 = 20 + 80e k *20


1
70 20
0.0235t
Ln
= 0.0235 And, T (t ) = 20 + 80e
20 80
To obtain the temperature after 40 minutes we can substitute in the

k =

above equation for t=40

T (40 ) = 20 + 80e 0.0235*40 = 51.25 o C


4.4.3 Chemical Application
Chemical material A dissolves in solution at a rate proportional
to the instantaneous amount of undisclosed chemical and to the
difference in concentration between the actual solution Ca and
saturated solution Cs.
Example 23 A 10 kg of certain solid A putted into a 100 liter of
water and after one hour 4 kg of that solid is dissolved. If a saturated
solution contains 0.2 kg of A per liter, find (a) The amount of A
which is undesolved after two hours and (b) The time to dissolve
80% of A.
Solution: Let y kg be undissolved after t hours.

10 y
dy

= ky (C s Ca ) = ky 0.2
= Ky ( y + 10)
100
dt

128 Ordinary Differential Equations


Where k and K are the constant of proportionality.
By solving the above equation by using separable variable
method we get:

y
1
Ln
= Kt + C1
10 y + 10

Substitute the initial conditions [y(0)=10, y(1)=6] in the above


equation we get: C1 = 0.0693 and K = 0.02877
(b) The time to dissolve 80% of A means that the undissolved
amount is 20%, then y = 2kg

y
1
= 0.02877t 0.0693
Ln
10 y + 10

1
2
Ln
= 0.02877t 0.0693
10 2 + 10
t = 3.82 hours

r=10 m

4.4.4 Water Tanks


Example 24 A circular cylinder

dh

dV = *102 dh

h=25m

of radius 10 m and height 25 m


whose axis is vertical as shown in
Fig.2, is filled with water. How long
will it take for all the water to escape through

Fig.2
dV = (.5)2 0.6 2gh dt

an orifice with 50 cm radius at the bottom of


the tank?

v = 0.6 2gh

Assuming the velocity of escape v in terms of instantaneous


height h is given by v = 0.6 2 gh .

Chapter Four

129
Solution: Assume incremental volume dV will take time dt to
escape from the tank. So from the geometry of the tank the
2
incremental volume is: dV = * r dh

(57)

Where, dh is the height of the incremental volume dV .


The minus sign has to be in the above equation because the height
of the water decreases with time.
The incremental volume dV will take time dt to escape from
the orifice of the tank at speed v . So, the incremental Volume dV
can be calculated also from the following equation:

dV = A.v.dt

(58)

Where A is the area of the orifice. So if the orifice is circle with


radius of ro the A = ro2 . And assume v = 0.6 2 gh . Then the
incremental volume is given by the following equation:

dV = ro2 * 0.6 2 gh dt
by equating (57) and (59) we get the following equation:

(59)

* r 2 dh = ro2 * 0.6 2 gh dt
The above differential equation can be solved by separation of
ro2
dh
variables.
= 0.6 2 gh 2 dt
h
r
By integrating both sides of the above equation we get the
r2
dh
following:
= 0.6 2 gh o2 dt + c
h
r
Where c is the constant of integration,
2 h = 0.6 2 g

ro2
r

t+c

(60)

130 Ordinary Differential Equations


So, at time t = 0 h = H o . Substitute this condition in the above
equation we get the following values for c. 2 H o = 0 + c
c = 2 H o Substitute this value in (60) we get the final
results: 2 h = 0.6 2 g

ro2
2

t + 2 Ho

r
To get the time required for tank to get empty we can substitute in
the above equation for h = 0 ,

2 Ho

te =

(61)
0.6 2 g ro2 / r 2
So, we can substitute the data in our example in the above equation
to obtain the time for the tank to get empty, t e .

te =

2 25
2

0.6 2 * 9.81 * 0.5 / 10

= 1505 sec . = 25.08 min .

Example 25 A spherical tank of


radius R=100 cm which contains

R-h
r

water and has outlet of radius

dh

ro = 5 cm at the bottom of the tank as

Fig.3

shown in Fig.3. At time t = 0 the outlet is

opened and the water flows out. Determine the time when the tank
will

be

empty,

assuming

the

initial

height

of

water

h(0 ) + R = 100 cm . The velocity with which liquid issues from an


orifice is v = 0.6
of the gravity.

2 gh , where ( g = 9.81m/s 2 ) is the acceleration

Chapter Four

131
Solution: Let the origin be chosen at the lowest point of the tank
and let h be the instantaneous depth, V the instantaneous volume,
and r the instantaneous radius of the free surface of the water as
shown in Fig.3. Then in an infinitesimal time dt, the water level will
fall by the amount dh , and the resultant decrease in volume of the
water in the tank will be:

dV = r 2 dh

(62)

Now by Torricellis law the velocity with which a liquid issues


from an orifice is: v = 0.6 2 gh where g is the acceleration of
gravity and h is the instantaneous height, or head, of the liquid
above the orifice. In the interval dt, then, a stream of water of length

vdt = 0.6 2 gh dt and of cross-sectional area ro2 will emerge


from the outlet. The volume of this amount of water is:
(63)
area * length = ro2 * 0.6 2 gh
So from the above equation and (62) we can get the following
equation: r 2 dh = ro2 * 0.6 2 gh dt

(64)

Before this equation be solved, r must be expressed in terms of h.


This is easily done through the use of equation of the circle which
describes the vertical cross section of the tank:

r 2 + (h R )2 = R 2 or

r 2 = 2hR h 2

(65)

With this, the differential equation (65) can be written as:

2hR h 2 dh = ro2 * 0.6 2 gh dt

(66)

132 Ordinary Differential Equations


This is a simple separable equation.

2 Rh1 / 2 h 3 / 2 dh = ro2 * 0.6 2 g dt


4
2
Rh3 / 2 h5 / 2 = ro2 * 0.6 2 g t + c
(67)
3
5
14
Since h = R at t = 0 , R 5 / 2 = c
15
4
2
14
Rh3 / 2 h 5 / 2 = ro2 * 0.6 2 g t + R 5 / 2
3
5
15
To fiend how long it will take the tank to empty, we must determine
14
the value of t when h=0. 0 = ro2 * 0.6 2 g t + R 5 / 2
15
5/ 2
14
R
t =
(68)
15 ro2 * 0.6 2 g
So in our example R = 1m and ro = 0.05m also g = 9.81 m / sec 2 .
Substitute these values in the above equation we get:

14
15 / 2
t=
= 140.5 sec .
15 0.05 2 * 0.6 2 * 9.81
Example 26 The tank shown in Fig.4 is consists of two portions, the
top one is cylinder with 20 m height and 10m radius of its base and
the other portion is half sphere with 10 m radius and has 50 cm2
outlet area at the bottom. If this tank filled with water and at time
t=0 the outlet is opened and the water flows out. Determine the time
when the tank will be empty, assuming the tank was initially filled
with water. The velocity with which liquid issues from an orifice is
v = 0.6 2 gh , where ( g = 9.81m/s 2 ) is the acceleration of the

gravity.

Chapter Four

133
Solution: Let the origin be chosen at the lowest point of the tank

and let h be the instantaneous depth, V the instantaneous volume,


and r the instantaneous radius of the free surface of the water as
shown in Fig.4.
Let us start first with finding the time required for the cylindrical
portion to get empty. Then in an infinitesimal time dt, the water
level will fall by the amount dh, and the resultant decrease in
volume of the water in the tank
will be:

dV = 10 2 dh

Fig.4

Now by torricellis law the

20m

velocity with which a liquid


issues from an orifice is:

v = 0.6 2 gh

where g is the

10m

acceleration of gravity and h is the


instantaneous height, or head, of the
liquid above the orifice. In the interval dt.
The unit volume escape from the orifice at

Area = 50 cm 2
v = 0.6 2 gh

time dt is:

dV = 0.6 2 gh * 50 * 10 4 dt
So, by equating both volumes we get the following equation:

0.6 2 gh * 50 * 10 4 dt = 10 2 dh ,

dh
= 4.23 * 10 5 dt
h

134 Ordinary Differential Equations


It is clear that the above equation is first order differential

equation in separable form, so it is easy to solve this equation by


integrating both sides.

dh
= 4.23 *10 5 dt + c 2 h = 4.23 * 10 5 t + c
h

It is clear from the initial condition that at t = 0 , h = 20 + 10 = 30m


Substitute this initial condition in the above equation we get:

2 30 = 4.23 * 10 5 * 0 + c

c = 2 30 = 10.954

So, the solution of differential equation becomes,

2 h = 4.23 * 10 5 t + 10.954
At the bottom of the cylinder portion h = 10m so we can obtain
the time required for the cylindrical portion to get empty if we
substitute in the solution of differential equation for h = 10m . Then,

2 10 = 4.23 * 10 5 t + 10.954
tcylinder = 30.4 hours
In the same way we can obtain the time required for spherical
portion to get empty. We use also unit element in spherical portion

dV = r 2 dh . But r = 10 2 (10 h )2 = 20h h 2

dV = 20h h 2 dh
This volume will take time dt to escape from the orifice of the tank.

dV = 0.6 2 gh * 50 * 10 4 dt

Chapter Four

(
)
(20h 0.5 h1.5 )dh = 0.0042298dt + k

135

20h h 2 dh = 0.6 2 gh * 50 * 10 4 dt

20 1.5 h 2.5
h
= 0.0042298 t + k

1.5
2.5
At t = 30.4 * 3600 sec, h = 10m

20 1.5 10 2.5
10
= 0.0042298 * 30.4 * 3600 + k

1.5
2.5
Then, k = 758.055

20 1.5 10 2.5

10
= 0.0042298 * 30.4 * 3600 + 758.055
1.5
2.5
The total time required for the total tank to get empty can be
obtained by applying h = 0 in the above equation. Then,
t = 179218 sec = 49.7827hours
Another Solution

For cylindrical portion we can use (60) to get the time required for
this portion to get empty

2 h = 0.6 2 g

ro2
2

t+c

(60)

r
So, at time t = 0 h = 30m . Substitute this condition in the above

equation we get the following values for c.

2 30 = 0 + c c = 2 30
2 h = 0.6 2 g

ro2
r2

t + 2 30

136 Ordinary Differential Equations


To get the time required for cylindrical portion of the tank to get

empty we can substitute in the above equation for h = 10 m . Then,

2 10 = 0.6 2 g

ro2

10 2

Q 50 *10 4 = ro2

2 10 = 0.6 2 * 9.81
tcylinder

t + 2 30

ro = 3.99cm
.0399 2
2

t + 2 30

10
= 109427 sec . = 30.4 hours

In the same way we can obtain the time required for spherical
portion to get empty. We use (67) as explained before.

4 3/ 2 2 5/ 2
Rh
h
= ro2 * 0.6 2 g t + c
3
5
Since h = R = 10 at t = 109427 sec . ,

4
2
10 * 103 / 2 105 / 2 = 0.03992 * 0.6 2 * 9.81 * 109427 + c
3
5
c = 758.135

4 3/ 2 2 5/ 2
Rh
h
= ro2 * 0.6 2 g t + 758.135
3
5

Then the time required for the hole tank to get empty is at h = 0 .
Then substitute h = 0 in the above equation to get tTotal

0 = 0.03992 * 0.6 2 * 9.81 t + 758.135

t = 179 184.4 sec . = 49.773 hours

Chapter Four

137

Example 27 A right circular

cylinder

of

radius

8m

and

Length of 16m as shown in

16m

Fig.5, whose horizontal axis, is


filled with water. How long will
Fig.5

it take for all the water to escape


through circular orifice has 10

16m

cm radius at the bottom of the


tank? Assume v = 0.6

2 gh

Solution: In this case we will

calculate the time required for the upper half to get empty. Then we
can do the same for the lower half.
First, For upper half:

The horizontal incremental volume can be taken in the upper half


of the tank. It is clear from geometry of the tank, the width of the
incremental volume, dV is 2r and the length L of the cylinder.
L

dh

h-R R
h

Fig.6

138 Ordinary Differential Equations

It is clear from Fig.6 that r =

R 2 (h R )2 = 2 Rh h 2

So the incremental volume dV is given by the following equation:

dV = 2 * 2 Rh h 2 * L dh

(69)

Also, this volume dV can be calculated at the orifice of the tank as


following: dV = ro2 * 0.6 2 gh dt

(70)

By equating (69) and (70) we get the following result:

2 * 2 Rh h 2 * L dh = ro2 * 0.6 2 gh dt
2
2 R h dh =
ro * 2 g dt
2L
By integrating both sides of the above equation we can get the
following equation:

2
(2 R h )3 / 2 dh = ro2 * 2 g t + c
3
2L
Where c is the constant of integration.

(71)

At time t = 0, h = 2 R Substitute this condition in the above


equation we get the value of the constant c,

c =0
Substitute from (72) into (71).

(72)

2
(2 R h )3 / 2 = ro2 * 2 g t
(73)
3
2L
To obtain the time required for the upper half to get empty we have

to put h = R in the above equation, (73).

tu =

4 LR 3 / 2
3 ro2 2 g

(74)

Chapter Four

139

For the lower half

The horizontal incremental volume dV can be taken in the upper


half of the tank. It is clear from geometry of the tank, the width of
the incremental volume, dV is 2r and the length L of the cylinder.
It is clear from Fig.7 that: r = R 2 (R h )2 = 2 Rh h 2
So the incremental volume dV is given by the following equation:

dV = 2 * 2 Rh h 2 * L dh

(75)

Also, this volume dV can be calculated at the orifice of the tank as


following: dV = ro2 * 0.6 2 gh dt

(76)

By equating (75) and (76) we get the following result:

2 * 2 Rh h 2 * L dh = ro2 * 0.6 2 gh dt
2
2 R h dh =
ro * 2 g dt
2L
L

R-h R
h

dh

Fig.7

By integrating both sides of the above equation we can get the


following equation:

2
(2 R h )3 / 2 = ro2 * 2 g t + c
3
2L

(77)

140 Ordinary Differential Equations


Where c is the constant

t = tu =

of

integration.

At

time

4 LR 3 / 2

, h = R substitute this condition in the above


3 ro2 2 g
equation we get the value of the constant c,
2
4 LR 3 / 2
3/ 2 2
(2 R R ) =
ro * 2 g
+c
(78)
3
2L
3 ro2 2 g
c = 0 , substitute for c = 0 in (78) we get the following results

2
(2 R h )3 / 2 = ro2 * 2 g t
3
2L

The total time required for the whole tank to get empty can be
obtained by Substituting in the above equation for h = 0 .

ttotal =

4 L(2 R )3 / 2
3

ro2

(79)

2g

So the time required for the lower portion only to get empty is given
by the following equation: t L = ttotal tu

(80)

The data collected from our example is ro = 0.1m , R = 8m , and

L = 16 m . Apply these data to equation (74), (79), and, (80)


respectively we get the following results:

tu =

4 * 16 * 83 / 2
3 * * 0.12 * 2 * 9.81

ttotal =

= 3468.92 sec . = 57.82 min .,

4 * 16 * (2 * 8)3 / 2
3 * * 0.12 * 2 * 9.81

= 9811.59 sec . = 163.52 min ., and,

t L = ttotal tu = 163.52 57.82 = 105.7 min .

Chapter Four

141
Example 28 A conical tank shown in Fig.8, filled with water and

10 m

has outlet of radius ro = 20 cm


at the bottom. At time t=0 the

Fig.8

outlet is opened and the water


flows

out.

Determine

the

time

required for the tank to get empty


assuming

the

tank

was

initially

dh

20 m

completely filled with water. The velocity


with which liquid issues from an orifice is

v = 0. 6

Radius = 20 cm

2 gh , where ( g = 9.81m/s 2 ) is v = 0.6 2 gh

the acceleration of the gravity.


Solution: Assume the radius of the base of the tank is R and its

height is L. Assume a horizontal incremental volume dV at height h


from the bottom of the tank and radius r. The thickness of the
incremental volume dV is dh . It is clear from the geometry of the
tank that the incremental volume looks like a cylinder with radius r
and height dh . So, the incremental volume can be obtained as
following: dV = r 2 dh

(81)

r R
R
r = h
=
L
h L

(82)

But

Substitute the value of r in (82) into (81) we get the following result:
2

R
dV = * h dh
L

(83)

142 Ordinary Differential Equations


In the same way dV can be obtained at the bottom of the tank as

following: dV = ro2 * 0.6 2 gh dt


By equating (83) and (84) we get the following result:

(84)

R
* h dh = ro2 * 0.6 2 gh dt
L
Lro2
3/ 2
dt
h dh = 0.6 2 g

By integrating both sides of the above equation we get the


Lr 2
2
(85)
following: h 5 / 2 = 0.6 2 g o t + c
R
5

where c is the constant of integration


At time t = 0 , h = L . Substitute this initial condition into (85):

2
L5 / 2 = 0 + c
5

c =

2 5/ 2
L
5

(86)

Substitute the value of c in (86) into (85) we get the following:

Lro2 2 5 / 2
2 5/ 2
t + L
= 0.6 2 g
h

5
R 5
So the time required for the tank to get empty is given by
applying for h = 0 in the above equation. So,
2

*
(87)
Lr
o
Substitute the data obtained in (87) where L = 20m , R = 5m R,
ro = 0.2m

2 L5 / 2
t =
5 * 0. 6 2 g

2 * 205 / 2
5
t =
*
= 420.68 sec . = 7.01 min .
5 * 0.6 2 * 9.81 20 * 0.2

Chapter Four

143

4.4.5 Half Life Of Nuclear Materials


Example 29 Experiment shows that radium disintegrates at a rate

proportional to the amount of radium instantly present. Its half life


(that is the time in which 50% of a given amount will disappear),
is 1590 years. What percent will disappear in one year?
Solution: Assume the instantaneous amount and starting amount of

radium exists are y and yo respectively.


dy
= ky

(88)
dt
Where k is the proportional constant. Equation (88) can be easily
solved by variable separation. y = Ce kt

(89)

Where C is integration constant. C and k can be determined from


initial conditions. The first initial condition is y = y0 at t = 0
substitute this condition into (89).

y = y0 e kt
The second initial condition is

(90)
y = y0 / 2 at t = 1590 years .

Substitute this condition into (90)

y0
= y0 e k *1590
2

k = 4.36 *10 4
4

y = y0 e 4.36 *10 t
(91)
To obtain the percent disappear after one year we can do the
following:

y e 4.36 *10 4 *1

y (1)
1
* 100 = 1 0

y0
y0

* 100 = 0.0436 %

144 Ordinary Differential Equations


4.4.6 Electrical Circuits

(a) E (t ) = 40 V , (b) E (t ) = 20 e

Fig.9. Assume I (0) = 0 R=10 , L=2H if:


+

3t

E(t)
_

I(t)

Solution: From Kirchoffs laws

and (c) E (t ) = 50 sin 5 t .

RI + L

Example 30 Find the current in the RL circuit in vR(t)

vL(t)

dI
= E (t )
dt

Fig.9

dI R
E (t )
+ I=
L
dt L

(a) I& +

10
40
I=
2
2

I& + 5 I = 20
By using the general solution of the first order linear differential
equations, (52) we can solve it.

f (t ) = 5 r (t ) = 20
I (t ) = e 5t

[ e

5t

h = 5dt = 5t

* 20dt + k I (t ) = 4 + ke 5t

where k is a constant of integration.

But I (0) = 0 k = 4 I (t ) = 4 * 1 e 5t
(b) For E (t ) = 20 e 3t

I (t ) = e 5t

[ e

5t

*10 e 3t dt + k

Chapter Four

145

I (t ) = e 5t 5 e 2 t + k I (t ) = 5 e 3 t + ke 5t
But I (0) = 0 then k = 5

I (t ) = 5 e 3 t e 5t

(c) E (t ) = 50 sin 5 t

I (t ) = e 5t

[ e

5t

* 25 sin 5t dt + k

I (t ) = e 5t e5t (sin 5t cos 5t ) + k But I (0) = 0 k = 5 / 2


2

I (t ) =

5
(sin 5t cos 5t ) + e 5t
2

Example 31

Find the current in the RC circuit in


Fig.10. Assume I (0) = 0 R=5 ,

E (t ) = 50 sin 20 t .

Assume (a) vc (0) = 0 and


(b) vc (0) = 100

and

C=.02F

vR(t)
+

E(t)
_

I(t)

Solution:

From Kerchiefs laws

RI +

1
Idt = E (t )
C

dI
1
1 dE (t )
+
I=
dt RC
R dt

1
1d
I& +
I=
50 sin 20 t
RC
R dt

Fig.10

vC(t)

146 Ordinary Differential Equations

I& +

1
1
I = * 50 * 20 cos 20 t I& + 10 I = 200 cos 20t
5 * .02
5

By using the general solution of the first order linear differential


equations we can solve it.

f (t ) = 10 r (t ) = 200 cos 20t h = 10 dt = 10t


I (t ) = e 10t

[ e * 200 cos 20 t dt + k ]
[ 4 e (cos (20 t ) + 2 sin ( 20 t )) + k ]

I (t ) = e 10t

10t

10t

I (t ) = 4 cos (20 t ) + 8 sin ( 20 t )) + ke 10t


(a) For vc (0) =

1
Idt
=0
C
t =0

0.2 sin( 20 t ) .4 cos (20t )

k 10t
e
=0
10
t =0

k = 4

I (t ) = 4 cos (20 t ) + 8 sin ( 20 t )) 4e 10t


(b) For vc (0) =

1
Idt
= 100 V
C
t =0

k 10t
1
0
.
2
sin(
20
t
)

.
4
cos
(
20
t
)

e
= 100
0.02
10
t =0

k = 24
I (t ) = 4 cos (20 t ) + 8 sin ( 20 t )) 24e 10t

Chapter Four

147

Problems:

[I] Draw a good direction fields for the following differential


equations and plot several approximate solution curves:
1) y = y
3) y =

2) y = cos y

xy
1+ x

4) y = 2 y / x

[II] By using the direction field, plot an approximate solution


curve of the given differential equation satisfying the given
condition:
5) y = x + 1,

y ( 0) = 1

6) y y = 1 e x ,

7) y + y 2 = 0, y (5) = 0.25 8) 9 yy + 4 x = 0,

y ( 0) = 0
y (3) = 4

[III] Find the general Solution of the following differential


equations:

dy x 2
=
9)
dx y
dy
+ y 2 sin x = 0
11)
dx

dy
x2
10)
=
dx y (1 + x 3 )
dy
12)
= cos 2 x cos 2 2 y
dx

1 y2
dy
13)
=
x
dx
dy
= y tanh x
15)
dx

dy x e x
14)
=
dx y + e y

)(

16) ( xLn( x) )dy ydx = 0

[IV] Solve the following initial value problems:


17) sin 2 xdx + cos 3 ydy = 0, y ( / 2) = / 3

148 Ordinary Differential Equations

18) xdx + ye x dy = 0,
19)

dy
Ln( x)
=
,
dx (1 + y 2 )

20) y = 2e x y 3 ,
21) y = 3 x 2 e y ,
2

22) yy = xe y ,
23) xyy = y + 2,

y (0) = 1

y (1) = 0

y (0) = 0.5
y (1) = 0
y (1) = 0

y (2) = 0

24) xydx + (2 xy 2 + 4 y 2 x 2) dy = 0, y (0) = 1


[V] Solve the following differential equations:

25) x 3 + y 3 dx 3 xy 2 dy = 0 26) xdy y + x 2 y 2 dx = 0

Equation reducible to separable form


)
)

(2 x + 3 y )dx + ( y x)dy = 0
( x + y )dx + (3x + 3 y 4)dy = 0

(1 xy x 2 y 2 )dx + (x3 y x 2 )dy = 0

tan 2 ( x + y )dx dy = 0

)
)
)
)
)

(2 + 2 x 2 y1 / 2 )ydx + (x 2 y1 / 2 + 2)xdy = 0
dx + ((1 x 2 )cot y )dy = 0
(x 2 + y 2 )dx + (x 2 xy )dy = 0
2 x 3 ydx + (x 4 + y 4 )dy = 0

( xy y )cos (2 y / x) = 3x 4

Chapter Four

149

Exact differential equations

[VI] Solve the following differential equations by prove that it


is Exact, and then solve it.
)

(4 x3 y 3 2 xy )dx + (3x 4 y 2 x 2 )dy = 0

2
2
2 x ye x 1dx + e x dy = 0

(cos y + y cos x )dx + (sin x x sin y )dy = 0

)
)

(x 2 + y 2 + x)dx + xydy = 0
(2 x + e y )dx + xe y dy = 0

y
y sin xy dx + (Lnx x sin xy )dy = 0

y sinh xdx + cosh xdy = 0

Linear first order differential equations

[VII] Solve the following differential equations


43) xy + y = y 2 Lnx

44) y + 2 y = 6e x

45) y = ( y 1) cot x

46) 1 x 2 y + xy = x

[VIII] Solve the following initial value problem


47) y + y = ( x + 1) 2 , y (0) = 0
48) y 2 y = 2 cosh 2 x + 4, y (0) = 125
49) xy 3 y = x 4 (e x + cos x) 2 x 2 ,
50) 2( y + 1) y

2
( y + 1) 2 = x 4 ,
x

y ( ) = e + 2 /

y (1) = 2 / 3 1

150 Ordinary Differential Equations


[VIV] Applications

51) After two days, 10 grams of a radioactive chemical is present.


Three days later 5 grams is present. How much of the chemical was
present initially assuming the rate of disintegration is proportional to
the instantaneous amount which is present.
52) It takes 15 minutes for an object to warm up from 10 C to 20 C
in a room whose temperature is 30 C. Assuming Newtons law of
cooling , how long would it take to warm up from 20 C to 25 C?
53) Chemical A is transformed into chemical B at a rate proportional
to the instantaneous amount of A which is untransformed. If 20% of
chemical A is transformed in two hours, (a) what percentage of A is
transformed in 6 hours and (b) when will 80% of A be transformed?
54) Find the current in the RLC circuit
the

following

figure.

vR(t)

Assume

(a) R=200 , L=short circuit, C=0.005

and E (t ) = 500 t cos 10 t

E(t)
_

I(t)

_
+

(b) R=160 , L=20H, C=short circuit,

farads and E (t ) = 200 cos 3 t

I (0) = 0 and v L (0) = 0 , vc (0) = 0

in

vL(t)

vC(t)

Chapter 5
Linear Differential Equations Of Higher Order
5.1 Definition
The general linear differential equations of order n has the form
shown in (1) or (2).
f n ( x)

dny
dx

+ f n 1 ( x)

d n 1 y
dx

n 1

+ ......... f1 ( x)

d1y
1

dx

+ f 0 ( x)

d0y
dx

= r ( x) (1)

f n ( x) y (n ) + f n 1 ( x) y (n 1) + ......... f1 ( x) y + f 0 ( x) y = r ( x)

(2)

Any differential equations cannot be written in this form is called


nonlinear differential equation.
If r(x), the right side of (1) or (2) is replaced by zero, the resulting
equation is called homogeneous differential equations. If r ( x) 0
the equation called nonhomogeneous differential equation.

If

f n ( x ), f n 1 ( x ), .......... .......... ......... f1 ( x ), and

f 0 ( x)

are all

constants, the differential equation is said to have constant


coefficients, otherwise it is said to have variable coefficients. A set
of n functions y n ( x), y n 1 ( x), .......... y 2 ( x), and y1 ( x) is said to be
linearly dependant over an interval if there exist n constants

C n , C n 1 , ...........C 2 , and C1 all of them must be not equal to zero,


such that, C n y n ( x) + Cn 1 y n 1 ( x) + ........ + C 2 y 2 ( x ) + C1 y1 ( x) = 0
Otherwise, the set of functions is said to be linearly independent.

152 Linear Differential Equations Of Higher Order


Example 1 2e 3 x , 5e 3 x , e 3 x

are linearly dependant over any

interval since we can find constants C3 ,.C 2 , C1 not all zero such
that: C1 2e 3 x + C 2 5e 3 x + C3e 3 x = 0
Identically, for instance, C3 = 0,.C2 = 2, and C1 = 5
Example

ex ,

xe x

are

linearly

independent

since

C1e x + C 2 xe x = 0 Identically if and only if C1 = 0 and C2 = 0 .


Theorem 1, The set of the following functions:

y n ( x ), y n 1 ( x ), .......... .......... ......... y 2 ( x ), and y1 ( x )


is linearly independent on an interval if and only if the following
determinant not equal zero.

W ( y1, y2

, yn )

y1( x)
y1 ( x)

y 2 ( x)
y2 ( x)

.............

yn ( x )
yn ( x)

.............
0
.............
y1n 1( x) y2n 1( x) ............. ynn 1( x)

Called the Wronskian of y1 , y 2

(3)

, y n is different from zero on that

interval.
5.2 Characteristic Equation

Substitute y = e x ( is constant) in (1) to obtain the following


equation:

f n ( x)n + f n 1 ( x)n 1 + .............................f1 ( x) + f 0 ( x) = 0 (4)


Which is called the auxiliary or characteristic equation. This can be
factored into:

Chapter Five

153

f n ( x)( n )( n 1 ).............( 2 )( 1 ) = 0
Which has roots n , n 1............2 , and 1 . Three cases must be
considered depending on the roots of this equation. These cases has
been analyzed in the following items:
Case 1

Roots are real and distinct.

Then e n x , e n1 x ,........ e 2 x and e 1 x are n linearly independent


solutions, so that the required solution is:

y = Cn e n x + C n 1e n1 x + ........ C1 e 1 x
Where C n , C n 1 ,..............C1 are constants.

(5)

Case 2 Some roots are complex.

When a + jb is a root of (3) so also a jb is also root. Then the


solution corresponding to the roots a + jb and a jb is

y = e ax [ A cos(bx) + B sin(bx)]

(6)

Where A and B are constants.


Case 3 Some roots are repeated.

If 1 is a root of multiplicity k, then a solution is given by:

y = Cnen x +Cn1en1x +......(Ck xk 1 + Ck 1xk 2 +....C1)e1x (7)


Example 3 Solve the following differential equation:-

y 3 y + 2 y = 0
Solution:- The auxiliary equation is

2 3 + 2 = 0
1 = 1 and 2 = 2
Then, 1 and 2 are real distinct roots. So, the general solution is
given by (5). y ( x) = C1e x + C 2 e 2 x

154 Linear Differential Equations Of Higher Order


Example 4 Solve the following differential equation:y 5 y + 8 y 4 y = 0
Solution:- The auxiliary equation is: 3 52 + 8 4 = 0

1 = 1 and 2 = 3 = 2 . Then, 2 and 3 are two equal roots.


Then the solution will take the form shown in (7).

y = C1e x + (C2 x + C3 ) e 2 x
Example 5 Solve the following differential equation:-

y + y + y = 0
Solution:- The auxiliary equation is:

2 + + 1 = 0

1,2 = 0.5 j

Then, the solution takes the form (6).

3
3
y = e 0.5 x A cos
x + B sin
x
2
2

3
.
2

5.3 Nonhomogeneous Linear Differential Equation

If r (x) in (1) is not zero, then (1) and (2) are called
nonhomogeneous, linear differential equations. The solution of
these equations takes the following form:

y ( x) = y h ( x) + y p ( x)
Where y h (x) is the solution of homogeneous equation, (sometimes
it called complementary solution). And y p (x) is the particular
solution of (1).

Chapter Five

155
The particular solution can be assumed depending on the form of

r (x) . The trial solution to be assumed in each form of r (x) is


shown in the following table. The trial solutions in this table hold in
case no terms in the assumed trial solution appear in the
complementary solution. If any term of the assumed trial solution
does appear in the complementary solution, we multiply this trial
solution by the small positive integer power of x which is large
enough so that none of the terms which are then present appear in
the complementary solution.

r (x )

Assumed trial solutions

ce px

Ae px

c cos px + k sin px

A cos px + B sin px

cn x n + cn 1 x n 1 + ......c0

An x n + An 1 x n 1 + ......A0

e px cn x n + cn 1 x n 1 + ......c0

e px An x n + An 1 x n 1 + ......A0

(
)
sin px * (k n x n + k n 1 x n 1 + ......k 0 )

(
)
sin px * (Bn x n + Bn 1 x n 1 + ......B0 )

(
)
qx
n
n 1
e sin px * (k n x + k n 1 x
+ ......k 0 )

(
)
e qx sin px * (Bn x n + Bn 1 x n 1 + ......B0 )

cos px * cn x n + cn 1 x n 1 + ......c0 +

e qx cos px * c n x n + c n 1 x n 1 + ......c0 +

cos px * An x n + An 1 x n 1 + ...... A0 +

e qx cos px * An x n + An 1 x n 1 + ...... A0 +

Sum of any or some of the Sums of the corresponding trial


above entries.

solutions.

156 Linear Differential Equations Of Higher Order


Example 6 Solve the following differential equation:

y + y 2 y = 2 e 3 x
Solution:- The auxiliary equation is 2 + 2 = 0

1 = 1 and 2 = 2
Then, 1 and 2 are real distinct roots. So the general solution is
given by the following equation:

y h ( x) = C1e x + C 2 e 2 x
The particular solution takes the following form:

y p ( x) = ke3 x
y p ( x) = 3ke3 x
y p ( x) = 9ke 3 x
e 3 x (9k + 3k 2k ) = 2e 3 x
k = 0.2 ,

y p ( x) = 0.2 e 3 x

y ( x) = y h ( x) + y p ( x) = C1e x + C 2 e 2 x + 0.2 e 3 x
Example 7 Solve the following differential equation:

y + y 2 y = 2 e x + e 2 x
Solution:- The auxiliary equation is 2 + 2 = 0

1 = 1 and 2 = 2
Then, 1 and 2 are real distinct roots so the general solution is
given by the following equation y h ( x) = C1e x + C 2 e 2 x

Chapter Five

157
As we see, there are some terms in the homogeneous solution has

similar terms shown in r (x) . So, the similar terms must be


multiplied by x in the particular solution. So, the particular solution
takes the following form:

y p ( x) = k1 xe x + k 2 xe 2 x
y p ( x) = k1 xe x + k1e x + k 2 e 2 x 2k 2 xe 2 x
y p ( x) = 2k1e x + k1 xe x 2k 2 e 2 x + 4k 2 xe 2 x 2k 2 e 2 x

2
1
and k 2 =
3
3
2
1
y p ( x) = xe x xe 2 x
3
3
k1 =

y ( x) = y h ( x) + y p ( x) = C1e x + C 2 e 2 x +

2 x 1 2x
xe xe
]
3
3

Example 8 Solve the following differential equation:-

y + 4 y = 8 sin 2 x
Solution:- The auxiliary equation is 2 + 4 = 0

1,2 = j 2
Then the general solution takes the form (6). So, the general solution
is given by y h = A cos(2 x) + B sin( 2 x )
For

the

particular

solution

we

normally

assume

y p = k1 cos(2 x) + k 2 sin( 2 x) . However, since the terms appear in


the homogeneous solution has similar terms appears in the particular
solution. Then, we have to modify the particular solution to take the

158 Linear Differential Equations Of Higher Order

following form y p = x (k1 cos(2 x ) + k 2 sin( 2 x) ) . By differentiating


the above equation and substitute the results into the differential
equation we get that the final result for the particular solution is as
the following:

y p = x sin( 2 x)

y ( x) = y h + y p = A cos(2 x) + B sin(2 x) x sin(2 x)


Example 9 Solve the following differential equation:-

y 4 y + 4 y = e 2 x
Solution:- The auxiliary equation is 2 4 + 4 = 0

1 = 2 = 2
Because of 1 = 2 , so the homogeneous solution takes the form in
(7). Then, the general solution is given by y h ( x) = (C1 + C 2 x )e 2 x .
The

particular

solution

corresponding

to

r ( x) = e 2 x

is

y p ( x) = ke 2 x but there is a term in the homogeneous solution


dependant with y p ( x) = ke 2 x . So we have to multiply it by x to be

y p ( x) = kxe 2 x . But, still there is another term in homogeneous


solution dependant with y p ( x) = kxe 2 x , then we have to multiply
again till we become sure that there is no any dependant terms
between homogeneous and assumed particular solutions. Then the
particular solution takes the following form:

Chapter Five

159

y p ( x) = kx 2 e 2 x
y p ( x) = 2kx 2 e 2 x + 2kxe 2 x
y p ( x) = 4kx 2 e 2 x + 4kxe 2 x + 4kxe 2 x + 2ke 2 x
By substituting the above values into the differential equation and
by comparing both sides of the equation we get the value of the
constant k, where k = 0.5 .

y p ( x ) = 0. 5 x 2 e 2 x
y ( x) = y h ( x) + y p ( x) = (C1 + C 2 x )e 2 x + 0.5 x 2 e 2 x
Example 10 Solve the following differential equation:-

y 5 y + 6 y = x 2 e 5 x
Solution:- The auxiliary equation is 2 5 + 6 = 0

Then, 1 = 2, and 2 = 3

y h ( x) = C1e 2 x + C2 e3 x
The particular solution corresponding to r ( x) = x 2 e 5 x takes the
following form:

y p ( x) = k 2 x 2 + k1 x + k 0 e 5 x

y p ( x) = 5 k 2 x 2 + k1 x + k 0 e 5 x + (2k 2 x + k1 ) e 5 x

y p ( x) = 25 k 2 x 2 + k1 x + k 0 e 5 x + 5(2k 2 x + k1 ) e 5 x
+5(2k 2 x + k1 ) e 5 x + (2k 2 ) e 5 x

160 Linear Differential Equations Of Higher Order


By substituting the above values into the differential equation and

by comparing both sides of the resultant equation we get the values


of the constants k 2 , k1 , and k 0 .

1
5
19
k 2 = , k1 = , and k 0 =
108
6
18
5
19 5 x
1
y p ( x) = x 2 x +
e
6
18
108

5
19 5 x
1
y( x) = yh ( x) + y p ( x) = C1e 2 x + C2e3x + x 2 x +
e
6
18
108

Example 11 Solve the following differential equation:-

y 5 y + 6 y = x 2 e 2 x
Solution:- The auxiliary equation is 2 5 + 6 = 0

1 = 2,

2 = 3

y h ( x) = C1e 2 x + C2 e3 x
The particular solution corresponding to

r ( x) = x 2 e 2 x

is

y p ( x) = k 2 x 2 + k1 x + k 0 e 2 x . But there is a term in the


homogeneous solution dependant with

y p ( x) = k 2 x 2 + k1 x + k 0 e 2 x .
So we have to multiply it by x to be as following:

y p ( x) = k 2 x 2 + k1 x + k 0 x e 2 x

(
) (
)
y p ( x) = 4(k 2 x 3 + k1 x 2 + k 0 x ) e 2 x + 2(3k 2 x 2 + k1 x + k 0 ) e 2 x
+2(3k 2 x 2 + k1 x + k 0 ) e 2 x + (6k 2 x + 2k1 ) e 2 x
y p ( x) = 2 k 2 x 3 + k1 x 2 + k 0 x e 2 x + 3k 2 x 2 + k1 x + k 0 e 2 x

Chapter Five

161
By substituting the above values into the differential equation and

by comparing both sides of the equation we get the value of the


constants k 2 , k1 , and, k 0 .

1
k 2 = , k1 = 1, and k 0 = 2
3
1

y p ( x ) = x 2 + x + 2 x e 2 x
3

1
y ( x) = y h ( x) + y p ( x) = C1e 2 x + C 2 e 3 x x 2 + x + 2 x e 2 x

3
Example 12 Solve the following differential equation:-

y 6 y + 12 y 8 y = x 2 + e 2 x
Solution:- The auxiliary equation is: 3 62 + 12 8 = 0

y h ( x) = C1 + C2 x + C3 x 2 e 2 x

1 = 2 = 3 = 2

The particular solution corresponding to r ( x) = x 2 + e 2 x

is

y p ( x) = k 2 x 2 + k1 x + k 0 + k3e 2 x . But there is a term in


homogeneous solution dependant with the assumed particular
solution.

So

we

have

to

multiply

it

by

to

be

y p ( x) = k 2 x 2 + k1 x + k 0 + k3 xe 2 x . But, still there is another term


in

homogeneous

solution

dependant

with

y p ( x) = k 2 x 2 + k1 x + k 0 + k3 xe 2 x . Then we have to multiply


again till we become sure that there are no any dependant terms
between homogeneous and particular solutions. Then the particular
solution takes the following form:

162 Linear Differential Equations Of Higher Order

y p ( x) = k 2 x 2 + k1 x + k 0 + k3 x 3e 2 x
y p ( x) = (2k 2 x + k1 ) + 2k3 x 3 e 2 x + 3k3 x 2 e 2 x
y p ( x) = (2k 2 ) + 4k3 x 3 e 2 x + 12k3 x 2 e 2 x + 6k3 xe 2 x
yp ( x) = 8k3 x3 e 2 x + 12k3 x 2 e 2 x + 24 k3 x 2 e2 x + 12k3 x e 2 x + 6k3e 2 x
By substituting the above values into the differential equation and
by comparing both sides of the equation we get the value of the
constants k3 , k 2 , k1 , and, k 0 .

3
3
1
1
k3 = , k 2 = , k1 = , and k 0 = .
8
8
8
6

1 2
x3 2 x
y p ( x) = x + 3 x + 3 +
e
8
6

y ( x) = y h ( x) + y p ( x) = C1 + C 2 x + C3 x 2 e 2 x

1 2
x3 2x
x + 3x + 3 +
e
8
6

Example 13 Solve the following differential equation:-

3 y 6 y + 36 y = e x sin (3 x )
Solution:- The auxiliary equation is: 32 6 + 36 = 0

1 , 2 = 1 11

y h =e x A cos 11x + B sin 11x

By inspecting the right hand side of the differential equation we can


get the following particular solution: y p = e x (k1 cos 3 x + k 2 sin 3 x )

Chapter Five

163

y p = e x ( 3k1 sin 3x + 3k 2 cos 3x ) + e x (k1 cos 3x + k 2 sin x )

y p = e x { 9k1 cos 3x 9k 2 sin 3x 3k1 sin 3x + 3k 2 cos 3x


3k1 sin 3x + 3k 2 cos 3x + k1 cos 3x + k 2 sin x

Substitute y p , y p , and, y p into the differential equation and


compare both sides we get the following equation:

3e x { 9k1 cos 3x 9k 2 sin 3x 3k1 sin 3x + 3k 2 cos 3 x

3k1 sin 3x + 3k 2 cos 3x + k1 cos 3x + k 2 sin x

6 e x ( 3k1 sin 3 x + 3k 2 cos 3x ) + e x (k1 cos 3x + k 2 sin x )

+ 36 e x (k1 cos 3x + k 2 sin 3x ) = e x sin 3x


Coefficient of e x cos 3 x = 0

3 * 9k1 + 9k 2 + 9k 2 + 9k 2 + 3k1 18k 2 6k1 + 36k1 = 0

k1 = 0
Coefficient of e x sin 3 x = 1

27 k 2 9k1 9k1 + 3k 2 + 18k1 6k 2 + 36k 2 = 1

1
k2 =
6

e x sin 3x
yp =
6

e x sin 3 x
y ( x ) = yh + y p =e A cos 11x + B sin 11x +
6
x

Example 14 Solve the following differential equation:-

y + y = 2 sin x + 4 x cos x
Solution:- The auxiliary equation is: 2 + 1 = 0
1 , 2 = j1 y h = A cos x + B sin x

164 Linear Differential Equations Of Higher Order


By inspecting the right hand side of the differential equation we can

get the particular solution as following:

y p = x(k1 cos x + k2 sin x) + x 2 (k3 x + k4 )cos x + x 2 (k5 x + k6 )sin x

y p = k1x cosx + k2 x sin x + k3 x3 + k4 x 2 cos x + k5 x3 + k6 x 2 sin x

y p = k3 x 3 + k 4 x 2 + k1 x cos x + k5 x 3 + k 6 x 2 + k 2 x sin x

y p = k3 x 3 + k 4 x 2 + k1 x sin x + 3k3 x 2 + 2k 4 x + k1 cos x

)
y p = [ k3 x 3 + (3k5 k 4 ) x 2 + (2k 6 k1 )x + k 2 ]sin x
+[k5 x 3 + (3k3 + k 6 )x 2 + (k 2 + 2k 4 )x + k1 ]cos x
y p = [ k3 x 3 + (3k5 k 4 ) x 2 + (2k 6 k1 )x + k 2 ]cos x
[ 3k3 x 2 + 2(3k5 k4 ) x + (2k6 k1 )]sin x
[k5 x 3 + (3k3 + k 6 )x 2 + (k 2 + 2k 4 )x + k1 ]sin x
+[3k5 x 2 + 2(3k3 + k 6 )x + (k 2 + 2k 4 )]cos x
yp = [ k3 x 3 + (6k5 k 4 ) x 2 + (4k6 + 6k3 k1 )x + 2(k 2 + k 4 )]cos x
[ k5 x3 (k6 + 6k3 )x2 + (6k5 4k4 )x + (2k6 2k1 )]sin x
+ k5 x 3 + k 6 x 2 + k 2 x cos x + 3k5 x 2 + 2k6 x + k 2 sin x

Substitute y p , y p , and

y p into the differential equation and

compare both sides we get the following equation:

[ k x
3

+ (6k5 k 4 ) x 2 + (4k 6 + 6k3 k1 )x + 2(k 2 + k 4 ) cos x

[ k x
5

(k 6 + 6k3 )x 2 + (6k5 4k 4 )x + (2k 6 2k1 ) sin x

+ k3 x 3 + k 4 x 2 + k1 x cos x + k5 x 3 + k 6 x 2 + k 2 x sin x
= 2 sin x + 4 x cos x

Chapter Five

165

Coefficient of cos x = 0

0 = 2(k 2 + k 4 ), k 2 = k 4
Coefficient of x cos x = 4

(8)

4 = 4k 6 + 6k3 k1 + k1

2k 6 + 3k3 = 2

(9)

Coefficient of x 2 cos x = 0

6k 5 k 4 + k 4 = 0

k 5 = 0
Coefficient of x 3 cos x = 0

(10)

k3 + k3 = 0 , yield nothing

Coefficient of sin x = 2

2 = (2k6 2k1 ) , k1 k6 = 1

(11)

coefficient of x sin x = 0

(6k5 4k 4 k 2 ) + k 2 = 0 , k 4 = 0
Coefficient of x 2 sin x = 0

(12)

0 = (k 6 6k3 ) + k 6

k6 = 3k3
coefficient of x 3 sin x = 0

(13)

k5 + k5 = 0 , yield nothing

From (8), (10) and (12) k 2 = k 4 = k5 = 0


By solving (9), (11) and (13) together we get the following
equations:

0 3 2 k1 2
1 0 6 k = 1

3
0 3 1 k6 0
By solving the above equations we get the following constants:
k1 = 5, k3 = 2 / 9, and k 6 = 2 / 3

166 Linear Differential Equations Of Higher Order

2
2

y p = x 3 + 5 x cos x + x 2 sin x
3
9

2
2

y ( x ) = y h + y p = A cos x + B sin x + x 3 + 5 x cos x + x 2 sin x


3
9

Example 15 Solve the following differential equation:-

y + y + y + y = sin 2 x * cos 3 x
Solution:-From the following rule:

1
(sin ( A B ) + cos( A + B ))
2
We can modify the right hand side of the above equation to be as
1
following:
y + y + y + y = (sin 5 x sin x )
2
3
2
The auxiliary equation is: + + + 1 = 0
sin A. cos B =

1 = 1, and 2 , 3 = j1

y h = c1e x + c2 cos x + c3 sin x


By inspecting the right hand side of the differential equation we can
get the particular solution as following:

y p = A cos 5 x + B sin 5 x + C x cos x + D x sin x


Where A, B, C , and D are constants.

y p = 5 A sin 5 x + 5 B cos 5 x C x sin x


+C cos x + D x cos x + D sin x
y p = 5 A sin 5 x + 5 B cos 5 x + (D C x ) sin x + (C + D x ) cos x
y p = 25 A cos 5 x 25 B sin 5 x + (D C x ) cos x C sin x
(C + D x ) sin x + D cos x

Chapter Five

167
y p = 25 A cos 5 x 25 B sin 5 x + (2 D C x )cos x (2C + D x )sin x
y p = 125 A cos 5 x 125 B sin 5 x (2 D C x )sin x

C cos x (2C + D x )cos x D sin x

y p = 125 A cos 5 x 125 B sin 5 x (3D C x )sin x (3C + D x )cos x


Substitute y p , y p , and

y p into the differential equation and

compare both sides we get the following:

125 A cos 5 x 125B sin 5 x (3D C x ) sin x (3C + D x ) cos x

25 A cos 5 x 25 B sin 5 x + (2 D C x ) cos x (2C + D x ) sin x


5 A sin 5 x + 5 B cos 5 x + (D C x ) sin x + (C + D x ) cos x
+ A cos 5 x + B sin 5 x + C x cos x + D x sin x =

Coefficient of cos 5 x = 0

1
(sin 5 x sin x )
2

125B 25 A + 5B + A = 0

120 B + 24 A = 0

(14)

Coefficient of sin 5 x = 0.5

125 A 25 B 5 A + B = 0.5
120 A 24 B = 0.5
From (14), and (15)

(15)

A=

5
1
, and B =
1248
1248

Coefficient of cos x = 0 3C + 2 D + C + C = 0

C + 2 D = 0

(16)

Coefficient of sin x = 0.5 3D 2C + D + D = 0.5

D + 2C = 0.5
From (16) and (17) we get the following:

(17)

168 Linear Differential Equations Of Higher Order

1
1
C = , and D =
10
5
yp =

1
(5 cos 5 x sin 5 x ) + 0.2 x cos x + 0.1x sin x
1248

y ( x ) = y h + y p = c1e x + c2 cos x + c3 sin x


+

1
(5 cos 5 x sin 5 x ) + 0.2 x cos x + 0.1x sin x
1248

5.4 General Solutions Of Nonhomogeneous


Equations
IF we have the following differential equation:

Differential

(18)
y + f ( x ) y + g ( x ) y = r ( x )
We shall obtain a particular solution of (18) by using the method of
variation parameters as follows:The homogeneous differential equation of (18) is

y + f ( x ) y + g ( x ) y = 0
The general solution of this equation is:-

(19)

y h ( x) = C1 y1 ( x) + C2 y 2 ( x)
The variation parameter method consists in replacing C1 and C2 by
functions u ( x) and v( x) to be determined. So that the resulting
function is given by the following equation:

y p ( x) = u ( x) y1 ( x) + v( x) y2 ( x)

(20)

is a particular solution of (18)

y p ( x) = u y1 + uy1 + vy 2 + vy 2

(21)

We shall see that we can determine u and v as following:

u y1 + vy 2 = 0

(22)

Chapter Five

169

y p ( x) = uy1 + vy 2

(23)

y p ( x) = u y1 + uy1 + vy 2 + vy 2

(24)

By substituting (20), (22) and (24) into (18) and collecting terms
containing u and terms containing v we obtain the following:

u ( y1 + f y1 + g y1 ) + v ( y 2 + f y 2 + g y 2 ) + u y1 + vy 2 = r

(25)

Since y1 , and y2 are solutions of the homogeneous equation (19).


Then, we can equate the first two terms in (25) by zero. So, (25) can
be reduced to be as following:

u y1 + vy 2 = r

(26)

Solving (22) and (26) together we get the following equation:

u =

y2 r
W

and v =

y1r
W

(27)

Where W = y1 y 2 y1 y 2

y2 r
yr
dx and v = 1 dx
(28)
W
W
Substituting (28) into (20) we get the final form as following:-

u =

y p ( x) = y1

y2 r
yr
dx + y2 1 dx
W
W

Example 16 Solve the following differential equation:-

e2x
x
Solution:- The auxiliary equation is 2 4 + 4 = 0
y 4 y + 4 y =

1 = 2 = 2,

y h = (c1+ c2 x ) e 2 x

(29)

170 Linear Differential Equations Of Higher Order


The particular solution can be obtained from (29)

y p ( x) = y1

y2 r
yr
dx + y 2 1 dx
W
W

e2x
W = 2 x
2e

xe 2 x
4x
e
=
(2 x + 1)e 2 x

y p ( x ) = e

2x

xe 2 x e 2 x / x
e4x

dx + xe

2x

e2xe2x / x
e4x

dx

y p ( x ) = e 2 x x + x e 2 x ln ( x )
= e 2 x (ln x x )
y ( x ) = (c1+ c2 x ) e 2 x + e 2 x (ln x x )
y ( x ) = (c1+ c2 x + ln x x ) e 2 x
Example 17 Solve the following differential equation:-

y + 3 y + 2 y = 2 xe x
Solution:-

The auxiliary equation is : 2 + 3 + 2 = 0

1 = 1, 2 = 2

y1 ( x) = e x ,

y 2 ( x) = e 2 x

y h ( x) = C1 e x + C2 e 2 x
The particular solution can be obtained from (29). Where,
e x
e2x
W =
= e 3 x
x
2x
e
2e
y p ( x ) = e

e2x * 2x e x
e 3x

dx + e

2x

e x * 2 xe x
e 3x

dx

Chapter Five

171
2

ex
ex
x
x2
y p ( x) = e +
e +
1 + 2x
1+ x
2
x

y p ( x) = e x

1 + 3x + 2 x 2
2

2
x

y ( x) = y h + y p = C1 e x + C2 e 2 x + e x

1 + 3x + 2 x 2

Example 18 Solve the following differential equation:-

y + 9 y = x cos x
Solution:- The auxiliary equation is 2 + 9 = 0

1 , 2 = j 3

y h = A cos 3 x + B sin 3 x

By inspecting the right hand side of the differential equation we can


get the particular solution as following:

y p = (k1 x + k o ) cos x + (k 2 x + k3 ) sin x


y p = (k1 x + ko ) ( sin x ) + k1 cos x
+(k 2 x + k3 ) cos x + k 2 sin x

y p = (k1 x + ko ) ( cos x ) k1 sin x k1 sin x

+(k 2 x + k3 )( sin x ) + k 2 cos x + k 2 cos x

Substitute y p , y p , and y p into the differential equation and


compare both sides we get the following:

(k1x + ko ) ( cos x ) k1 sin x k1 sin x


+ (k 2 x + k3 )( sin x ) + k 2 cos x + k 2 cos x
+ 9[(k1 x + k o ) cos x + (k 2 x + k3 ) sin x ] = x cos x

172 Linear Differential Equations Of Higher Order


Coefficient of x cos x = 1

k1 + 9k1 = 1 , k1 = 1 / 8

(30)

Coefficient of cos x = 0

k o + 2k 2 + 9k o = 0 ,

2 k 2 + 8k o = 0

(31)

2k1 + 8k3 = 0

(32)

Coefficient of sin x = 0

2k1 k3 + 9k3 = 0 ,

Substitute from (30) into (32) we get:

8k 3 = 2 / 8 ,

k3 =

1
32

(33)

Coefficient of x sin x = 0

k 2 + 9k 2 = 0

k2 = 0

(34)

Substitute (7) into (4) we get the following:

ko = 0

(35)

Substitute (30), (33), (34) and (35) into y p we get:

yp =

x cos x sin x
+
8
32

x sin x sin x
+
(36)
8
32
Another solution for obtaining y p by using Wronskian determinant.

y ( x ) = A cos 3x + B sin 3 x +

y1 = cos 3 x , and y 2 sin 3 x


cos 3x
sin 3x
W =
= 3 cos 2 3 x + 3 sin 2 3 x = 3
3 sin 3 x 3 cos 3 x
y p = cos 3 x

x sin 3 x cos x
x cos 3 x cos x
dx + sin 3 x
dx
3
3

Chapter Five

yp =

173

cos 3 x x cos 4 x sin 4 x x cos 2 x sin 2 x


+

3
8
32
4
8

sin 3 x cos 4 x x sin 4 x cos 2 x x sin 2 x


+
+
+
3 32
8
8
4
x cos 3x cos 4 x cos 3x sin 4 x x cos 3x cos 2 x
yp =

+
3*8
3 * 32
3* 4
cos 3x sin 2 x sin 3 x cos 4 x x sin 3x sin 4 x

+
+
3*8
3 * 32
3*8
sin 3 x cos 2 x x sin 3x sin 2 x
+
+
3*8
3* 4
x[cos 3x cos 4 x + sin 3x sin 4 x ]
yp =
3*8
sin 4 xcox3x sin 3x cos 4 x

3 * 32
x[cos 3 x cos 2 x + sin 3x sin 2 x ]
+
3* 4
sin 3x cos 2 x cos 3x sin 2 x
+
3*8
x cos x sin x x cos x sin x
yp =

+
+
3*8
3 * 32
3* 4
3*8
x cos x sin x
yp =
+
8
32
x cos x sin x
y ( x ) = A cos 3x + B sin 3x +
+
8
32
It is clear this is the same as we get in (36)
+

Example 19 Solve the following differential equation:y 5 y + 6 y = x 2 e 2 x


Solution:- The auxiliary equation is 2 5 + 6 = 0

1 = 2,

2 = 3

y h = c1e 2 x + c2 e3 x

(37)

174 Linear Differential Equations Of Higher Order


By inspecting the right hand side of the differential equation we can

get the particular solution as following:

y p = k 2 x 2 + k1 x + k o xe 2 x

y p = k 2 x 3 + k1 x 2 + k o x e 2 x

(
) (
)
y p = 4(k 2 x 3 + k1 x 2 + k o x )e 2 x + 2(3k 2 x 2 + k1 x + k o )e 2 x
+2(3k 2 x 2 + k1 x + k o )e 2 x + (6k 2 x + 2k1 )e 2 x
y p = 2 k 2 x 3 + k1 x 2 + k o x e 2 x + 3k 2 x 2 + k1 x + k o e 2 x

Substitute y p , y p , and y p into the differential equation and


compare both sides we get:
4 k 2 x 3 + k1 x 2 + k o x e 2 x + 2 3k 2 x 2 + k1 x + k o e 2 x

+2 3k 2 x 2 + k1 x + k o e 2 x + (6k 2 x + 2k1 )e 2 x

[(
+ 6[(k x

) ]

5 2 k 2 x 3 + k1 x 2 + k o x e 2 x + 3k 2 x 2 + k1 x + k o e 2 x
2

) ]

+ k1 x 2 + k o x e 2 x = x 2 e 2 x

Coefficient of e 2 x = 0

2k o + 2k o + 2k1 5k o = 0

Then, 2k1 k o = 0

(38)

Coefficient of xe 2 x = 0

4k o + 4k1 + 4k1 + 6k 2 10k o 10k1 + 6k o = 0


6k 2 2k1 = 0
Coefficient of x 2 e 2 x = 1
4k1 + 6k 2 + 6k 2 10k1 15k 2 + 6k1 = 1
1
3k 2 = 1 , k 2 =
3
Substitute from (40) into (39) we get:

(39)

(40)

Chapter Five

175

6
,
k1 = 1
(3 * 2)
Substitute from (41) into (38) we get: ko = 2
x2

+ x + 2 x e2x
y p =

k1 =

(41)

x2

y ( x ) = c1e + c2 e
+ x + 2 x e2x
(42)

Another solution to obtain y p by using the Wronskian theory


2x

y1 = e

2x

3x

, and y 2 = e

y p = e

2x

3x

W =

e3 x x 2e 2 x
e

5x

dx + e

e2x
2e
3x

e3x

2x

3e

3x

= e5 x

e 2 x x 2e 2 x

5x

dx

x
e3 x x 2 + 2 x + 2 e x
3
3

2 x x
y p = e
+ x2 + 2x + 2

y p = e 2 x *

x3
y ( x ) = c1e + c2 e + x 2 + 2 x + 2 e 2 x

2x
3 x x
y ( x ) = (c1 2 )e + c2 e
+ x2 + 2x e2x
3

* 2x
3 x x
y ( x ) = c1 e + c2 e
+ x2 + 2x e2x

2x

3x

(43)

Where c1* = c1 2
As we see the general solution (43) is the same as we get before
in (42).

176 Linear Differential Equations Of Higher Order


5.5 Cauchy Equations

The following equations are so called second order and third order
Cauchy differential equations.

x 2 y + axy + by = 0

(44)

x 3 y + ax 2 y + bxy + cy = 0

(45)

The above two equations can be solved by substituting y = x m to


obtain the auxiliary equations.
For second order Cauchy equation, if we apply y = x m in (44) we
get the auxiliary equation (46)

m 2 + (a 1)m + b = 0
We have two roots of (46). So, we have three different cases,

(46)

Case 1 If m1 and m2 are two different roots of (46), then the two

functions y1 ( x) = x m1 and y 2 ( x) = x m2

(47)

Constitute a fundamental system of (44). So, the corresponding


general solution is y ( x) = C1 x m1 + C 2 x m2

(48)

Case 2 If there is double roots (i.e. m1 = m2 = m ), then the solution

(49)
takes the following form:- y ( x) = (C1 + C 2 Ln x )x
Case 3 If there are two complex conjugate roots m1 , m2 = j
m

y h ( x) = x C1Cos ( Ln( x )) + C 2 sin ( Ln ( x ))


(50)
The same way can be used with the third order Cauchy differential
equation (45). So the auxiliary equation will be as follows:-

m 3 + (a 3)m 2 + (b a + 2)m + c = 0

(51)

Chapter Five

177
Case 1 are three different roots of (51), so the general solution of

(45) is: y ( x) = C1 x m1 + C 2 x m2 + C3 x m3

(52)

Case 2 If there is double roots (i.e. m1 = m2 = m ), then the solution

takes the following form:- y ( x) = (C1 + C2 Ln x )x

+ C3 x m3 (53)

Case 3 If there are two complex conjugate roots m1 , m2 = j

y h ( x) = x C1Cos ( Ln( x )) + C 2 sin ( Ln ( x )) + C3 x m3


Example 20 Solve the following differential equation:-

x 2 y + 3 x y + y = 0
Solution:- From (46) the auxiliary equation is

m 2 + 2m + 1 = 0 Then m1 = m2 = 1
y ( x) = (C1 + C 2 Ln x )x 1
Example 21 Solve the following differential equation:-

( x 2 ) 2 y + 5 ( x 2 ) y + 3 y = 0
Solution:-

Put t = x 2,

dt = dx

t 2 y + 5t y + 3 y = 0
From (46) the auxiliary equation is

m 2 + 4m + 3 = 0 m1 = 1,

m2 = 3 ,

y ( x) = C1t 1 + C2t 3 But, t = x 2


C
C2
y ( x) = 1 +
x 2 ( x 2 )3

(54)

178 Linear Differential Equations Of Higher Order


Example 22 Solve the following differential equation:-

x 2 y + 9 x y + 25 y = 125
Solutions:- From (46) the auxiliary equation is

m 2 + 8m + 25 = 0

m1 , m2 = 4 j 3

y h ( x) = x 4 C1Cos ( Ln( x 3 )) + C2 sin ( Ln ( x 3 ))


Assume y p = C3 .Substitute

in

the

equation,

C3 = 5 y p = 5 . Then the total solution is

we

get

y ( x) = y h ( x) + y p ( x) = x 4 C1Cos ( Ln( x 3 )) + C 2 sin ( Ln ( x 3 )) + 5


Example 23 Solve the following differential equation:x 3 y 9 x 2 y + 34 x y 50 y = 0
Solutions:- From (51), the auxiliary equation is

m 3 12m 2 + 45m 50 = 0

m1 = 2, m2 = m3 = 5

y h ( x) = C1 x 2 + (C2 + C3 Ln ( x) )x 5
5.6 Applications
5.6.1 Free Oscillation

Fig.1

Example 24 A weight W suspended from the

end of a vertical spring stretches it y


meters. Let A and B represents the

position of the end of the spring

before and after the weight W is put on. B is called


the equilibrium position. Call y the displacement of W at any
position C from the equilibrium position. Assume that y is positive
in the down ward direction. If we pull the body down a certain

Chapter Five

179
distance and then release it, it undergoes a motion. We want to

determine the motion of this mechanical system. For this purpose


we consider the forces acting on the body during the motion. This
will lead to a differential equation, and by solving this differential
equation we shall then obtain the displacement as a function of time.
The first force acting on the weight is the attraction of gravity.

F1 = mg
Where m is the mass of the body and (g=9.81

(55)
m/sec.) is the

acceleration of gravity.
The next force to be considered is the spring force extended by
the spring. From Hook s law

F2 = ky
(56)
Where y is the stretch, the constant of proportionality k is called the
spring modulus.
The last force acting on the weight is the weight upward due to
the weight stretch the spring by an amount y0 .
Then also from Hook s law:-

F3 = ky0
It is clear that from equilibrium

(57)

mg = ky0
(58)
So that the total force acting on the weight at any position y is
FT = mg ky0 ky
(59)
Substitute (58) into (59).
FT = ky
(60)
By Newton s law, Mass*acceleration=net force on the weight

180 Linear Differential Equations Of Higher Order


m&y& = ky , or m&y& + ky = 0

(61)

Is the differential equation represents the system shown in Fig.1.


The roots of (61) are complex. So, the oscillation of the system is
called harmonic oscillation.
If we connect the mass m to the dashpot, then we have to take the
corresponding various damping into account. The damping force has
direction opposite to the instantaneous motion. So, the damping
force is of the form

F4 = cy&
(62)
Where c is the damping constant. So the resulting force acting on
the body when stretched and released is

FT = ky cy&
(63)
So the motion of the system is governed by the following
differential equation

m&y& + cy& + ky = 0

c
k
The auxiliary equation is: 2 + + = 0
m
m
1
c
1, 2 =

c 2 4mk
2m 2m
c
1
=
and =
c 2 4mk
2m
2m
Where,
1,2 =

(64)
(65)
(66)
(67)
(68)

The form of solution of (55) will depend on the damping. So, we


have three cases:

Chapter Five

181

Case 1 c 2 > 4mk , Then the roots of auxiliary equation are distinct
real roots (over damping).
Case 2 c 2 < 4mk , Then the roots of auxiliary equation are complex

conjugate roots (under damping).


Case 3 c 2 = 4mk . Then the roots of auxiliary equation are double

roots (critical damping).


5.6.2 Electric Circuit
Example 25 Find the current in the RLC circuit in Fig.2. Assume

L=20H,

for

vR(t)

C=0.002

Farads and E (t ) = 481cos10 t .


Solution:-, From KVL

E(t)
_

I(t)

_
+

di
1
+ RI + idt = 481cos10 t
dt
c
Differentiate both sides of the
L

VL + VR + VC = E (t )

R=160

v L ( 0) = 0

I (0) = 0 and

vL(t)
Fig.2

above differential equation.

1
LI&& + RI& + I = 4810 sin 10t
c
20 I&& + 160 I& + 500 I = 4810 sin 10t
I&& + 8 I& + 25 I = 240.5 sin 10 t
The homogeneous solution:- 2 + 8 + 25 = 0 , = 4 j 3

(69)

vC(t)

182 Linear Differential Equations Of Higher Order

I h (t ) = e 4 x [ A cos 3t + B sin 3t ]

(70)

The Particular Solution:- I P = k1 sin 10 t + k 2 cos 10 t

I&P = 10k1 cos10 t 10 k 2 sin 10 t


I&&P = 100 k1 sin 10 t 100 k 2 cos10 t
Substitute in (69) we get:- k1 = 1.5

and

k 2 = 1.6

I P (t ) = 1.5 sin 10 t 1.6 cos10 t

(71)

From (70) and (71) we get the general solution


I (t ) = I h (t ) + I P (t ) = e 4 x [ A cos 3t + B sin 3t ] 1.5 sin 10 t 1.6 cos 10 t (72)

Q I ( 0 ) = 0 , then 0 = A 1.6, A = 1.6

Q v L (0) = LI&(0) = 0 I&(0) = 0


I&(0) = 0 = 4e 4 x [ A cos 3t + B sin 3t ] + e 4 x [3 A cos 3t + 3B sin 3t ]
15 cos 10 t + 16 sin 10 t t = 0

Then, B = 7.13333 . Substitute A and B into (72) we get:-

I (t ) = e 4 x [1.6 cos 3t + 7.133 sin 3t ] 1.5 sin 10 t 1.6 cos 10 t


5.6.3 Bending of Beams

A horizontal beam situated on the x axis of the xy coordinate


system and supported in various ways, bends under the influence of
vertical loads. The deflection curve of the beam often called the
elastic curve shown in Fig.3., is given by y = f (x) where y is
measured as positive downward. This curve may be determined
from the following equation:

Chapter Five

EIy

(1 + y )

3/ 2
2

183

= M ( x)

(73)

Where M(x) is the bending moment at x and is to algebraic sum of


the moment being taken as positive for forces in the positive y and
negative otherwise.
For small deflections, y is small and the following approximate
equation can be used

EIy = M (x)

(74)

Where E is Young s modulus and I is the moment of inertia of a


cross section of the beam about its central axis, is called the flexural

rigidity and is generally constant.


Example 26 A beam of length L is simply supported at both ends as

shown in Fig.3. (a) Find the deflection if the beam has constant
weight W per unit length and (b) determine the maximum deflection.
x

L-x

B
x
Deflection, y(x)

Fig.3
Solution:- The total weight of the beam is WL, so each end supports

weight is

1
WL . Let x be the distance from the left end A of the
2

beam. To find the bending moment M at x, consider forces to the left


of x

184 Linear Differential Equations Of Higher Order

() Force

1
1
WL at A has moment WLx
2
2

() Force due to weight of the beam to left of x has magnitude Wx

1
and moment Wx( x / 2) = Wx 2
2
Then the total bending moment at x is

1 2 1
Wx WLx .
2
2

1
1
EIy = Wx 2 WLx
2
2
By solving this equation for y (0) = 0 and y (0) = 0 we find,

(75)

W
( x 4 2 Lx 3 + L3 x)
(76)
24 EI
(b) The maximum deflection occurs at x = L / 2 , then substitute
5WL4
in (76) for x = L / 2 we get the maximum deflection as
384 EI
y ( x) =

Example 27 A beam of length 10m is simply supported at both ends

as shown in Fig.4. (a) Find the deflection if the beam has constant
weight 3000 Newton per meter and 30000 Newton concentrated
load at the middle of the beam (b) determine the maximum
deflection.

L-x
C

5-x

30000 N

Deflection, y(x)

Fig.4

B
x

Chapter Five

185
Solution:-(a) The total weight of the beam is 3000*10=30000

Newton then the total weight is 30000+30000=60000 Newton, so


each end supports weight is 60000 / 2 = 30000 Newton. Let x be the
distance from the left end A of the beam. To find the bending
moment M at x, consider forces to the left of x
() Force 30000 N at A has moment 30000 x
() Force due to weight of the beam to left of x has
magnitude 3000x and moment 3000 x( x / 2) = 1500 x 2
Then the total bending moment at x is 1500 x 2 30000 x .

EIy = 1500 x 2 30000 x

(77)

y h = c1 + c2 x

(78)

y P = x 2 A1 x 2 + A2 x + A3 = A1 x 4 + A2 x 3 + A3 x 2
y P = 12 A1 x 2 + 6 A2 x + 2 A3
Substitute (79) into (77)

(79)

EI 12 A1 x 2 + 6 A2 x + 2 A3 = 1500 x 2 30000 x
A1 =

1500 125
=
,
12 EI EI

A2 =

30000
5000
=
,
6 EI
EI

A3 = 0

Then the general solution of (77) is:

y ( x) =

1
125 x 4 5000 x 3 + c2 x + c1
EI

The boundary condition is : y (0) = 0, y ( L) = 0 ,

(80)

186 Linear Differential Equations Of Higher Order

1
375000
5000 L2 125L3 =
EI
EI
Substitute (81) into (89) we get:

c1 = 0,

c2 =

(81)

1
125 x 4 5000 x 3 + 375000 x
(82)
EI
(b) The maximum deflection occurs at x = L / 2 = 5m , then

y ( x) =

substitute in (82) for x = 5 we get the maximum


deflection as

Example

28

1328125
EI

10

cantilever beam has one


end

L-x
A

horizontally

imbedded in concrete
and a force 12000 N

B
Deflection, y(x) Fig.5

12000 N

acting on the other end as shown in Fig.5. Find (a) the deflection
and (b) the maximum deflection of the beam assuming its weight is
3000 Newton/meter.
Solution:-

a) Let x be the distance from the left end B of the beam. To find the
bending moment M at x, consider forces to the right of x
()

Force 12000 N at B has moment 12000 x

()

Force due to weight of the beam to the right of x has

magnitude 3000x and moment 3000 x( x / 2) = 1500 x 2

Then the total bending moment at x is 1500 x 2 + 12000 x .

Chapter Five

187

EIy = 1500 x 2 + 12000 x

(83)

y h = c1 + c2 x

(84)

y P = x 2 A1 x 2 + A2 x + A3 = A1 x 4 + A2 x 3 + A3 x 2
y P = 12 A1 x 2 + 6 A2 x + 2 A3

(85)

Substitute (85) into (83) we get:

EI 12 A1 x 2 + 6 A2 x + 2 A3 = 1500 x 2 + 12000 x
A1 =

1500 125
=
,
12 EI EI

A2 =

12000 2000
=
,
6 EI
EI

A3 = 0

Then the general solution of (83) is:

y ( x) =

1
125 x 4 + 2000 x 3 + c2 x + c1
EI

The boundary condition is : y (10) = 0,


7.75 * 10 6
c1 =
,
EI

(86)
y (10) = 0 ,

1.1 * 10 6
c2 =
EI

(87)

Substitute (87) into (86)

y ( x) =

1
125 x 4 + 2000 x 3 1.1 * 10 6 x + 7.75 * 10 6
EI

(c) The maximum deflection occurs at

x = 0 , then

substitute in (88) for x = 0 we get the maximum

7.75 * 10 6
deflection as
EI

(88)

188 Linear Differential Equations Of Higher Order


Problems
Solve the following differential equations

y + y 2 y = 0

y + 6 y + 9 y = 0

y 4 y + 13 y = 0

y + y + 9 y 9 y = 0

y 6 y + 9 y = e 2 x

y y = 4 xe x

y y = sin 2 x

y + y = csc x

y 3 y + 2 y = sin e x

y + 4 y = sec 2 2 x

y 2 y 5 y + 6 y = e 2 x + 3

y 5 y + 8 y 4 y = e 2 x + 2e x + 3e x

y + 4 y = sin 2 x + cos 2 x

y 8 y + 25 y = 5 x 3e x 7e x

y 9 y + 14 y = 3x 2 5 sin 2 x + 7 xe 6 x

y (4 )+ y = 1 e x

y + 2 y + y = e x Ln( x)

( )
(

)2

Chapter Five

189

x 2 y + xy 4 y = 0

x 3 y 3x 2 y + 6 xy 6 y = 0

x 3 y + xy y = 0

(2 x + 1)2 y 2(2 x + 1) y 12 y = 0

) Find the current in the RLC circuit in Fig.2. Assume

I (0) = 0 and v L (0) = 1V for R=160 ohms, L=20H, C=0.002


farads and E (t ) = te t .
) Find the current I(t) in Fig.2. Assume I (0) = 1A and

v L ( 0) = 1 V

for R=20

, L=5H, C=0.04 farads and

E (t ) = 10 cosh 5 t .
) A 20 kg weight suspended from the end of a vertical spring
stretches it 10 cm. assuming no external forces, find the
position of the weight at any time if initially the weight is
pulled down 10 cm and released. (a) Without dashpot (b) If
we connect the mass m to the dashpot with damping constant
c=1, state which type of damping you have and find the
position of the weight at any time.

Chapter 6
Laplace Transforms
6.1 Definition
For any given function f (t ), t 0 we can define another function

F (s ) by the following definite integral:

L{ f (t )} = F ( s ) = e st f (t )dt

(1)

The function F (s ) is called the Laplace transform of the function


f (t ) . Note that F (s ) is simply the total area under the curve f (t )

for t=0 to infinity, whereas F (s ) for s greater than 0 is a "weighted"


integral of f (t ) , since the multiplier e st is a decaying exponential
function equal to 1 at t = 0 . Thus as s increases, F (s ) represents the
area under f (t ) weighted more and more toward the initial region
near t = 0 . Knowing the value of F (s ) for all s is sufficient to fully
specify f (t ) , and conversely knowing f (t ) for all t is sufficient to
determine F (s ) .
The benefit of considering the Laplace transform of a function is
that it sometimes enables us to solve problems easily in the "s
domain" that would be difficult to solve in the "t domain".
See Appendix 1 for table of general properties of Laplace transform.
Now let us see some helpful examples of these transforms.

191

Chapter Six

Example 1: find Laplace transform of the following function:

f (t ) = 1

e st
Solution: F ( s ) = e st f (t )dt = e st dt =
s
0
0

=
0

0 1 1
=
s s

Example 2: find Laplace transform of the following function:

f (t ) = e at
Solution:

e ( s a )t
st
st at
( s a )t
F ( s ) = e f (t )dt = e e dt = e
dt =
( s a)
0
0
0

=
0

1
sa

6.2 Inverse Laplace Transforms

If L{ f (t )} = F ( s ) , then we can call f (t ) the inverse Laplace


transform of F (s) and write L1{F ( s )} = f (t )

Example3 If F ( s ) =

1
s2

Solution: Since F ( s ) =

, find f (t )
1 1
,
we
have
L
2 = t f (t ) = t
s2
s

Theorem 1 The Laplace transform and inverse Laplace

transform is linear operator

L{c1 f1 (t ) + c2 f 2 (t )} = c1L{ f1 (t )} + c2 L{ f 2 (t )}
and

L{c1F1 ( s) + c2 F2 ( s)} = c1L{F1 ( s)} + c2 L{F2 ( s)}

192 Laplace Transforms


Theorem 2

Suppose that

f (t ) is continuous and its

f (t ) is piecewise

continuous in any interval 0 t T and f (t ) is of exponent order


for

t >T .

L{ f (t )} = sL{ f (t )} f (0)
This can be extended to be as following:
L{ f

( n)

(t )} = s n L{ f (t )} s n 1 f (0) s n 2 f (0) s n 3 f (0)... f

n 1

(0) (2)

Theorem 3

If L1{F ( s )} = f (t ) ,
L1{F ( s a )} = e at f (t )

(3)

Proof:
1

L {F ( s a )} =

f (t ) e

( s a )t

dt = f (t ) e at e st dt =e at f (t )
0

Theorem 4
t

If, g (t ) = f (t ) dt
0

1
L{g (t )} = L{ f (t )}
s

Example 4 Let F ( s ) =

(4)

1
s(s 2 + w2 )

, find f (t )

193

Chapter Six

1
Solution: We know that L1 2
= sin t
( s + 2 )
1 t
L 2
= sin t dt
s ( s + 2 ) 0

1
1
[1 cos t ]
L1 2
=
s ( s + 2 ) 2
Example 5 Let F ( s ) =

1
s 2 (s 2 + 2 )

, find f (t )

Solution: We know from the previous example that:

1
1
[1 cos t ]
L1 2
=
s ( s + 2 ) 2
1 t
L 2 2
=
[1 cost ]dt
s ( s + 2 ) 2 0

1
1
1

L1 2 2
t
sin

s ( s + 2 ) 2

Example 6

Proof that L{sin at} =

a
2

(s + a 2 )

e jat e jat
Solution: We know that: sin at =
j2
It follows from the linear character of the transform that:
L{sin at} =

1
1
L{e jat }
L{e jat }
j2
j2

194 Laplace Transforms

1
1
1
1
1
j 2a
a

=
=
j 2 ( s ja ) j 2 ( s + ja ) j 2 ( s 2 + a 2 ) ( s 2 + a 2 )
The same procedure can be used to proof that:

L{sin at} =

L{cos at} =

s
2

(s + a 2 )

Example 7

Find the Laplace transform of the following functions


(a) ae bt (b) at 2 (c) 4 cos 5t (d) 3 / t (e) sin 2 t
Solution:

(a) L{ae

bt

} = ae

bt st

dt = a e ( s + b)t dt =
0

(b) L{at } = at 2 e st dt = a
2

(3)

(c) L{4 cos 5t} = 4 *

s
s 2 + 25

s3

a * 2!
s3

a
s+b

2a
s3

4s

s 2 + 25

(d) L{3 / t } = 3L{t1 / 2 } = 3

(1 / 2)
s1 / 2

= 3
s
s

(e) L{sin 2 t} = L (1 cos 2t )


2

1
1
1
L{sin 2 t} = L (1 cos 2t ) = L(1) L{cos 2t}
2
2
2
2
1
s
=
2
=
2
2 s 2 s + 4 s ( s + 4)

195

Chapter Six

Example 8 Find the Laplace transform of the following functions:

(a) e 5t t 3 (b) e 5t cos 4t

} { }s = s 5 = s34!

Solution: (a) L e 5t t 3 = L t 3

(b) L e 5t cos 4t = L{cos 4t} s = s + 5 =

=
s = s 5

(s 5)4

s
s 2 + 16 s = s + 5

s+5
( s + 5) 2 + 16

Theorem 5

For n = 1,2,3,.....

L t f (t ) = (1)

dn
ds n

F (s)

(6)

Where F ( s ) = L{ f (t )}

Example 9

Find Laplace transform of the following functions


(a) te at (b) t sin wt (c) t 2 sin wt (d) te t cos t (e) t 3 cos t
Solution:

{ }

(a) L te at =

d
d 1
1
L(e at ) =
=
ds
ds s a (s a )2

(b) L {t sin wt} =

d
d
w
2 ws
L(sin wt ) =
=
2
2
ds
ds s + w
s 2 + w2

2 ws
d
d
(c) L t sin wt = L(t sin wt ) =
ds
ds s 2 + w 2
2

)2

6 ws 2 2 w3

) (s 2 + w2 )3
2

196 Laplace Transforms

L te t cos t =
(d)

d
d
L(e t cos t ) = L(cos t )
ds
ds
s s +1

(
d s + 1
s + 1)2 1
=
=
ds (s + 1)2 + 1 (s + 1)2 + 1 2

(e) t 3 cos t
we know that L{cos t} =

s
s2 + 2

d3
s

L t cost = ( 1)
2

3
2
ds s +
3

d 2 s 2 + 2 2 s 2
L t cost = 2

ds s 2 + 2

)
(
2 s ) + (s 2 2 )(2 * (s 2 + 2 )* 2 s )
{
}

(s 2 + 2 )4

3
2
(
s 2 + 2 ) (6 s 2 6 2 ) 3 * 2 s (s 2 + 2 ) * (2 s 3 6 2 s )
=
(s 2 + 2 )6
2
6(s 2 + 2 ) (s 2 2 ) + 12 s 2 (s 2 3 2 )
3
L{ t cos t }=
(s 2 + 2 )5

d s2 + 2
L t cos t =
ds

Example 10 Solve the following differential equation:


y + 2 y + 5 y = 0 ,

Solution:

y (0) = 2,

y (0) = 4

197

Chapter Six

s 2Y ( s ) sy (0) y (0) + 2[ sY ( s ) y (0)] + 5Y ( s ) = 0


Y (s) =

2s
s 2 + 2s + 5

=2

s +1
( s + 1) 2 + 2 2

2
( s + 1) 2 + 2 2

y (t ) = 2e t cos 2t e t sin 2t

y (t ) = e t (2 cos 2t sin 2t )
6.3 Partial Fractions

As explained in the previous examples in many cases the function

Y (s) is so important to express it in terms of its partial fraction. In


most cases Y (s ) takes the following form:

G ( s)
H ( s)
Where G (s ) and H (s ) are polynomials of s.
Y ( s) =

(7)

Assume G (s ) and H (s ) have no common factors and have real


coefficients. The degree of G (s ) is lower than H(s).
Let s=a be a root of H ( s ) = 0 . There are many cases for the roots of

H (s ) will be explained in the following cases:


Case 1 Unrepeated factors

A
G(s)
A
A2
= 1 +
+ .... n + W ( s)
(8)
H ( s) s a1 s a2
s an
Where W (s ) is denotes the sum of the partial fractions
Y (s) =

corresponding to all the (unrepeated or repeated) linear factors of

H (s ) which are not under consideration.

198 Laplace Transforms

L1{Y ( s )} = A1 e a1t + A2 e a 2 t + ....... An e a n t + L1{W ( s )}

(9)

The constants A1 , A2 ,....... An can be determined by multiplying


both sides of (8) by (s a1 ) and by assuming s = a1 we can obtain

A1 . Same procedure can be carried out to obtain A2 by multiplying


both sides of (8) by (s a2 ) and by assuming s = a2 we can obtain

A2 . Thin we can say, An can be obtained by multiplying both sides


of (8) by (s an ) and by assuming s = an we can obtain An . To
illustrate this procedure consider we need to obtain An multiply
both sides of (8) by (s an ) we get the following equation:

(s an ) G(s) = (s an )A1 + (s an )A2 + ....An + (s an )W (s)


H ( s)

s a1

s a2

Let s = an in the above equation then the terms involving

A1 , A2 , .... An 1 all will disappear, and An will be the only constant


remains in the equation following:

An = (s an )

G( s)
H (s) s = a

(10)
n

Formulas for A1 , A2 , An can be obtained similarly (By cyclic


permutation of the subscripts.
Example 11 Find Laplace transform of the following function:

G ( s)
2s 2 4
Y ( s) =
=
H ( s) s 3 4s 2 + s + 6

199

Chapter Six

Solution:

Y ( s) =

A3
A1
A2
G ( s)
2s 2 4
=
+
+
= 3
H ( s ) s 4 s 2 + s + 6 ( s 2) ( s + 1) ( s 3)

(s 2) * G(s)
(s 2) 2s 2 4
A1 =
=
H ( s)
s = 2 (s 2)(s + 1)(s 3)
A2 =

(s + 1) * G(s)
(s + 1) 2s 4
=
H ( s)
s=1 ( s 2)(s + 1)(s 3)

=
s =2

=
s=1

(s 3) * G(s)
(s 3) 2s 2 4
A3 =
=
H ( s)
s =3 ( s 2)(s + 1)(s 3)

G ( s) 4 / 3 1 / 6
7/2
Y ( s) =
=
+
+
H ( s ) ( s 2) ( s + 1) ( s 3)

4
4
=
3 * 1
3

1
2
=
6
3 * 4

=
s =3

14 7
=
4 2

4
1
7
y (t ) = e 2t e t + e3t
3
6
2
m
Case 2 Repeated factor ( s a ) , in this case;

Y (s) =

Am
Am 1
G(s)
A1
=
+
+
......
+ W ( s)
(s a )
H ( s ) (s a )m (s a )m 1

t m1
t m2
L {Y(s)}= e Am
+ Am1
+ ....+ A2t + A1 + L1W(s)
(m 2)!

(m 1)!
1

at

Where: Am = (s a )m

G (s )
H (s )

d m k (s a )m G ( s)
1
Ak =
H ( s)
(m k ) ! ds m k
Where, k = 1,2,...., m 1

(11)

(12)
(13)

,
s =a

(14)

200 Laplace Transforms


Example 12 Solve the following initial value problem:
y 3 y + 2 y = 4 t + e 3t ,

y ( 0 ) = 1, y ( 0 ) = 1

Solution:

s 2Y ( s ) sy (0) y(0) 3[ sY ( s ) y (0)] + 2Y ( s ) =

4
s2

1
s 3

G ( s ) s 4 7 s 3 + 13s 2 + 4s 12
=
Y (s) =
H (s)
s 2 ( s 3)( s 2 3s + 2)
A
A
B
C
D
= 22 + 1 +
+
+
s ( s 3) ( s 2) ( s 1)
s
12
G (s )
s 4 7 s 3 + 13s 2 + 4 s 12
=
=2
A2 = s *
=
6
H (s ) s = 0
( s 3)( s 2 3s + 2)
s =0
2

d s 4 7 s 3 + 13s 2 + 4 s 12
1
=3
A1 =
( 2 1)! ds
( s 3)( s 2 3s + 2)
s =0
B = (s 3) *

C=

1
G (s )
s 4 7 s 3 + 13s 2 + 4 s 12
=
=
2
H (s ) s = 3
s 2 ( s 2 3s + 2)
s =3

s 4 7 s 3 + 13s 2 + 4 s 12
s 2 ( s 3)( s 1)

= 2
s=2

1
G (s )
s 4 7 s 3 + 13s 2 + 4 s 12
=

D = (s 1) *
=
2
H (s ) s =1
s 2 ( s 3)( s 2)
s =1
Y (s) =

3
1/ 2
2
1/ 2
+
+

s 2 s ( s 3) ( s 2) ( s 1)

1
1
y (t ) = 2t + 3 + e3t 2e 2t et
2
2

201

Chapter Six

Case 3 Unrepeated complex factors (s a )


2
2
Where a = + j , a = j , ( s a )( s a ) = ( s ) +

Y ( s) =

G(s)
As + B
=
+ W (s)
H ( s ) (s )2 + 2

L1{Y ( s)} =

(15)

1 t
e [Ta cos t + S a sin t ] + L1{W ( s)}

(16)

Where Ra ( s) = S a + jTa = ( s ) 2 + 2

] HG((ss))

(17)
s =a

Example 13 Solve the initial value problem


y ( 0 ) = 2 , y ( 0 ) = 4

y + 2 y + 5 y = 0 ,

Solution: S 2Y ( s ) sy (0) y (0) + 2[ sY ( s ) y (0)] + 5Y ( s ) = 0

2s
2s
G ( s)
= 2
=
H ( s ) s + 2 s + 5 ( s (1 + j 2))( s (1 j 2))
a = 1 + j 2, a = 1 j 2
= 1, = 2
G ( s)
G(s)
Ra ( s ) = S a + jTa = ( s ) 2 + 2
= ( s + 1) 2 + 4
H ( s)
H (s)
G (a)
Ra (a ) = S a + jTa = (1 + j 2 + 1) 2 + 4
= 2 s = 2 + j 4
H (a)
S a = 2, Ta = 4
1
L1{Y ( s )} = et [Ta cos t + S a sin t ] + L1{W ( s)}
Y ( s) =

[
[

1
= e t [4 cos 2 t 2 sin 2 t ]
2
= e t [2 cos 2 t sin 2 t ]

202 Laplace Transforms


Example 14 Solve the initial value problem
y 3 y + 2 y = e t ,

y ( 0 ) = 1, y ( 0 ) = 1

Solution: s 2Y ( s ) sy (0) y (0) 3[ sY ( s ) y (0)] + 2Y ( s ) =

G ( s)
s 2 3s + 3
A2
A1
B
Y (s) =
=
=
+
+
H ( s ) (s 1)2 ( s 2) (s 1)2 (s 1) ( s 2)

s 2 3s + 3
A2 =
( s 2)

A1 =

s =1

d s 2 3s + 3
ds ( s 2)

B=

= 1

s =1

( s 3s + 3) ( s 2)(2 s 3)
( s 2) 2

s 2 3s + 3

Y ( s) =

( s 1)

(s 1)2

=1
s=2

1
( s 2)

y (t ) = tet + e 2t
Example 15 Find f (t ) if F (s ) equals:

F (s) =
Solution:

s 3 7 s 2 + 14s 9
( s 1) 2 ( s 2)3

=0
s =1

1
s 1

203

Chapter Six

F (s) =

A2 =

A2

( s 1) 2

B3
A1
B2
B1
+
+
+
( s 1) ( s 2)3 ( s 2) 2 ( s 2)

s 3 7 s 2 + 14 s 9
( s 2) 3

=1
s =1

d s 3 7 s 2 + 14s 9
A1 =
ds
( s 2) 3
B3 =

=0
s =1

s 3 7 s 2 + 14s 9
( s 1) 2

= 1
s=2

d s 3 7 s 2 + 14s 9
B2 =
ds
( s 1) 2

=0
s =2

1 d 2 s 3 7 s 2 + 14s 9
B1 =
2! ds 2
( s 1) 2
1

F (s) =

=0
s=2

( s 1)
( s 2) 3
1
f (t ) = te t t 2 e 2t
2
Example 16 Find f (t ) if F (s ) equals:

F (s) =

Solution:

F (s ) =

A2
s2

B3
B2
B1
A1
+
+
+
2
3
s
s2 + 2
s2 + 2
s2 + 2

) (

) (

s +1
2

s ( s 2 + 2) 3

204 Laplace Transforms

s +1

A2 =

A1 =

( s 2 + 2) 3

=
s =0

d
s +1
ds ( s 2 + 2) 3

1
8
=

s =0

)3

Q s2 + 2 = 0

1
8

s = j 2 = + j

= 0, = 2
B3 =

s +1
s2

s= j 2

d s +1
B2 =
ds s 2 s = j

1
1
= j
2
2
=

s 2 2s (s + 1)
s4

1 d s 2 2s
B1 =
2! ds
s4
s= j

s= j 2

1 s 4 ( 2 s 2 ) + 4 s 3 s 2 + 25
=

2
s8
s = j

1
1
= j
2
2 2

= 0.75 j 0.3535
2

t 1 1 1
2
1
1
y(t ) = + +
cos 2t sin 2t
cos 2t sin 2 t
8 8
2
4
2
2 2
0.35 cos 2t 0.75sin 2t
y (t ) =

(t + 1) (cos
8

2t + 1.24 sin 2t

205

Chapter Six

Theorem 6

f (t )
L
= F ( s ) ds
t s

If L{ f (t )} = F ( s )

(18)

Proof:

By definition: L{ f (t )} = F ( s ) = f (t )e st dt
Integrate both sides of the above equation from s to , we obtain
the following equation:


(19)
F ( s ) = f (t )e st dt ds
s 0

The function f (t ) is continuous, then, the integration with respect to

s can be performed inside the t integral. Hence performing the


integration we get the following:

F
s


s 0

(s )ds =

f (t )e

st

ds dt =

e st
f (t )
dt
t s

f (t ) st
f (t )
e dt = L
=

0 t
t
We can obtain the useful result from theorem 6

If L{ f (t )} = F ( s )

f (t ) = L1{F (s )} = tL1 F ( s ) ds

Example 17 Find Laplace transform of the following function

sin t
t
Solution: From theorem (6) we can say that:

206 Laplace Transforms

s
sin t
L
ds = tan 1
= s L{sin t}ds = s 2
2

t
s +
s
sin t
1 s
L
= cot 1
= tan

t 2

Example 18 Find inverse Laplace transform of the following

function:

(s 2 1)2

Solution: From above theorem we have immediately that:

1 1
f (t )
2 2 ds = tL 2 s 2 1
s 1

1 sinh t
f (t ) = tL1 2
=t
2

s
2
1


= tL1
s

(
(

)s

Example 19 Find inverse Laplace transform of the following

function: F (s ) =

s+2

(s 2 + 4s + 5)2

s+2
s

2t 1
Solution: L {F (s )} = L
=e L

2
2
2
2
(s + 2 ) + 1
s + 1

1
2t 1
2t 1 1

ds = t e L 2
L {F (s )} = t e L

2
s 2
2
s
1
+
s + 1

1 t e 2t sin t
L1{F (s )} = t e 2t L1 2
=
2
+
s
2
1

207

Chapter Six

6.4 Step Functions

In order to deal effectively with functions having jump


discontinuous, it is very helpful to introduce a function known as the
unit step function. This function will be denoted by uc (t ) , and is
defined by:

t < c,
tc c0

0,
uc (t ) = 1

(20)

Its graph is shown in the following Fig.1.


uc(t)
1

Fig.1
t

t=c

Example 20 Find Laplace transform of uc (t )


Solution:

L{uc (t )} = e

st

L{uc (t )} =

uc (t )dt = e
0

st

(0)dt + e
c

st

e cs
(1)dt =0 +
s

e cs
s

Example 21 Find Laplace transform of 8 * u3 (t )


Solution:

This

function

8e 3s
L{8 * u3 (t )} =
s

has

the

following

shape

Fig.2

208 Laplace Transforms


8u3(t)
8

t=3

Fig.2
Example
22
Find
Laplace transform of the
following
function
2t3
2
f (t ) =
Otherwise
0
Solution:

The function f (t ) is
shown in Fig.3. This
function can expressed in
terms

of

the

f (t )
2

f 1 (t )
f 2 (t )

u 2 (t )
2
3

u 3 (t )

two

f1 ( x ) ,and,

functions

Fig.3

f 2 ( x ) where :
f ( x ) = f1 ( x ) + f 2 ( x ) = 2u 2 (t ) 2u3 (t )

2e 2 s 2e 3s 2 e 2 s e 3s

=
F (s ) = L{ f (t )} = L{2u 2 (t ) 2u3 (t )} =
s
s
s
We can check the above solution by using the elementary Laplace
transform principles as following:
3 st
e dt
2

L{ f (t )} = 2 *

e st
= 2*
s

3
2

e 3s e 2 s 2 e 2 s e 3s
=
= 2

s
s

209

Chapter Six

Example 23 Find Laplace transform of the following function

f (t ) = 2
0

0t 2
2t 6
Otherwise

terms of unit step function. If


we look deeply to the function

Fig.4

In this example we will try to


this discontinuous function in

Solution:

get general method to convert

O
-1

E
1

-2

shown in Fig.4 we can see that, this function consists of four unit
step functions as following: 3uo (t ),

5u 2 (t ) , and, 2u6 (t ) ,

where f (t ) = 3uo (t ) 5u 2 (t ) + 2u6 (t )


If we look deeply to Fig.4 we can see that it is easy to get that by
starting from the origin and take each jump (arrow) as a unit step
function. It is clear from Fig.4 that we have three jumps (arrows)
OA, BC, and DE. For OA its direction is up so we will take +ve sign
for the unit step function and its length is 3 so the amplitude of unit
step function is 3 and it happened at t = 0 , then the suffix for unit
step function will be zero. Then the first arrow (OA) equivalent to
OA = 3uo (t ) . In the same way we can deal with the jump (arrow) BC
and DE and they equivalent to 5u 2 (t ) and 2u6 (t ) respectively.
The following table clarifies the jump method.

210 Laplace Transforms

Jump

Direction Sign

Amplitude time

Equivalent

OA

UP

+ve

t =0

3uo (t )

BC

DOWN

-ve

t=2

5u 2 (t )

DE

UP

+ve

t =6

2u6 (t )

f (t ) = 3uo (t ) 5u 2 (t ) + 2u6 (t )
3 5e 2 s + 2e 6 s
L{ f (t )} = {3uo (t ) 5u 2 (t ) + 2u6 (t )} =
s
Example 24 Find Laplace transform of the following function

f (t ) = 0
1

Solution:
The function

0t 3
3t 4
Otherwise

3
2

B
E

1
f (t ) is

shown in Fig.5. As
explained in details in

O
-1
2

C
1

4D 5 6

Fig.5

the previous example we can get the following table:


Jump
OA

Direction Sign
UP
+ve

Amplitude time
2
t =0

BC

DOWN

-ve

t =3

2u3 (t )

DE

UP

+ve

t=4

u 4 (t )

f (t ) = 2uo (t ) 2u3 (t ) + u 4 (t )

Equivalent
2uo (t )

2 2e 3s + e 4 s
L { f (t )} = L{2uo (t ) 2u3 (t ) + u 4 (t )} =
s

211

Chapter Six

Theorem 7 If F (s ) is L{ f (t )}, then:

L{uc (t ) f (t c)} = e cs F ( s )

(21)

L1{e cs F ( s )} = uc (t ) f (t c)

(22)

Conversely If f (t ) = L1{F ( s )}, then:

Proof To proof theorem 7, it is sufficient to compute the transform

of uc (t ) f (t c) . Clearly

L{uc (t ) f (t c)} = e

st

uc (t ) f (t c)dt = e st f (t c)dt
c

Introducing, a new integration variable = t c , we have

L{uc (t ) f (t c)} = e s ( + c ) f ( )d
0

e cs e s f ( )d = e cs F ( s )
0

Example 25 Find Laplace transform of the following function

t2
0<t <3
Solution: The function f (t ) Is show inFig.6.

It is clear from Fig.6 that, f (t ) = t 2 [u o (t ) u3 (t )]


L{F (t )} = ( 1)2

d 2 1 e 3s

2 s
s
ds

d 1 s 3e 3s e 3s
L{F (t )} = 2

ds s
s2

d 3se 3s + e 3s 1
F (s ) =
ds
s2

212 Laplace Transforms

F (s ) =
F (s ) =
F (s ) =

s 2 9se 3s + 3e 3s 3e 3s 2s (3se 3s + e 3s 1)
s4

9s 2 e 3s 6se 3s 2e 3s + 2
e 3s
s3

s3

(9s 2 + 6s + 2)+ s23


t2

Fig.6

uo (t ) u3 (t )

t 2 (uo (t ) u3 (t ))
Another solution:

This equation, f (t ) = t 2 [uo (t ) u3 (t )] can be modified to be in the


form of (21).
t 2 [uo (t ) u3 (t )] = t 2uo (t ) (t 3)2 + 6(t 3) + 9 u3 (t )
It is clear the above equation is in the form of (21).

213

Chapter Six

6 9 3s
2

+
+ e

s3 s3 s 2 s
Which is clear, the same result that we got from previous solution.

L t 2uo (t ) (t 3)2 + 6(t 3) + 9 u3 (t ) =

Example 26 Find Laplace transform of the following function

et

0 < t <1
Solution: As explained in the previous example the above

function can be expressed as f (t ) = et [uo (t ) u1 (t )]


e (s 1)
1
F (s ) = L{ f (t )} =

s 1 (s 1)
Another solution:
This equation, f (t ) = et [uo (t ) u1 (t )] can be modified to be in the

et 1
form of (21). e [uo (t ) u1 (t )] = e uo (t ) 1 u1 (t )
e

It is clear the above equation is in the form of (21).


t

e ( s 1)
e s

e t 1
1
1
L e uo (t ) 1 u1 (t ) =
* e =

s
1
s
1
s
1
s
1

Which is clear, the same result that we got from previous solution.
Example 27 Find Laplace transform of the following function:

k sin t

0 < t < /

Solution: As explained in the previous example the above

function can be expressed as following:

f (t ) = k sin t [uo (t ) u / (t )] = k sin t uo (t ) k sin t u / (t )

214 Laplace Transforms

To put the above equation in the form of (21) we have to replace


sin t u / (t )

with

sin (t / ) u / (t ) . It is clear that

sin (t / ) = sin (t ) . Substitute this in the above equation we


get the following: f (t ) = k sin t u o (t ) + k sin (t / )u / (t )

F (s ) =

ke

k
s2 + 2

s2 + 2

s
k
F (s ) = 2
1+ e
2

s +

Example 28 Find Laplace transform of the following function

sin t ,
0 t < 2 ,
f (t ) =
sin t + cos t t 2
Solution: Laplace transform of f (t ) can be easily computed once
we recognize that f (t ) can be written in the form:

f (t ) = sin t + u 2 (t ) cos (t )
To put the above equation in the form of (21), we have to replace

cos(t ) with cos(t 2 ) . It is clear that cos(t ) = cos(t 2 ) .


f (t ) = sin t + u 2 (t ) cos (t ) = sin t + u 2 (t ) cos (t 2 )
L{ f (t )} = L{sin t} + L{u 2 (t ) cos (t 2 )}
L{ f (t )} = L{sin t} + e 2s L{cos (t )}

L{ f (t )} =

1
s2 + 1

+e

2s

s
s2 + 1

1 + s e 2s
s2 + 1

Example 29 Find Laplace transform of the following function:

f (t ) = t 2 u 2 (t )

215

Chapter Six

Solution: Laplace transform of the above function can be

obtained by two different methods as following:


First method :We First find L{u2 (t )} . Then, by using (6) we can

obtain L t 2 u 2 (t ) as following:

Q L{u 2 (t )} =

e 2s
s

d 2 e 2 s
4 4
2s 2
e
=
+
+
L t u 2 (t ) = ( 1)
3
ds 2 s
s2 s
s
The second method: We can modify t 2 u2 (t ) to take the form in
2

(21)as following: Qt 2 = (t 2 )2 + 4(t 2 ) + 4

{ } {(
) }
2e 2 s 4e 2 s 4e 2 s
L{t 2u 2 (t )}=
+ 2 +
3
s
s
s
4 4
2
L{t 2u 2 (t )}= 3 + 2 + e 2 s
s
s
s
L t 2u 2 (t ) = L (t 2 )2 + 4(t 2) + 4 u 2 (t )

Example 30 Find the inverse transform of

1 e s
s2

Solution: From the linearity of the transform (Theorem 7) we have:

f (t ) =

1 e s 1 1 1 e s
1
L 2 = L 2 L 2

s
s
s
f (t ) = t (t 1)u1 (t )
Hence f (t ) may also be given in the form:
t,
f (t ) = 1

0 t < 1,
t 1

216 Laplace Transforms


Example 31 Solve the following initial value problem

y + 4 y = r (t )

1,
Where, r (t ) =
0

y (0) = 1, y (0) = 0
t < 2 ,
otherwise

(23)
(24)

Solution: Laplace transform of above equation can be easily

computed once we recognize that r (t ) can be written in the form:

r (t ) = u (t ) u2 (t )
Then the Laplace transform of equation (23) is:

(25)

( s 2 + 4) Y ( s ) sy (0) y(0) = L{u (t )} L{u 2 (t )}


e s e 2s
( s + 4)Y ( s ) s =

s
s
s
s
e
e 2s
+

(26)
Y ( s) = 2
( s + 4) s ( s 2 + 4) s ( s 2 + 4)
To compute y (t ) we must obtain the inverse transform of each term
2

on the right side of equation (26). The inverse transform of the first
term of (26) is:

s
y1 (t ) = L1
= cos 2t
2
( s + 4)
The inverse transform of the second term of (26) is:

e s

1 s A1 A2 s + A3
=
+
L
L
e

2
s

s ( s 2 + 4)

+
(
s
4
)

A1 =

e s

( s 2 + 4) s = 0

1
4

(27)

Chapter Six

217

u (t ) u (t )
y2 (t ) = + [Ta cos 2 (t ) + S a sin 2 (t )]
4
2

(28)

Where Ra ( s ) = S a + jTa = ( s ) 2 + 2

]HG((ss)) = S1

=
s= j2

1
j2

1
1
S a + jTa = j , then Ta =
2
2
Substitute (29) into (28) we get:

(29)

u (t ) u (t ) 1

y 2 (t ) =
+
cos 2 (t )

4
2 2

u (t )
y2 (t ) = [1 cos 2 (t )]
(30)
4
Similarly, the inverse transform of the third term of (26) is:
u 2 (t )
[1 cos 2 (t 2 )]
4
Combining (27), (30) and (31) we obtain finally:

y3 (t ) =

y (t ) = y1 (t ) + y 2 (t ) + y3 (t )
u (t )
u (t )
= cos 2t + [1 cos 2 (t )] 2 [1 cos 2 (t 2 )]
4
4

(31)

(32)

6.5 The Transformation Of Periodic Function

The application of Laplace Transformation to the important case of


general periodic function is based upon the following theorem.
If a function f (t ) is periodic with period k on [0, ) , and
piecewise regular on 0 t k , then:
k

f (t ) e

L{ f (t )} = 0

1 e

st

ks

dt
s>0

(33)

218 Laplace Transforms


Example 32 Find Laplace transform of the rectangular wave shown

in Fig.7.

f (t )
1

t
b

2b
Fig.7 Rectangular wave.

The period of the given function is 2b. Hence from (33) we can get
the Laplace transform as following:
L{ f (t )} =

1
1 e

L{ f (t )} =

2b
2bs 0

f (t )e st dt

b1 * e st dt + 2b ( 1)e st dt

1 e 2bs 0

st
e
L{ f (t )} =

1 e 2bs s

b
0

e st

2b
b

)2

1 2e bs + e 2bs
1 e bs

L{ f (t )} =
=
s 1 e bs 1 + e bs
s
1 e 2bs

L{ f (t )} =

)(

(ebs / 2 e bs / 2 ) = 1 tanh bs
2
s (1 + e bs ) s (e bs / 2 + e bs / 2 ) s
1 e bs

219

Chapter Six

Example 33 Find Laplace transform of the saw tooth wave shown in

Fig.8
f(x)
k

x
k
2k
3k
Fig.8 Saw tooth waveform.

Solution: In this case, the period of the function is k, hence;

L{ f (t )} =

1
1 e

{ f (t )} =

k st
te dt
ks 0

1 (1 + ks )e ks

s 2 1 e ks

1
1 e ks

e st

st

1
)
2

s
0

(
1 + ks ) (1 + ks )e ks ks
=

s 2 1 e ks

(
1 + ks )(1 e ks ) ks (1 + ks )
=

L{ f (t )} =
2
ks
2

s 1 e
s
s 1 e ks
Example 34 What is the Laplace transform of the staircase function

shown in Fig.9?

f(t)
4

Fig.9

3
2
1
k

2k

3k

4k

220 Laplace Transforms

f(t)
4

Fig.10

3
2
1
k

2k

3k

4k

t+k
k

2
1

2k

4k
3k
The required transform can easily be found by direct calculation.
However, it is even simpler to obtain it by considering f (t ) to be
the difference between the two functions shown in Fig.10. The
transform of the sawtooth function ( f1 (t )) can be obtained as in the
previous example as following:

L{ f1 (t )} =

1
1 e

k t st
e dt
ks 0 k

1/ k
1 e ks

e st

(
)

st
1
2

s
0

221

Chapter Six

L{ f (t )} =
L{ f (t )} =

1 (1 + ks )e ks

ks 2 1 e ks

(1 + ks ) (1 + ks )e ks ks

ks 2 1 e ks

(1 + ks )(1 e ks ) ks = (1 + ks )

ks 2 1 e ks

ks 2

s 1 e ks

t + k
The transform of the linear function f 2 (t ) =
can be found
k
(t + k ) 1 1 k
as following: L
= +
k k s2 s
Then Laplace transform of the staircase function is:
L{ f (t )} =

1 1 k 1 (1 + ks )
k
1
2 + 2
=

ks
ks
k s
s k s
s 1 e
s 1 e

) (

6.6 Pulse Functions

In some applications it is necessary to deal with functions with


pulse nature, for example, voltages or forces of large magnitude,
which act over very short time intervals. Such problems often lead
to differential equation in the following form:

ay + by + cy = r (t )

(34)

Where r (t ) is very high during the short interval 0 < t < , and
otherwise zero. In particular let us suppose that r (t ) is given by:
1 ,
r (t ) =
0

0 t <,
= (t )
otherwise

(35)

222 Laplace Transforms

(t )dt = 1

Where

(36)

L{ (t )} = e

st

(t )dt = lim

st

1 e s
=1
dt = lim
0 s

(37)

In the similar way unit pulse acting at the instant t = t 0 is defined


by (t t0 ) . Where (t t0 ) can be defined as following

(t t0 ) = 0

t t0

(38)

And

(t t0 ) dt = 1

t t0

(39)

The Laplace transform of pulse function (t = t0 ) is given by:

L{ (t t 0 )} = e st0

(40)

Example 35 Solve the following initial value problem:

y + 2 y + 2 y = (t )

y(0) = 0

y (0) = 0,

(41)

Solution:

The Laplace transform of (41) is given by the following


equation: ( s 2 + 2 s + 2) Y ( s ) = e s

Y (s) =

e s
( s 2 + 2 + 2)

= e s

1
( s + 1) 2 + 1

y (t ) = u (t ) e (t ) sin(t )

223

Chapter Six

6.7 Applications
6.7.1 Electric circuits
Example 36 By using Laplace transform, Find the current I (t ) in

Fig.11. Assume I (0) = 1 A and v L (0) = 1 V for R=20 , L=5H,


C=0.04 farads and E (t ) = 100 cos 5 t .

vR(t)

From KVL

E(t)

VL + VR + VC = E (t )

I(t)

Differentiate

both

sides

of

the

above

differential equation. Then.

vL(t)
Fig.11

1
LI&& + RI& + I = 500 sin 5t
c
I&& + 4 I& + 5 I = 100 sin 5t

I ( 0 ) = 1, V L ( 0 ) = L I& ( 0 ) = 1 I& ( 0 ) = 0 .2
s 2 I ( s ) s 0.2 + 4[ sI ( s ) 1] + 5 I ( s ) =

100 * 5
( s 2 + 25)

G ( s ) 500 + ( s + 4.2)( s 2 + 25)


I ( s) =
=
H (s)
( s 2 + 25) ( s 2 + 4 s + 5)
a1 = j 5, a1 = j 5

1 = 0, 1 = 5

di
1
+ RI + idt = 100 cos 5t
dt
c

_
_

Solution:

vC(t)

224 Laplace Transforms

Ra ( s ) = S a + jTa = ( s 1 ) 2 + 12
=

]HG((ss)) = [s + 5]HG((ss))
2

500
= 12.5 + j12.5
(25 + j 20 + 5)

S a = 12.5, Ta = 12.5

1 t
e [Ta cos 1 t + S a sin 1 t ] + L1{W ( s )}

L1{I1 ( s)} =
=

1
[12.5 cos 5 t + 12.5 sin 5 t ] + L1{W ( s)}
5

= 2.5[cos 5 t + sin 5 t ] + L1{W ( s )}

a2 = 2 + j1, a2 = 2 j1 , 2 = 2, 2 = 1

Ra ( s ) = S a + jTa = ( s 2 ) 2 + 2 2
=

]HG((ss))

500 + ( s + 4.2)( s 2 + 25)


( s 2 + 25)

s = 2 + j1

Ra (a ) = S a + jTa = 15.55 j 0.24


S a = 15.5, Ta = 0.24

L1{I 2 ( s)} =

1 t
e [Ta cos 2 t + S a sin 2 t ] + L1{W ( s)}

= e 2t [ 0.24 cos t 15.5 sin t ]


I (t ) = I1 (t ) + I 2 (t )
I (t ) = 2.5[cos 5 t + sin 5 t ] + e 2t [ 0.24 cos t 15.5 sin t ]

225

Chapter Six

Example 37 Find the current in the RLC circuit in Fig.11. Assume

I (0) = 0 and v L (0) = 5 , R=150 , L=50H, C=0.01 farads and E (t )


is shown in Fig.12

Fig.12

E(t)

Solution:

100

From KVL
0.1

VL + VR + VC = E (t )
L

0.2

0.3

di
1
+ RI + idt = E (t )
dt
c

Differentiate both sides of the above differential equation. Then.

1
LI&& + RI& + I = E (t )
c
R
1
1 d
(E (t ))
I&& + I& +
I=
L
Lc
L dt
1
I&& + 3I& + 2 I = * 1000
50
1
I&& + 3I& + 2 I = * 1000
50

Q v L = LI&, vL (0 ) = 5
50 I&(0 ) = 5

I&(0 ) = 0.1
s 2 I ( s ) 0.1 + 3sI ( s ) + 2 I (s ) =

I ( s ) s 2 + 3s + 2 =

20
s

20
20 + 0.1s
+ 0.1 =
s
s

t,sec

226 Laplace Transforms

I (s) =

G ( s)
20 + 0.1s
0.1s + 20
=
=
H ( s ) s ( s 2 + 3s + 2) s ( s + 1)(s + 2 )

Let I ( s ) =

G(s) A
B
C
= +
+
H ( s ) s ( s + 1) (s + 2 )

A=

0.1s + 20
= 10
( s + 1)(s + 2 ) s = 0

B=

0.1s + 20
= 19.9
s (s + 2 ) s = 1

C=

0.1s + 20
= 9.9
s ( s + 1) s = 2

I (s ) =

10 19.9 9.9

+
s s +1 s + 2

I (t ) = 10 19.9e t + 9.9e 2t
Example 38 Find the current in the RLC circuit in Fig.11. Assume

I (0) = 0 and vL (0) = 5 , R=150 , L=50H, C=0.01 Farads and :

500 sin 5t
E (t ) =
500

0t

t>

2
5

2
5

Solution: It is clear that E (t ) can be expressed as following:

E (t ) = 500 sin 5t u2 / 5 (500 sin 5t 500)


From KVL , L

1
di
+ RI + Idt = E (t )
dt
c

227

Chapter Six

R
1
1
I& + I +
Idt = E (t )

L
LC
L
u
1

I&& + 3I& + 2 I = 2500 cos 5t 2 (2500 cos 5t )


50
5

u
I&& + 3I& + 2 I = 50 cos 5t 2 (50 cos 5t )
5

s 2 I (s ) sI (0) I&(0 ) + 3[sI (s ) I (0 )] + 2 I (s ) =

I (0) = 0, VL = LI&, VL (0) = 50 * I&(0 ) = 5


I&(0 ) = 0.1 A / sec .
2

50s 1 e 5

2
I (s ) s + 3s + 2 0.1 =
s 2 + 25

2
s
5

I (s ) =

0.1s + 50s + 2.5 50s e

I (s ) =

A
B
C
+
+ 2
(s + 1) (s + 2 ) s + 25

A=

(s + 1)(s + 2 )(s 2 + 25)

0.1s + 50s + 2.5 50s e

(s + 2)(s 2 + 25)

2
s
5

= 4.934
s = 1

50 s
s 2 + 25

50.s.e

2
s
5

s 2 + 25

228 Laplace Transforms

B =

0.1s 2 + 50 s + 2.5 50 s e

(s + 1)(s

+ 25

2
s
5

= 39.2217
s = 2

For s + 25 , = 0, = 5
S a + jTa =

0.1s + 50s + 2.5 50s e


(s + 1)(s + 2 )

2
s
5

= 0 + j0
s = j5

I (s ) =

4.934 39.2217

(s + 1) (s + 2 )

i (t ) = 4.934 e t 39.2217 e 2t

Example 39 Find the current in the RLC circuit in Fig. 1. Assume

I (0) = 0 and v L (0) = 5 , R=150 , L=50H, C=0.01 farads and


E (t ) = 100 sin t
Solution: Fig.13 shows E (t ) and its derivatives E (t )
E(t)
100

t
-

E (t )

100

t
-

Fig.13. E (t ) and its derivatives E (t ).

229

Chapter Six

From KVL VL + VR + VC = E (t )
L

di
1
+ RI + idt = E (t )
dt
c

Differentiate both sides of the above differential equation we get:


1
LI&& + RI& + I = E (t )
c
R
1
1 d
(E (t ))
I&& + I& +
I=
L
Lc
L dt
1
I&& + 3I& + 2 I = * E (t )
50
Q v L = LI&,

v L (0 ) = 5

50 I&(0 ) = 5

I&(0 ) = 0.1
s 2 I ( s ) 0.1 + 3sI ( s ) + 2 I (s ) =

1
L{E (t )}
50

E (t ) is shown in Fig.13. This function is periodical and Laplace


transform for it can be obtained from (33) as following:

L{E (t )} =

100 * cos t e

st

dt

1 e s

s
100s / tanh
100 s 1 + e
2
L{E (t )} = 2
=
s
2
s +1 1 e
s +1

(
)(

s
100s / tanh
1
2
s 2 I ( s ) 0.1 + 3sI ( s ) + 2 I (s ) =
2
50
s +1

230 Laplace Transforms

s
2 s / tanh
2
I ( s ) s 2 + 3s + 2 = 0.1 +
s2 + 1

s
2 s / tanh
0.1
2
I (s) = 2
+ 2
s + 3s + 2
s + 1 s 2 + 3s + 2

) (

)(

s
2 s / tanh + 0.1 s 2 + 1
2
I (s) =
s 2 + 1 s 2 + 3s + 2

I ( s) =

)(

A
B
Cs + D
+
+ 2
(s + 1) (s + 2) s + 1

s
2 s / tanh + 0.1 s 2 + 1
2
A=
2
s + 1 (s + 2 )

= 1.19
s = 1

s
2s / tanh + 0.1 s 2 + 1
2
B =
2
s + 1 (s + 2 )

(
)

= 0.903
s = 2

s
2s / tanh + 0.1 s 2 + 1
2
S a + jTa =
s 2 + 3s + 2

=0
s = j1

I (s ) =

1.19 0.903

s +1 s + 2

I (t ) = 1.19e t 0.903e 2t

231

Chapter Six

6.7.2 Newton s law


Example 40 The mass m of Fig.2 is suspended from the end of a

vertical spring of constant k [force required to produce unite


stretch].

An

external

force

F (t ) acts on the mass as well as


a resistive force proportional to
the

instantaneous

Assuming

that

velocity.
is

the

displacement of the mass at time


t and that the mass starts from

y
m

rest at y=0, (a) set up a


differentia equation for the motion and (b) find y at any time t.
Solution:

(a) The resistive force is given by B

dy
. The restoring force is
dt

given by ky . Then by Newtons law,


m

d2y
dy
= B ky + F (t )
dt
dt
d2y
dy
+ B + ky = F (t )
dt
dt

(42)

Where, y (0) = 0, , y& (0) = 0

(43)

(b) Taking the Laplace transform of (42), we obtain


m[ S 2Y ( s ) sy (0) y (0)] + B[ sY ( s ) y (0)] + kY ( s ) = F ( s )

232 Laplace Transforms

Y (s) =
=

G ( s)
F ( s)
=
H ( s ) ms 2 + Bs + k

F ( s)
2
2


s B + B k s B B k
2m
m 2m
m
2m
2m

Y ( s) =

G(s)
=
H (s)

F (s)

(44)
2

B
m s +
+ R
2
m

k
B2
Where R =
m 4m 2
Then we have three cases which can be summarized as following:
Case 1 R > 0

In this case let R = w 2 . We have

Bt

1
sin wt
1
L
= e 2m

2
w

B

m s + 2m + R



Then using the convolution theorem, we find from (44)
t

1
y (t ) =
F (u )e
wm 0

B (t u )
2m

sin w(t u )du

Case 2 R=0

Bt

1
1
In this case L
= te 2 m
2
B

m
s
+

m
2

233

Chapter Six

And by convolution form in (44) yields:

1 t
y (t ) =
F
(
u
)(
t

u
)
e
wm 0

B (t u )
2m

sin w(t u )du

In this case R = 2 . We have

Case 3 R<0

Bt

2 m sinh t
1
1
L
=e
2

B

2
m s + 2m


And by convolution form in (44) yields:
t

1
y (t ) =
F
(
u
)
e
m 0

B (t u )
2m

sinh (t u )du

6.7.3 Bending of Beams


Example 41 A beam of length 10m is simply supported at both ends

as shown in Fig.4. (a) Find the deflection if the beam has constant
weight 3000 Newton per meter and 30000 Newton concentrated
load at the middle of the beam (b) determine the maximum
deflection.
x

L-x
C

5-x

30000 N

B
x

Deflection, y(x)

Fig.3

234 Laplace Transforms


Solution: (a) The total weight of the beam is 3000*10=30000

Newton then the total weight is 30000+30000=60000 Newton, so


each end supports weight is

60000
= 30000 Newton. Let x be the
2

distance from the left end A of the beam. To find the bending
moment M at x, consider forces to the left of x
() Force 30000 N at A has moment

30000 x
() Force due to weight of the beam to left of
x has magnitude 3000x and moment
3000 x( x / 2) = 1500 x 2
Then the total bending moment at x is 1500 x 2 30000 x . Thus,
EIy = 1500 x 2 30000 x

(45)

The boundary condition is


y(0)=y(L=10)=0
By using Laplace transform with (45) we get:

EI s 2Y ( s ) sy (0) y (0) =
Y ( s) =

1500 * 2
s3

1 3000 30000 y (0)


+ 2

4
EI s 5
s
s

30000
s2

1
125 x 4 5000 x 3 + y (0) x
EI
But y (L = 10 ) = 0 , then substitute in (46), we get:

y (t ) =

y (0) = 375000 / (EI )

(46)

235

Chapter Six

Substitute that in (46) we get the general solution of (45)


y (t ) =

1
125 x 4 5000 x 3 + 375000 x
EI

Problems

[I] Find the Lapalce transform of the following functions f(t) where
c,k, and w are constants
)

t 2 + 3t + 4

t 2 e 2t

e t cos 2t

sin( wt + k )

cosh 2 (3t )

3t sin wt + wt 2 cos wt

t 3 sin wt

t 2 sinh wt

cos wt sinh wt + sin et cosh wt

1 ct
e e kt
t

[II] Solve the following initial value problems by using Laplace


transformation
)

4 y 8 y + 5 y = 0, y (0) = 0, y (0) = 1

y + y = 3 cos 2t , y (0) = 0,

y(0) = 0

236 Laplace Transforms

y 4 y = 8t 2 4, y (0) = 5, y (0) = 10

4 y + 2 y + 2 y = 0, y (0) = 1, y (0) = 3

4 y 2 y + 2 y = 2 cos2t 4 sin 2t , y(0) = 0, y(0) = 0

4 y + 2 y + y = e 2t , y (0) = 0, y (0) = 0

y + 4 y = 2 cos t + sin t , y (0) = 0, y (0) = 1

4 y 2 y + 5 y = 8 sin t 4 cos t , y(0) = 1, y(0) = 3

y + 4 y + 4 y = f (t ) , y (0 ) = y (0 ) = 0
1
f (t ) =
0

0 < t <1
1< t < 2

f (t )

is

periodical

function.
)

y + y = f (t ) , y (0 ) = y (0 ) = 0

1
f (t ) =
0

0<t <

< t < 2

, f (t ) is periodical function.

y + 2 y + 2 y = (t ), y ( 0) = 1,

y + 4 y = (t ) (t 2 ), y ( 0) = 0,

y + 2 y + y = (t ) + u 2 (t ), y ( 0) = 0,

y ( 0 ) = 0
y ( 0 ) = 0

y ( 0 ) = 1

237

Chapter Six

y y = 2 (t 1), y ( 0) = 1,

y + 2 y = (t / ), y ( 0) = 1,

y + 2 y + 3 y = sin t + (t ), y ( 0) = 0,

y + y = (t ) cos t , y ( 0) = 0,

y ( 0 ) = 0

y ( 0 ) = 0
y ( 0 ) = 1

y ( 0 ) = 1

[III] Find f(t) for the following function F(s)


)

5s 2 15s + 7
( s + 1)( s 2) 3
s2 + 2
( s 2 + 10)( s 2 + 20)

[IV] In each case graph the given function, which is assumed to


be zero outside the given interval, and find Laplace transform
)

0<t<2

t2

0<t <3

et

0 < t <1

k sin wt

0 < t < /w

k cos wt

0 < t < /w

k cos wt

0 < t < 2 / w

1 e t

0<t <

Find and graph the inverse Laplace transform of the following


functions:

238 Laplace Transforms

)
)
)
)

2e 0.5s
s
s
se
s2 + 4
e s
s 2 + 2s + 2
s (1 + e s )
s2 +1

) Find the current in the RLC circuit in Fig.1. Assume

I (0) = 0 and v L (0) = 0 for R=160


C=0.002

farads

E (t ) = 10 cosh 5 t

for

(a)

E (t ) = te t

, L=20H,
(b)

Chapter 7
Fourier Series
7.1 Introduction
An important mathematical question raised by Joseph Fourier in
1807, arising from his practical work on heat conduction, is whether
an arbitrary function f (x) with period 2 L can be represented in the
form of a Fourier series:

f ( x ) = a0 +

an

n =1

nx
nx
cos
+ bn sin

L
L

(1)

The above representation is good for all x, < x < . If f (x) is


not periodic outside the interval ( L < x < L) or if f (x) is not
defined beyond this interval, the representation is good only in the
restricted interval.
A second question is: suppose we can indeed represent f (x) by a
Fourier series of the form (1), how do we calculate Fourier
Coefficients a0 , an , bn ?
Before we start finding the Fourier coefficients we have to state
some important notes
Theorem 1 A function f ( x ) is said to be even on the interval

( L, L) if f ( x) = f ( x) .
This means that this function is symmetric about the y axis.

239

Chapter Seven

Theorem 2 A function f ( x ) is said to be odd on the interval

( L, L )

if

f ( x) = f ( x) . This means that this function is

symmetric about the origin in xy plan.


Theorem 3 On computing the Fourier coefficients we found that;
Odd* odd =even
Even* even=even
Odd* even =odd
Even* odd =odd
Theorem 4 On computing the Fourier coefficients we found that

L
2 f ( x)dx
L

f ( x) dx 0

L
0

if f ( x) is even
, So,

if f ( x) is odd

n x
m x
1- cos
cos
dx =
L 3
4L42
44
4
0
L 14
L

even

for m = n
for m n

2-

m x n x
cos
sin
dx {= 0 for all m and n
L
L

L 144424443

odd

L
n x
mx
3- sin
dx
* sin
L
L
0

L 1444
424444
3

even

for m = n
for m n

The above relations known as orthognality relations

240

Fourier Series

7.2 Determination Of Fourier Coefficients

Now we can obtain the an ,and bn in the following way.


nx
Multiplying both sides of (1) by sin
and integrate with respect
L
to x from L to L to get:
L

L
nx
nx
=
f ( x) sin
dx
a

dx +
0 sin
L
L

L 1424
3
odd

L
nx
nx

a
n sin L cos L dx + bn

n =1
L 144424443

odd

By applying theorem 4 we get:

nx nx
sin L sin L dx
L 14442444
3

even
L

nx
f ( x) sin
dx = bn * L
L

1 2L
nx (2)
or bn = f ( x) sin
dx
L 0
L

1 L
nx
bn = f ( x) sin
dx,
L L
L

The same way can be used to obtain a0 , an by multiplying (1) by


nx
cos
and integrate with respect to x from L to L yield,
L
L
L
nx
nx

f ( x) cos
dx = a0 cos
dx +
L
L

L 1424
3
even

L
nx
nx

a
n cos L cos L dx + bn

n=1
L 144424443
even

By applying theorem 4,

n
x
n
x


sin
cos
dx
L L
L 14
4424443
odd

nx
f ( x) cos
dx = a0 * 2 L + a n * L
L

241

Chapter Seven

1 L
1 2L
f ( x) dx, or a0 =
f ( x) dx
a0 =
2L L
2L 0
1 L
1 2L
nx
nx
an = f ( x) cos
dx, or an = f ( x) cos
dx
L L
L0
L
L

(3)

So that Fourier coefficients can be obtained as shown in (2) and (3).


Example 1 Find Fourier series for the following function

Let

0
f ( x) =
k

for L < x < 0


for 0 < x < L

And let f (x) is periodical function with period equal to 2L as


shown in Fig.1.

f(x)

-L
Fig.1
Solution:-

1 L
k L
k
a0 =
f ( x) dx =
dx =

2L L
2L 0
2
1 L
k L nx
nx
an = f ( x) cos
dx = cos
dx = 0
L0
L L
L
L

242

Fourier Series

1 L
k L nx
nx
bn = f ( x) sin
dx = sin
dx
L L
L0 L
L
0 , n even

kL
(1 cos n )
=
Ln
2 k , n odd
n

k 2k
f ( x) = +
2 L
f ( x) =

1 nx
sin

n
L
n =1, 3, 5,.......

k 2 k x 1 3x 1 5x

+
sin + sin
+ sin
+ ...........
2 L 3 L 5 L

Fig.2 shows that the partial sum of Fourier series do approach f (x)
as n increases.

0.8

0.8

terms=2

0.6

0.4

0.4

0.2

0.2

-0.2

-3

-2

-1

terms=3

0.6

-0.2

-3

-2

-1

Fig.2 the partial sum of Fourier series do approach f (x) as n


increases.

243

Chapter Seven

1
1

0.8

terms=4

0.6

0.8

0.4

0.4

0.2

0.2

-0.2

terms=10

0.6

-3

-2

-1

-0.2

-3

-2

-1

0.8

terms=10

0.6

0.4

0.2

-0.2
-10

-8

-6

-4

-2

10

Fig.2 continue
Theorem 5 If f ( x ) is an odd function of x , i.e. f ( x ) = f ( x )

an = 0

, n = 0,1,2,3,4,.......

2L
nx
and bn = f ( x) sin
dx
L0
L

(4)
(5)

Theorem 6 If f ( x ) is an even function of x , i.e. f ( x ) = f ( x ) then,

bn = 0,

n = 1, 2, 3, 4,.......

2L
nx
and an = f ( x) cos
dx,
L0
L

1L
a0 = f ( x) dx
L0

(6)
(7)

244

Fourier Series

Example 2 Find Fourier transform of the following function:

f ( x) = x, L < x < L. Let f (x) is periodic function with period


equal to 2L as shown in Fig.3.
f(x)

L
x
L

-L

Fig.3
Solution:- Since f (x) is an odd periodic function, its Fourier
coefficients are: an = 0, n = 0,1,2,............................

2L
2L
nx
bn = f ( x) sin
(1) n +1,
dx =
L0
n
L

n = 1,2,3,.............

n x
(1) n +1
f ( x) =
sin

n =1 n
L
2L

Example 3 Expand f ( x) = x 2 , 0 < x < 2 . in a Fourier series if the

period is 2 as shown in Fig.4.


f(x)

Fig.4

245

Chapter Seven

This function is not odd or even. So, the Fourier

Solution:-

coefficients can be determined as follows,

1 L
1 2 2
4 2
a0 =
f ( x) dx =
x dx =
2 0
3
2 L L
1 2L
1 2 2
nx
nx
an = f ( x) cos
dx = x cos
dx
0
L 0
L

2

cos nx
sin nx
1 sin nx
4
an = x 2
2x
+
=
2

n
n2
n3 0
n2

1 L
1 2 2 nx
nx
bn = f ( x) sin
dx = x sin
dx

L L
L

0
2

1 cos nx
sin nx
cos nx
4
bn = x 2
2x
+
2
=

n
n

n2
n3 0
4 2 4
4

+ 2 cos nx
f ( x) = x =
sin nx
3
n

n =1 n
2

Example 4 Expand f ( x) = sin x, 0 < x < . Find Fourier series if

the period is 2 .
f(x)

x
-

Fig.5

246

Fourier Series

Solution:- It is clear that this function is even function. So,

bn = 0 for n = 1, 2, 3,..............

1L
1
2
a0 = f ( x) dx = sin x dx =
0

L0

2L
2
nx
nx
an = f ( x) cos
dx
dx = sin x cos

L
L0

0
=

sin x cos (n x ) dx = sin ( x + nx) + cos (x n x ) dx


0
0

1 cos(n + 1) x cos(n 1) x
+
=

n +1
n 1 0

1 cos(n + 1) x cos(n 1) x
+
=

n +1
n 1 0
=

1 1 cos(n + 1) cos(n 1) 1
+

n +1
n 1

1 1 + cos(n ) 1 + cos(n )
+

n +1
n 1

an =

2(1 + cos(n ))

n2 1

, if n 1

a1 = 0
f ( x) =
f ( x) =

n=2
2

(1 + cos(n ))

(n 2 1)

cos nx

4 cos 2 x cos 4 x cos 6 x

+ 2
+ 2
+ ............
2
2 1 4 1 6 1

247

Chapter Seven

Example 5 Expand the function f ( x) = x, 0 < x < 2 if f (x) is even

function (Fig.6) with period 4.


f(x)
2

Fig.6
x

-2

Solution:-Because of the function f (x) is even function then

bn = 0 . Also,
1L
12
a0 = f ( x) dx = x dx = 1
20
L0
2L
22
nx
nx
an = f ( x) cos
dx
dx = x cos
20
L0
2
L
2

2
n x
n x 4
= x
sin

2 2 cos
L 0
2 n
n

4
2 2

(cos n 1)

f ( x) = 1 +
f ( x) = 1

4
n 2

(cos n 1) cos
2

nx
2

8
3x 1
x 1
5x

+
+
+
cos
cos
cos
......

2 32
2
2
52
2

248

Fourier Series

7.3 Determination Of Fourier Coefficients Without Integration

In this section we will represent Fourier coefficients of any periodic


function by polynomial can be obtained in terms of jumps of the
function and its derivatives.
By a jump J of a function f ( x ) at a point xs we mean the
difference between the right hand side and left hand side of f (x) at
xs . Is: J s = f ( xs + 0) f ( xs 0)
(8)
Where f ( xs + 0) and f ( xs 0) is the value of the function f (x)

directly after and before the jump at x s . Then f may have jumps at

x0 , x1 , x2 , ...... x s ,.... xm and the same is true for derivatives


f , f ,............ we choose the following notation:-

J s = Jumps for f at xs

J s = Jumps for f at xs (s = 1,2,3,........m)


(9)
J s = Jumps for f at xs
So that in case of function f (x) having period 2 L , the Fourier
transform can be obtained from the following function:

an =

n x s
1 m
L
J s sin

n s =1
L
n

J s cos

s =1

n xs
+
L

n x s L
n x s
L

+
+
sin
cos
...
J
J
+

L
L
n s =1
n s =1

m
m
n x s
n x s
1
L
J s cos
bn =
J s sin

n s =1
L
n s =1
L
2 m

3 m

n x s L
n x s
L

cos
sin
.....
J
J

+
+
+

L
L
n s =1
n s =1

2 m

3 m

(10)

(11)

249

Chapter Seven

For n = 1, 2, 3, 4,...., and n = 0 can be obtained from equation (3)


as usual.
In case of the function f (x) is periodical function having period

2 , the Fourier transform can be obtained from the following


formula:

an =

1
n

m
1 m
J s sin n xs J s cos n xs +

n s =1
s =1

1
n2

1
bn =
n

s =1

n3

J s sin n xs +

s =1

J s cos n xs + +.....

m
1 m
J s cos n xs J s sin n xs

n s =1
s =1

1
1

+
+

+
+
J
cos
n
x
J
sin
n
x
.....
s
s

2 s
3 s
n s =1
n s =1

(12)

(13)

For n = 1, 2, 3, 4,...., and n=0 can be obtained from equation (3).


Example 6 Find Fourier transform without integration for the

following function (Fig.7) if the period is 2 .


f(x)

J1
-

J2

Fig.7

250

Fourier Series

Solution:-

a0 =

Jumps at x1 = 0

Jumps at x2 =

J1 =

J 2 =

f ( x) dx = x dx =
2
0
0

As we see this function neither even nor odd. Then an can be


obtained from equation (12) and the above table as follows:

1
an =
n

an =

J s sin n x s = 1 ( J1 sin n x1 J 2 sin n x2 )


n

s =1

1
(sin n 0 + sin n ) = 0 for all n.
n

bn can be obtained from equation (13) and the above table as


follows:

1
bn =
n

bn =

1
m
J s cos n x s =
(J cos n x1 + J 2 cos n x2 )

n 1
s =1

1
(cos n 0 + cos n ) = 2 ,
n
n

n = 2, 4, 6, 8,.....

Otherwise bn = 0 .

1
1

1
f ( x) = 2 sin 2 x + sin 4 x + sin 6 x + ......
4
6
2

251

Chapter Seven

Example 7 Find Fourier transform without integration for the even

waveform f ( x) = x,

0 x < as shown in Fig.8.

Solution:-

a0 =

Jumps at x1 = 0

Jumps at x2 =

J1 = 0

J2 = 0

J1 = 2

J 2 = 2

f ( x) dx = x dx =
2
0
0

As we see it is even function then bn = 0 , for n = 1, 2, 3

an can be obtained from equation (12) as follows :


f(x)

x
-

f(x)
1

-1

Fig.8

252

Fourier Series

m
m

J s sin n x s 1 J s cos n x s

n s =1

s =1
1
1

an =
J1 sin n x1 J 2 sin n x2 ( J1 cos n x1 + J 2 cos n x2 )
n
n

Substitute in this equation from the above table we get:


1 1
4
an =
n = 1, 3,5,7,...
(2 cos n 0 2 cos n ) = 2 ,
n n
n
4
1
1
1

f ( x) = cos x + cos 3x + cos 5 x + cos 7 x + ......


2
9
25
49

1
an =
n

Example 8 Find Fourier transform without integration for the odd

0 x < as shown in Fig.9.

waveform f ( x) = x,
Solution:-

Jumps at x1 = 0

Jumps at x2 =

J1 = 0

J 2 = 2

J1 = 0

J 2 = 0

As we see it is odd function then an == 0 , for n = 0,1, 2, 3 . bn can


be obtained by substituting

f(x)

from the above table in

equation (13) as following :

1
m
n +1 2
J s cos n xs =
(
)
(
)
n

2
cos
1

n
n
s =1

1
1
1

f ( x) = 2 sin x sin 2 x + sin 3x sin 4 x + ......


2
3
4

bn =

1
n

Fig.9

253

Chapter Seven

Example 9 Find Fourier transform of the waveform in Fig.10:


f(x)

Fig.10

Io

Io

Jumps

7
6

11
6 2

5
6

at Jumps

at Jumps

at Jumps

at

x1 = / 6

x2 = 5 / 6

x3 = 7 / 6

x4 = 11 / 6

J1 = I o

J 2 = Io

J3 = Io

J 4 = Io

As we see it is odd function then an=0, for n = 0,1, 2, 3

bn can be obtained by substituting from the above table in


equation (13) as follows :
bn =

and

I
m
n
5n
7 n
11n
J s cos n x s = o cos
cos
cos
+ cos

n
6
6
6
6

s =1

2 3I o
bn =
, n = 5, 7, 17, 19
n

1
n

Otherwise bn = 0
f ( x) =

2 3 Io
1
1
1
1

sin x sin 5 x sin 7 x + sin 11x + sin 13 x + +....

11
13
5
7

254

Fourier Series

Example 10 Find Fourier transform of the waveform in Fig.11.


1

f (x)

cos x

Fig.11

x
f (x )

/ 2

/2

/6

5 / 6

7 / 6

11 / 6

J1 = I o

J 2 = Io

J3 = Io

J 4 = Io

3 / 2

ao = a n = 0

bn =
=

1 m
J s cos nxs

n s =1

Io
5n
7 n
11n
n
....
cos
cos
+ cos
cos
6
6
6
6
n

bn =

2 3
I o , n = 1, 11, 13, 23, 25,
n

bn =

2 3
I o , n = 5, 7, 17, 19,....
n

bn = 0 n = else where(2, 3, 4, 6, 8, ....


f (x ) =

2 3I o
1
1
1
1

sin x sin 5 x sin 7 x + sin 11x + sin 13x....


5
7
11
13

255

Chapter Seven

7.4 Complex Fourier Series

In this section we will discuss other form of Fourier series, which is


complex Fourier series.
As we know, the Fourier coefficients are:

1 L
a0 =
f ( x) dx
2 L L
1 L
nx
an = f ( x) cos
dx.
L L
L

(14)

1 L
nx
bn = f ( x) sin
dx
L L
L
If we change n to -n in the above definition for an and bn , we will
find: a n = an , and b n = bn
Therefore we can rewrite the following

f ( x) =

an

n=0
0

nx
nx
cos

+ bn sin
L
L

nx
nx
a n cos
bn sin

L
L

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

L
L

n =
f ( x) =

(15)

(16)

Therefore we can write the sum of (15) and (16) as follows:



nx
nx
2 f ( x) = an cos
+ bn sin

L
L

n =

f ( x) =

1
nx
nx
an cos

+ bn sin

L
L
2 n =

(17)

256

Fourier Series

Where now, for n = 0, 1, 2, , 3.........,


Form (17) can be further written more compactly using the
complex notations:

f ( x) = cn e
n =

n x
L

, L < x < L

(18)

n x

i
1 L
L dx
Where cn =
f
(
x
)
e

2L L
The form (18) is equivalent to normal Fourier series form but this

form is Sometimes preferred it is coefficients are easier to


remember.

cn =

1
(an + jbn )
2

Example 11 Use the complex method to find Fourier transform of

the following function:

for L < x < 0


0
Let f ( x) =
for 0 < x < L
k
Let f (x) is periodical function with period equal to 2L as shown in
Fig.12.
f(x)
k

-L

Fig.12

257

Chapter Seven

k L
k
1 L
Solution:- a0 =
=
=
f
x
dx
dx
(
)
2 L L
2 L 0
2
1 L
cn =
f ( x) e
2 L L

k
cn = j
1 e
2n
cn = j

n x
L dx =

jn

kL
e
L 0

n x
L

dx =

n x L
j
L

ke
L j n
L

x =0

k
1 (cos n + j sin
n3
)
=j
1
2

2n
=0, for all n

2k
, Otherwise cn = 0
n

Substitute in equation (18) we get:


n x

L
f ( x ) = cn e

n =

x
3 x
5 x

2k j L 1 j L 1 j L
= j e
+ e
+ e
+

3
5

n x

j

L = j 2k cos x j sin x
f ( x ) = cn e

L
L

n =

1
3 x
3 x 1
5 x
5 x

+ cos
j sin
j sin
+ cos
+ ...
L
L 5
L
3
L

f ( x) =

k 2 k x 1 3x 1

5x
+
sin + sin
+ sin
+ +.......
2 L 3 L 5
L

Compare the above result with the result of Example 1 in this


chapter.

258

Fourier Series

Problems

Find Fourier series of the function f(x) which is assumed to have


the period of 2 by two different techniques

/ 2 < x < 0
1 if

f ( x) = 1
if
0< x < /2
0
if
/2< x <

< x < 0
if
0

f ( x) = 1 if
0< x < /2
1
if
/2< x <

f ( x) = x
< x <

f ( x) = x 2

)
)

f ( x) = x 3
f ( x) = x

)
)
)
)
)
)
)

< x <

< x <
< x <
if
/ 2 < x < 0
+ x
f ( x) =
if
0< x <
x
if
/ 2 < x < / 2
x
f ( x) =
/ 2 < x < 3 / 2
x if
x 2
if
/ 2 < x < / 2
f ( x) = 2
/ 4
if
/ 2 < x < 3 / 2
0 < x <
sin x if
f ( x) =
if
< x < 2
0
f ( x) = sin x
< x <
0< x <
cos x if
f ( x) =
if
< x < 2
0
f ( x) = cos x
< x <

Chapter 8
Least Square Technique
8.1 Introduction
Suppose you are in a science class and you receive these
instructions:
Find the temperature of the water at the times 1, 2, 3, 4, and 5
seconds after you have applied heat to the container. Conduct your
experiment carefully. Graph each data point with time on the x-axis
and temperature on the y-axis. Your data should follow a straight
line. Find the equation of this line. The data from the experiment
looks like this when charted and graphed:

260

Least Square Technique

Notice that our data points don't fall exactly on a straight line as
they were supposed to, so how are we going to find the slope and
intercept of the line?
This is a common problem with experimental sciences because
the data points that we measure seldom fall on a straight line.
Therefore, scientists try to find an approximation. In this case, they
would try to find the line that best fits the data in some sense. The
first problem is to define "best fit." It is convenient to define an error
as a distance from the actual value of y for x (the value that was
measured in the experiment) to the predicted value of y for x.
Therefore, it seems reasonable that the "best fit" line would
somehow minimize the errors, but how? You could minimize the
sum of the absolute values of the errors; this is called the l1 fit. It
would also be reasonable to find the biggest error for each line and
choose the line that minimizes this quantity; this is called the l fit.
However, the fit that is used most often is the l2 fit which is called
the least squares fit. This method is called the least squares fit
because it finds the line that minimizes the sum of the squares of the
errors. Gauss developed this method to solve a problem when he
was a young man (15 years old!!) to help his friend solve a
chemistry problem. This is the fit that is most often used because it
is the only one that can be found by solving a system of linear
equations.

Chapter Eight

261

8.2 Least Squares Fit (Second Technique)


You have just read a lot of new information, so let's illustrate the
concepts with our example. We have the graph of the data above.
Now we need to guess which line best fits our data. If we assume
that the first two points are correct and choose the line that goes
through them, we get the line y = 1 + x . If we substitute our points
into this equation, we get the following chart. The points and line
are graphed below.

Therefore, the sum of the squares of the errors is 27. Do you think
that we can do better than this?
If we choose the line that goes through the points when x = 3 and
4, we get the line y = 4 + x . Will we get a better fit? Let's look at it.

262

Least Square Technique

The sum of the squares of the error is 18. That is a better fit, but can
we do even better?
Let's try the line that is half way between these two lines. The
equation would be y = 2.5 + x . It looks like this:

263

Chapter Eight

The sum of the squares of the error is 11.25 with this line, so this is
the best line yet. Can we do better? It doesn't seem very scientific or
efficient to keep guessing at which line would give the best fit.
Surely there is a methodical way to determine the best fit line. Let's
think about what we want.
A line in slope-intercept form looks like c0 + c1 x = y where c0 is
the y -intercept and c1 is the slope. We want to find c0 and c1 such
that c0 + c1 xi = yi is true for all our data points:

c0 + 1c1 = 2
c0 + 2c1 = 3

c0 + 3c1 = 7
c0 + 4c1 = 8

c0 + 5c1 = 9
We know that there may not exist c0 and c1 that fit all these
equations, so we try to find the best fit. We can write these
equations in the form X c = y (these are just new letters for our
familiar equation Ax = b ) where

1
1

X = 1

1
1

1
2
3
2

c0
3 , c = , and, y = 7

c1
4
8
9
5

264

Least Square Technique

In general, we cannot solve this system because the system is


usually inconsistent because it is overdetermined. In other words,
we have more equations than unknowns (the unknowns are the two
variables, c0 and c1 , for which we are trying to solve). There is a
system of equations called the normal equations that can be used to
find least squares solution to systems with more equations than
unknowns.
Theorem 8.1 Let X be an m by n matrix such that X T X is
invertible,

then

the

solution

to

the

normal

equations,

X T X c = X T y , is the least squares approximation to c in X c = y .


Remark 25 It is important to remember that the solution to the
normal equations is only an approximation to c for X c = y . It is not
equal to c because X c = y is inconsistent, so it has no solution. In
other words, there does not exist a vector, c, that makes X c = y a
true statement. Therefore, we use the normal equations to
approximate c.
Remark 26 For now, you don't need to check to see if X T X is
invertible because most of the systems that we encounter will meet
this requirement. However, if you cannot find a solution to the
normal equations, you should check to see if X T X is invertible.
The normal equations will give us the "best fit" line (or curve) every
time according to the way we defined "best fit". Let's try applying

265

Chapter Eight

the normal equations to our system. First, we multiply so that we


have a system that we can solve. X T X c = X T y

1
1
1 1 1 1 1
1 2 3 4 5 1

1
1

1
2

4
5

2
3
c0 1 1 1 1 1
c = 1 2 3 4 5 7

1
8
9

5 15 c0 29
15 55 c = 106
1

Using Cramer s rule or Gauss elimination can easily solve the above
equation. c0 = 0.1 ,

and, c1 = 1.9

When we graph and chart the line y = 0.1 + 1.9 x , we get:

The sum of the squares of the error is 2.7. This is a great


improvement over our guesses and we know that we cannot do any

266

Least Square Technique

better. In general, if we have n data points, we solve X T X c = X T y


with

X =

1
1

M
1
1

x1
x2

xn 1
xn

c0
c=
c1

y1
y
2
y= M

yn 1
yn

What if we are told that our data is not supposed to fit a straight
line, but instead falls in the shape of a parabola? Consider the
following data from another experiment:

We can find the curve that best fits our data in a similar manner. The
general equation for a parabola is c0 + c1 x + c2 x 2 = y . Therefore,

267

Chapter Eight

we want to find the values of the coefficients, c0 , c1 , and c3 , so that


the curve we find best fits these equations:

c0 + 1c1 + 1c2 = 3
c0 + 0c1 + 0c2 = 1

c0 + 1c1 + 1c2 = 1
c0 + 2c1 + 4c2 = 1

c0 + 3c1 + 6c2 = 3
Let us use the normal equations with

1
1

X =1

1
1

1
0
1
2
3

1
0

1 ,

4
9

c0
c = c1 ,
c2

3
1

y = 1

1
3

X T Xc = X T y
1
1

1
0
0

5 5
5 15

15 35

1
1
1
1 1

1
2
3 1

1
4 9 1
1
15 c0 7
35 c1 = 7

99 c2 33

1
0
1
2
3

1
0 c0

1 c1

4 c2
9

268

Least Square Technique

Now we can augment the matrix and solve using Gaussian


elimination. We get the following results:

19
c0 35
c = 1 5
1 7
c2 6
7
These coefficients indicate that the curve we want is

y=

5 6
19
1 + x2
35 7 7

Let's graph this curve and fill in our chart:

269

Chapter Eight

Expected y

error

(error) 2

4
35

4
35

16
1225

19
35

16
35

256
1225

-1

11
35

24
35

576
1225

19
35

16
35

256
1225

4
35

4
35

16
1225

-1

We find that the sum of the squared errors is

32
. Using our
35

definition of least squares "best fit," you will not be able to find a
parabola that fits the data better than this one. In general, to find the
parabola that best fits the data, you use the normal equations

X T X c = X T y with

X =

x1

1
M

x2
M

1
1

xn 1
xn

x12

x22
M

xn21
xn2

c0
c = c1
c2

y1
y
2
y= M

1
n

yn

Notice that the normal equations used to find the best fit line and
the best fit parabola have the same form. Do you think that we could

270

Least Square Technique

expand this to higher degree polynomials? Yes, we can. In general,


we use the normal equations X T X c = X T y with

X =

1
1

x1
x2

M
1
1

M
xn 1
xn1

x12
x22

K
K

O
K
K

xn21
xn2

c0
x1m
y1

c
m
y
x2
1
2

, y = M
M , c = M

c
xnm1
1

m
y

1
n

cm
yn
xnm

where m represents the degree of the polynomial curve that you


wish to fit and n represents the number of data points. The least
squares

"best

fit"

curve

for

these

equations

is

c0 + c1 x + c2 x 2 + ... + cm 1 x m 1 + cm x m . Remember that the degree


is the highest power of the variable in your equation. A line is a first
degree polynomial and a parabola is a second degree polynomial.
If we can find the best fit curve for any degree polynomial, why
don't we always use a higher degree polynomial and fit the data
better? After all, if we have n data points and fit them to a
polynomial of degree n 1, we will have a perfect fit every time
because our systems would not be inconsistent. However, our goal
is not just to find a curve that fits the data closely. Usually, we want
the curve to predict what would happen between our data points. If
we choose a curve that exactly fits all our data points, we are
incorporating the error in our measurements into our model unless
the model fits the data exactly (which occurs only rarely).

271

Chapter Eight

Unfortunately, there is no set rule for deciding what degree


polynomial should be used to fit the data. However, first and
second-degree polynomials provide the simplest models and should
fit most of your data until you start modeling more complicated
systems.
8.3 Least Squares Fit (Second Technique)
There is another simple method to get the least square
approximation to fit polynomial of degree n to a set of points

( xi , yi ) . The simplest example of a least square approximation is


fitting line to a set of points. The mathematical expression for
straight line is as following:

y = a0 + xa1 + e

(1)

Where a0 and a1 are coefficients representing the straight line and


e is the error or residual between the estimated straight line and the
given data points which can be represented by the following
equation

e = y a0 xa1

(2)

One criteria is to minimize the sum of residuals s to zero for all


available data as shown in the following equation:-

s=

i =1

i =1

ei = yi a0 a1xi

(3)

272

Least Square Technique

Where n is the total number of data points. However, this criterion


suffers from some problems explained in reference [1]. A strategy
that overcomes the shortcoming of the above criteria is to minimize
the sum of squares of the residuals between actual data points and
straight-line model. Then,

Sr =

i =1

ei2

( yi, data yi, mod el ) 2

i =1

(4)

( yi a0 a1xi )2

i =1

This strategy has many advantages including the fact that it gives a
unique line for any given data.
8.3.1 Lest Square Fit Of Straight Line Methodology
As we explained before we have get the minimum sum of squares of
results between data and points this can be obtained by differentiate
the sum of residuals with straight line coefficient and equate it with
zero.
n
S r

= 2 ( yi a0 a1 xi ) = 0
a0
i =1

(5)

n
S r

= 2 [( yi a0 a1 xi )xi ] = 0
a1
i =1

(6)

Steven C. Chapman and Raymond P. Canale Numerical Method of


Engineering , book, McGraw-Hill international edition, third edition,1998

273

Chapter Eight

By simplifying the above equations we can obtain the following:


n

i =1

i =1

i =1

yi a0 a1xi = 0
n

i =1

i =1

i =1

yi xi a0 xi a1xi2 = 0

(7)

(8)

The above two equations (7) and (8) can be further simplified to be
as following:
n
n

na0 + xi a1 = yi
i =1
i =1

(9)

n
n
n

xi a0 + xi2 a1 = xi yi

i =1
i =1
i =1

(10)

i =1

i =1

i =1

n xi yi xi * yi
a1 =

n xi2 xi
i =1 i =1
n

a0 = y a1 x

(11)

(12)

Where y and x are the mean of yi and xi respectively.


The least squares procedure can be readily extended to fit the data
to a higher order polynomial. For example, suppose that we fit a
second order polynomial or quadratic:

y = a0 + a1x + a2 x 2 + e
For this case the sum of squares of the residuals is:

(13)

274

Least Square Technique

Sr =

(yi a0 a1xi a2 xi2 )


n

(14)

i =1

8.3.2 Lest Square Fit Of Higher Order Curves


Following the procedure of the previous section, we take the
derivative of the above equation with respect to each of the
unknown coefficients of the polynomial as in

[(

)]

(16)

[(

) ]

(17)

n
S r
= 2 yi a0 a1 xi a2 xi 2 = 0
a0
i =1

(15)

n
S r
= 2 yi a0 a0 xi a2 xi 2 xi = 0
a1
i =1
n
S r
= 2 yi a0 a0 xi a2 xi 2 xi2 = 0
a2
i =1

These equations can be set equal to zero rearranged to develop the


following set of normal equations:

na0
n

(xi ) a0

i =1
n

(xi 2 )a0

i =1

( )
i =1
i =1
i =1
n
n
n
+ (xi 2 )a1 + (xi 3 )a2 = xi yi
i =1
i =1
i =1
n
n
n
3
4
+ (xi )a1 + (xi )a2 = xi 2 yi
n

+ ( xi ) a1

i =1

+ x a2 = yi

i =1

i =1

(18)

275

Chapter Eight

Note that the above three equation are linear and have three
unknowns a0 , a1 , a2 . The coefficients of the unknowns can be
calculated directly from the observed data.
Example 1
For the following data determine a second order equation fits this
data

xi

yi

Solution:-

xi

yi

xi * yi

xi2

xi3

xi4

xi2 yi

16

12

15

27

81

45

24

16

64

256

96

40

25

125

625

200

42

36

216

1296

252

63

49

343

2401

441

192

140

784

4676

1048

Then,

28 40

276

Least Square Technique

7 a0
28a0

28a1
140a1

140a2 = 40
140a2 = 192

784a1 467a2 = 1048

140a0

From the above equation we can get:

a0 = 3.6 *10 12
a1 = 1.90476
a2 = 0.095238
Then the required polynomial is:

F ( x) = 3.6 * 10 12 + 1.90476 x 0.095238 x 2


8.4 Fourier Approximation By Using Least Square Technique
The above procedure can be used to determine the Fourier
coefficients for Fourier series.
Assume the required Fourier series will be in the following form

y = a0 + a1 cos( t ) + b1 sin( t ) + e

(19)

Where we will take only the first three terms for simplicity and
later we can extend this technique for n terms.
From least square technique we can say the square of errors is
n

S r = ( yi a0 a1 cos( t ) b1 sin( t ) )2

(20)

i =1

We have to minimize the square of errors with respect to a0 , a1 , b1


respectively. Then we have the following conditions:

277

Chapter Eight
n

+ cos( t ) a1

na0

i =1
n

sin( t ) a0

i =1

i =1

i =1
n

+ cos 2 ( t ) a1

+ cos( t )b1

= cos( t ) yi

+ cos( t ) + sin( t ) a1

+ sin 2 ( t )b1

= sin( t ) y i

cos( t ) a0

i =1
n

+ sin( t )b1 = yi

i =1

i =1

i =1
n

i =1

i =1
n

i =1

By solving the above equations we can get a0 , a1, b1 . Then,


n

yi
i =1 n

a0 =

(21)

2 n
a1 = yi * cos( t )
n i =1

(22)

2 n
b1 = yi * sin( t )
n i =1

(23)

The above equations can be extended to fit n terms of Fourier series


as following:
If the required Fourier series be in the following form:

y = a0 + a1 cos( t ) + b1 sin( t ) + a2 cos(2 t ) + b2 sin(2 t )....


.............................................. + am cos(m t ) + bm sin(m t ) + e

(24)

Where n must be > 2m + 1, or m (n 1) / 2 . In this case:


n

yi
i =1 n

a0 =

(25)

2 n
a j = yi * cos( j t )
n i =1

(26)

2 n
b j = yi * sin( j t )
n i =1

(27)

278

Least Square Technique

Example 2 Use the method of least square to find the Fourier


transform for the function shown in the following figure (Find DC
and fundamental ( a0 , a1 , b1 ) and then draw flowchart and basic
program to determine and print m harmonics (divide the function to
20 intervals in your calculations and 200 intervals in the computer
program per period).

Solution: From table shown in next page ;


n y
a0 = i = 0
i =1 n

2 n
a1 = yi * cos( t ) = 16.17
n i =1
2 n
yi * sin( t ) = 102.2
n i =1
If we use the exact Fourier transform will get:
0.18
100 0.08
1 2L
a0 =
f ( x ) dx =
dt dt = 0
.02 0.02
2 L 0
0.12

b1 =

2L
200 0.08
t
t
a1 = f (t ) cos dt =
cos
dt = 0

L0
.01 0.02
0.01
L

279

Chapter Eight

2L
200 0.08 t
x
b`1 = f ( x) sin dx =
sin
dt = 127.324
L0
.01 0.02 0.01
L
The following computer program can be used to get m terms of
Fourier series, where we divided the number of points to n=200
points then m = (200 1) / 2 = 99 . Then we can get the following
coefficients.

xi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
sum

0
0.001
0.002
0.003
0.004
0.005
0.006
0.007
0.008
0.009
0.01
0.011
0.012
0.013
0.014
0.015
0.016
0.017
0.018
0.019
0.19

0
0
100
100
100
100
100
100
0
0
0
0
-100
-100
-100
-100
-100
-100
0
0
0

cos

0
0
80.90161308
58.77834693
30.90141996
-0.000367321
-30.90211865
-58.77894126
0
0
0
0
80.90118126
58.77775259
30.90072128
-0.001101962
-30.90281733
-58.7795356
0
0
161.796153

sin x i

0
0
58.7786441
80.90182898
95.10574244
100
95.10551542
80.90139717
0
0
0
0
58.77923843
80.90226079
95.10596945
99.99999999
95.1052884
80.90096535
0
0
1021.586851

280

Least Square Technique

1 DIM A(110), B(110), T(210),Y(210)


2 T(0)=0:FOR I=1 TO 19:T(I)=T(I-1)+.02/200:Y(I)=0:NEXT I
3 FOR I=20 TO 80:T(I)=T(I-1)+.02/200:Y(I)=100:NEXT I
4 FOR I=81 TO 119:T(I)=T(I-1)+.02/200:Y(I)=0:NEXT I
5 FOR I=120 TO 180:T(I)=T(I-1)+.02/200:Y(I)=-100: NEXT I
6 FOR I=181 TO 200 T(I)=T(I-1)+.02/200:Y(I)=0:NEXT I
10 INPUT "how many data points you have",N:N=N-1
20 INPUT " what is the highest harmonics you want ",M
25 IF M > (N-1)/2 THENM=(N-1)/2
35 UMY=0:WO=2*3.14*50
40 FOR I=1 TO N
60 SUMY=SUMY+Y(I)
70 FOR J=1 TO M
80 A(J)=A(J)+2/N*Y(I)*COS(J*WO*T(I))
90 B(J)=B(J)+2/N*Y(I)*SIN(J*WO*T(I))
100 NEXT J
110 NEXT I
115 A(0)=SUMY/N
120 FOR J=1 TO M
130 IF ABS(A(J)) > .95 THEN PRINT "A(";J;")=";A(J),
140 IF ABS(B(J)) > .95 THEN PRINT "B(";J;")=";B(J),
150 NEXT J
200 end

281

Chapter Eight

Basic computer program to determine Fourier coefficients of


function in Example 2.
In the above basic program note the following:
From line 2 to line 6 to enter the data points of waveform, in
this case we have the waveform shown below, we divide the
waveform into 200 equal intervals start from t=0 and end at
t=0.02 sec. You can define the waveform in any other way.
In line 25, we can not get harmonic order greater than (n-1)/2
The loops from line 40 to line 110 is to calculate the Fourier
coefficients Am, Bm
The loop from line 120 to line 150 is to print the Fourier
coefficients Am, Bm
The results of the above computer program:
b( 1 )= 104.1915 b( 3 )=-11.26867 b( 5 )=-25.42907
b( 7 )=-7.446722 b( 9 )= 10.24038 b( 11 )= 10.42216
b( 13 )=-1.144581 b( 15 )=-8.346155 b( 17 )=-4.108836
b( 19 )= 4.133745 b( 21 )= 5.881331 b( 25 )=-4.849892
b( 27 )=-3.221158 b( 29 )= 2.181897 b( 31 )= 4.21746
b( 33 )= .7539896 b( 35 )=-3.292385 b( 37 )=-2.796622
b( 39 )= 1.186604 b( 41 )= 3.323474 b( 43 )= 1.065102
b( 45 )=-2.3783

b( 47 )=-2.539027 b( 49 )= .559677

282

Least Square Technique


Start
Input data pints
T(I), Y(i)
Input N, M

A(0)=SUMY/N

SUMY=0, WO=2*.14*f

For J=1 to M

If M>(N-1)/2
M=(N-1)/2
For I=1 to N

Is Abs(A(J)) > 0.1


Print A(J)

SUMY=SUMY+Y(I)
For j=1 to m
Is Abs(B(J)) > 0.1

A(J)=A(J)+2/N*Y(I)*cos(J*Wo*t(I))
B(J)=B(J)+2/N*Y(I)*sin(J*Wo*t(I))

Print B(J)

Next J,I

Next J

End

Flowchart of Basic computer program to determine Fourier


coefficients of function in Example 2.
Example 3 Use the method
of least square to find

1v

the Fourier transform for the


function

shown

in

the

following figure (Find DC and

1ms

2ms

fundamental ( a0 , a1 , b1 ) and then draw flowchart and basic


program to determine and print m harmonics (divide the function to

283

Chapter Eight

20 intervals in your calculations and 200 intervals in the computer


program per period).
Solution: f = 1000 Hz , o = 2 * 1000 = 6283

t,ms
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0.60
0.65
0.70
0.75
0.80
0.85
0.90
0.95
1.00

f (t ) sin

f (t )

f (t ) cos o t

0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0.60
0.65
0.70
0.75
0.80
0.85
0.90
0.95
1.00

0.000000
0.047553
0.080903
0.088171
0.061810
0.000012
-0.092689
-0.205706
-0.323589
-0.427964
-0.500000
-0.523098
-0.485449
-0.382124
-0.216398
-0.000104
0.247101
0.499509
0.728027
0.903452
1.000000

0.000000
0.015450
0.058777
0.121350
0.190209
0.250000
0.285322
0.283169
0.235138
0.139093
0.000046
-0.169906
-0.352617
-0.525815
-0.665711
-0.750000
-0.760882
-0.687743
-0.529128
-0.293725
-0.000185

10.50

0.50

-3.16

284

Least Square Technique


n

a0 =

yi 10.5
=
= 0.525
20
n
i =1

a1 =

2 n
2
yi * cos( t ) =
* 0.5 = 0.05

n i =1
20

b1 =

2 n
2
yi * sin( t ) =
* (3.16) = 0.316

n i =1
20

If we use the exact Fourier transform will get the following results

1 2L
a0 =
f ( x) dx
2L
0
0.001

1 0.001
1 1000t 2
=
=
1000
t
dt

.001 0
.001 2 0

= 0.5

1 2L
1 0.001
t
t
a1 = f (t ) cos dt =
1000
t
*
cos
dt = 0

L 0
0.05 0
0.0005
L
1 2L
t
b1 = f (t ) sin dt =
L 0
L
1 0.001
t
1000 t * sin
=
dt = 0.16

0.05 0
0.0005
Problems
Solve problems of Chapter 7 numerically and compare the results.

Chapter 9
Power Series Solution Of Differential Equations
9.1 Introduction
In chapter five we consider solving the linear differential equation
with constant coefficients. Caushy equation was the only equation in
that chapter has non-constant coefficients and has been solved by
special manner. In this chapter, we shall consider solving
differential equations by so-called power series method, which
yields solution in the form of power series. This is a very efficient
standard procedure in connection with linear differential equations
whose variable coefficients.
We start by showing some examples of power series of famous
functions:

1
= x m = 1 + x + x 2 + x 3 + x 4 + ......
1 x m=0

xm
x 2 x3 x 4
e =
=1+ x +
+
+
+ ......
m
!
2
!
3
!
4
!
m=0
x

cos x =

(1) m x 2m
x2 x4
=
1

+
+.........
(2m)!
2
!
4
!
m=0

(1) m x 2m +1
x3 x5
sin x =
= x
+
+.........
m
(
2
+
1
)!
3
!
5
!
m=0

See Appendix 1 for more functions.

286 Power Series Solution Of Differential Equations

The power series (in power of ( x a ) ) is an infinite series of the

following form:

cm ( x a) m = c0 + c1 ( x a) + c2 ( x a) 2 + c3 ( x a)3 + .......

(1)

m=0

Where c0 , c1 , c2 ,... are constants called coefficients of the series, a is


a constant, called the center of the power series and x is a variable.
If a = 0 , (1) takes the following form:

cm x m = c0 + c1x + c2 x 2 + c3 x 3 + .......

(2)

m=0

9.2 Power Series Solution Of Second Order Differential Equations


In this section we will discuss how to solve second order differential
equations with non constant coefficient. The form of second order
differential with non constant coefficient is as shown in (3):

d2y
dx

+ P( x)

dy
+ Q( x) y = 0
dx

(3)

Where P ( x) and Q ( x) are functions in x only.


We will look for solution of (3) in power series of x (or in powers
of x a ), if a = 0 , then the solution has the following form:

y=

cm x m = c0 + c1x + c2 x 2 + c3 x 3 + .......

(4)

m =0

y =

mcm x m 1 = c1 + 2c2 x + 3c3 x 2 + 4c4 x 3 .......

m=0

(5)

287

Chapter Nine

y =

m(m 1)cm xm2 = 2c2 + 3* 2 c3 x + 4 * 3c4 x2 + 5 * 4c5 x3. + ..(6)

m=0

Insert (4), (5) and (6) into (3) and collecting like powers of x, we
may write the relating equation in the following form:

k0 + k1 x + k 2 x 2 + k3 x 3 + ....... = 0

(7)

Where the constants k0 , k1 , k 2 , k3 , . are expressions containing


the unknown coefficients c0 , c1 , c2 ,...... in (4). In order that (7) hold
for all x in some interval, we must have the following conditions:

k0 = 0, k1 = 0, k 2 = 0, k3 = 0 .......

(8)

From (8) we may then determine the coefficients c0 , c1 , c2 ,...... .


The following examples explain in details the above manner.
Example 1 Solve the following differential equation: y + y = 0
Solution:
Assume, y =

cm x m = c0 + c1x + c2 x 2 + c3 x 3 + .......

(9)

m=0

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get the
following:

(2c2 + 3 * 2 c3 x + 4 * 3c4 x 2 + 5 * 4c5 x 3 + 6 * 5c6 x 4 .....)


+ (c0 + c1 x + c2 x 2 + c3 x 3 + ...) = 0

288 Power Series Solution Of Differential Equations

c
Coefficients of x 0 = 0 , 2c2 + c0 = 0, c2 = 0 ,
2!
c
Coefficients of x1 = 0 , 3 * 2 c3 + c1 = 0 , c3 = 1 ,
3!
c
c
Coefficients of x 2 = 0 , 4 * 3 c4 + c2 = 0 , c4 = 2 = 0 ,
4 * 3 4!

c
c
Coefficients of x 3 = 0 , 5 * 4 c5 + c3 = 0 , c5 = 3 = 1 ,
5 * 4 5!
c
c
Coefficients of x 4 = 0 , 6 * 5 c6 + c4 = 0 , c6 = 4 = 0 ,
6*5
6!
c
c
Coefficients of x 5 = 0 , 7 * 6 c7 + c5 = 0 , c7 = 5 = 1 ,
7*6
7!
Coefficients of x 6 = 0 , 8 * 7 c8 + c6 = 0 , c8 = c0 / 8! ,
Substitute the values of c0 , c1 , c2 ,...... into (9) we get the final form
for the solution of the differential equation as following:

y=

cm x

m=0

x 2 x 4 x 6 x8

= c0 1
+

+
+........
2! 4! 6! 8!

x3 x5 x 7 x9
+ c1 x
+

+
+........
3! 5! 7! 9!

y = c0 cos x + c1 sin x
Example 2 Solve the following differential equation by using power
series method:

y 2 xy = 0

289

Chapter Nine

Solution: Assume, y =

cm x m = c0 + c1x + c2 x 2 + c3 x 3 + ...

m=0

Then y and y can be easily obtained as in (5) and (6)


respectively. Substitute these power series in the differential
equation we get the following:

(2c2 + 3 * 2 c3 x + 4 * 3c4 x 2 + 5 * 4c5 x 3 + 6 * 5c6 x 4 .....)


2 x(c0 + c1 x + c2 x 2 + c3 x 3 + ...) = 0
Coefficients of x 0 = 0 , c2 = 0 ,

2c
Coefficients of x1 = 0 , 3 * 2 c3 2c0 = 0 , c3 = 0 ,
3* 2
2c
Coefficients of x 2 = 0 , 4 * 3 c4 2c1 = 0 , c4 = 1 ,
4*3
3

Coefficients of x = 0 , 5 * 4 c5 2c2 = 0 , c5 =

2c2
= 0,
5*4

Coefficients of x 4 = 0 , 6 * 5 c6 2c3 = 0 ,

c6 =

2c3
2 * 2c0
=
,
6 *5 6 *5*3* 2

Coefficients of x 5 = 0 , 7 * 6 c7 2c4 = 0 ,

c7 =

2c4
2 * 2c1
=
,
7*6 7*6*4*3

2c
Coefficients of x 6 = 0 , 8 * 7 c8 2c5 = 0 , c8 = 5 = 0 ,
8*7
Coefficients of x 7 = 0 , 9 * 8 c9 2c6 = 0 ,

290 Power Series Solution Of Differential Equations

2*2
23
2
2
c9 =
c6 =
*
c0 =
c0 ,
9*8
9*8 6*5*3* 2
9 *8* 6 *5*3* 2
Coefficients of x 8 = 0 , 10 * 9 c10 2c7 = 0 ,

c10

2
2
2*2
23
=
c7 =
*
c1 =
c1 ,
10 * 9
10 * 9 7 * 6 * 5 * 3
10 * 9 * 7 * 6 * 5 * 3

Coefficients of x 9 = 0 ,

11 * 10 c11 2c8 = 0 , and c11 =

2c8
= 0,
11 * 10

Substitute the values of c0 , c1 , c2 ,...... into (4) we get the final


solution as following:

2 3
22
23
6
y = c0 1 +
x +
x +
x 9 + ...
6*5*3* 2
9 *8* 6 *5*3* 2
3 * 2

2 4
22
23
7
+ c1 x +
x +
x +
x10 + ..
4*3
7*6*4*3
10 * 9 * 7 * 6 * 5 * 3

Example 3 Solve the following differential equation:

y + (cos( x )) y = 0
Solution:

(1) m x 2m
x 2 x 4 x 6 x8
Q cos x =
=1
+

+
+.........
(
2
)!
2
!
4
!
6
!
8
!
m
m=0
Assume, y =

cm x m = c0 + c1x + c2 x 2 + c3 x 3 + .......

m=0

291

Chapter Nine

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get:

x 2 x 4 x 6 x8
m2
m
(
m

1
)
c
x
+
1

+
+.....

m
2! 4! 6! 8!
m=0

cm x m = 0

m=0

c
Coefficients of x 0 = 0 , 2c2 + c0 = 0, c2 = 0 ,
2
c
Coefficients of x1 = 0 , 6 c3 + c1 = 0 , c3 = 1 ,
6
c
c
Coefficients of x 2 = 0 , 12c4 + c2 0 = 0 , c4 = 0 ,
2
4*3
c
2c1
Coefficients of x 3 = 0 , 5 * 4 c 5 + c 3 1 = 0 c5 =
,
2
5*4*3
Substitute the values of c0 , c1 , c2 ,...... into the assumed solution.

y=

cm x

m=0

x2

1 4
1 6
= c0 1
+
x
x + .......
2 4*3
6*5

x3
1
+ c1 x
+
x 5 +.......
3* 2 5*3* 2

y ( x) = c0 y1 ( x) + c1 y 2 ( x)
Example 4 Solve the following differential equation by using power
series method:
Solution:

y xy = 0

292 Power Series Solution Of Differential Equations


Assume y =

cm x m

(4)

m=0

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get:

m(m 1)cm x m 2 x

m=0

2c2 + (3 * 2c3 )x +

cm x m 1 = 0

m=0

m(m 1)cm x m 2 co x cm x m +1 = 0
m
1 243
m
4 442444
1=4
3
1=4
assume n = m +1

(n + 1)cn + 2 x n cn 1 x n =
n=2

assume n = m 2

(2c2 ) + (3 * 2c3 c0 )x + (n + 2)
n=2

c2 = 0 , c3 =

co
c
= o
3 * 2 3!

[(n + 2)(n + 1)cn + 2 cn 1 ]x n = 0

n=2

cn + 2 =

cn 1
(n + 2)(n + 1) n = 2,3,4,....
c
c0
c2
= 0 , c6 = 3 =
,
6 * 5 6 * 5 * 3!
5*4

c4 =

c1
,
4*3

c7 =

c4
c1
c1
=
=
,
7 * 6 7 * 6 * 4 * 3 7 * 3 * 4!

c9 =

c5 =

c8 =

c6
co
co
,
=
=
9 * 8 9 * 8 * 6 * 5 * 3! 9 * 2 * 6!

c10 =

c7
c1
c1
=
=
,
10 * 9 10 * 9 * 7 * 3 * 4! 9 * 7 * 6!

c5
= 0,
8*7

293

Chapter Nine

c11 =

c8
c9
co
= 0 , c12 =
=
11 * 10
12 * 11 12 * 11 * 9 * 2 * 6!

x3 x6

x9
x12
+
+
+
+ ......
y ( x ) = co 1 +
3! 180 12960 12 * 11 * 9 * 2 * 6!

x4
x7
x10
+ c1 x +
+
+
+ ........
12 7 * 3 * 4! 9 * 7 * 6!

Example 5 Solve the following differential equation by using power


series method: y x y y = 0

Solution: Assume y =

cm x m

(4)

m=0

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get:

m(m 1)cm x

m2

m=0

m(m 1)cm x

mcm x

m 1

m=0
m2

m =0

2c2 + (3 * 2c3 )x +

cm x m = 0

m=0

(m + 1)cm x m = 0

m=0

m(m 1)cm x m 2 co 2c1x

4 442444
m
1=4
3
assume n = m 2

(m + 1)cm x m = 0
1 42443
m
1=4
assume n = m

294 Power Series Solution Of Differential Equations

2c 2 c 0 = 0 , c 2 =

c0
c
, 3 * 2 * c3 2c1 = 0 c3 = 1
2!
3

[(n + 2)(n + 1)cn + 2 (n + 1)cn ]x n = 0

n=2

cn + 2 =

(n + 1)cn
(n + 2)(n + 1) n = 2,3,4,....

c4 =

c
c2
= o ,
4 4*2

c7 =

c5
c1
c1
,
=
=
7 7 * 5 * 3 7 * 3 * 4!

c9 =

c7
c1
=
,
9 9*7*5*3

c5 =

cn + 2 =

cn
(n + 2) n = 2,3,4,....

c3
c0
c
c
= 1 , c6 = 4 =
5 5*3
6 6*4*2
c8 =

c10 =

c6
co
=
8 8*6*4*2

c8
co
=
10 10 * 8 * 5 * 4 * 2

x2

x4
x6
x8
x10
+ 2
+ 3
+ 4
+ 5
+ ......
y ( x ) = co 1 +
2! 2 * 2! 2 * 3! 2 * 4! 2 * 5!

x3
x5
x7
x9
+ c1 x +
+
+
+
........
3 5*3 7*5*3 9*7*5*3

Example 6 Solve the following differential equation by using power


series method: (1 x ) y + y = 0

Solution: Assume y =

cm x m

(4)

m=0

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get:

m(m 1)cm x

m=0

m2

m(m 1)cm x

m =0

m2

cm x m = 0

m=0

295

Chapter Nine

m(m 1)cm x

m2

m=0

m(m 1)cm x

m 1

m=0

cm x m = 0

m=0

2c2 + (3 * 2c3 )x + m(m 1)cm x m 2 2 * 1c3 x


4 442444
m
1=4
3
assume n = m 2

m(m 1)cm x m 1 + co + c1x + cm x m = 0


= 224
3 442444
m
m
1=4
3
14
3
assume n = m 1

c
2c2 + c0 = 0 , c2 = 0
2!
c3 =

n=m

3 * 2 * c3 2c2 + c1 = 0 ,

co c1

6 6

[(n + 2)(n + 1)cn + 2 n(n + 1)cn +1 + cn ]x n = 0

n=2

cn + 2 =

cn
(n + 1) c
(n + 2)(n + 1) n +1 (n + 2)(n + 1) n = 2,3,4,....

cn + 2 =

cn
n
cn +1
(n + 2)
(n + 2)(n + 1) n = 2,3,4,....

c4 =

c
c
c
2c3
c
c
c
2 = o 1 + o = o 1,
4
4*3
12 12 24
24 12

c5 =

co
3c0
c1
3c4 3c3
3c1

+
+
,
5
5 * 4 5 * 24 5 * 12 6 * 5 * 4 6 * 5 * 4

c5 =

co
c
1,
5 * 4 * 3 24

296 Power Series Solution Of Differential Equations

co
2c 0
4c5
c
c1
2c1
4 =

+
+
,
6
6 * 5 3 * 5 * 4 * 3 3 * 24 6 * 5 * 24 6 * 5 * 12
7c0 11c1

c6 =
720
420
x 2 x3 x 4 x5 7 x 7

+ ......
y ( x ) = co 1
2
6 24 60 720

c6 =

x 3 x 4 x 5 11x 6
+ c1 x

........
6 12 24 420

Example 7 Solve the following differential equation by using power


series method: 2 + x 2 y x y + 4 y = 0

Solution: Assume y =

cm x m

m=0

(4)

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get:

m(m 1)cm x

m2

m =0

m(m 1)cm x m

m=0

mcm x m 1 + 4 cm x m = 0

m=0

m=0

m(m 1)cm x m 2 + (m 2 2m + 4)cm x m = 0

m=0

m=0

2 * 2c 2 + 12c3 x + 2 m(m 1)c m x m2 + 2co + 3c1 x +


4 4424443
m
1=4
assume n = m 2

(m 2 2m + 4)c m x m

2 44
m
1=4
424444
3
assume n = m

=0

297

Chapter Nine

Coefficient of x o = 0 4c2 + 4co = 0,

c 2 = co

c
Coefficient of x1 = 0 12c3 + 3C1 = 0, c3 = 1
4
[n(n 2 ) + 4]cn
Coefficient of x n = 0 cn + 2 =
2(n + 2 )(n + 1) 2,3,4,....
c4 =
c5 =

4c
c
4c 2
= o = o,
2*4*3
4!
3!

7c3
7c1
=
,
2 * 5 * 4 10 * 16

c7 =

(5 * 3 + 4)c5
2*7*6

c6 =

(4 * 2 + 4)c4
2*6*5

co
,
30

19c1
1920

x4 x6
2

+ ......
y ( x ) = co 1 x +
3! 30

x 3 7 x 5 19 x 7
+ c1 x
+

........
4 160 1920

Example 8

Solve the following differential equation by using

power series method: y 2 x y + y = 0


Solution: This equation known as Hermith equation.
Assume, y =

cm x m

(4)

m=0

(Charles Hermit (1822-1901). A French mathematician, held the chair of


higher algebra at the university of Paris from 1876 to 1901. This equation is
important in many branches in mathematical physics; for example, in quantum
mechanics.

298 Power Series Solution Of Differential Equations


Then y and y can be obtained as in (5) and (6) respectively.
Substitute these power series in the differential equation we get:

m(m 1)cm x m 2 2 x

m=0

mcm x m 1 +

m=0

(2c2 + c0 ) + (3 * 2c3 2c1 + c1 )x +

cm x m = 0

m=0

m(m 1)cm x m 2

4 442444
m
1=4
3
assume m = n + 2

m 1

2 x mcm x
+ cm x m = 0
2 44
= 244
m =4
14
4244m4
3
assume m = n

(2c2 + c0 ) + (3 * 2c3 2c1 + c1 )x +

2 ncn x +
n=2

(n + 2)(n + 1)cn + 2 x n

n=2

cn x n = 0

n=2

(2c2 + c0 ) + (3 * 2c3 2c1 + c1 )x


+

[(n + 2)(n + 1)cn + 2 2ncn + cn ]x n = 0

n=2

c
Coefficients of x 0 = 0 , then, 2c2 + c0 = 0, c2 = 0
2
Coefficients

c3 =

of

x1 = 0 ,

3 * 2 c3 2c1 + c1 = 0 ,

(2 )
c1 ,
3* 2

Coefficients of x n = 0 , (n + 2 )(n + 1)cn + 2 2ncn + cn = 0 ,

299

Chapter Nine

cn + 2 =

2n
c
(n + 2)(n + 1) n

Substitute the values of c0 , c1 , c2 ,...... into (4) we get:


y=

cm x m = c0 1 2! x 2 +

(4 )( ) 4 (8 )(4 ) 6
x +
x + .... +
4!
6!

(2 ) 3 (6 )(2 ) 5 (10 )(6 )(2 ) 7

c1 x +
x +
x +
x + ..
3!
5!
7!

m=0

y ( x) = c0 y1 ( x) + c1 y 2 ( x)
Example 9 Solve the following differential equation by using power
series method: x 2 + 9 y ( x + 1) y + x 4 y = 0

Solution: Assume y =

cm x m

(4)

m=0

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get:

m(m 1)cm x m + 9

m =0

mcm x

m 1

m=0

c1 x +

m(m 1)cm x m 2

m=0

mcm x m

m=0

cm x m + 4 = 0

m=0

m(m 2)cm x m + 9 * 2c2 + 9 * 3 * 2c3 x

2 4
m
1=4
42444
3
assume n = m

+9

m(m 1)cm x m 2 c1 2c2 x mcm x m 1 + cm x m + 4 = 0


34244
0
4 442444
m
m
1=4
3
1=4
3 m
1=42
43
assume n = m 2

assume n = m 1

assume n = m + 4

300 Power Series Solution Of Differential Equations

(9 * 2c2 c1 ) + (9 * 3 * 2c3 2c2 c1 )x

n ( n 2) c n x

n=2

+ 9 (n + 2 )(n + 1)cn + 2 x n
n=2

(n + 1)cn +1x n + cn 4 x n = 0

n=2

n=4

Coefficient of x o = 0 c2 = c1 / 9 * 2
Coefficient of x1 = 0 c3 =

c1
2c 2
5c
+
= 51
9 *3* 2 9 *3* 2 3

[n(n 2)cn + 9(n + 2)(n + 1)cn + 2 (n + 1)cn +1 ]x

cn 4 x n = 0

n=4

n=2

x [0co + 9 * 4 * 3c4 3c3 ] + x [3 * 1c3 + 9 * 5 * 4c5 4c4 ] +


2

[n(n 2)cn + 9(n + 2)(n + 1)cn + 2 (n + 1)cn +1 ]x

n=4

cn 4 x n = 0

n=4

[n(n 2)cn + 9(n + 2)(n + 1)cn + 2 (n + 1)cn +1 + cn 4 ]x n = 0

n=4

Coefficient of x 2 = 0 c4 =

3c3
5
= 2 7 c1
(9 * 4 * 3) 2 * 3

4c 3c3
13
Coefficient of x 3 = 0 c5 = 4
=
c
9 1
(9 * 5 * 4)
2*3
Coefficient of x n = 0

cn + 2 =

[(n + 1)cn +1 n(n 2)cn cn 4 ]


9(n + 2)(n + 1)
4,5,6....

301

Chapter Nine

5c5 4 * 2c4 co
72
1
= 2 12 c1
c6 =
co
9*6*5
2 *3
2 * 5 * 32
6c 5 * 3c5 c1
181 * 487
1
c7 = 6
c1
co
= 14
9*7*6
3 *7
2 * 5 * 7 * 34
7 c 6 * 4c 6 c 2
23 * 4363
43
c8 = 7
c
= 14 4 c1 + 4
6 o
9 *8* 7
3 *2
2 *7*3
6
7

x
x
x8
y ( x ) = co 1
......

+
+

2
2 * 5 * 7 * 34 2 4 * 7 * 36

2 * 5 * 3

x2
5x3
5x 4
13 x 5
72 x6
+ c1 x +
+ 5 + 2 7
2 12
9
9
*
2
3
2
*
3
2
*
3
2 *3

181 * 487 x 7
314 * 7

23 * 4363 x 8
2 4 * 316

.......

Example 10 Solve the following differential equation by using


power series method: 1 + x 2 y 4 x y + 6 y = 0

Solution: Assume y =

cm x m

m=0

(4)

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get:

m(m 1)cm x

m=0

m(m 1)cm x m

m=0

mcm x m + 6 cm x m = 0

m=0

m2

m=0

m(m 1)cm x m 2 + (m 2 5m + 6)cm x m = 0

m=0

m=0

302 Power Series Solution Of Differential Equations

2c2 + (3 * 2c3 )x +

m(m 1)cm x m 2 + 6co + 2c1x

4 442444
m
1=4
3
assume n = m 2

(m 2 5m + 6) cm x m = 0

2 44
m
1=4
424444
3
assume n = m

2c2 + 6co = 0, c2 = 3co , and c3 =

[(n + 2)(n + 1)cn + 2 + (n 2 5n + 6)cn ]x n = 0

c1
3

n=2

(
n 2 5n + 6 )
cn
cn + 2 =
(n + 2)(n + 1)

n = 2,3, 4,....

c4 = 0 , c5 = 0 , and, cn + 2 = 0

x3
2
y ( x ) = co 1 3x + c1 x
3

Example 11 Solve the following differential equation:

( x 2 + 1) y + x y y = 0
Solution: Assume, y =

cm x m

(4)

m=0

Then y and y can be obtained as in (5) and (6) respectively.


Substitute these power series in the differential equation we get:
2

( x + 1)

m(m 1)cm x

m=0

m2

+x

mcm x

m=0

m 1

cm x m = 0

m=0

303

Chapter Nine

m(m 1)cm x

m=0

mcm x m

m=0

m(m 1)cm x m 2

m=0

cm x m = 0

m=0

(2c2 c0 ) + (3 * 2c3 + c1 c1 )x +

m(m 1)cm x m

m
2 4
1=4
42444
3
assume m = n

m(m 1)cm x m 2 + mcm x m cm x m = 0


m
4 442444
2 44
2 44
m =4
1=4
3 m
1=4
424
3
assume m = n + 2

(2c2 c0 ) + 6c3 x +

assume m = n

[n(n 1)cn + (n + 2)(n + 1)cn + 2 + ncn cn ]x n = 0

n=2

(2c2 c0 ) + 6c3 x +

[(n + 1)(n 1)cn + (n + 2)(n + 1)cn + 2 ]x n = 0

n=2

c
Coefficients of x 0 = 0 , 2c2 c0 = 0, c2 = 0 and
2
1
Coefficients of x = 0 , 6 c3 = 0 , c3 = 0 ,
Coefficients of x n = 0 , (n + 1)(n 1)cn + (n + 2)(n + 1)cn + 2 = 0 ,

1 n
cn
2+n
Substitute the values of c0 , c1 , c2 ,...... into (4) we get:

cn + 2 =

y=

cm x m = c1x +

m=0
2

x
1
1 * 3 6 1 * 3 * 5 8 1 * 3 * 5 * 7 10
2
c0 1 +
x4 + 3
x 4
x +
x ....
5
2
!
2
*
2
!
2
*
3
!
2
*
4
!
2
*
5
!

y ( x) = c0 y1 ( x) + c1 y 2 ( x)

304 Power Series Solution Of Differential Equations


Example 12 Solve the following differential equation about the
ordinary point x = 1 : y + ( x 1) 2 y 4 ( x 1) y = 0

(10)

Solution: To solve an equation about the point x=a , means to obtain


solutions valid in a region surrounding that point, solutions
expressed in powers of ( x a ) . We first translate the axes, putting

x 1 = v . Then the differential equation (10) becomes


d2y
dx 2

+ v2

dy
4 vy = 0
dx

(11)

Assume, y =

cm v m = c0 + c1v + c2 v 2 + c3v 3 + .......

(12)

m=0

Then y and y can be easily obtained from (12). Substitute


these power series in the differential equation we get the following

m(m 1)cm v m 2 +

m=0

mcm v m +1 4

m=0

m(m 1)cm v m 2 +

m=0

cm v m +1 = 0

m =0

(m 4)cm v m +1 = 0

m=0

2c2 + (3 * 2c3 + (0 4)c0 )v +

m(m 1)cm v m 2 + (m 4)cm v m +1 = 0


4 442444
1 4
m
1=4
3 m
1=4
42444
3
m=n+2

m = n 1

2c2 + (3 * 2c3 + (0 4)c0 )v


+

[(n + 2)(n + 1)cn + 2 + (n 5)cn 1 ]v n = 0

n=2

305

Chapter Nine

Coefficients of v 0 = 0 , 2c2 = 0, c2 = 0 and

2c
Coefficients of v1 = 0 , 6 c3 = 4c0 , c3 = 0 ,
3
Coefficients of v n = 0 , (n 5)cn 1 + (n + 2)(n + 1)cn + 2 = 0 ,

cn + 2 =

5n
cn 1
(n + 1)(n + 2)

C n = 0 , for n=2, 5, 8, 11, Also C n = 0 , for n=7, 10, 13, 16, .

c4 =

c
c
c0
c1
Also, c6 = 0 , c9 = 0 , c12 =
4
45
324
42768

Substitute the values of c0 , c1 , c2 ,...... into (12) we get:

y=

cm v

m=0

v6
v9
v12
v 4

= c0 1 +

+
+... + c1 v +

45 324 42768

But v = x 1 , substitute in the above equation, we get:

( x 1) 6 ( x 1)9 ( x 1)12

+
+...
y = cm ( x 1) = c0 1 +
45
324
42768

m=0

( x 1) 4

+ c1 ( x 1) +

y ( x) = c0 y1 ( x) + c1 y 2 ( x)

306 Power Series Solution Of Differential Equations


9.3 Power Series Basics
A power series (1) is said to converge at a point x if
m

cn ( x a ) n

lim

m n =0

exists. The series certainly converges

for x = a ; it may converge for all x, or it may converges


for some values of x and not for others.
A power series converges absolutely for x a < R and
diverge for

x a > R , Where R is the radius of

convergence.
A power series represents a continuous function within its
interval of convergence.
A power series can be differentiated (Integrated) term wise
within its interval of convergence.
Two power series with a common interval of convergence
can be added term by term.
The function (solution) is analytic at x = a if it can be
expand in a power series having the form:

y ( x) =

cm ( x a) m = c0 + c1 ( x a) + c2 ( x a) 2 + c3 ( x a)3 + .......

m=0

If both P ( x) and Q( x) are analytic at a point x = a , this point is


called an ordinary point of the differential equation (3) otherwise it
is called a singular point.

307

Chapter Nine

If a is a singular point of differential equation (3) and

( x a) P( x), ( x a ) 2 Q ( x) are analytic function at x = a .


Then a is said to be regular singular point of the
differential equation (3), otherwise it is called an irregular
singular point.
If x = a is an ordinary point of differential equation (3),
we can always find two distinct power series solutions of
the following form: y ( x) =

cm ( x a ) m .

A series

m=0

solution will converge at least for x = a < R1 , where R1


is the distant to the closest single point.
Example 13 Consider the following differential equation

d2y
dx 2

+x

dy
+ ( x 2 + 4) y = 0
dx

We have P ( x) = x and Q ( x) = x 2 + 4 which are analytic


functions for all x. Thus all points x are ordinary points of the
differential equation.
Example 14 Consider the following differential equation:

d2y
dx 2

+ ex

dy
+ sin( x) y = 0
dx

308 Power Series Solution Of Differential Equations


We have P ( x) = e x and Q( x) = sin( x) which are analytic
functions for all x. Thus all points x are ordinary points of the
differential equation.
Example 15 Consider the following differential equation:

d2y

+ ( Ln( x)) y = 0
dx 2
This differential equation has a singular point at x = 0 . Because
Q ( x) = Ln( x) possesses no power series in x.
Example 16 Consider the following differential equation

( x 2 1)
d2y

d2y
dx 2

+ 2x

dy
+ 6y = 0
dx

dy
6
y=0
+
dx 2 ( x 2 1) dx ( x 2 1)
2x
6
We have P ( x) =
and
Q
(
x
)
=
( x 2 1)
( x 2 1)

2x

which are

analytic except at x = 1 and x = 1. Thus x = 1 and x = 1 are


singular points of the differential equation, and all other finite value
of x are ordinary points.
We now test P( x ) and Q( x ) at each singular point

For x = 1

2x
= 1 Also,
x 2 1 x 1 x = 1
6
6( x + 1)
=
= 1
Q( x ) = ( x + 1)2 * 2

1
x
x 1
x = 1

(x + 1) P(x ) = (x + 1) *
(x + 1)2

2x

309

Chapter Nine

It is clear that the point x = 1 is regular singular point.

For x = 1

2x
= 1 Also,
2
+
1
x
x 1
x =1
( x 1)2 Q( x ) = ( x 1)2 * 26 = 6( x 1) = 1
x + 1 x =1
x 1

(x 1) P(x ) = (x 1) *

2x

It is clear that the point x = 1 is regular singular point.


So, the two points x = 1, and x = 1 are regular singular points
for the differential equation.
Example 17 Consider the following differential equation:
2

( x 4)
d2y

d2y
dx 2

+ ( x 2)

dy
+y=0
dx

dy
1
y=0
+
2
2 dx
2
2
dx
( x 2)( x + 2)
( x 2) ( x + 2)
1
1
We have P ( x) =
and
Q
(
x
)
=
( x 2)( x + 2) 2
( x 2) 2 ( x + 2) 2

It is clear that x = 2 and x = 2 are singular points. We now


test P (x) and Q (x) at each singular point.
For x = 2

( x + 2) P ( x ) =

1
1
and ( x + 2) 2 Q ( x) =
( x 2)( x + 2)
( x 2) 2

It is clear that ( x + 2) P ( x) is not analytic at x = 2 and hence

x = 2 is an irregular single point of the differential equation.

310 Power Series Solution Of Differential Equations


For x = 2

( x 2) P ( x ) =

1
( x + 2) 2

and ( x 2) 2 Q( x) =

1
( x + 2) 2

are analytic

function at x = 2 is a regular singular point of the differential


equation.

311

Chapter Nine

9.4 Solutions Around Singular Points


To solve (3) around the regular singular point we employ the
following theorem:
Theorem 1 If x = a is a regular singular point of equation (3) then
there exists at least one series solution of the form

y ( x) = ( x a )

cm ( x a )

m=0

cm ( x a ) m + r

(13)

m =0

Where the number r is a constant which must be determined. The


series will converge at least on some intervals 0 < ( x a ) < R .
Example 18 Solve the following differential equation about x = 0 :

y +

1
1
y
y=0
3x
3x

(14)

Solution:
From (14) we have P( x ) =
analytical

x 2Q( x ) =

at

point

1
1
and Q( x ) =
which are not
3x
3x
x=0

but

xP( x ) =

1
3

and

x
= 0 at x = 0 . So, It is clear that x = 0 is a regular
3

singular point of (14). So from (13) we assume the solution to be in


the following form:

y=

cm x m + r ,

m =0

(15)

312 Power Series Solution Of Differential Equations

(m + r )cm x m + r 1 ,

y =

(16)

m=0

(m + r )(m + r 1)cm x m + r 2

y =

(17)

m =0

Substitute that in the differential equation we get:

3 (m + r )(m + r 1)cm x m + r 1
m =0

( m + r )cm x

m + r 1

m=0

cm x m + r

m=0

(m + r )(3m + 3r 3 + 1)cm x

m + r 1

m=0

r (3r 2)c0 x r 1 + x r

=0

cm x m + r

=0

m =0

(m + r )(3m + 3r 2)cm x m 1

m
1 44442444443
1=4
n = m 1

xr

cm x m = 0

m
= 024
14
3
n=m

x r r (3r 2)c0 x 1 + x n [(n + r + 1)(3n + 3r + 1)cn +1 cn ] = 0


n =0

Which implies that r (3r 2)co = 0 ,


and (n + r + 1)(3n + 3r + 1)cn +1 cn = 0

(18)

n = 0, 1, 2, 3,......

Since nothing is gained by taking c0 = 0 , we must have

r (3r 2) = 0 .

313

Chapter Nine

cn +1 =

cn
(n + r + 1)(3n + 3r + 1)

n = 0, 1, 2, 3,..

The two values of r that satisfy (18), r1 =

(19)

2
and r2 = 0 , when
3

substitute in (19), give us two different recurrence relations:


For r1 =

2
, substitute in (19) we get:
3

cn +1 =

cn
n = 0, 1, 2, 3,......
(3n + 5)(n + 1)

c1 =

c0
,
5 *1

c3 =

c0
c2
=
11 * 3 3!*5 * 8 * 11

c4 =

c3
c0
=
14 * 4 4!*5 * 8 * 11 * 14

cn =

c0
n = 1,2,3,......
n!*5 * 8 * 11 * ......(3n + 2)

c2 =

(20)

c0
c1
=
8* 2 2 *5*8

Thus we obtain the first solution:

1
y1 ( x) = co x 2 / 3 1 +
xn
n =1n!*5 * 8 * 11 * ......(3n + 2)

(21)

For r2 = 0 , substitute in (19) we get:

cn +1 =

cn
n = 0, 1, 2, 3,......
(n + 1)(3n + 1)

Where as iteration of (22) yields:

(22)

314 Power Series Solution Of Differential Equations

c0
c0
c
, c2 = 1 =
1 *1
2 * 4 2!*1 * 4
c
c0
c4 = 3 =
4 * 10 4!*1 * 4 * 7 * 10
c0
cn =
n!*1 * 4 * 7 * ......(3n 2)
c1 =

, c3 =

c0
c2
=
3 * 7 3!*1 * 4 * 7

n = 1, 2, 3,......

1
y 2 ( x) = co x 0 1 +
xn
(23)

!*
1
*
4
*
7
*
......(
3
2
)
n
n
n =1

By the ratio test it can be demonstrated that both (21) and (23)

converges for all finite values of x. Also, it should be clear from the
form (21) and (23) that neither series is a constant multiple of the
other and therefore, y1 ( x) and y 2 ( x ) are linearly independent
solution on the x-axis. Hence, by the superposition principle we get:

y ( x) = C1 y1 ( x) + C2 y2 ( x)


1
y ( x) = C1 x 2 / 3 1 +
xn +

n =1n!*5 * 8 * 11 * ......(3n + 2)

0

1
C2 x 1 +
x n , x <
n =1n!*1 * 4 * 7 * ......(3n 2)

This is another solution of differential equation. On any interval not


containing the origin (such a 0 < x < ) this combination represents
the general solution of the differential equation. Although the
forgoing example illustrates the general procedure for using
theorem 1, we hasten to point out that we may not always be able to

fined two solution so readily, or for that matter, find two solutions
which are infinite series consisting entirely of power of x.

315

Chapter Nine

9.5 Indicial Equation

Equation (18) is called the indicial equation of the problem, and


the values r1 =

2
and r2 = 0 are called the indicial roots or
3

exponents of the singularity. In general, if x=0 is a regular point of


(3) then the function xP(x)

and x 2Q ( x) obtained from (3) are

analytic at x = 0 . That is, the following expressions are valid on


intervals that have a positive radius of convergence.

xP( x) = p0 + p1 x + p2 x 2 + ..........
x 2Q( x) = q0 + q1x + q2 x 2 + ..........
After substituting y =

cm x m + r

in (3) and simplifying, the

m=0

indicial equation is a quadratic equation in r that results from


equating the total coefficients of the lowest power of x equal to zero.
The indicial equation has the following form:

r (r 1) + p0 r + q0 = 0

(24)

We then solve the latter equation for the two values of the
exponents and substitute these values into a recurrence relation such
as (19).
Example 19 Solve the following differential equation:

x y + 3 y y = 0

316 Power Series Solution Of Differential Equations


Solutions: This differential equation has a regular singular point at

x = 0 . Then, assume y =

cm x m + r ,

(15)

m=0

Then y and y can be obtained as in (16) and (17) respectively.


Substitute these power series in the differential equation we get:
r

x r (r + 2)c0 x

+x

n=0

[(n + r + 1)(n + r + 3)cn +1 cn ] = 0

So that, the indicial equation and exponents are r (r + 2) = 0 and

r1 = 0, r2 = 2 , respectively.
Since (n + r + 1)(n + r + 3)cn +1 cn = 0 , n = 0, 1, 2, ........
It follows that, when r1 = 0 , cn +1 =

(25)

cn
(n + 1)(n + 3)

c1 =

2c0
2c
c0
c
c
, c2 = 1 =
, c3 = 2 = 0
1* 3
2 * 4 2!*4!
3 * 5 3!*5!

c4 =

2c
c3
= 0
4 * 6 4!*6!

cn =

2c 0
, n = 1, 2, 3,......
n!*(n + 1)!

Thus one series solution is as following:


0

1
y1 ( x) = c0 x 1 +
xn
n =1n!*(n + 2)!
Or y1 ( x) = c0

n!*(n + 2)! x n

n=0

x <

(26)

317

Chapter Nine

Now when r2 = 2 ,we get the following equation:

(n 1)(n + 1)cn +1 cn = 0 , n = 0, 1, 2, ........

(27)

But note here that we do not divide by (n 1)(n + 1) immediately


since this term is zero for n = 1 . However, we use recurrence
relation (27) for the cases n = 0 and n = 1 :

1 * 1c1 c0 = 0 and 0 * 2c2 c1 = 0


The latter equations implies that c1 = 0 and so the former equation
implies that c0 = 0 . Continuing we found:

cn +1 =

cn
n = 2, 3, .....
(n 1)(n + 1)

c3 =

c2
1* 3

cn =

2c 0
, n = 2, 3, 4,......
(n 2)!*n!

, c4 =

c3
c
2c
2c
= 2 , c5 = 4 = 2
2 * 4 2!*4!
3 * 5 3!*5!
(28)

Thus we can write

y 2 ( x ) = c2 x

2
xn
n = 2 ( n 2)! * n!

x <

(29)

However, close inspection of (29) reveals that y 2 is simply a


constant multiple of (26). To see this, let k = n 2 in (29). We
conclude that this method gives only one series solution of this
equation x y + 3 y y = 0 . And this is not acceptable. So, we have
to follow special manner in case of r1 r2 = N .

318 Power Series Solution Of Differential Equations


9.6 Cases Of Indicial Roots

Let us suppose that r1 and r2 are the real solutions of the indicial
equation and that, when appropriate, r1 denotes the largest root. So,
we have the following three cases:
Case I

If r1 and r2 are distinct and do not differ be an integer,

Case II

If r1 r2 = N , where N is a positive integer.

Case III

If r1 = r2

The above three cases are analyzed in details in the following:


Case I If r1 and r2 are distinct and do not differ be an integer, then

there exist two linearly independent solutions of (3) of the form (30)
and (31) and as explained in Example 18 and the following example.

y1 =
y2 =

cm x m + r1 ,

c0 0,

(30)

bm x m + r2 ,

b0 0,

(31)

m =0

m=0

Example 20 Solve the following differential equation around x = 0 :

2 x y + (1 + x ) y + y = 0
Solution: If y =

cm x m + r

(15)

m=0

Then y and y can be obtained as in (16) and (17) respectively.


Substitute these power series in the differential equation we get:

319

Chapter Nine

m=0

(m + r )(m + r 1)cm x

( m + r ) cm x m + r +

m =0

m=0

m + r 1

(m + r )cm x m + r 1

m =0

cm x m + r = 0

m =0

(m + r )(2m + 2r 1)cm x m + r 1 +

r (2r 1)c 0 x r 1 + x r

(m + r + 1)cm x m + r

=0

m =0

(m + r )(2m + 2r 1)c m x m1

m
1 44442444443
1=4
n = m 1

+ xr

(m + r + 1)c m x m

=0

m
0 442444
1=4
3
n=m

x r r(2r 1)c0 x 1 + xn [(n + r + 1)(2n + 2r + 1)cn+1 + (k + r +1)cn ] = 0


n=0

Which implies that r (2r 1) = 0 , r1 =

1
, and r2 = 0
2

(n + r + 1)(2n + 2r + 1)cn +1 + (n + r + 1)cn = 0 n = 0,1, 2, 3,......


For r1 =

c1 =

cn
1
: cn +1 =
n = 2, 3, .....
2(n + 1)
2

c0
c
c1
, c2 =
= 20
2 *1
2*2 2 *2

c3 =

c
c2
= 3 0 ,
2 * 3 2 * 3!

320 Power Series Solution Of Differential Equations

cn =

(1) n c0

n = 1,2,3,......

2 n * n!

Thus from (30) and (31) we can write the final solution as:
1/ 2

y1 ( x) = c0 x

(1) n

(1) n

x = c0 n
x n +1 / 2
1 + n
n = 02 * n!
n = 02 * n!

Which converge for x 0 . As given, the series is not meaningful

x < 0 because of the presence of x1 / 2 .


Now for r2 = 0 ,

cn +1 =

cn
n = 2, 3, .....
2n + 1

c1 =

c0
1

c3 =

c0
c2
=
5
1* 3 * 5

, c2 =

c
c1
= 0
3
1* 3
, c4 =

(1) n c0
cn =
1 * 3 * 5 * 7.....(2n 1)

c3
c0
=
7
1* 3 * 5 * 7

n = 1, 2, 3,......

Thus we can write the second solution for the differential


equation as:

(1) n c0
y2 ( x) = c0 1 +
xn

n =11 * 3 * 5 * 7.....(2n 1)

On the interval 0 < x < the general solution is:


y ( x) = C1 y1 ( x) + C2 y 2 ( x)

321

Chapter Nine

Example 21 Solve the following differential equation:

2 x y + (1 + x ) y 2 y = 0
Solution: It is clear that this equation has singular point at x = 0 .

So the assumed solution will be in the following form:

y=

cm x m + r

(15)

m =0

Then y and y can be obtained as in (16) and (17) respectively.


Substitute these power series in the differential equation we get:

2
+

m=0

(m + r )(m + r 1)cm x m + r 1 +

( m + r ) cm x

m+r

m=0

m=0

2 cm x m + r = 0
m=0

(m + r )(2m + 2r 1)cm x

m + r 1

m =0

r (2r 1)c0 x

(m + r )cm x m + r 1

r 1

+x

( m + r 2) c m x m + r = 0

m =0

(m + r )(2m + 2r 1)cm x m 1

m
1 44442444443
1=4
n = m 1

+x

( m + r 2) c m x m = 0

m
0 442444
1=4
3
n=m

x r r (2r 1)c0 x 1 + x n [(n + r + 1)(2n + 2r + 1)cn+1 + (n + r 2)cn ] = 0


n=0

Which implies that r (2r 1) = 0 ,

322 Power Series Solution Of Differential Equations

(n + r + 1)(2n + 2r + 1)cn +1 + (n + r + 1)cn = 0 n = 0,1, 2, 3,......

r1 =

1
, r2 = 0
2

For r1 =

1
:
2

n c n
2

cn +1 =
3

n + ( 2 n + 2)
2

n = 2, 3, .....

c
At n = 0 c1 = 0
2

c
c
, At n = 1 c2 = 1 = 0
20 40

At n = 2 c3 =

c2 c0
=
42 1680

At n = 4 c5 =

co
c4
=
22
887040

, At n = 3 c4 =

c3
co
=
24
40320

Thus we can write

x x2
x3
x4
x5
y1 ( x) = c0 x1 / 2 1 + +

+ .......

2 40 1680 40320 887040


Now for r2 = 0

cn +1 =

(2 n )cn
(n 2 )cn
=
n = 0, 1, 2, 3, .....
(2n + 1)(n + 1) (2n + 1)(n + 1)

At n = 0 c1 = 2co ,

c
c
At n = 1 c2 = 1 = o , At n = 2 c3 = 0
6
3
At n = 2 c4 = 0

323

Chapter Nine

cn = 0, for n = 3,4,5,6,....

x2
y2 ( x) = c0 1 + 2 x +
3

On the interval 0 < x < the general solution is:

y ( x) = C1 y1 ( x) + C2 y 2 ( x)
Case II If r1 r2 = N , where N is a positive integer number.

When the roots of the indicial equation differ by a positive


integer we may or may not be able to find two solutions of (3)
having form (4). If not, then one solution corresponding to smaller
root contains a logarithmic term. When the exponents are equal a
second solution will always contain a logarithm. This latter situation
is analogous to the solutions of the Caushy-Eulaer differential

equation when the roots of the auxiliary equation are equal. The
solution of this kind of equation is shown in the following examples.
Example 22 Solve the following differential equation:

x y + ( x 6 ) y 3 y = 0
Solution: If y =

cm x m + r

(15)

m =0

Then y and y can be obtained as in (16) and (17) respectively.


Substitute these power series in the differential equation we get:

324 Power Series Solution Of Differential Equations

(m + r )(m + r 1)cm x

m=0

m + r 1

( m + r ) cm x m + r

m=0

m=0

m=0

(m + r )cm x m + r 1 3 cm x m + r = 0

r (r 7)c0 x r 1 + x r (m + r )(m + r 7)cm x m 1


m =4
1 4442444443
14
n = m 1

+ xr

(m + r 3)cm x m = 0

m
0 442444
1=4
3
n=m
r 1

r ( r 7 ) c0 x

x r (n + r + 1)(n + r 6)cn +1 + (n + r + 1)cn x n = 0


n=0
n = 0

Which implies that:

r (r 7) = 0,

r1 = 7, r2 = 0, r1 r2 = 7 , and

(n + r + 1)(n + r 6)cn +1 + (n + r 3)cn = 0 n = 0,1, 2, 3,......


From the smaller root r2 = 0

(n + 1)(n 6)cn +1 + (n 3)cn = 0 n = 0, 1, 2, 3,......


(3 n ) c , n = 0, 1, 2, 3, 4,.......
cn +1 =
(n + 1)(n 6) n
c
c
3
c1 =
co ,
c2 = 1 = 0 ,
5 10
1 * ( 6)
c
c
c3 = 2 = 0 ,
c4 = c5 = c6 = 0 ,
12
120
( 3) c = 0 = Undefined number.
c7 =
6
7*0
0

325

Chapter Nine

This implies that co and c7 can be chosen arbitrarily.


And for n 7 , c8 =

c9 =

4
c7
8 *1

5
4*5
c8 =
c7
9*2
2! 8 * 9

c10 =

,
,

6
4*5*6
c9 =
c7
10 * 3
3! 8 * 9 * 10

() n +1 4 * 5 * 6......(n 4)
cn =
c7 n = 8, 9, 10, ..... ,
(n 7)! 8 * 9 * 10...n
If we choose c7 = 0 and c0 0 we obtain the polynomial solution:

1
1 3
1
y1 ( x) = c0 1 x + x 2
x ,
2
10
120

But when c7 0 and c0 = 0 , it follows that a second, through


infinite series, solution is
( 1) n +1 4 * 5 * 6.....( n 4)

y2 ( x) = c7 x 7 +
xn

n = 8 ( n 7)! 8 * 9 * 10.....n
Finally, for x > 0 the general solution of the differential equation is

y ( x) = C1 y1 ( x) + C2 y 2 ( x)
1
1 3
1
y ( x) = C1 1 x + x 2
x
10
120
2
7 (1) n +1 4 * 5 * 6.....(n 4) n
x
+ C2 x +
n
n

(
7
)!
8
*
9
*
10
.....

n =8
It is interesting to observe that in the proceeding example the
larger root r1 = 7 was not used.

326 Power Series Solution Of Differential Equations


Example 23 Solve the following differential equation:

x y ( 4 + x ) y + 2 y = 0

Solution: If y =

cm x m + r

(15)

m =0

Then y and y can be obtained as in (16) and (17) respectively.


Substitute these power series in the differential equation we get:

(m + r )(m + r 1)cm x m + r 1 4

m=0

( m + r ) cm x

m+r

m =0

(m + r )cm x m + r 1

m =0

+ 2 cm x m + r = 0
m=0

(m + r )(m + r 5)cm x

m=0

m + r 1

+2

(m + r 2)cm x m + r

=0

m=0

r (r 5)c0 x r 1 + x r (m + r )(m + r 5)cm x m 1


m =4
1 4442444443
14
n = m 1

( m + r 2) c m x m = 0

m
0 442444
1=4
3

n=m
r (r 7)c0 x 1

xr
n = 0
+ (n + r + 1)(n + r 6)cn +1 + (n + r + 1)cn x
n=0

n =0
So, Coefficient of x 1 r (r 5) = 0, r1 = 5, r2 = 0, r1 r2 = 5 ,
Coefficient of x n = 0

(n + r + 1)(n + r 4)cn +1 (n + r 2)cn = 0 n = 0,1, 2, 3,......

327

Chapter Nine

cn +1 =

(n + r 2)
cn n = 0, 1, 2, 3,......
(n + r + 1)(n + r 4)

At r2 = 0 cn +1 =

( n 2)
cn n = 0, 1, 2, 3,......
(n + 1)(n 4)

At n = 0 , c1 =

2co co
c
c1
= , At n = 1 , c2 =
= o
4
2
2 * 3 4 * 3

At n = 2 , c3 =

(2 2)c2
3 * ( 2)

At n = 4 , c5 =

At n = 3 , c4 =

= 0,

2c4
0
=
5 * (4 4 ) 0

c3
=0
5 *1

Undefined number

Assume c5 = c5*

3c5* c5*
4c6 c5*
At n = 5 , c6 =
=
=
, At n = 6 , c7 =
6 *1 2
7*2 7
At n = 7 ,

5c7
5c5*
=
c8 =
8*3 8*7*3

6c8
5c5*
At n = 8 , c9 =
=
9 * 4 6 * 7 *8*3
At n = 9 , c10

7c8
c5*
=
=
10 * 5 10 * 6 * 8 * 3

x x2

x6 x7
5 x8
5x9
+
+
+
+ ...
y ( x) = co 1 + + + c5* x 5 +
2
7 8 * 21 42 * 24
2 12

It is interesting to observe that in the proceeding example the larger


root r1 = 5 was not used.

328 Power Series Solution Of Differential Equations


Example 24 Solving the following differential equation by two

different methods. x 2 y + 5 x y + 3 y = 0
Solution: It is clear the above differential equation in the form of
2

Cauchy differential equation: x y + axy + by = 0


The auxiliary equation is m 2 + (a 1)m + b = 0 , so substitute that in
the differential equation we get: m 2 + 4m + 3 = 0

m1 = 3,

m2 = 1 ,

y ( x) = C1 x 3 + C2 x 1

The second solution:

The above differential equation can be solved also by means of


power series concept as following.
It is clears the above differential equation has regular singular point
at x = 0 , so the solution of the above differential equation has the
form (15). Then y and y can be obtained as in (16) and (17)
respectively. Substitute (15), (16) and (17) in the differential
equation we get:

m=0

(m + r )(m + r 1)cm x m + r + 5 (m + r )cm x m + r


m =0

+ 3 cm x m + r = 0

xr

m=0

((m + r )(m + r 1 + 5) + 3)cm x m = 0

m =0

329

Chapter Nine

r
m
x r (r + 4 ) + 3 + ((m + r )(m + r + 4) + 3)cm x = 0

m
1 4444
1=4
42444444
3

n=m
x

((n + r )(n + r + 4) + 3)cn x n = 0

n =1

r (r + 4 ) + 3 = 0, or , r 2 + 4r + 3 = 0
r1 = 1, and, r2 = 3 , It is clear that r1 r2 = 2
This is the second case of the indicial equation, so,
At r1 = 3 , x

x 3

((n + ( 3))(n + ( 3) + 4) + 3)cn x n = 0

n =1

((n 3)(n + 1) + 3)cn x n = 0

m =1

((n 3)(n + 1) + 3)cn

n =1, 2,3, 4,....

=0

At n = 1, ((1 3)(1 + 1) + 3)c1 = ( 2 * 2 + 3)c1 = 0 c1 = 0

0
0
Then, c2 is undefined number, so we can get the solution in terms
At n = 2, ((2 3)(2 + 1) + 3)c2 = ( 1 * 3 + 3)c2 = 0, or , c2 =

of c2 . In the same way we can substitute for n=3, 4, 5, 6, to get


the rest of constants, so we get the following values:

c1 = c3 = c4 = c5 = c6 = c7 = c8 = ............ = 0
Substitute the values of constants in the solution form we get:

y ( x ) = x 3 co + c2 x 2 , or y ( x ) = co x 3 + c2 x 1
It is clear we get the same solution in both methods.

330 Power Series Solution Of Differential Equations


Case III If r1 = r2 there always exist two linearity independent

solutions of equation (3) of the following form:

y1 ( x ) =

cm x m + r1 ,

m=0

c0 0, and y2 ( x ) = y1 ( x) Ln x

(32)

Example 25 Solve the following differential equation

x( x 1) y"+(3 x 1) y '+ y = 0
Solution: It is clears the above differential equation has regular

singular point at x = 0 , so the solution of the above differential

equation has the following form: y =

cm x m + r

(15)

m=0

Then y and y can be obtained as in (16) and (17) respectively.


Substitute these power series in the differential equation we get:

(m + r )(m + r 1)cm x m + r

m=0

+ 3 (m + r )cm x
m=0

m+r

(m + r )(m + r 1)cm x m + r 1

m=0

(m + r )cm x

m + r 1

m=0

cm x m + r

=0

m =0


x r ((m + r )(m + r 1 + 3) + 1)cm x m
m = 0

m =0

(m + r )(m + r 1 + 1)cm x m 1 = 0

331

Chapter Nine


r
x ((m + r )(m + r + 2) + 1)cm x m
m
0 44442444443
1=4

n=m

2
1
m 1
r co x (m + r )(m + r 1 + 1)cm x
=0

=14444
1m4
42444444
3
n = m 1, or , m = n +1

The indicial equation is the coefficient of x r 1 which is


r 2 co = 0 , r 2 = 0 , so we have double roots r1 = r2 = 0


x r ((n + r )(n + r + 2) + 1)cn x n (n + r + 1) 2 cn +1 x n = 0
n =0

n = 0
Substitute in the above equation for r = 0 we get:

[(n(n + 2) + 1)cn (n + 1) 2 cn +1 ]x n = 0

n=0

[(n + 1) 2 cn (n + 1) 2 cn +1 ]x n = 0

n=0

(n + 1) 2 cn (n + 1) 2 cn +1 = 0
cn +1 = cn , or co = c1 = c2 = c3 = c4 = c5 = c6 = c6 = ....cn

y1 ( x ) = co 1 + x + x 2 + x 3 + x 4 + x 5 + ........
1
But,
= 1 + x + x 2 + x 3 + x 4 + x 5 + .......
1 x
c ln ( x )
c
So, y1 ( x ) = o , and y2 ( x ) = y1 ( x ) ln ( x ) = o
1 x
1 x
1
y ( x ) = C1 y1 ( x ) + C2 y 2 ( x ) =
C1* + C2* ln ( x )
1 x

332 Power Series Solution Of Differential Equations


Example 26 Solve the following differential equation by two

different methods x 2 y + 3 x y + y = 0
Solution: It is clear the above differential equation in the form of

Cauchy differential equation: x 2 y + axy + by = 0 . The auxiliary


equation is m 2 + (a 1)m + b = 0 , so substitute that in the
differential equation we get:

m 2 + 2m + 1 = 0 , m1 = m2 = 1 y ( x) = (C1 + C2 Ln x )x 1
The second solution:

The above differential equation can be solved also by means of


power series concept as following.
It is clears the above differential equation has regular singular
point at x = 0 , so the solution of the above differential equation has
the following form: y =

cm x m + r

(15)

m =0

Then y and y can be obtained as in (16) and (17) respectively.


Substitute these power series in the differential equation we get:

m =0

(m + r )(m + r 1)cm x

cm x m + r

m=0

=0

m+r

+ 3 ( m + r )cm x m + r
m=0

333

Chapter Nine

((m + r )(m + r 1 + 3) + 1)cm x m = 0

m=0

r
m
x r (r + 2) + 1 + ((m + r )(m + r + 2) + 1)cm x = 0

m
1 44442444443
1=4

n=m
x

((n + r )(n + r + 2) + 1)cn x n = 0

n =1

r (r + 2 ) + 1 = 0, or r 2 + 2r + 1 = 0
r1 = r2 = 1
It is clear that this is the third case of the indicial equation, so,
At r = 1 , x

((n 1)(n + 1) + 1)cn x n = 0

n =1

It is clear that for any value for n, the expression

((n 1)(n + 1) + 1) 0 , so it must be cn = 0 for n = 1, 2, 3, 4,..


y1 ( x ) = co x 1
y 2 ( x ) = c y1 ( x ) ln ( x ) = c* x 1 ln ( x )

y ( x ) = C1 y1 ( x ) + C2 y 2 ( x ) = C1* + C2* ln ( x ) x 1

334 Power Series Solution Of Differential Equations


9.7 Bessel Differential Equation

The following equation is called Bessels differential equation,

x 2 y + x y + ( x 2 v 2 ) y = 0

(33)

The above equation is so important differential equation used in


applied mathematics, physics and engineering.
In solving (33) we shall assume v 0 , where in. Since we seek
series solution of each equation about x = 0 , we observe that the
origin is a regular singular point of Bessel s equation.
9.7.1 Solution of Bessel s Equation

If we assume y =

cm x m + r

(15)

m =0

Then y and y can be obtained as in (16) and (17) respectively.


Then, substitute that in the Bessel s differential equation we get:

m=0

(m + r )(m + r 1)cm x

m+r

( m + r )c m x m + r

m=0

cm x m + r + 2 v 2

m=0

(r 2 r + r v 2 )c0 x r +
x

[(m + r )(m + r 1) + (m + r ) v

m =1

]c
)

mx

cm x m + r

=0

m=0

+x

cm x m + 2 = 0

m=0

(r 2 v 2 )c0 x r + x r cm (m + r ) 2 v 2 x m + cm x m+ 2 = 0
m=0

m=1

From above equation, we see that the indicial equation is:

Chapter Nine

335

r 2 v2 = 0

(34)

So that the indicial roots are r1 = v and r2 = v


When r1 = v , (33) becomes,

x v c m m ( m + 2v ) x m + c m x m + 2 = 0
m=0
m =1

v +1
v
m
m+2
=0
(1 + 2v)c1 x
+ x c m m ( m + 2v ) x + c m x
m
2 442444
0
1=4
3 m
1=42
43

n=m
n=m+2

v
n
x (1 + 2v)c1 x + x (n + v) 2 v 2 cn + cn 2 = 0
n=2

Therefore, by the usual argument we can write: (1 + 2v ) c1 = 0 ,

(n + v) 2 v 2 cn + cn 2 = 0 n = 2, 3,4,5,......
cn =

cn 2
2

(n + v) v

= 0 n = 2, 3,4,5,......

(35)

The choice c1 = 0 in (35) implies c3 = c5 = c7 = .... = 0 , so for

n = 2, 4,6,8 .... , we fined, after letting n=2k, k=1,2,3,..,


c2 k 2

, k = 1,2,3,4,......
2 2 k (k + v)
co
c0
c2
=
c2 =
, c4 =
,
2
2
4
2 1(1 + v)
2 * 2(2 + v) 2 * 1 * 2(1 + v)(2 + v)
c0
c4
c6 = 2
= 6
,
2 * 3(3 + v)
2 * 1 * 2 * 3(1 + v)(2 + v)(3 + v)

c2 k =

336 Power Series Solution Of Differential Equations

(1) k co

c2 k =
, k = 1,2,3,....
2 2k k! (1 + v)(2 + v)(3 + v)....(k + v)

(36)

Since this latter function possesses the convenient property

(1 + v) = v(v) , we can reduce the indicated product in the


demonstrator of (36) to one term.
For example:

(1 + v + 1) = (1 + v)(1 + v)
(1 + v + 2) = (2 + v)(2 + v)
= (2 + v)(1 + v)(1 + v)
(1 + v + k ) = (k + v)(k 1 + v).....(3 + v)(2 + v)(1 + v)(1 + v)
(k + v)(k 1 + v).....(3 + v)(2 + v)(1 + v) =

(1 + v + k )
(1 + v)

Hence we can write (37) as:

c2 k =

(1) k (1 + v)co
2

2k

k! (1 + v + k )

, k = 1,2,3,....

In the above formula co is still arbitrary, and since we are looking


only for particular solution, it is convenient to choose:

co =

1
2 v (1 + v)

So that finally: c2 k =

(1) k
2 2k + v k! (1 + v + k )

, k = 0,1,2,3,....

(37)

So substituting the above results into assumed solution for v 0 :

337

Chapter Nine

y ( x) =

c2 k x 2 k + v

k =0

(1) k
x
y ( x) =

!
(
1
)

+
+
k
v
k
2
k =0

2k + v

(38)

For each v , the function y ( x ) is called a Bessel function of the first


kind of order v and is donated by the symbol J v (x) :

(1) k
x
J v ( x) =

!
(
1
)

+
+
k
v
k
2
k =0

2k + v

(39)

Graphs of J o ( x ), and J1 ( x ) are shown in the following figure.


Their resemblance to the graphs of cos x and sin x is interesting. In
particular, they illustrate the important fact that for each value of v
the equation J v (x) =0 has infinitely many roots.

Also, for the second exponent r2 = v we obtain, in exactly the


same manner,

(1) k
x
J v ( x) =

k
v
k
!
(
1
)

+
2
k =0

2k v

(40)

338 Power Series Solution Of Differential Equations

The functions J v (x ) and J v (x) are called Bessel functions of the

first kind of order v and v, respectively, depending on the value of


v, (38) may contains negative powers of x and hence converges on

0 < x < , when v is not an integer, J v ( x ), and J v ( x ) are two


linearly independent solutions of Bessels equation and this is a
complete solution of Bessels equation when v.

y ( x) = C1 J v ( x) + C2 J v ( x)

(41)

For many reason it is convenient to take the linear combination

Yv ( x) =

cos v J v ( x) J v ( x)
sin v

(42)

Instead of J v ( x ) as a second, independent solution of Bessels


equation. Using Yv (t ) , which is known as the Bessel function of the
second kind of order v, we can thus write a complete solution of

Bessels equation in the alternative form:

y ( x) = C1 J v ( x) + C2Yv ( x)

(43)

Where v is not an integer


Example 27 Solve the following differential equation:

1
x 2 y + x y + ( x 2 ) y = 0
4

on 0<x<

Solution: It is clear that v 2 = 1 / 4, and v = 1 / 2 .

r1 r2 = 2v = 1= positive integer, so this is the second case and

v integer, so y ( x) = C1 J v ( x) + C2Yv ( x)

339

Chapter Nine

And, Yv ( x) =

cos v J v ( x) J v ( x)
sin v

(44)

And the function J v ( x ) are linearly independent solution of the


differential equation. Thus another form of the general solution of
the differential equation: y ( x) = C1 J v ( x) + C2Yv ( x)

Yv ( x ) is sometimes called Neumanns function or is called


Bessel function of the second kind of order v. J1 / 2 ( x ) can be
obtained by substituting in (39) for v = 1 / 2 we get:

J1 / 2 ( x ) =

2
sin x
x

In the same way we can get: J 1 / 2 ( x ) =

2
cos x
x

cos v J1 / 2 ( x) J 1 / 2 ( x)
sin v
2
2

cos
sin x
cos x

2
x
x
Y1 / 2 ( x) =

sin
2
2
Y1 / 2 ( x) =
cos x
x
2
2
y ( x) = C1
sin x + C2
cos x
x
x
If v is an integer, say v = m, the situation is somewhat different.
Y1 / 2 ( x) =

Again the roots of the indicial equation differ by an integer, namely,


2m, and it is to be expected that a second solution of the form (15)
will not exist. In fact, when we consider J v ( x ) as the limit of

340 Power Series Solution Of Differential Equations

J v ( x ) as v approaches m and remember that the value of the

gamma function becomes infinite when its argument approaches any


non-positive integer, then it follows that as v approaches m , the
first m terms in the series (40) approach zero and the series
effectively begins with the term for which k = m :
2k m

(1) k
x
(45)
J m ( x) =

+
!
(
1
)
2
k
m
k

k =m
In this, let the variable of summation be changed from k to j by
the substitution k = j + m .
2 ( j + m ) m
(1) ( j + m )
x
J m ( x) =

j = 0( j + m )! (1 m + ( j + m )) 2

(1) j * (1) m x
J m ( x) =

(
)
!
(
1
)
+

+
j
m
j
2
j =0

2 j+m

(1) j
x
J m ( x) = (1)

(
)
!
(
1
)
2
+

+
j
m
j
j = 0 123
1
424
3
= ( j + m +1)
!j
m

(1) j
j! ( j + m + 1)

(1) k
k! (k + m + 1)

2 j+m

2 j+m

x
J m ( x) = (1)

2
j =0
In the above summation, assume the index j = k .
m

J m ( x) = (1)

k =0

x

2

2k + m

(1) k
x
But we know that, J v ( x) =

!
(
1
)

+
+
k
v
k
2
k =0

2k + v

Chapter Nine

341

So, J m ( x) = (1) m J m ( x )

(46)

Thus, when v is an integer, the function J v ( x ) is proportional to

J v ( x ) . These two solutions are therefore not independent, and the


linear combination c1 J v ( x ) + c2 J v ( x ) is no longer a complete
solution of Bessels equation. So the solution is not yet completely
satisfactory, because the second solution is defined differently,
depending on whether the order v is integer or not. To provide
uniformity of formalism and numerical tabulation, it is desirable to
adopt a form of the second solution which is valid for all values of
the order. This is the reason for introducing a standard second
solution Yv ( x ) defined for all v by the formula:
(a) Yv ( x) =

cos v J v ( x) J v ( x)
sin v

(47)

(b) Yn ( x ) = lim
{ Yv ( x )

(48)

vn

This function is known as the Bessel function of the second kind of


order v or Neumanns function of order v. after some modification of
equation (48) we can get the following equation for Yn ( x ) as
following:

( 1)m 1 (hm + hm + n ) 2m
x
2m + n
(
)
2
!
!
+
m
m
n
m=0
(49)
n n 1
(n m 1)! x 2m
x

2m n

n
x
x
Yn ( x ) = J n ( x ) ln + +

m=0

m!

342 Power Series Solution Of Differential Equations


Where x > 0, n = 0,1, 2,.... and is the so called Euler constant and

= 0.577 215 664 9 and


ho = 0, and hs = 1 +

1 1
1
+ + .... + , (s = 1,2,....)
s
2 3

(50)

And when n = 0 the last sum in (49) is to be replaced by 0. For n = 0


the representation (49) takes the form (51). Furthermore, it can be
shown that Y n ( x ) = ( 1)n Yn ( x )
m 1
2
x
( 1) hm 2m
Y0 ( x ) = J 0 ( x ) ln + +
x

2
m =1 2 2m (m!)2

(51)

Example 28 Solve the following differential equation:

x 2 y + x y + ( x 2 4 ) y = 0
Solution: It is clear that v 2 = 4,

on 0<x<

and v1 = 2, v2 = 2

So v = N (i.e. v is integer) so the solution can be obtained as the


following: y ( x ) = C1 J 2 ( x ) + C2 Y2 ( x )
9.7.2 Recurrence Formulas For Bessels Function

J n +1 ( x ) =
J n ( x ) =

2n
J n ( x ) J n 1 ( x )
x

1
[J n 1 (x ) J n +1 (x )]
2

xJ n ( x ) = nJ n ( x ) xJ n +1 ( x )
xJ n ( x ) = xJ n 1 ( x ) nJ n ( x )

343

Chapter Nine

Example 29 Show that (a) J 3 / 2 ( x ) =

2 sin x x cos x

and
x
x

(b) J 3 / 2 ( x ) =
Solution: (a) Q J n +1 ( x ) =

2 x sin x + cos x

x
x

2n
J n ( x ) J n 1 ( x )
x

1
1
J 3 / 2 ( x ) = J1 / 2 ( x ) J 1 / 2 ( x )
x
2
2
2
Q J1 / 2 ( x ) =
sin x and Q J 1 / 2 ( x ) =
cos x
x
x
1 2
2
J 3 / 2 (x ) =
sin x
cos x
x
x x
Let n =

J 3 / 2 (x ) =

2 sin x
2 sin x x cos x

cos x =

x x
x
x

(b) Q J n +1 ( x ) =
Let n =

2n
J n ( x ) J n 1 ( x )
x

1
1
J1 / 2 ( x ) = J 1 / 2 ( x ) J 3 / 2 ( x )
2
x

J 3 / 2 ( x ) = J1 / 2 ( x )

Q J1 / 2 ( x ) =

1
J 1 / 2 ( x )
x

2
2
sin x and Q J 1 / 2 ( x ) =
cos x
x
x

2
1 2
sin x
cos x
x
x x
2
cos x
2 x sin x + cos x
J 3 / 2 (x ) =
sin x +
=

x
x
x
x

J 3 / 2 (x ) =

344 Power Series Solution Of Differential Equations


Problems Solve the following differential equations by using power

series about x=0


)

y xy y = 0

x 4 y xy + 2 y = 0

(1 + x 2 ) y 2 y = 0

(1 + 2 x 2 ) y + 3 xy 6 y = 0

(1 x 2 ) y 10 xy 18 y = 0

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

2 xy + (1 + 2 x 2 ) y xy = 0

2 xy + (1 + 2 x) y + 4 y = 0

2 x 2 y + x(4 x 1) y + 2(3 x 1) y = 0

2 x(1 x) y + (1 2 x) y + 8 y = 0

2 x 2 y 3 x(1 x) y + 2 y = 0

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

xy + (1 x 2 ) y xy = 0

4 x 2 y + (3 x + 1) y = 0

x 2 y + x( x 1) y + (1 x) y = 0

4 x 2 y 2 x(2 + x) y + (3 + x) y = 0

x( x 1) y 3 y + 2 y = 0

345

Chapter Nine

1
x 2 y + xy + ( x 2 ) y = 0
9

x 2 y + xy + (9 x 2 4) y = 0

2 x 2 y + 2 x 2 + x y y = 0

(
)
2 x 2 y + (2 x 2 3 x )y + ( x + 2 ) y = 0

4 x 2 y + (4 x + 1) y = 0

xy + (1 + x ) y + y = 0

x 2 y xy + (1 + x ) y = 0

9 x 2 y + 9 x 2 + x y + (12 x 1) y = 0

3 x 2 y + 3 x 2 + 5 x y + (6 x 1) y = 0

x 2 y + x 2 x y + y = 0

xy + y + xy = 0

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

x 2 y x(2 x ) y + (2 x ) y = 0

x 2 y + xy 2 x 2 y = 0

x 2 y x(4 x ) y + (6 2 x ) y = 0

x 2 y + xy 6 x 2 y = 0

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

x 2 y 2 x 2 y + x 4 + x 2 6 y = 0

346 Power Series Solution Of Differential Equations

xy y + 4 x 5 y = 0

( )
x y + xy + (x + 9 )y = 0
x ( x + 1) y (5x + 8x + 3)xy + (9 x

Find J1 / 2 and J 1 / 2

)
)

x 2 y + xy 6 x 2 y = 0
2

+ 11x + 4 y = 0

Chapter 10
Partial Differential Equations
10.1 Definition
A partial differential equation (PDE) is any equation involving a
function of more than one independent variable and at least one
partial derivative of that function. The order of a PDE is the order
of the highest order derivative that appears in the PDE
10.2 Partial Derivatives Of Function Of Two Variables
Let f be a function of two independent variables. Then the first
partial derivatives of f with respect to x and y are the functions f x
and f y defined by the following equations:

f ( x + x, y ) f ( x, y )
f
= lim =
x
x x 0
f
f ( x, y + y ) f ( x, y )
fy =
= lim =
y y 0
y

fx =

(1)

That is to say, to find f x , we keep y constant and differentiate with


respect to x. Similarly we can define f y , we keep x constant and
differentiate with respect to y.
Example 1 Find f x and f y for the following functions:
(a) f ( x, y ) = x 4 y 2
(b) f ( x, y ) = e x sin( 2 x + y )

347

Chapter Ten

Solution:
(a) f x =

f
= 4 x 3 y 2 , and
x

(b) f x =

f
= e x sin( 2 x + y ) + 2e x cos(2 x + y )
x

fy =

fy =

f
= 2x4 y
y

f
= e x cos(2 x + y )
y

Example 2 Find f x and f y for the following function at point (2,1)

f ( x, y ) = cosh ( x 6 y ) + e xy
Solution:
(a) f x =

fx =
fy =

f
= sinh ( x 6 y ) ye xy
x

f
= sinh (2 6) e 2 = sinh 4 e 2
x ( 2,1)

f
= 6 sinh ( x 6 y ) xe xy
y

fy =

f
= 6 sinh (4) 2e 2 = 6 sinh 4 2e 2
y ( 2,1)

Example 3 If u = x y
Solution:

Show that

x u
1 u
+
= 2u
y x Ln x y

348

Partial Differential Equations

u
x u
= y x y 1 ,
= xy = u
x
y x

(2)

u
1 u
= x y Ln x ,
= xy = u
y
Ln x y

(3)

Add (2) and (3) we get:

x u
1 u
+
= 2u
y x Ln x y

10.3 Partial Derivatives of Function of More Than Two Variables


A similar definition of the partial derivatives is given in three
variables. Let f be a function of three variables (x, y, z), then we
define, for instance

f
f ( x + x, y, z ) f ( x, y, z )
= lim =
x
x x 0
f ( x, y + y, z ) f ( x, y, z )
f
= lim =
fy =
y
y y 0
f
f ( x, y, z + z ) f ( x, y, z )
fz =
= lim =
z z 0
z

fx =

Example 4 If f ( x, y, z ) = sin 2 x * cos 4 y * sin 6 z Find:


fx, f y, fz
Solution:
f
fx =
= 2 cos 2 x * cos 4 y * sin 6 z
x
f
fy =
= 4 sin 2 x * ( sin 4 y ) * sin 6 z
y
f
fz =
= 6 sin 2 x * cos 4 y * cos 6 z
z

(4)

349

Chapter Ten

10.4 Total Differentials


For function f = f ( x, y, z ) , the differential of this function df is
expressed by the following form:

df =

f
f
f
dx + dy + dz = f x dx + f y dy + f z dz
z
x
y

(5)

10.5 Partial Derivatives Of Higher Orders


If f is a function of two variables f ( x, y ) , then its partial derivatives

f x and f y are also function of two variables, so we can consider


their partial derivatives, f xx , f xy , f yx and f yy which is called
the second partial derivatives of f .

f xx

f xy

f 2 f
= = 2
x x x
f 2 f
= =
y x yx

(6)
(7)

f yx

f 2 f
= =
x y xy

(8)

f yy

f 2 f
= = 2
y y y

(9)

Thus the notation f xy or

2 f
f
or
means that we

yx
y x

differentiate with respect to x then with respect to y. If the function

f xy and f yx are both continuous, then f xy = f yx , a similar

350

Partial Differential Equations

statement holds for functions of more than two variables. This


result, known as cumulative property of partial derivatives, may be
assumed to be true for all functions encountered at this stage.
Example 5 Find all second partial derivatives of:

f ( x, y, z ) = xe y cos z
Solution:
f x = e y cos z ,

f y = xe y cos z and

f z = xe y sin z

f xx = 0 ,

f yy = xe y cos z and

f zz = xe y cos z

f xy = e y cos z

f xz = e y sin z

f yz = xe y sin z

10.6 The Chain Rule


The Chain rule is used to provide a rule for differentiating a
composite function. If y is a function of x and x is a differential
function of t, then y is indirectly proportional function of t and:

dy dy dx
= *
dt dx dt
For, y = Y ( x ), and , x = X (t )
Example 6 If y = 2 x 2 , and , x = 5t 2 Find

(10)

dy
dt

Solution: From (10) we can get the following results

dy dy dx
=
*
= 4 x * 10t = 40 xt
dt dx dt
dy
= 200t 3
But, x = 5t 2
dx

351

Chapter Ten

Case1 Suppose that z = f ( x, y ) is a differentiable function of x and


y, where x = X (t ) , y = Y (t ) are both differentiable function of t,
then z is a differentiable function of t and,

dz z d x z d y
*
*
+
=
dt x dt y dt

Example 7 Suppose that z = x 2 y,

(11)

x = t3,

and

y = t2

Use the Chain rule to find dz / dt .


Solution:

dz z d x z d y
+
*
*
=
dt x dt y dt
= 2 xy * 3t 2 + x 2 * 2t
= 2 t 3 t 2 * 3t 2 + t 6 * 2t = 8 t 7

Case 2 Suppose that z = f ( x, y ) , is a differential function of x and


y, where x = X ( s, t ), y = Y ( s, t ) and partial derivatives xs , xt , y s
and yt are exist. Then:

z z x z y
+
=
s x s y s

(12)

z z x z y
+
=
t x t y t

(13)

352

Partial Differential Equations

Example 8 If z = e x sin y , x = st 2 , y = s 2 t find

z
z
and
s
t

Solution: From case 2 of Chain rule

z z x z y
+
=
s x s y s
= (e x sin y ) t 2 + (e x cos y ) 2 st
z z x z y
+
=
t x t y t
= (e x sin y ) 2 st + (e x cos y ) s 2
It can be easily to extend case 2 of Chain rules to the function f
which contains three variables f = f ( x, y, z )
Where x = x( s, t ), y = y ( s, t ), z = z ( s, t ) .
Then we have the extension of case 2 of Chain rules

f f x f
=
+
s x s y
f f x f
=
+
t x t y

y f z
+
s z s
y f z
+
t z s

(14)
(15)

Example 9 If f = x 4 y + y 2 z 3 , where x = r s et , y = r s 2 e t , and

y = r s 2 e t . And find the value of


Solution:

f f x f y f z
=
+
+
s x s y s z s

f
where r = 2, s = 1, t = 0
s

353

Chapter Ten

)( ) (

)(

)(

)(

f
= 4 x 3 y ret + x 4 + 2 y z 3 2rse t + 3 y 2 z 2 r 2 sin t
s

When r = 2, s = 1, t = 0 we have x = 2, y = 2, z = 0

f
= 64 * 2 + 16 * 4 + 0 * 0 =192
s

10.7 Differentiation of Implicit Functions


Suppose that the following function F ( x, y, z ) = 0 defines variable,
say z, as a function of the other two variables x and y. Then z is
sometimes called an implicit function of x and y, where z = f ( x, y ) .
Then F ( x, y, f ( x, y )) = 0 . If F is differentiable, then we get the
following rule

Fy
F
z
z
= x and
=
x
Fz
Fz
y
Example 10 If

x2
a2

y2
b2

z2
c2

(16)

= 1,

Solution:
Let

x2
2

y2
2

z2
2

1 = 0

a
b
c
Fx
z
2x / a2
c2 x

=
=
= 2
x
Fz
2z / c2
a z
Fy
z
2 y / b2
c2 y

=
=
= 2
2
y
Fz
2z / c
b z

Find

z
z
and
x
y

354

Partial Differential Equations

10.8 Applications
In this section we will drive the differential equations which governs
the conduction of heat in solids.
In the following sections some

basic problems associated with

this equation are solved. In the


case of heat conduction in two

x0

x 0 + x

parallel plates of the same area A and different constant


temperatures T1 and T2 respectively are separated by a small
distance d, an amount of heat H per unit time will pass from the
warmer to the cooler. Moreover, to a high degree of approximation,
H is proportional to the area A, the temperature difference

T2 T1 , and inversely proportional to the separation distance, d.


Thus we can write:

kA T2 T1
(17)
d
Where the positive proportionality factor k is called the thermal
H=

conductivity and depends only on the material between the two


plates. The physical law expressed by equation (17) is known as
Newtons law of cooling.
Now consider a straight rod of uniform cross section and
homogeneous material, oriented so x-axis lies along the axis of the
rod. Let x = 0 and x = L designate the ends of the bar. We will
assume that the sides of the bar are perfectly isolated so that there is

355

Chapter Ten

no passage of heat through them. We will also assume that the


temperature u depends only on the axial position x and time t, and
not on the lateral coordination y and z; hence u equals u ( x, t ) .
Consider an element of the bar lying between the cross section

x = x0 and x = x0 + x , where x = x0 is arbitrary and x is so


small. The instantaneous rate of heat transfer from left to the right
across the cross section x = x0 is obtained by taking the limit in
equation (17). As d 0 and replacing

lim (T2 T1 ) / d by

d 0

u x ( xo , t ) we get the following equation:

H ( x0 , t ) = kA u x ( xo , t )

(18)

The minus sign appears in this equation since there will be positive
flow of heat from left to right only if the temperature is greater to
the left of x = x0 than to the right; in this case u x ( xo , t ) will be
negative. In a similar manner the rate at which heat passes from left
to right through the cross section x = x0 + x is given by:

H ( x0 + x, t ) = kA u x ( x0 + x, t )

(19)

The net rate of heat at which heat flows into the segment of the bar
between x = x0 and x = x0 + x is thus given by:

Q = H ( x0 , t ) H ( x0 + x, t ) = kA[ u x ( x0 + x, t ) u x ( x0 , t )] (20)
The average change in temperature u is proportional to the
amount of heat Q t introduced, and inversely proportional to the
mass m of the element. Thus;

356

Partial Differential Equations

u =

Qt
1 Qt
=
s m s Ax

(21)

Where the constant of proportionality s is known as the specific heat


of the material of the bar, and is its density. The average
temperature change u in the bar element under consideration is the
temperature change at some intermediate point x = x0 + x ,
where 0 < < 1. Thus (21) can be written as:

u ( x0 + x, t + t ) u ( x0 + x, t ) =

Q t
s A x

(22)

Solving equation (22) for Q and equating the resulting expression


with the given by equation (20) yields the following equation:

u x ( x0 + x, t ) u x ( x0 , t )
=
x
u ( x0 + x, t + t ) u ( x0 + x, t )
s A
t
Ak

(23)

If we let x and t approach zero in equation (23), we obtain


the heat conduction of diffusion equation:

2u xx = ut

(24)

The quantity 2 is called the thermal diffusivity, and is a


parameter depending only on the material of the bar and is defined
by as following:

2 =

(25)

357

Chapter Ten

Several relatively simple conditions may be imposed at the end of


the bar. For example, the temperature at an end constant value T. At
an end where this is done the boundary condition is:

u (0, t ) = T or

u ( L, t ) = T

(26)

Another simple boundary condition occurs if the end is insulated so


that no heat passes through it. Recalling the expression (18) for the
amount of heat crossing any cross section of the bar, the condition
for insulation is clearly that this quantity vanishes. Thus the
following condition is boundary condition at an insulated end:

ux = 0

(27A)

To determine completely the flow of heat in the bar it is necessary to


state the temperature distribution at one fixed distant, usually taken
as the initial time t = 0 this initial condition is of the form:

u ( x,0) = f ( x), 0 < x < L

(27B)

The problem then is to determine the solution of (24) subject to one


or the other of (26) and (27A) boundary conditions at the ends, and
the initial condition (27B).
Example 11: State exactly the boundary value problem which
determines the temperature in a copper bar 1 meter in length if the
entire bar is originally at 20oC, and one end is then suddenly heated
to 60oC, and held at that temperature while the other end is
insulated. ( 2 = 1.14 cm 2 / sec )

358

Partial Differential Equations

Solution: 2 = 1.14 cm 2 / sec = 0.000114m 2 / sec


From (24) we can say that: 2u xx = ut

0.000114 u xx = ut and u ( x,0) = 20 , 0 < x < 1 ,

u (0, t ) = 60, t > 0 and u (1, t ) = 0, t > 0


10.9 Methods Of Solution Of The Partial Differential Equation
In this section we are going to introduce some methods of solution
of second order linear partial differential equation (28).

2u

2u
2u
u
u
+C 2 +D
+E
+ Fu = G
A 2 +B
xy
x
y
x
y

(28)

Where A, B, ........, G may depend on x and y but not u. A second


order equation with independent variable x and y which does not
have the form (28) is called nonlinear. Some terms of the above
equation can be eliminated depending on the physical application
used. In the following there is some easy examples showing how to
solve second order partial differential equations.
Example 12 Solve the following partial differential equation:

2z
= x 2 y where, z ( x,0) = x 2 , z (1, y ) = cos y
xy

359

Chapter Ten

Solution: The above partial differential equation can be written


in the following form:

z
= x 2 y
x y

By integrating the above equation with respect to x we fiend:

z 1 3
= x y + F (y)
y 3

where F ( y ) is arbitrary.

Integrating the above equation with respect to y we get:

1 3 2
x y + F ( y )dy + G ( x )
where G ( x ) is arbitrary.
6
The above results can be written in the following form:
z=

1 3 2
x y + H ( y ) + G(x )
6
The above equation has two arbitrary functions and is therefore a
z=

general solution.
Since z ( x,0 ) = x 2 we have from the general solution

x 2 = 0 + H (0 ) + G ( x ) Or, G ( x ) = x 2 H (0 )

z=

1 3 2
x y + H ( y ) + x 2 H (0)
6

Since z (1, y ) = cos y , we have from above equation,

cos y =

1 2
y + H ( y ) + 1 H (0)
6

1 2
y 1 + H (0 )
6
1
1
z = x 3 y 2 + cos y y 2 + x 2 1
6
6

H ( y ) = cos y

360

Partial Differential Equations

2u
u
Example 13 Solve t
= x2
+2
x
xt
Solution: Write the equation as

+ 2u = x 2
t
x t

Integrating with respect to x, t

1
u
+ 2u = x 3 + F (t )
t
3

u 2
1 x 3 F (t )

+ u=
+
t t
3 t
t
This is a linear first order ordinary differential equation

u =e

ln t 2

ln t 2 1 x 3 F (t )

dt + H ( x )
* e
+
3 t

2 1 x 3 F (t )

dt + H ( x )
+
t u = t
3 t

1
t 2u = t 2 x 3 + G (t ) + H ( x )

6
10.9.1 Separation of Variables
In this section we will describe a method for solving the problem of
heat conduction in a rod of uniform material with insulated lateral
surface and will use the method of separation of variables to solve
this initial value problem. The idea behind the method of
separation of variables is to convert the given partial differential
equation into several ordinary differential equations.

361

Chapter Ten

Suppose that the initial temperature distribution is given by a


function f ( x) , and that the ends of the rod are held at zero
temperature. Then we must solve the following partial differential
equation:

2u xx = ut , 0 < x < L,

t>0

(29)

Subject to the following initial condition:

u ( x,0) = f ( x),

0< x<L

(30)

And the following boundary conditions:

u (0, t ) = 0, t > 0

(31A)

u ( L, t ) = 0, t > 0

(31B)

The choice of the boundary condition (31A) and (31B) may appear
unnecessarily restrictive, however this problem is sufficiently
general to fully illustrate the method of solution.
The mathematical solution of equations (29) to (31) can be
carried out by technique known as the method of separation of
variables. This method is based on the idea of finding certain
solutions of the differential equation (29) which are two functions
one of the in x which is X ( x) and the another one in t which is

T (t ) . Then the general solution will take the following form:

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

(32)

Where X is a function of x only, and T is a function of t only.


Substituting (32) for u in the differential equation (29) yields

362

Partial Differential Equations

2 X ( x )T (t ) = X ( x )T (t )

(33)

The primes refer to ordinary differentiation with respect to the


independent variable, whether x or t. Equation (33) is equivalent to:

X ( x ) 1 T (t )
=
X ( x ) 2 T (t )

(34)

In which the variables are separated in each side of equal sign, that
is, the left hand side depends only on x and the right hand side only
on t. In order for equation (34) to be valid for 0 < x < L, t > 0 , it is
necessary that both sides of (34) be equal to same constant.
Otherwise by keeping one independent variable (say x) fixed and
varying the other, one side (the left in this case) of (34) would
remain unchanged while the other varied, thus violating the equality.
This constant Called separation constant 2 , then equation (34)
becomes:

X ( x ) 1 T (t )
= 2
= 2
(35)
X ( x ) T (t )
From (35) we then obtain the following two ordinary differential
equations for X ( x) and T (t ) :

X ( x ) + 2 X ( x ) = 0

(36)

T (t ) + 2 2T (t ) = 0

(37)

The partial differential equation (29) has thus been replaced by two
ordinary differential equations (36) and (37). Equations (36) and
(37) are second and first order linear homogeneous ordinary

Chapter Ten

363

differential equations respectively. Thus is the essence of the


method of separation of variables.
Equations (36) and (37) can be readily solved. According to the
value of 2 we have two cases case 1, if 2 > 0 or case 2, if

2 = 0
Case 1 If 2 > 0
2 2
X ( x) = k1 sin x + k 2 cos x , and T (t ) = e t
2 2
u ( x, t ) = X ( x) T (t ) = e t (k1 sin x + k 2 cos x)

(38)

Is a solution of the partial differential equation (29) regardless of the


values of and the arbitrary constants k1 and k 2 .
Now from u (0, t ) = X (0 )T (t ) = 0 , so, T (t ) = 0, or X (0 ) = 0 . It is
clear that X (0) = 0 otherwise it gives trivial solution. So, X (0 ) = 0
is one boundary condition. Similarly from (31B)

u (L, t ) = X (L ) * T (t ) = 0 X (L ) = 0 is the second boundary


condition.
The constants k1 , k 2 and can be partially determined from the
boundary condition (31). The first boundary condition requires that
2 2
u (0, t ) = k 2e t = 0 therefore k 2 equals 0. The second boundary
2 2
condition, u ( L, t ) = k1e t sin t = 0 will be satisfied if sin t

equal 0, and hence if equals n / L , where n is a positive integer.

364

Partial Differential Equations

The allowable value of the previously arbitrary parameter has thus


been determined by the boundary conditions. Hence any function of
the form (39) will satisfy the boundary condition (31) as well as the
partial differential equation (29). Moreover, since both the partial
differential equation (29) and the boundary condition (31) are linear
and homogeneous, any finite sum of such functions will also satisfy
them. The function given by (39) is sometimes known as
fundamental solution.
2 2 2
2
nx
u ( x, t ) = cn e n t / L sin
,
L

n = 1,2,3,......

(39)

Where cn is arbitrary constants corresponding to the choice of n.


Case 2 2 = 0 , from (36) X ( x ) = 0
X ( x ) = c1 x + c2
So, from the boundary condition X (0 ) = 0 c2 = 0 X ( x ) = c1 x
And, X (L ) = 0 , then 0 = c1L c1 = 0 Which is trivial solution.
Example 14 Let f ( x) = 3 sin

u n ( x,0) = cn sin

4 x
L

n x
= f ( x)
L

Provided n=4 and cn =3.


The solution to the complete boundary value problem is:
2 2
2
4x
u ( x, t ) = 3e 16 t / L sin
= 0,
L

n = 1,2,3,......

365

Chapter Ten

Example 15: Use the method of separation of variables to solve the


following partial differential equation:

u 2u
,
=
t x 2
where u x (0, t ) = 0, u (2, t ) = 0 , and, u ( x,0 ) = 8 cos

3x
9x
6 cos
4
4

Solution:
Assume u ( x, t ) = X ( x) T (t )

u 2u
=
Q
t x 2

X ( x )T (t ) = X ( x )T (t )

X ( x ) T (t )
=
= 2
X ( x ) T (t )

X ( x ) + 2 X ( x ) = 0

(40)

T (t ) + 2T (t ) = 0

(41)

By solving equation (40) we get the following:

X ( x ) = k1 cos x + k 2 sin x
By solving equation (41) we get the following:

T (t ) = ce

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

u x ( x, t ) = e

(K1 cos x + K 2 sin x )


2

( K1 sin x + K 2 cos x )

366

Partial Differential Equations

u x ( x, t ) = e

(K 2 cos x K1 sin x )

(K 2 ) = 0

Q u x (0, t ) = 0

u x (0, t ) = e
K2 = 0

Q u (2, t ) = 0

u (2, t ) = e
2 =

( K1 cos 2 ) = 0

n
for n=1, 3, 5,.
2

n
for n=1, 3, 5,.
4
2
n
u ( x, t ) = e t K1 cos
x
4

n
u ( x,0) = K1 cos
x
4
3x
9x
Q u ( x,0 ) = 8 cos
6 cos
4
4

By comparing the above equations we get the following:

n
9x
3x
6 cos
x = 8 cos
4
4
4
From the first term we get the following: K1 = 8 and n = 3

K1 cos

From the second term we get the following: K1 = 6 and n = 9

u ( x, t ) = 8e

9 2
t
3
16
cos

81

t
9

x 6e 16 cos
x
4
4

367

Chapter Ten

Example 16: Use the method of separation of variables to solve the


following partial differential equation:
(b)

2 y
t 2

=4

2 y
x 2

, where y (0, t ) = 0, y ( x,0 ) = 0, yt ( x,0 ) = 5 sin x

Solution: Assume u ( x, t ) = X ( x) T (t )

2 y
t

=4

2u
x

X ( x )T (t ) = 4 X ( x )T (t )

X ( x ) T (t )
=
= 2
X ( x ) 4T (t )

X ( x ) + 2 X ( x ) = 0

(42)

T (t ) + 42T (t ) = 0

(43)

By solving equation (42) we get the following:

X ( x ) = k1 cos x + k 2 sin x
By solving the equation (43) we get the following:

T (t ) = k3 cos 2t + k 4 sin 2t

Q u ( x, t ) = X ( x) T (t )
y ( x, t ) = (k1 cos x + k 2 sin x ) * (k3 cos 2t + k 4 sin 2t )

Q y (0, t ) = 0 y (0, t ) = (k1 ) * (k3 cos 2t + k 4 sin 2t ) = 0


It is clear that k1 = 0 otherwise (k3 cos 2t + k 4 sin 2t ) which is
not valid. So k1 = 0 .

Q y ( x,0 ) = 0 y ( x,0 ) = (k 2 sin x ) * (k3 ) = 0

368

Partial Differential Equations

k3 = 0
y ( x, t ) = (k 2 sin x ) * (k 4 sin 2t )

yt ( x, t ) = (k 2 sin x ) * (k 4 * 2 * cos 2t )
Q yt ( x,0 ) = 5 sin x

yt ( x,0) = (k 2 sin x ) * (k 4 * 2 ) = 5 sin x


= (k 2 ) * (k 4 * 2 ) = 5

k2 k4 =

5
2

y ( x, t ) =

5
(sin x * sin 2 t )
2

Example 17: Use the method of separation of variables to solve the


following partial differential equation:

2 y

(c)

=4

2 y
x

where

yt ( x,0 ) = 3 sin 2x 2 sin 5x


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

2 y
t 2

=4

2u
x 2

X ( x )T (t ) = 4 X ( x )T (t )

X ( x ) T (t )
=
= 2
X ( x ) 4T (t )

y (0, t ) = 0, y ( x,0 ) = 0,

and

Chapter Ten

369

X ( x ) + 2 X ( x ) = 0

(44)

T (t ) + 42T (t ) = 0

(45)

By solving equation (44) we get the following:

X ( x ) = k1 cos x + k 2 sin x
By solving equation (45) we get the following:

T (t ) = k3 cos 2t + k 4 sin 2t

Q u ( x, t ) = X ( x) T (t )
y ( x, t ) = (k1 cos x + k 2 sin x ) * (k3 cos 2t + k 4 sin 2t )

Q y (0, t ) = 0 y (0, t ) = (k1 ) * (k3 cos 2t + k 4 sin 2t ) = 0


It is clear that k1 = 0 otherwise (k3 cos 2t + k 4 sin 2t ) which
is not valid. So k1 = 0 .

Q y ( x ,0 ) = 0
y ( x,0 ) = (k 2 sin x ) * (k3 ) = 0

k3 = 0

y ( x, t ) = (k 2 sin x ) * (k 4 sin 2t )
yt ( x, t ) = (k 2 sin x ) * (k 4 * 2 * cos 2t )

Q yt ( x,0 ) = 3 sin 2x 2 sin 5x


yt ( x,0 ) = (k 2 sin x ) * (k 4 * 2 ) = 3 sin 2x 2 sin 5x
Then for the first term of yt ( x,0 ) , = 2

(k 2 ) * (k 4 * 4 ) = 3 k 2 k 4 =

3
4

Then for the second term of yt ( x,0 ) ,

= 5

370

Partial Differential Equations

2
10
3
(sin 2x * sin 4 t ) 1 (sin 5x * sin 10 t )
y ( x, t ) =
4
5
(k 2 ) * (k 4 * 10 ) = 2 k 2 k 4 =

10.9.2 Solution Using Fourier Series


Let f ( x) = b1 sin

x
L

+ ........ + bm sin

m x
L

Where b1 ,......, bm are given constants.


We will use the principle of superposition to solve this more
complicated problem. If we choose cn = bn in (39), then we obtain
a function which assumes the initial value bn sin

n x
and also
L

satisfies the partial differential equation (29) and boundary


conditions (31A) and (31B). By adding the solution corresponding
to n = 1,2,...m we obtain the solution.
m

nx
n 2 2 2 t / L2
sin
....
b
e
n
L
n =1
Which satisfies the desired initial condition.
u ( x, t ) =

(46)

In order to satisfy the initial condition (30) we must have:

u ( x , 0) =

bn sin

n =1

nx
= f ( x)....
L

(47)

That is, a Fourier sine series. This can be done provided f ( x )


satisfies the conditions of the Fourier theorem for 0 < x < L , and is

371

Chapter Ten

defined outside the interval (0, L ) as an odd function of period 2 L .


Assuming that f ( x) does have Fourier series, the coefficients bn
are given by the following equation:

2L
nx
bn = f ( x) sin
dx
L0
L

(48)

To summarize the solution of the heat conduction problem (29),


(30), (31);

2u xx = ut , 0 < x < L, t > 0


u ( x,0) = f ( x), 0 < x < L....

u (0, t ) = u ( L, t ) = 0,

t>0

is given by the following equation:

u ( x, t ) =

bn e n

2 t / L2

n =1

sin

nx
....
L

(49)

Example 18 Consider the conduction of heat in the copper rod of


100 cm in length whose ends are maintained at 0 o C for all

t > 0 . Find an expression for the temperature u ( x, t ) if the initial


temperature distribution in the rod is given by:
(a) u ( x,0) = 50

0 < x < 100;

x
(b) u ( x,0) =
100 x
Where ( 2 = 1.14 cm 2 / sec )

0 < x < 50,


50 < x < 100

372

Partial Differential Equations

Solution: From equation (49)

u ( x, t ) =

bn e n

2 t / L2

sin

n =1

nx
.... ,
L

2 = 1.14 cm 2 / sec , L=100cm


(a) u ( x,0) = 50

0 < x < 100;

If we draw this function as odd function outside the interval (0, L )


of period 2 L it will be as shown in the following figure:

50
L=100 cm

-L=-100 cm

The Fourier coefficients of the above waveform is given by

2L
2 100
nx
nx
50 sin
bn = f ( x) sin
dx =
dx

100 0
L0
L
100
100

100
nx
=

cos

n
100 0
=

100(1 cos n )
n

200
n n =1,3,5,7,..........

u( x, t ) =

200 2 1.142 t / 10000 x 1 9 2 1.142 t / 10000 3x


sin
sin + e
e

L
L 3
2
2
1
5x

+ e25 1.14 t / 10000sin


+ ....
L
5

373

Chapter Ten

(b) If we draw this function as odd function outside the interval

(0, L ) of period 2L it will be as shown in this figure:


50
-L=-100 cm

L=100 cm

2L
nx
bn = f ( x) sin
dx
L0
L
100
2 50
nx
nx
=
dx + (100 x) sin
dx
x sin
100 0
100
100


50

400 sin( n / 2)

n 2 2
2
2
2
2
400
3x
x 1
u ( x, t ) = 2 e 1.14 t / 10000 sin e 9 1.14 t / 10000 sin
L 9
L

2
2
1
5x

+ e 25 1.14 t / 10000 sin


+ .....
25
L

Example 19 Solve the following partial differential equation:

u 2u
u x (0, t ) = u x ( , t ) = 0, u ( x,0 ) = (1 x ) ,
=
t x 2
where 0 < x < , t > 0
Solution: Assume u ( x, t ) = X ( x ) * T (t )

374

Partial Differential Equations

u 2u
Q
= 2 X ( x ) * T (t ) = X ( x ) * T (t )
t x
X ( x ) T (t )

=
= 2
X ( x ) T (t )

X ( x ) + 2 X ( x ) = 0

(50)

T (t ) + 2T (t ) = 0

(51)

By solving equation X ( x ) + 2 X ( x ) = 0 we get the following:

X ( x ) = k1 sin x + k 2 cos x
By solving equation T (t ) + 2T (t ) = 0 we get the following:

T (t ) = ce

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

(K1 sin x + K 2 cos x )


2
u x ( x, t ) = e t (K1 cos x K 2 sin x )
2
Q u x (0, t ) = 0 u x (0, t ) = e t (K1 ) = 0 K1 = 0
2
u ( x, t ) = K 2 e t (cos x )
2

(52)

It is clear from (52) that we need to compare with cosine terms, so,
assume u ( x,0 ) is even function. So, bn = 0 .

u ( x ,0 )

375

Chapter Ten

ao =

an =
an =

(1 x )dx =

(1 x ) cos

nx

dx

(1 x ) cos nxdx

u = (1 x )

dv = cos nx

du = dx

v=

sin nx
n

(1 x ) sin nx 1

+ sin nxdx
an = 2
n
n0

1
2
4
an = 2 2 ( cos nx ) = 2 (1 cos nx ) = 2
n
n
0 n
1
2

+ 4cos x + cos 3x +
u ( x,0 ) =
2
9

+
u ( x ,0 ) =

n = 1, 3, 5,....

1
1

cos 5 x + cos 7 x + ......


25
49

k 2 cos x

=0

u ( x, t ) =

+ 4e t cos x + e 9t cos 3x +
2
9

1
1

+ e 25t cos 5 x + e 49t cos 7 x + ....


25
49

376

Partial Differential Equations

Example 20 Use the method of Fourier series to solve the following


boundary value problems:

u
2u
(a)
= 2 2 , u (0, t ) = u (4, t ) = 0, u ( x,0 ) = 25 x
t
x
where 0 < x < 4, t > 0
Solution: Assume u ( x, t ) = X ( x ) * T (t )

u
2u
Q
= 2 2 X ( x ) * T (t ) = 2 X ( x ) * T (t )
t
x
X ( x ) T (t )

=
= 2
X ( x ) 2T (t )
X ( x ) + 2 X ( x ) = 0

(53)

T (t ) + 22T (t ) = 0

(54)

By solving equation (53) we get the following:

X ( x ) = k1 sin x + k 2 cos x .
By solving equation (54) we get the following:

T (t ) = ce 2

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

u ( x, t ) = e 2

Q u (0, t ) = 0

u (0, t ) = e 2

Q u (4, t ) = 0 u (4, t ) = e 2

(K1 sin x + K 2 cos x )

(K 2 ) = 0

(K1 sin 4 ) = 0

K2 = 0

n
4

377

Chapter Ten

u ( x, t ) = e

n 2 2
t
8 K sin
1

Qu ( x,0) = 25 x = K1 sin

n
4

n x
4

(55)

It is clear from (55) that we need to compare with sine terms so we


will complete u ( x,0 ) as an odd function as shown in the figure:
u ( x ,0 )
100

4
4

2L
nx
bn = 25 x sin
dx
L0
L

50 4
nx
x
sin
dx
bn =

4 0
4

4
25 4 2
nx
nx 4
sin
x cos
bn =

2 n 2 2
4
n
4 0

bn =

200
cos n
n

bn =

200
, n = 2, 4, 6, ......
n

bn =

200
, n = 1, 3, 5, ......
n

378

Partial Differential Equations

u ( x ,0 ) =

200 x 1
2x 1
3x 1
4x

+ sin
sin
+ ......
sin sin


4 2
4
3
4
4
4

9 2
2
2 t

t
x 1 2
200 8
2x 1
3x
8
e
u ( x, t ) =
+ e
sin e
sin
sin

4 2
4
3
4

2
1
4x

e 2 t sin
+ ......
4
4

Example 21 Use the method of Fourier series to solve the following


boundary value problems:

u 2u
= 2 u x (0, t ) = u x ( , t ) = 0, u ( x,0) = x 2
t x
where 0 < x < , t > 0
Solution: Assume u ( x, t ) = X ( x ) * T (t )

u 2u
Q
=
t x 2

X ( x ) * T (t ) = X ( x ) * T (t )

X ( x ) T (t )
=
= 2
X ( x ) T (t )

X ( x ) + 2 X ( x ) = 0

(56)

T (t ) + 2T (t ) = 0

(57)

By solving equation (56) we get the following:

X ( x ) = k1 sin x + k 2 cos x .

379

Chapter Ten

By solving equation (57) we get the following:

T (t ) = ce

Q u ( x, t ) = X ( x) T (t )
u ( x, t ) = e 2

(K1 sin x + K 2 cos x )

u x ( x, t ) = e 2

(K1 cos x K 2 sin x )

Q u x (0, t ) = e 2

(K1 ) = 0 K1 = 0

u x ( , t ) = e 2

( K 2 sin ) = 0

= n
u ( x, t ) = e 2

(K 2 cos nx )

(58)

It is clear from (58) that we need to compare with cosine terms so

u ( x ,0 ) = x 2 must be completed as even function as shown in the


following figure:

u ( x ,0 ) = x 2

380

Partial Differential Equations

1 L
ao =
f ( x )dx
2 L L
1 L
an = f ( x ) cos nx dx
L L

3 2
ao = x dx =
=
3
3
0
2

an =

x
0

cos nx dx

2 2x
2
x2
an = 2 cos nx 3 sin nx +
sin nx
n
n
n
0

an =
an =
an =

2 2

cos
nx

n 2
4

cos n

n2
4

for n = 2, 4,6,....

n2

an =

for n = 1,3,5,....

n2

u ( x, o ) =

1
1

+ 4 cos x + cos 2 x cos 3x + .....


3
4
9

u ( x, t ) =

1
1

+ 4 e t cos x + e 4t cos 2 x e 9t cos 3x + .....


3
4
9

381

Chapter Ten

10.9.3 Solution Using Laplace Transform


Example 22 Use the method of Laplace transform to solve the

u
2u
following boundary value problem:
=4 2
t
x
Where u (0, t ) = 0, u (3, t ) = 0, u ( x,0 ) = 10 sin 2x 6 sin 4x
Solution: Taking the Laplace transform of the given differential
equation with respect to t, we have:
st u
e dt
0
t

2
st u

e
4 2 dt
0

x
Which can be written as:

st
e udt
0

u ( x,0 ) = 4

Or sU u ( x,0 ) = 4

st

x 2 0

u dt

2U

(59)

x2

where U = U ( x, s ) = L{u ( x, t )} = e st udu

Using the given condition u ( x,0 ) = 10 sin 2x 6 sin 4x


becomes: 4

2U
x 2

sU = 6 sin 4x 10 sin 2x

(60)
(61)

Taking the Laplace Transform of the conditions

u (0, t ) = 0, u (3, t ) = 0 , we have: L{u (0, t )} = 0,


Or U (0, s ) = 0,

U (3, s ) = 0

L{u (3, t )} = 0
(62)

Solving the ordinary differential equation (61) subject to condition


(62) by the usual elementary methods as following:

382

Partial Differential Equations

42 s = 0
1 =

s / 2 and 2 = s / 2

U h ( x, s ) = C1e

s /2 x

+ C2e

s /2 x

U p ( x, s ) = A cos 4x + B sin 4x + D cos 2x + F sin 2x

U p ( x, s ) = 4 A sin 4x + 4 B cos 4x
2D sin 2x + 2F cos 2x
U p ( x, s ) = 4 2 2 A cos 4x 4 2 2 B sin 4x
2 2 2 D cos 2x 2 2 2 F sin 2x

4 * 42 2 A cos4x 42 2 B sin 4x 22 2 D cos2x 22 2 F sin 2x


s( A cos4x + B sin 4x + D cos2x + F sin 2x) = 6 sin 4x 10sin 2x
By comparing coefficients in both sides we get:

A = 0 , D = 0 64 2 B sB = 6 B =
And 16 2 F sF = 10 F =
U ( x, s ) = U h + U P = C1e

s /2x

s + 64 2

10
s + 16 2

+ C2 e

s /2 x

But from (62) U (0, s ) = 0,

6 sin 2x
s + 16 2

C1 + C2 = 0 And, U (3, s ) = 0
C1e3

s /2

+ C2e 3

But, C 2 = C1

s /2

+0=0

C1 e3

s /2

e 3

s /2

=0

6 sin 4x
s + 64 2

383

Chapter Ten

Then must be C1 = 0
C2 = 0
10 sin 2x 6 sin 4x
U ( x, s ) =

s + 16 2 s + 64 2
By taking the inverse Laplace transform we find:

u ( x, t ) = 10e 16

sin 2x 6e 64

sin 4x

Which is the required solution:

U ( x, s ) =

10 sin 2x

6 sin 4x

s + 16 2 s + 64 2
By taking the inverse Laplace transform we find the required

solution as following:

u ( x, t ) = 10e 16

sin 2x 6e 64

sin 4x

Example 23 Use the method of Laplace Transforms to solve the


following partial differential equation s:

u 2u
,
=
t x 2

u ( x,0 ) = 6 sin

where

x
2

u (0, t ) = 0, u (4, t ) = 0 ,

and

+ 3 sin x

Solution: As explained in the previous example

sU u ( x,0) =

2U
x

(63)

Where U = U ( x, s ) = L{u ( x, t )} = e st udu


Using the given condition
becomes:

u ( x ,0 ) = 6 sin

x
2

+ 3 sin x , (63)

384

2U
x 2

Partial Differential Equations

sU = 6 sin

x
2

+ 3 sin xx

(64)

Taking the Laplace Transform of the conditions:

u (0, t ) = 0, u (4, t ) = 0 , we have:

L{u (0, t )} = 0,

L{u (4, t )} = 0

Or U (0, s ) = 0,

U (4, s ) = 0

(65)

Solving the ordinary differential equation (64) subject to


condition (65) by the usual elementary methods as following:

2 s = 0

1 = s and 2 = s

U h ( x, s ) = C1e s x + C 2 e s x

U p ( x, s ) = A cos

U p ( x, s ) =

x + B sin

A sin

x+

x + D cos x + F sin x

B cos

2
2
2
2
D sin x + F cosx

U p ( x, s ) =

A cos x
B sin x
4
2
4
2

2 D cosx 2 F sinx

A cos

B sin

x 2 D cos x 2 F sin x

4
2
4
2

s A cos x + B sin x + D cos x + F sin x


2
2

x
= 6 sin 3 sin
2

385

Chapter Ten

By comparing the coefficient of cos

x and cos x we get the

following constants: A = 0, D = 0

By comparing the coefficient of sin


following constants:
B=

x and sin x we get the

B sB = 6

and 2 F sF = 3
2
s+
4

U ( x, s ) = U h + U P = C1e
+

s /2x

6
s + 2 4

+ C2 e

sin

x
2

s /2 x

3
s + 2

QU (0, s ) = 0,

C1 + C 2 = 0

And , QU (4, s ) = 0

C1e 4

F =

+ C2 e 4

sin x

+0=0

But, C 2 = C1 C1 e 4 s e 4 s = 0

Then must be C1 = 0

C2 = 0

U ( x, s ) = U h + U P =

6
s +

sin

x
2

3
s +

sin x

By taking the inverse Laplace transform we find:


u ( x, t ) = 6e (

) sin x + 3e

4t

sin x

s + 2

386

Partial Differential Equations

Problems
1)

If

f ( x, y ) = x 2 sin y, and
g ( x, y ) = e y sin( x + y )

Find f x , f y , g x , g y

f ( x, y, z ) = sin 2 xy * cos 2 yz * tan 2 xz

2)

If

3)

Find all second partial derivatives of

Find , f x , f y , f z

f ( x, y, z ) = e 2 x sinh y cosh z
4)

Suppose that:

y
z = sin( xy ) cos ,
x

x = te t ,

Use the Chain rule to find


5)

If z = x Ln y,
Find

6)

y = sinh t

dz
dt

x = st 2 , y = s 2 t

z
z
and
t
s

If sin 2 x + cos 2 y + tan 2 z = 1


Find

z
z
and
x
y

7) Let a metallic rod 20cm long be heated to a uniform temperature


of 100oC. Suppose that at t=0 the ends of the bar are plunged into an
ice bath at 0 o C , and thereafter maintained at this temperature, but

387

Chapter Ten

that no heat allowed to escape through the lateral surface. Find an


expression for the temperature at the center of the bar at time t=30
sec if 2 =0.86 cm 2 / sec
8) Use the method of separation of variables to solve the following
partial differential equation s:

u 2u
(a)
, where u x (0, t ) = 0, u (2, t ) = 0 , and
=
t x 2

u ( x,0 ) = 8 cos
(b)

2 y
t 2

=4

3x
9x
6 cos
4
4

2 y
x 2

, where

y (0, t ) = y (5, t ) = 0, y ( x,0 ) = 0, yt ( x,0 ) = 5 sin x


(c)

2 y
t

=4

2 y
x

, where

y (0, t ) = y (5, t ) = 0, y ( x,0 ) = 0,

and

yt ( x,0 ) = 3 sin 2x 2 sin 5x


(9) Use the method of Fourier series to solve the following boundary
value problems:

u
2u
= 2 2 , u (0, t ) = u (4, t ) = 0, u ( x,0 ) = 25 x
(a)
t
x
where 0 < x < 4, t > 0

388

Partial Differential Equations

u 2u
= 2 u x (0, t ) = u x ( , t ) = 0, u ( x,0) = x 2
(b)
t x
where 0 < x < , t > 0 , and

10) Use the method of Laplace Transforms to solve the following


partial differential equation s:

u 2u
(a)
, where u (0, t ) = 0, u (4, t ) = 0 , and
=
t x 2
u ( x,0 ) = 6 sin

x
2

+ 3 sin x

u 2u
, where u x (0, t ) = 0, u x (2, t ) = 0 , and
(a)
=
t x 2
u ( x,0 ) = 4 cos x 2 cos 3x

Chapter 11
Simultaneous Linear Differential Equations
11.1 Characteristic Value Problems
A variety of practical problems having to do with mechanical
vibrations, alternating currents and voltages, and other oscillatory
phenomena lead to linear algebraic systems of the following type:

a11 x1 + a12 x2 + ................ + a1n xn = x1


a21 x1 + a22 x2 + ................ + a2n xn = x2
...........................................................................
an1 x1 + an 2 x2 + ................ + ann xn = xn

(1)

Where is a parameter. The metric form of this system is as


following:

AX = X

(2)

We can use the n x n identity matrix I to write (2) as AX = IX or,


equivalently, as:

(I A)X

=0

(3)

The homogeneous system of this sort has a nontrivial solution if,


and only if,

det (I A) =

a11

a12

a21

a22 ....... a2n

......

a1n

.............................................
an1
an 2
ann

=0

(4)

390

Simultaneous Linear Differential Equations

When expanded the determinant det (I A) is seen to be a


polynomial of degree n in the parameter A. Equation (4) is known as
the characteristic equation of the matrix A, and p ( ) is called the
characteristic polynomial of A.

p ( ) = det (I A)

(5)

For values of which satisfy (4), and for these values only, the
matrix equation (3) has nontrivial solution vectors. The n roots of

p ( ) = 0 , which need be neither distinct nor real, are called the


characteristic values of the matrix A, and the corresponding
nontrivial solution vectors of systems (1), (2), or (3) are called the
characteristic vectors or eigen vectors of A. The problem of finding
characteristic values and characteristic vectors of a square matrix is
referred to as a characteristic or eigen value problem.
If A is a real matrix, clearly all coefficients of its related
characteristic polynomial p ( ) must be real. Hence, complex
characteristic values must occur in conjugate pairs. The following
theorem affirms that the same is true of complex characteristic
vectors.
THEOREM 1 If x is a characteristic vector corresponding to a
complex characteristic value a + jb , b 0 , of a real matrix A, then

x is a characteristic vector corresponding to the characteristic value

a jb .

Chapter Eleven

391
Let us find the characteristic values and the characteristic vectors

of several specific matrices.


Example 1 Find the characteristic values and the corresponding

4 5
characteristic vectors of the following matrix: A =

1 2
Solution: The characteristic equation of A is:

det (I A) =

+2

= 2 2 3 = ( + 1)( 3) = 0
So the characteristic values of A are 1 = 1 and 2 = 3 .
If = 1 , the equation det (I A) X = 0 is equivalent to the
following linear system:

5 x1 + 5 x2 = 0
x1 + x2 = 0

or to: x1 + x2 = 0

1
An obvious solution of the last equation is X 1 = and, of course,
1
this vector multiplied by any number is also a solution. Thus, for all

1
nonzero numbers c1 , X = c1 is a characteristic vector of A
1
corresponding to 1 = 1 .

392

Simultaneous Linear Differential Equations

If = 3 , the equation det (I A) X = 0 is equivalent to

5
x1 + 5 x2 = 0 , which has X 2 = as an obvious solution. Thus,
1
5
for every nonzero number c2 , X = c2 is a characteristic vector
1
of A corresponding to 2 = 3 .
As a check on the characteristic values and vectors just found, we
observe that:

5 5 1 0
= and that:
1 1 1 0

[1I A] =
1

5 1 5 5 0
= 1 5 1 = 0
1

[2 I A]

Example 2 Find the characteristic values and the corresponding


characteristic vectors of the following matrix:

3 2 5
A = 4 1 5

2 1 3
Solution:

det (I A) = 4
2

+1
1

5
5 = 3 + 2 16 + 20
+3

= ( + 5)( 2)2 = 0

Chapter Eleven

393

and so the characteristic values of A are 1 = 5 and 2 = 2 .


The equation ( 5 I A) X = 0 is equivalent to the following linear
system:

8 x1 + 2 x2 + 5 x3 = 0
4 x1 4 x2 + 5 x3 = 0
2 x1 + x2 2 x3 = 0
which is equivalent to
Setting

3x3 = 0

4 x1

x3 = 0

2 x2

x3 = 4c1 , we find

x2 = 2c1 , and

x1 = 3c1 . All

characteristic vectors of A corresponding to 1 = 5 are therefore

3
given by X = c1 2 , where c1 can be any nonzero number.

4
The equivalent component form of the matrix equation

(2 I A)X

x1 + 2 x2 + 5 x3 = 0
= 0 is:

4 x1 + 3x2 + 5 x3 = 0
2 x1 + x2 + 5 x3 = 0

This system is equivalent to

+ x3

x1
x2

=0

+3 x3 = 0

Setting x3 = c2 , we find that the characteristic vectors of A

1
corresponding to 2 = 2 are given by X = c2 3 , c2 0

1

394 Simultaneous Linear Differential Equations


Example 3 Find the characteristic values and the corresponding
characteristic vectors of each of the following matrix:

6
6
4
1
3
2

1 5 2
Solution:

6
4 6
det (I A) = 1 3 2 = 0

1
+ 2
5

( 4 )( 3)( + 2 ) + 10 + 6( ( + 2 ) + 2 ) 6( 5 ( 3)) = 0
3 2 + 4 42 + 4 16 + 12 = 0
3 52 + 8 4 = 0
The roots of the above equations (eigen values) are:

1 = 1 and 2,3 = 2
For 1 = 1

3 x1 6 x2 6 x3 = 0
x1 2 x2 2 x3 = 0

x1 + 5 x2 + 3 x3 = 0
3 x2 + x3 = 0
Let x2 = c1

x3 = 3 x2 = 3c1

x1 + 5c1 9c1 = 0

Chapter Eleven

395

x1 4c1 = 0

x1 = 4c1
x1
4


x2 = c1 1
3
x

3
For = 2

2 x1 6 x2 6 x3 = 0
x1 x2 2 x3 = 0

x1 + 5 x2 + 4 x3 = 0
4 x2 + 2 x3 = 0

x3 = 2x2
Let x2 = c2

x3 = 2c2

x1 = 3c2

The eigen vectors for = 2 is shown below:

x1
3


=
x
c
2
2 1
2
x

3
Example 4 Find the characteristic values and the corresponding
characteristic vectors of each of the following matrix:

7 2 4
3 0 2

6 2 3

396 Simultaneous Linear Differential Equations


Solution:

7 2
det (I A) = 3

2 =0
2 +3

3 42 + 5 2 = 0

1,2 = 1 and 3 = 2
Eigen vectors for 1, 2 = 1 :

6 x1 + 2 x2 + 4 x3 = 0
3x1 + x2 + 2 x3

=0

6 x1 + 2 x2 + 4 x3 = 0
From subtracting the last two equations we get the following
equation:

x3 = 0 6 x1 + 2 x2 = 0
Then, if x1 = c1

x2 = 3c1

x1
1


x
c
=
2 1 3
0
x

3
Eigen vectors for 3 = 2

5 x1 + 2 x2 + 4 x3 = 0

3x1 + 2 x2 + 2 x3 = 0
6 x1 + 2 x2 + 5 x3 = 0

Chapter Eleven

397
From subtracting the last two equations we get the following

equation 3 x1 3 x3 = 0

x1 = x3 = c2

1

x1

1
x 2 = c2
2
x

3
1

Example 5 Find the characteristic values and the corresponding
characteristic vectors of each of the following matrix:

4
6
2
4
2
6

6 6 15
Solution:

det (I A) = 4
6

2
6

6
6 =0
+ 15

3 + 112 144 324 = 0


1 = 2 , 2 = 9 , and 3 = 18
Eigen vectors for 1 = 2

4 x1 4 x2 + 6 x3 = 0

(6)

4 x1 4 x2 + 6 x3 = 0

(7)

6 x1 + 6 x2 + 13 x3 = 0

(8)

Divide (6) by 2, we get the following equation:

398

Simultaneous Linear Differential Equations

2 x1 2 x2 + 3 x3 = 0

(9)

Multiply (9) by 3 we get the following equation:

6 x1 6 x2 + 9 x3 = 0

(10)

Add (8) to (10) we get the following:

22 x3 = 0
Let x1 = c1

x3 = 0 , and x1 = x2

x2 = c1

x1
1


x2 = c1 1
0
x

3
Eigen vectors for 2 = 9

7 x1 4 x2 + 6 x3 = 0

(11)

4 x1 + 7 x2 + 6 x3 = 0

(12)

6 x1 + 6 x2 + 24 x3 = 0

(13)

From subtracting the first two equations we get the following


equation:

11x1 11x2 = 0

x1 = x2 = c2

7c2 4c2 + 6x3 = 0


x3 =

1
c2
2

Chapter Eleven

399

x1
2
1
x 2 = c2 2
x 2 1

3
Eigen vectors for 3 = 18

20 x1 4 x2 + 6 x3 = 0
4 x1 20 x2 + 6 x3 = 0

6 x1 + 6 x2 3x3 = 0
From subtracting the first two equations we get the following
equation:

16 x1 + 16 x2 = 0

x1 = x2 = c3
20c3 4c3 + 6 x3 = 0

x3 = 4c3
x1
1


x2 = c3 1
4
x

3
Example 6 Find the characteristic values and the corresponding
characteristic vectors of each of the following matrix:

11 4 7
7 2 5

10 4 6

400 Simultaneous Linear Differential Equations


Solution:

11

det (I A) = 7
10

+2
4

7
5 =0
+6

3 32 + 2 = 0
1 = 0 , 2 = 1 and 3 = 2
Eigen vectors for 1 = 0

11x1 + 4 x2 + 7 x3 = 0

(14)

7 x1 + 2 x2 + 5 x3 = 0

(15)

10 x1 + 4 x2 + 6 x3 = 0

(16)

From subtracting (14) and (16) we get the following equation:

x1 x3 = 0

x1 = x3 = c1
7c1 + 2 x2 + 5c1 = 0

x2 = c1
x1
1


x2 = c1 1
1
x

3
Eigen vectors for 2 = 1

10 x1 + 4 x2 + 7 x3 = 0

(17)

7 x1 + 3x2 + 5 x3 = 0

(18)

Chapter Eleven

401

10 x1 + 4 x2 + 7 x3 = 0

(19)

Multiply (17) by 7 and (18) by 10 we get the following two


equations:

70 x1 + 28 x2 + 49 x3 = 0

(20)

70 x1 + 30 x2 + 50 x3 = 0

(21)

Subtract (20) from (21) we get the following equation:

2 x2 + x3 = 0
Let x2 = c2

x3 = 2c2

7 x1 + 3c2 10c2 = 0

x1 = c2
x1
1


x 2 = c 2 1
2
x

3
Eigen vectors for 3 = 2

9 x1 + 4 x2 + 7 x3 = 0

(22)

7 x1 + 4 x2 + 5 x3 = 0

(23)

10 x1 + 4 x2 + 8 x3 = 0

(24)

Subtract (23) from (22) we get the following two equations:

2 x1 + 2 x3 = 0

(25)

x1 = x3 = c3

9c3 + 4 x2 + 7c3 = 0

(26)

402

Simultaneous Linear Differential Equations

x2 =

c3
2

x1
2


x2 = c3 1
2
x

3
Example 7 Find the characteristic values and the corresponding
characteristic vectors of each of the following matrix:

6
6
4
1
3
2

1 4 3
Solution:

det (I A) = 1
1

3
4

6
2 =0
+3

3 42 + 4 = 0
1 = 4 , 2 = 1 , and 3 = 1
Eigen vectors for 1 = 4

6 x2 6 x3 = 0

(27)

x1 + x2 2 x3 = 0

(28)

x1 + 4 x2 + 7 x3 = 0

(29)

add (28) and (29) we get the following equation:

5 x2 + 5 x3 = 0

(30)

Chapter Eleven

403

x2 = c1 and x3 = c1

x1 + 4c1 7c1 = 0

(31)

x1 = 3c1

x1
3


x2 = c1 1
1
x

3
Eigen vectors for 2 = 1

3 x1 6 x2 6 x3 = 0

(32)

x1 2 x2 2 x3 = 0

(33)

x1 + 4 x2 + 4 x3 = 0

(34)

add (33) and (34) we get the following equation:

2 x2 + 2 x3 = 0

(35)

x2 = c2 and x3 = c2
x1 + 4c2 4c2 = 0

(36)

x1 = 3c1
x1
0


x2 = c2 1
1
x

3
Eigen vectors for 3 = 1
5 x1 6 x2 6 x3 = 0

(37)

x1 4 x2 2 x3 = 0

(38)

x1 + 4 x2 + 2 x3 = 0

(39)

404 Simultaneous Linear Differential Equations


Multiply (39) by 3 and add it to (37), we get the following
equation:

3 x1 + 12 x2 + 6 x3 = 0

(40)

Add (40) to (37) we get the following equation:

2 x1 + 6 x2 = 0 x1 = 3x2
Let x2 = c3

x1 = 3x2

3c3 + 4c3 + 2 x3 = 0

x3 =

(41)

7
c3
2

x1
6
1
x2 = c3 2
x 2 7

3
Example 8 Find the characteristic values and the corresponding
characteristic vectors of the following matrix:

2
3
1 1
A=
1 2

1 2

1
6

2 2

2 6

1
6

Solution: A factored form of the characteristic equation of the


matrix A can be obtained by applying elementary properties of
determinants to det (I A) .

Chapter Eleven

2
3
1 1

1 2

1 2

405

1
6

2 2

2 6

1
6

We first add the third row of det (I A) to its fourth row, which
permits us to factor 4 out of the new fourth row. In the
remaining determinant, we subtract column 4 from column 3 and
then expand. This gives us the following result:

1
1
3 2
1
1 6
6

= ( 4 )2 ( 2)2 + 1 = 0
1
2 2
2

2
2 6
1
From the last equation, we see that 1 = 4 , 2 = 2 + j1 , and,

3 = 2 j1 are the characteristic values of A.


Using Gauss-Jordan elimination to solve the linear system
(4 I A)x = 0 , we find without difficulty that the characteristic
0
0
vectors of A corresponding to 1 = 4 are given by X = c1
1

1
where c1 0 .
To find the characteristic vectors which correspond to

2 = 2 + j1 , we reduce the following matrix to row echelon form


and then write the corresponding linear system, which we find to be
as following:

406

Simultaneous Linear Differential Equations

1
1 + j1 2 1
1
1 + j1 6
6

[(2 + j1)I A] =
1
2
j1
2

2
2 4 + j1
1

x1 +

x4 = 0
x2 +
x3 +

With

1
( 1 + j1)x 4 = 0
2
+ x4 = 0

x4 = 2c2 , we find from these equations that the

characteristic vectors of A corresponding to 2 = 2 + j1 are given


by the following equation:

2
1 + j1
, c2 0 .
X = c2

2
Having found these vectors, we know from Theorem 1 that the
characteristic vectors corresponding to the characteristic value

2
1 j1
, c3 0
3 = 2 j1 of A are the vectors x = c3
2

Chapter Eleven

407

11.2 Systems Of Linear First Order Differential Equations


In many problems in applied mathematics there are not one but
several dependent variables, each a function of a single independent
variable, usually time. The formulation of such a problem in
mathematical terms frequently leads to a system of simultaneous
differential equations. Often these equations are nonlinear and
exceedingly difficult, if not impossible, to solve, even with the aid
of a computer. In certain important cases, however, they are linear
in the dependent variables we can solve them easily as following:
The simultaneous system consists of m linear differential
equations in unknown functions x1 , x2 ,....xn as shown in (42). Such
a system is called a linear differential system. A linear differential
equations system (42) is homogeneous if, and only if, all the
functions

f1 , f 2 ,.... f m are trivial on I, and the system is

nonhomogenous otherwise.

Li1 x1 + Li 2 x2 + ..............Lin xn = f i , 1 i m
(42)
A solution of a linear differential system (42) on an interval I is a
vector function which satisfies each equation of the system for every
t in I. A linear differential system is consistent or inconsistent on I
according as it has, or does not have, a solution on I, and one system
is equivalent to another if, and only if, every solution of either
system is a solution of the other.
In particular, the constant coefficient systems we consider will all
be expressible in the following form:

408

Simultaneous Linear Differential Equations

p11 (D )x1 + p12 (D )x2 + ...... + p1n (D )xn = f1 (t )

p21 (D )x1 + p22 (D )x2 + ...... + p2 n (D )xn = f 2 (t )

(43)
...........................................................................
pn1 (D )x1 + pn 2 (D )x2 + ...... + pnn (D )xn = f n (t )
d
Where pij is a polynomial operator in D = , for 1 i, j n
dt
To solve a system like this, or to determine its inconsistency, we
try to find elementary operations that will reduce it to an equivalent
system of the following form:

q11 (D )x1 + q12 (D )x2 + ...... + q1n (D )xn

= g1 (t )

q22 (D )x2 + ...... + q2n (D )xn = g 2 (t )

.........................................................................
qnn (D )xn = g n (t )

(44)

Example 9 Find a complete solution of the following linear


differential system:

dx
dy
+ 2x +
+ 6 y = 2e t ,
dt
dt
2

dx
dy
+ 3x + 3 + 8 y = 1
dt
dt

Solution: As a rule, the steps in a reduction of a constantcoefficient linear differential system to form (44) are easier to detect
when each system in the reduction process is written in operator
form, rather than in derivative form. The operator form of the given
system is:

Chapter Eleven

409

(D + 2)x + (D + 6) y = 2et ,

(45)

(2 D + 3)x + (3D + 8) y = 1

(46)

Our first step in the elimination process is to subtract twice (45)


from (46) after which we interchange the equations and have:

x + (D 4) y = 1 4et

(47)

(D + 2 )x + (D + 6 )y = 2et

(48)

Working with this new system, we operate on both members of (47)


with D + 2 and add the result to (48). Then we simplify the new
second equation and multiply the first equation through by 1 . This
gives us the following system of equations:

x ( D 4 ) y = 1 + 4e t

(49)

(D 2 D 2)y = 2 10et

(50)

Of course, this system is equivalent to the one we started with and it


is in the form of (44). Since (50) is an equation in y only, it is a
simple matter to solve for y and we find without difficulty the
following results:

y = c1e t + c2 e 2t + 5et + 1

(51)

With y now completely determined, we substitute into (49) to obtain


the following equation:

x (D 4 ) c1e t + c2 e 2t + 5et + 1 = 1 + 4et

(52)

Solving this equation for x and simplifying, we find the following


equation:

410

Simultaneous Linear Differential Equations

x = 5c1e t 2c2 e 2t 11et 3

(53)

Thus, a complete solution of the original differential system is:

x
5 t
2 2t 11 t 3
y = c1 1 e + c2 1 e + 5 e + 1


(54)

It is readily verified that both of the vector functions


t
5 t 5e
x1 (t ) = e =
, and

t
1
e

2t
2 2 t 2e
x2 (t ) = e =

2
t
1

Satisfy the homogeneous system corresponding to the given system,


which is:

dx
dy
+ 2x +
+ 6 y = 2e t ,
dt
dt

dx
dy
+ 3x + 3 + 8 y = 1
dt
dt

and that the vector function is as following:


t
11 t 3 11e 3
v(t ) =

e + 1 =
t
5

5e + 1

satisfies

the

non-

homogeneous system itself. We shall soon see that this observation


extends to some quite general linear differential systems. Its full
significance will become clear to us once we have become familiar
with linear transformations and linear operator equations.

Chapter Eleven

411
Example 10 Find a complete solution of the differential system

(2D 2 + 3D 9)x + (D 2 + 7 D 14)y = 4

(55)

(D + 1)x + (D + 2)y = 8e 2t

(56)

Solution:
During the first stage of a reduction process, it is sometimes
convenient to eliminate an unknown other than the leading one from
all but one equation of a reduced system. To indicate what happens
when this is done, we shall eliminate y, instead of x, from one
equation of the present system, although there is no particular
advantage in doing so.
To begin the elimination process, we operate on (56) with

( D 5) ,

where the choice of

( D 5)

as an operational

multiplier is not just a clever guess. Actually, D + 5 is the quotient


when D 2 + 7 D 14 is divided by D + 2 ; hence, subtracting

(D + 5)(D + 2) y = (D 2 + 7 D + 10)y

from

(D 2 + 7 D 14)y

will

eliminate both D 2 y and Dy , which is one of our objectives. Add


the result to (55), and simplify. Then, we multiply the second
equation by 24. This gives us the following system of equations:

(D 2 3D 14)x 24 y = 4 + 56e2t

(57)

24(D + 1)x + 24(D + 2 ) y = 192e 2t

(58)

Next, we operate on (57) with D + 2 , add the result to (58), and


simplify, obtaining:

412

Simultaneous Linear Differential Equations

(D 2 3D 14)x 24 y = 4 + 56e2t
(D3 D 2 + 4D 4)x = 8 + 32e2t

(59)
(60)

As it stands, this system is not of the form (44). However, by


merely interchanging the x and y terms in the first equation, the
system takes on that form. Of course, there is no need to actually
make this interchange because (56) can be solved at once. The roots
of its characteristic equation are j 2, 1 . Hence a complementary
function is c1 cos 2t + c2 sin 2t + c3et . It is easy to see that

2 + 4e 2t is a particular integral, and therefore:

x = c1 cos 2t + c2 sin 2t + c3et 2 + 4e 2t


With x completely determined, a solution for y can be found by
substituting the last expression for x into (59):

)(

D 2 3D 14 c1 cos 2t + c2 sin 2t + c3et 2 + 4e 2t = 4 + 56e 2t


Performing the indicated differentiations, collecting like terms,
simplifying, and solving for y, we have:

y =

1
(3c1 + c2 ) cos 2t + 1 (c1 3c2 ) sin 2t 2 c3et + 1 5e 2t
4
4
3

Thus, in terms of the parameters

k1 = c1 / 4, k 2 = c2 / 4, and

k3 = c3 / 3 a complete solution of system (59) and (60) is given by


the following:

Chapter Eleven

413

4 cos 2t
4 sin 2t
x

y = k1 3 cos 2t + sin 2t + k 2 cos 2t 3 sin 2t


(61)

3
2
4


+ k 3 e t + + e 2t
2
1 5
But, (55) and (56) are equivalent systems; hence (61) is also a

complete solution of the original system.


Before considering another example, let us return to system (43)
and observe that if D were a number, instead of an operator, then:

p11 (D )

p21 (D )
....

p12 (D ) ....

p22 (D ) ....
....
....

p1n (D )

p2 n (D )
....

(62)

pn1 (D ) pn 2 (D ) .... pnn (D )


would be a determinant. Of course, the polynomial operators pij (D )
usually are not numbers. Nevertheless, (62) is known as the
determinant of the operational coefficients of (43). Moreover,
whenever the following theorem is applied, (62) is expanded using
the properties that hold for ordinary determinants.
THEOREM 1 If the determinant of the operational coefficients
of a system of n linear differential equations with constant
coefficients is not identically zero, then the total number of
independent arbitrary constants in any complete solution of the
system is equal to the degree of the determinant of the operational
coefficients, regarded as a polynomial in D. In particular cases in
which the determinant of the operational coefficients is identically

414 Simultaneous Linear Differential Equations


zero, the system may have no solution or it may have solutions
containing any number of independent constants.
Applying this theorem to system (55), (56), in the above example,
we note that the determinant of the operational coefficients is as the
following:

2 D 2 + 3D 9 D 2 + 7 D 14
D +1

D+2

The expanded form of this determinant is the third-degree


polynomial

D3 D 2 + 4D 4

in

D . Hence, according to

Theorem 1, there must be exactly three arbitrary constants in any


complete solution of the given system. This explains why the
complete solution (61) of system (55), (56) contains three arbitrary
constants, even though the system has only two equations and two
unknowns.

Example 11 Solve the following differential system:


Dx

(D 1)x
(D + 1)x

+ (D 1) y

+ (D + 2)z = 2et

+ Dy
+ (D 2)z = aet
+ (D 2) y + (D + 6)z = et
Solution: It is readily verified that the determinant of the
operational coefficients of this system is identically zero. Hence,
according to Theorem 1, the system may have no solution or it may
have solutions containing any number of arbitrary constants. Let us
apply elementary operations to the system and find out what the
case might be.

Chapter Eleven

415
By subtracting the second equation from both the first and third

equations, and then adding 2 times the new first equation to the
new third equation, we get the following system:

(D 1)x

+ 4z

+ (D 2 )z

= (2 a )et

= aet
0
= (a 3) et
Of course, this reduced system is equivalent to the given one.
+ Dy

Clearly, unless a = 3 , neither system is consistent.


On the other hand, if a = 3 , we can operate on the first equation
of the reduced system with ( D + 1) , add the result to the second
equation, simplify, and omit the third equation which is simply

0 = 0 , to obtain:
x y + 4 z = et

(63)

(2 D 1) y (3D 2)z = 3et

(64)

This system is in the form of (44), and it is equivalent to the original


system. From (64), y can be found in terms of z = z (t ); then, from
(63) x too can be found in terms of z. Since z is subject only to the
restriction that it be differentiable, it may contain any number of
arbitrary constants.
Thus, consistent with the possibilities allowed for by Theorem 1,
we have found that, if a 3 , the original differential system has no
solution; but, if a = 3 , the system may have solutions containing
any number of arbitrary constants.

416 Simultaneous Linear Differential Equations


11.3 Linear Differential Systems with Constant Coefficients
We shall now consider, as an alternative to the use of elementary
operations, a method of solving linear differential systems with
constant coefficients which resembles the way in which we solved
single linear constant coefficient differential equations. A significant
feature of the method, which we are about to present, is that it puts
to use what we already know about characteristic value problems.
Let us first investigate the method as it applies to first order systems.
As in the case of a single equation, to solve the non-homogeneous
first order system

x = Ax + f (t )

(65)

where A is a constant matrix. We begin by looking for a complete


solution of the associated homogeneous system:

x = Ax

(66)

Guided by our experience in solving single equations, we attempt


to find a solution of (66) of the form

x = ke t

(67)

where k is a constant vector and A is a scalar. Substituting (67)


into (66), dividing out the common factor e t , and slightly altering
the resulting equation, we see that (67) yields a solution of (66) if,
and only if,

(I A)k = 0

(68)

Chapter Eleven

417
Thus, (67) will be a nontrivial solution of (66) if, and only if, is a
characteristic value of A and k is a corresponding characteristic
vector. The remaining steps required to find a complementary
function of (65) may differ somewhat according as:
. All characteristic values of A are real and distinct.
.

All characteristic values of A are real, but some are

repeated roots of the characteristic equation det (I A) = 0


.

Complex characteristic values of A occur.

Perhaps, the best way of learning how to handle these three cases
is by means of specific examples. Our first example (Example 12)
involves a first order system whose coefficient matrix has only
distinct real characteristic values.

Example 12 Find a complete solution of the following


system of linear differential equations:
x1 =
x2 = 4 x1

x2

+ x3

x2

4 x3

x3 = 3x1

x2

+4 x3

Solution:
As (67) suggests, we seek solutions of (69) of the type:

x1 a
x = b e t
2
x3 c
where a , b, c are constants

(69)

Simultaneous Linear Differential Equations

418

Substituting ae t , be t and ce t into the given system for

x1 , x2 , and x3 , respectively, then dividing out e t and transposing,


we obtain the characteristic value problem as following:

+
b
4a +( + 1)b

3a

c =0
4c = 0

(70)

+( 4 )c = 0

The corresponding characteristic equation is as following:

4 +1
4 = 4( 1)
+5
4
3
1
4 ( 1)( 3) 3 4
4 +5
= ( 1)( 3)
= ( + 1)( 1)( 3) = 0
1
1
Clearly 1 = 1, 2 = 1, and 3 = 3 are the characteristic values
of the following coefficient matrix:

0
A= 4

3
If = 1

1
1 4

1 4
= 1 system (70) becomes linear system as following:

a+bc =0
ac =0
4a +4c = 0 which is equivalent to
b 2c = 0
3a + b 5c = 0

Chapter Eleven

419

1
Setting c = 1 we fiend that 2 is a characteristic vector of A

1
1
corresponding to 1 = 1 . By the same procedure, we fiend 0 and

1
1
1 to be characteristic vectors of A corresponding to the

2
respective characteristic values 2 = 1 and 3 = 3 respectively. It
follows that:
1
1
1
2 e t ,
0 e t
, and 1 e3t



1
1
2
are particular solutions of (69). Since, for every real number t, the
Wronskian W of these three solutions has the nonzero value

W (t ) = 2e3t , a complete solution of the given first order system is


as following:

1
1
1
t
t

X = c1 2 e + c2 0 e + c3 1 e3t



1
1
2
Our next example involves a simple first order system whose
coefficient matrix has a repeated characteristic value. Although the
system has only two unknowns, it serves to illustrate how complete
solutions of more general systems can be found when repeated
characteristic values occur.

420 Simultaneous Linear Differential Equations


Example 13 Find a complete solution of the following system:

x1 = x1 2 x2
x2 = 2 x1 3 x2

(71)

1 2
Solution: The coefficient matrix of this system is A =
.
2 3
a
Since we are seeking solutions of (71) of the type e t , where
b
a and b are constants, the characteristic value problem to be solved
is:

2 a 0
1
2 + 3 b = 0


and the characteristic equation is

(72)

2
1
2
2
2 + 3 = + 2 + 1 = ( + 1) = 0

Hence, 1 = 1 is a repeated characteristic value of A. Setting

= 1 in (72), we obtain the linear system


2a + 2b = 0
2a + 2b = 0

which is equivalent to

a b = 0

1
Clearly, is a characteristic vector of A corresponding to
1

1 = 1 , and
1
X = e t
1
is a particular solution of (71)

(73)

Chapter Eleven

421
Strict analogy with a single differential equation, having -1 as a

double root of its characteristic equation, would suggest that a


second solution of (71) might be found by multiplying (73) by t.

1
But, te t does not satisfy (73) Furthermore, the Wronskian of
1
this vector function and (73) is a trivial function over all real values
of t. This is no insurmountable problem, however for variation of
parameters, which enabled us to cope with repeated roots of
characteristic equations in the first al place, is still applicable. To

a
apply the method, we take = 1, as we must if e t is to be a
b
solution of (71). Then, we vary the parameters a and b and attempt
to find a solution of (71) of the following type:

u t
v e

(74)

where u and v are functions of t. Of course, we want

e t

e t

ue t
to be a fundamental matrix of (71).
t
ve

Substituting ue t and ve t into (71) for x1 and x2 , respectively,


then canceling all occurrences of e t and regrouping, we find that
(74) will be a solution of (71) if, and only if, u and v satisfy the
equations:

422

Simultaneous Linear Differential Equations

u = 2(u v )
v = 2(u v )

(75)

Subtracting the second of these equations from the first, we have

u v = (u v ) = 0 which implies that:


u = v + k1

(76)

Replacing u by v + k1 , in the second of (75), we get v = 2k1 ,


which integrates into v = 2k1t + k 2 . With v thus determined, the last
of (76) gives u = 2k1t + k 2 + k1 and (74) becomes as following:

k1 + k 2 + 2k1t t
e

k 2 + 2k1t

(77)

The Wronskian of this vector function and (73) has the following
value:

k1 + k 2 + 2k1t

k 2 + 2k1t

1 2t
e
= k1e 2t 0

Hence, (73) and (77) are fundamental solutions of (71), provided

k1 0 . In particular, if k1 = 1 and k 2 = 0 , (73) and (77) give us:


e t

e t

(1 + 2t )e t

t
2te

as a fundamental matrix, and

1
(1 + 2t ) t
X = c1 e t + c2
e
t
1
2

as a complete solution of the original differential system.

Chapter Eleven

423
Looking back on (63) and (64), a shorter method of finding a

fundamental matrix of (71) comes to our attention. As soon as (73)


has been found, determine constants a, b, c , and d such that:
t
a t c t (a + ct )e

b e + d te =



(b + dt )e

and (73) will be linearly independent solutions of (71).


As one further introductory example, let us consider a simple first
order system whose coefficient matrix has complex characteristic
values.
Example 14 Find a complete solution of the following system:

x1 = 2 x1 3 x2
x2 = 3 x1 + 2 x2

(78)

This system will have a solution of the type

a t
b e

(79)

if, and only if:

2
3

3 a 0
=
2 b 0

Solving the characteristic equation as following:

2 3
3

= 2 4 + 13 = 0

(80)

424

Simultaneous Linear Differential Equations

we obtain 1 = 2 + j 3 and 2 = 2 j 3 as conjugate complex

2
characteristic values of the coefficient matrix A =
3

3
.
2

Replacing by 2 + j 3 in the characteristic value problem (80), and


dividing out a factor of 3 from every term, we get the linear system

ja + b = 0
a + jb = 0
which is obviously equivalent to ja + b = 0
Taking a equal to the coefficient of b, and b equal to minus the

1
coefficient of a, in the last equation, we obtain as a
j
characteristic vector of A corresponding to the characteristic value

1 = 2 + j 3 .
Substituting these values of a, b, and into (79), gives us the
complex vector function

(2 + j 3)t
e
j

(81)

which formally satisfies system (78). Of course, what we want are


real fundamental solutions of (78). To find these, we use Euler's
formula to write (81) as:

j 3t
2t cos 3t + j sin 3t
2t
2t j 3t e
e
=
e
e
=

j (cos 3t + j sin 3t ) e
j
t
3
j
je

Chapter Eleven

425

2t
2t j 3t e cos 3t
e e =
+
2
t
j
e sin 3t

e 2t sin 3t
j

2
t
e cos 3t

It is now easy to verify that the real vector functions:

sin 3t 2t
cos 3t 2t
e
and
cos 3t e
sin 3t

Form a basis for all real solutions of system (78). Thus, we are
able to write a complete solution:

cos 3t 2t
X = c1
e + c2
sin
3
t

sin 3t 2t
cos 3t e of the given differential

system using only one of the two conjugate characteristic values of


A.
Example 15 Find a complete solution of the following first order
systems:

x1 = 2 x1 13x2
x2 = x1 + 4 x2

Solution:

2 13
A=
4
1
det (I A) =

+2

13

=0

( + 2 )( 4 ) + 13 = 0
2 2 + 5 = 0
For 1 = 1 + j 2

1,2 = 1 j 2

426

Simultaneous Linear Differential Equations

13 a 0
3 + j 2
1
b = 0

3
+
j
2

(3 +

j 2 )a + 13b = 0

(3 + j 2)a = 13b
Let a = C1 .!

1+ j 2

t 1 13

=
X 1 = C1 1
e
C
1
3 j 2 e

13
(
)
+
j
3
2

13

13
1+ j 2
e
= c1
3 j2

13

0
X 1 = c1e t cos 2t sin 2t
2
3

13
X 2 = c2 et cos 2t + sin 2t
3
2

13
0
X = X 1 + X 2 = c1et cos 2t sin 2t
2

0
13
+ c2 et cos 2t + sin 2t
3

2
Example 16 Find a complete solution of the following first order
systems.

x1 = 3x1 4 x 2
x 2 = 2 x1 + x 2

Chapter Eleven

427

Solution:

3 4
A=

2 1
det (I A) =

+3

=0

( + 3)( 1) + 8 = 0
2 + 2 + 5 = 0

1,2 = 1 j 2

For 1 = 1 + j 2

4 a 0
2 + j 2
2
b = 0
j

2
+
2

(2 + J 2)a + 4b = 0 and 2a + ( 2 + j 2)b = 0


a = ( 1 + j1)b
a = ( 1 + j1)c1
Let b = c1
x1
a
= c1 e (1+ j 2 )t
b
x2
1 + j1
a

= c1
1

b
1
1
= , and, =
1
0
1

1
X 1 = c1e t cos 2t sin 2t
0
1

1
X 2 = c2 e t cos 2t + sin 2t
1
0

428

Simultaneous Linear Differential Equations

cos 2t sin 2t
X = X 1 + X 2 = c1e t
cos 2t

cos 2t sin 2t
+ c2 e t
sin 2t

Example 17 Find a complete solution of the following first order


systems.

x1 = 3 x1 2 x2
x2 = 2 x1 + x2
Solution:

3 2
A=
1
2
det (I A) =

+3

( + 3)( 1) + 4 = 0
2 + 2 + 1 = 0
1 = 2 = 1
Eigen values For 1 = 1

2a + 2b = 0

a = b
Let a = c1 , and b = c1

x
1
1 = c1 e t
1
x2

=0

Chapter Eleven

429

Eigen values For 2 = 1

x u
1 = e t
x2 v

ue t = u e t = ( 3u 2v )e t
u = 2(u + v )
ve t + ve t = (2u + v )e t

v = 2(u + v )
Let u + v = c2

u = 2c2 ,

u = 2c2t + c3

v = c2 u = c2 + 2c2t c3

2c2t + c3
W =
c2 + 2c2t c3

1
= 2c2t c3 (c2 + 2c2t c3 ) = 0
1

c3 = 0
u = 2c2t , and v = 2c2t + c2

1
2t t
e
X = c1 e t + c2
t

+
1
2
1

Example 18: Find a complete solution of the following first order


systems.

x1 = 4 x1 2 x2
10
, x(0 ) =
x2 = 25 x1 10 x2
40

430 Simultaneous Linear Differential Equations


Solution:

4 2
QA=

25 10
det (I A) =

25

+ 10

=0

( 4)( + 10) + 50 = 0
2 + 6 + 10 = 0
1, 2 = 3 j1
Eigen values For 1 = 1

( 7 + j1)a + 2b = 0
Let a = c1

b =

1
c1 ( 7 + j1)
2

a
1 2

= c1 7
1 = c1

b
j
7
1
2
j


2
2
2

= , and
7

=
1

0
X 1 = c1e 3t cos t sin t
1
7

2
X 2 = c2 e 3t cos t + sin t
7
1

2 cos t

3t 2 sin t
+
X = c1e 3t
c
e
2

7 cos t + sin t
cos t + 7 sin t

Chapter Eleven

431

10 2c
Q X (0 ) = = 1

40 7c1 c2
2c1 = 10 and, 7c1 c2 = 40
c1 = 5 and, c2 5
x
cos t sin t

X = 1 = 10e 3t

x
4
cos
t
3
sin
t

2
Example19 Find a complete solution of the following first order
systems.

x1 = 3 x1
x3
1
x2 = 2 x1 + 2 x2 + x3 x(0 ) = 2

8
x3 = 8 x1
3 x3
Solution:
3 0 1
A = 2 2 1

8 0 3
3

der (I A) =

2
8

2
0

1 = 0
+3

3 22 + 2 = 0
1 = 1 , 1 = 1 , and 3 = 2
Eigen values for 1 = 1

2a
2a
8a

+c = 0
b

c = 0
+4c = 0

Simultaneous Linear Differential Equations

432

Let a = c1 c = 2c1 and b = 0

x1
1


X 1 = x2 = c1 0 et
2
x

3
Eigen values for 2 = 1

4a
2a
8a

3b

+c = 0
c = 0
+2c = 0

Let a = C2 c = 4C2
Substitute values of a and c into the second equation we get the
following:

3b = 2C2 4C2
b =

2
C2
3

x1
3


X 2 = x2 = c2 2 e t
12
x

3
Eigen values for 3 = 2

+c = 0

2a

c = 0

8a

+5c = 0

a = c = 0
Let b = c3

Chapter Eleven

433

x1
0


X 2 = x2 = c3 1 e 2t
0
x

3
x1
1
3
0

t
t

X = x2 = c1 0 e + c2 2 e + c3 1 e 2t
2
12
0
x



3
1
Q x(0) = 2

8
1
1
3
0


2 == c1 0 + c2 2 + c3 1

2
12
0
8



1 = c1 + 3c2

(82)

2=

2c2 + c3

(83)

8 = 2c1 + 12c2

(84)

Multiply (82) by 2 and add the results to (83) we get the


following:

6 = 6c2 c2 = 1
c1 = 2 , and, c3 = 0
x1 2
3
t t
X = x 2 = 0 e 2 e
12
x 4

3
It is not always necessary, nor advantageous, to reduce a linear
differential system with constant coefficients

434

Simultaneous Linear Differential Equations

pi1 (D )x1 + pi 2 (D )x2 + .... + pin (D )xn = f i (t )

(85)

where 1 i n
to a first-order system before solving. For a system like (85) can
usually be solved in the same manner as a first-order system. The
concepts of complementary function and particular integral carry
over and, can even be extended to far more general linear systems.
If we define a matrix operator P(D ) , and vector functions x and f
by:

p12 (D ).... p1n (D )


p11 (D )
p (D )

(
)
(
)
p
D
p
D
....
21
22
2
n

P(D ) =
..............................................

pn 2 (D ).... pnn (D )
pn1 (D )
x1
f1
x
f
2

2
x = .. f = ...


..
...
xn
f n
where the pij ' s are polynomial operators in D, which, of course,
have constant coefficients, system (85) can be written in the
compact matrix form:

P(D )x = f (t )
The associated homogeneous equation is:

(86)

P(D )x = 0

(87)

Chapter Eleven

435
As with first order systems, a complete solution of (87) is called a

complementary function of (86) and any particular solution of (86)


is called a particular integral of that system. To find a
complementary function, we assume solutions of the homogeneous
system exist in the form:

x = ke t
just like we did for first order systems. Since D r e t = r e t , it

( )

follows that, if we substitute x = ke t into (87), we obtain

P( )ke t = 0 , or dividing out the scalar factor et ,

P( )k = 0
We will have a nontrivial solution if, and only if,

(88)

P( ) = 0
(89)
This equation is called the characteristic equation of both the
algebraic system (88) and the original differential system. It is
nothing but the determinant of the operational coefficients of (85)
equated to zero, with D replaced by .
For each root j of the characteristic equation (89) there will be
a solution vector k j of (88) determined to within an arbitrary scalar
factor c j . If (89) is a polynomial equation in of degree N, and if
its root 1 , 2 ,... N are all distinct real numbers, a complete
solution of (87), i.e., a complementary function of (86), is then:

x = c1k1e 1t + c2 k 2e 2 t + ....... + c N k N e N t

436 Simultaneous Linear Differential Equations


Example 20 Find a complete solution of the differential system:

(D + 1)x + (D + 2) y + (D + 3)z
= e t
(D + 2)x + (D + 3) y + (2 D + 3)z
= et
(4 D + 6)x + (5D + 4) y + (20 D 12)z = 7e t

(90)

To find a complementary function of this system, we observe that

a
solutions b e t of the homogeneous system exist if, and only if,

c

( + 1)a + ( + 2)b + ( + 3)c


( + 2)a + ( + 3)b + (2 + 3)c
(4 + 6)a + (5 + 4)b + (20 12)c

=0
=0
=0
The characteristic equation of this system is:

( + 1)
( + 2)
(4 + 6)

( + 2)
( + 3)
(5 + 4)

( + 3)
(2 + 3)
(20 12)

(91)

=0

or, expanding, collecting terms, and factoring,

( 1)( 2 )( 3) = 0
Substituting the roots 1 = 1, 2 = 2, and 3 = 3 of this equation
into (52), one at a time, we obtain the three linear systems

2a + 3b + 4c = 0
3a + 4b + 5c = 0
10a + 9b + 8c = 0
3a + 4b + 5c = 0
4a + 5b + 7c = 0
14a + 14b + 28c = 0

Chapter Eleven

437

4a + 5b + 6c = 0
5a + 6b + 9c = 0
18a + 19b + 48c = 0
When the coefficient matrices of these systems are reduced to
row echelon form the systems themselves are transformed,
respectively, into

ac =0
,
b + 2c = 0

a + 3c = 0
,
bc =0

a + 9c = 0
b 6c = 0

From these systems we see that (1,-2,1), (3,.-1,-1), and (9,-6,-1)


are nontrivial solutions of (91) corresponding to the distinct real
values 1, 2, and 3, respectively, of the parameter . A
complementary function of (90) is therefore

1
3
9

t
2t
c1 2 e + c2 1 e + c3 6 e3t



1
1
1

(92)

To complete the problem we now need to find a particular


integral of the given differential system. Since the scalar factor e t

1
in the non-homogeneous term f (t ) = 1 e t of (90), and the

7
scalar factors et , e 2t and e3t in the terms of the complementary
function are linearly independent functions, we choose a trial
solution of (90) as following:

438

Simultaneous Linear Differential Equations

a
v = b e t
(93)

c
Substituting (93) into (90), collecting terms, and canceling a
factor of e t , we find:

b + 2c = 1
a+

2b + c = 1

2a b 32c = 7
which is equivalent to the following:
a=3
b = 1
c=0

3
Hence, a particular integral of (51) is 1 e t and a complete

0
solution of the original system is:
1
3
9
3
x = c1 2 et + c2 1 e 2t + c3 6 e3t + 1 e t




1
1
1
0
As with first order systems and single equations, if the set of roots

{ j } of the characteristic equation (89) includes one or more pairs

of conjugate complex numbers, it is desirable to convert all


corresponding complex exponential solutions into purely real
solutions. To see how this can be accomplished, let p jq be a pair
of conjugate complex roots of (89), and let k be a particular

Chapter Eleven

439
nontrivial solution vector of (88) corresponding to the root

= p + jq , so that P( )k = p( p + jq )k = 0
Then, since all the coefficients in (88) are real, it follows by
taking conjugates throughout the last equation that k is a solution
vector of (88) corresponding to = p jq Therefore, in a complex
sense, both ke( p + jq )t and k e ( p jq )t are particular solutions of (87).
By combining these as follows and applying the Euler formulas, we
obtain the two independent real solutions as following:

k +k

ke ( p + jq )t + k e ( p jq )t
k k
= e pt
cos qt
sin qt
2
j2
2

= e pt [ (k ) cos qt (k ) sin qt ]

(94a)

k k

ke ( p + jq )t k e ( p jq )t
k k
= e pt
cos qt +
sin qt
j2
2
j2

= e pt [ (k ) cos qt + (k ) sin qt ]
(94b)
where . (k ) and (k ) denote the column vectors whose
components are, respectively, the real parts of the components of k
and the imaginary parts of the components of k.
If p( ) = 0 has a double root, say = r , and if a is a specific
nontrivial solution vector of the equation P(r )k = 0 then, of course,

ae rt is a nontrivial solution of (87). To obtain a second independent


solution, we proceed as indicated at the end of Example 13. That is,
we determine constant vectors b1 and b2 such that:

440

Simultaneous Linear Differential Equations

b1te rt + b2 e rt

(95)

and ae rt will be linearly independent solutions of (87). It is


significant that the term b2 e rt must be retained in the matrix case.
This might have been anticipated had we noticed that in general the
vector b2 will not be a scalar multiple of a, and hence, in
constructing a complete solution of (87), the term involving b2 r rt
cannot be absorbed in the term involving ae rt , as would necessarily
be the case with the term b2 e rt were it included in a trial solution of
the form b1te rt + b2te rt for a single scalar differential equation. It
can be shown, however that to within an arbitrary scalar factor, the
vector b1 is the same as the vector a. Hence, it is really only
necessary to determine the components of b2 .
Similar results hold for roots of (89) of higher multiplicity. Thus,
for an m-fold root r, there will be particular solutions of (87) of the
form:

ae rt
b1te rt + b2 e rt
c1t 2 e rt + c2te rt + c3e rt
.........................................................
k1t m 1e rt + k 2t m 2 e rt + .......k m 1te rt + k m e rt

(96)

Chapter Eleven

441

Example 21 Find a complete solution of the system

(D 2 + D + 8)x1 + (D 2 + 6D + 3)x2 = 0
(D + 1)x1 + (D 2 + 1)x2 = 0

(97)

Solution: In this case the characteristic equation of this system is:

2 + + 8 2 + 6 + 3
= 4 + 22 8 + 5 = 0
2
+1
+1

(98)

with roots 1, 1, 1 j 2 . For the root -1 + j2, (98) simplifies to:

4 j 2 6 + j8 k1 0
j2
k = 0
j

(99)

which is equivalent to jk1 (1 + j 2 )k 2 = 0

1 + j 2
Taking k1 = 1 + j 2 and k 2 = j , we have

j
1

(k ) = and (k ) = .
0
1
Thus, from (94), two particular solutions of the given differential
system are:

1
2
x1 = e t cos 2t sin 2t
1

2
1
x2 = e t cos 2t + sin 2t
0

1
For the repeated root = 1 , and a trial solution ae t , (88)
becomes:

442

Simultaneous Linear Differential Equations

10 a1 0
=
2 a2 0

10
P(1)a =
2

a1 1
so we can take a = =
a2 1
From (56), another trial solution is b1tet + b2 et or since b1 = a
(as we observed earlier, without proof)

1 t b12 t
1te + b e

22

(100)

Substituting this into the original system, we obtain two equations


each of which reduces to: 2b12 + 2b22 = 1
Hence, we can take b12 = 0 and b22 =

1
.
2

Two solutions associated with the double root = 1 are therefore

1
x3 = aet = et
1
0
1 t t
and x4 = b1te + b2 e = te + 1 e

1
2
t

A complete solution of the original system is now given by

x = c1 x1 + c2 x2 + c3 x3 + c4 x4
To find a particular integral of a non-homogeneous system (86),
or (65), in the usual case in which f (t ) is a vector function having
only a finite number of linearly independent derivatives, we proceed

Chapter Eleven

443
very much as in the case of a single scalar differential equation. At
the outset, it is convenient to identify the independent functions

1 (t ), 2 (t ),.........., m (t ) which appear in the components of f (t )


and then express f (t ) in the form:

f (t ) = f1 1 (t ) + f 2 2 (t ).............. + f m m (t )

(101)

where the f ' s with subscripts are appropriate constant column


vectors. This expression is then compared with a complementary
function of the system being solved

xh (t ) = h1 u1 (t ) + h2 u 2 (t ).............. + hm u m (t )
in

which

the

h' s

are

constant

(102)
vectors

and

u1 (t ), u 2 (t ),..................u n (t ), are known linearly independent scalar


functions. For such terms of (101) as do not contain a nonzero scalar
times any of the functions u j (t ) in (102) among the pertinent
functions, or any of their derivatives, trial particular integrals can be
constructed as described before, provided that the arbitrary scalar
constants appearing in the entries in the table are replaced by
undetermined constant vectors: The trial solutions are then
substituted into the non-homogeneous system, and the arbitrary
components of the coefficient vectors are determined to make the
resulting equations identically true. For any term of (101) whose
relevant function has a derivative, possibly of order zero, that is
proportional to a function u j (t ) of (102), not only must the usual

444 Simultaneous Linear Differential Equations


choice for a trial particular integral be multiplied by the lowest
positive integral power of the independent variable which will
eliminate the duplication, but the products of the normal choice and
all lower nonnegative integral powers of the independent variable
are also to be included in the actual choice. Finally, once a particular
integral for each term on the right-hand side of (101) has been
found, a particular integral for the non-homogeneous system having

f (t ) as its non-homogeneous term can be formed by addition. An


example should clarify the details of the procedure.
Example 22 Find a particular integral of the non-homogeneous
system of equations obtained by adding 2et and 2et + e 2t to the
right-hand members of the respective equations of Example 21.
Solution: At the outset, let us express the non-homogeneous term
of the equivalent metric equation in the form:

0
2
f (t ) = e 2t + et
1
2

(104)

then write the complementary function, found in Example 21, as:

c1 + 2c2 t
2c1 + c2 t
+
xh =
e
t
cos
2

c
e sin 2t
c

2
1
c3

et + c4 e t cos 2t
+
1
c
c3 + c4
4

(105)

Chapter Eleven

445

Since neither e 2t , nor any of its derivatives, is proportional to


any of the linearly independent functions

e t cos 2t

e t sin 2t

et

tet

appearing in the terms of xh we assume as a trial particular

0
integral, corresponding to the first term e 2t of f (t ) , Simply
1
a1
v1 = ae 2t = e 2t
a2
where a1 , a2 constants
Then, substituting, we have:

P(D )v1 = P(D )ae 2t = P( 2 )ae 2t


10 5 a1 2t 0 2t
=
= e
a e

1
5

2
1
or, dividing out e 2t ,

10 5 a1 0
1 5 a = 1

2
1
2
1 1
1 1
It follows that a1 = , a2 = and a = . Thus, e 2t is
9
9
9 2
9 2
one term in the particular integral we are seeking.
To find a particular, integral corresponding to the second term

2 t
t
t
2 e of f (t ) , we note that, since both e and te occur in terms of

446 Simultaneous Linear Differential Equations


the complementary (unction, the normal choice for a trial particular
integral, namely, bet , is to be modified by multiplying it by t 2 and
including the terms ctet and de t ,

b1
c1
Where b = c =
b2
c2

d
d = 1 are constant vectors to be
d 2

determined. Then, substituting

v2 = bt 2 et + ctet + det into the

2
equation P(D )x = et and using the following equations:
2

( )

If D m te t = m te t + mm 1e t

p(D )te t = p( )te t + p( )e t


and

P(D )te t = P( )te t + P( )e t


Where p (D ) is a polynomial in the operator D and P(D ) is a
matrix whose elements are polynomials in D.

If D m t 2 e t = m t 2 e t + 2mm 1te t + m(m 1)m 2 e t


Hence

p(D )t 2 e t = p( )t 2 e t + 2 p( )te t + p( )e t
and

P(D )te t = P( )t 2 e t + 2 P( )te t + p( )e t


Where p (D ) is a polynomial in the operator D and P(D ) is a
matrix whose elements are polynomials in D.

Chapter Eleven

447

P(D ) bt 2 et + ctet + det = P(1)bt 2 et + 2 P(1)btet + P(1)bet


2
+ P(1)ctet + P(1)cet + P(1)det = et
2
Hence, equating the coefficients of like functions on the two sides
of this equation, we find that

P(1)b = 0
P(1)c + 2 P(1)b = 0
2
P(1)d + P(1)c + P(1)b =
2
Expanding these equations, and simplifying slightly, we obtain
the linear system

b1 + b2

=0

b1 + b2

=0

3b1 + 8b2

+5c1 +5c2

=0

b1 +

+ c1

=0

2b2

2b1 + 2b2
2b2

+ c2

+3c1 +8c2

+10d1

+10d 2

=2

+ c1

+2d1

+2d 2

=2

+2c2

(103)

When reduced to row echelon form, the augmented matrix of this


system becomes:

1
0

0
0

0 0 0
0 0 0
0 1 0
0 0 1
0 0 0
0 0 0

1
0
0
1

2 2 2

2
2
1
0
0
0

0
0
0
0

448 Simultaneous Linear Differential Equations


which gives us the following:

b1
0 1
0
b
0 1
0
2


c1
2 2
2
= k1 + k 2 +
c 2
2 1
2
d1
0 0
1



d 2
1 0
0
as a complete solution of (103). In particular, taking k1 = k 2 = 0 ,
we have

1
2
0
b= c= d =
1
1
0
Finally, putting our results together, we get the entire particular
solution:

1 1 2t 1 2 t 2 t
e
+ t e + te
9 2
1
1
In the following there are some different examples to help
v=

students in understanding this chapter.


Example 23 Find a complete solution the following system:

(D + 2 )x + (D + 4 )y = 1
(D + 1)x + (D + 5) y = 2

(104)
(105)

Solution: Subtract (105) from (104) we get the following


equation:

x y = 1
Multiply (3) by (D + 1)

(106)

Chapter Eleven

(D + 1)x (D + 1) y = (D + 1)

(D + 1)x (D + 1) y = 1

449
(107)

Subtract (107) from (105) we get the following equation:

(2 D + 6 ) y = 3
2

dy
+ 6y = 3
dt

This is first order ordinary differential equation. The solution of this


equation is as following:

1
+ c1e 3t
2

y (t ) =

Substitute y (t ) into (106)

x y = 1

x =

1
+ c1e 3t
2

x
=
y

1
1 1
+ c1 e 3t
2 1
1

Example 24 Find a complete solution the following system:

(D + 1)x + (4 D 2) y = t 1

(108)

(D + 2 )x + (5D 2 )y = 2t 1

(109)

Solution: Subtract (109) from (108) we get the following


equation:

x + ( Dy ) = t

450 Simultaneous Linear Differential Equations


x Dy = t

(110)

Multiply (110) by (D + 1) we get the following equation:

(D + 1)x D(D + 1) y = (D + 1)t

(D + 1)x + D 2 D y = 1 t

(111)

Add (111) to (108) we get the following equation:

( D 2 + 3D 2)y = 2
(D 2 3D + 2)y = 2

It is second order ordinary differential equation.

y h (t ) = c1e t + c2 e 2t
y p (t ) = 1
y (t ) = y h + y p = c1et + c2 e 2t + 1
Substitute in (110) we get the following:

x c1et 2c2 e 2t = t
x = t c1e t 2c2 e 2t
x
1
2
t
= c1 et + c2 e 2t +
y
1
1
1
The above example can be solved by another technique as
following:

+ 1 4 2
+ 2 5 2 = 0

Chapter Eleven

451

2 3 + 2 = 0
1 = 1 , and 2 = 2
For 1 = 1

a = b
Let b = c1 , a = c1

x
1
X 1 = = c1 et
y
1
For 2 = 2

3a + 6b = 0

a = 2b
Let b = c2 , a = 2c2

x
2
X 2 = = c2 e 2t
y
1
t 1 0t
Q f (t ) =
e
2

1
t

= 0

a 2b = t 1

(112)

2a 2b = 2t 1

(113)

Subtract (112) from (113) we get a = t b = 1 / 2

x
1
2
t
= c1 et + c2 e 2t +

y
1
1
1 / 2

452 Simultaneous Linear Differential Equations


Example 25 Find a complete solution the following system:

(2 D + 11)x + (D + 3) y + (D 2)z = 14et

(114)

(D 2)x + (D 1) y + Dz

(115)

= 2et

(D + 1)x + (D 3) y + (2 D 4)z = 4et

(116)

Solution:

2 + 11 + 3 2
2 1
= 0

+ 1 3 2 4
3 + 62 + 11 + 6 = 0

1 = 1 , 2 = 2 , and 3 = 3
For 1 = 1

9a + 2b 3c = 0

3a 2b c = 0
4b 6c = 0
Let c = c1

b =

3
c1
2

4
x
1 t
X 1 = y = c1 9 e
z 6 6


For 2 = 2
7 a + b 4c = 0

4a 3b 2c = 0
a 5b 8c = 0

a =

2
c1
3

Chapter Eleven

453
After simplification of the above equation we get the following:
Let c = c2 b =

30
14
c2 and a = c2
17
17

x
14
1

X 2 = y = c2 30
z 17 17

For 3 = 3

5a 5c = 0
Let a = c = c3

5a 4b 3c = 0
b = 2c3
1
x


X 3 = y = c3 2 e 3t
1
z

14e t

Q f (t ) = 2et

t
4e

= 1
13a + 4b c = 14
a

+ c = 2

2a 2b 2c = 4
After simplification of the above equation we get the following:

a = 1, b = 0 , and c = 1

Simultaneous Linear Differential Equations

454

x 1

X 4 = y = 0 e t
z 1

X = X1 + X 2 + X 3 + X 4
Example 26: Find a complete solution of each of the following
system:

(2 D + 1)x + (D + 2 )y = sin t
(3D + 1)x + (3D + 5) y = cos t

(117)
(118)

Multiply (117) by 3 then subtract the result equation from (118)


we get the following equation:

(3D 2)x y = cos t 3 sin t

(119)

Multiply (3) by (D + 2) ).

3D 2 8D 4 x (D + 2 ) y = 7 sin t cos t

(120)

Add (118) and (120).

(
)
(3D 2 + 6 D + 3)x = 6 sin t + cos t

3D 2 6 D 3 x = 6 sin t cos t
(121)

It is clear that (121) is a second order ordinary differential


equation and has the following solution:

xh (t ) = (c1 + c2t )e t
x p (t ) = A cos t + B sin t

xp (t ) = A sin t + B cos t

Chapter Eleven

455

xp (t ) = A cos t B sin t

3( A cos t B sin t ) + 6( Asi int + B cos t )


+ 3( A cos t + B sin t ) = 6 sin t + cos t

Coefficient of sin t = 6

6 = 3B 6 A + 3B
A = 1
Coefficient of cos t = 1

1 = 3 A + 6 B + 3 A

B = 1/ 6
x p (t ) = 1 / 6 sin t cos t

x(t ) = (c1 + c2t )e t + 1 / 6 sin t cos t


Substitute the value of x(t ) in equation (119) we get the
following equation:

(3D + 2 )x + y = 3 sin t cos t

y (t ) = 3 sin t cos t 3 (c1 + c2t )e t + c2 e t + 1 / 6 cos t + sin t

2 (c1 + c2t )e t + 1 / 6 sin t cos t


sin t cos t
y (t ) =
+
+ (c1 + c2t )e t 3c2 e t
3
2

456 Simultaneous Linear Differential Equations


Problems:
1- Find the characteristic values and the corresponding
characteristic vectors of each of the following matrix:

4 5 5
5 6 5

5 5 6
2- Find a complete solution of each of the following first order
systems. Also fiend the solution that satisfies the given condition
when one is given
a)

x1 = 3x1 + 2 x2
x2 = 2 x1 x2

3
x1 2 x2
2
b)
5
x2 = 2 x1 + x2
2
x1 =

c)

x1 = 3 x1 2 x2
x2 = 5 x1 3 x2

d)

x1 = 3 x1 + 2 x2
x2 = 2 x1 x2

e)

x1 = x1 x2
x2 = x1 + 3 x2

f)

x1 = 2 x1 + x2
3
X (0 ) =
x2 = 3x1 + 2 x2 + 2 sin t
4

Chapter Eleven

x1 = 3 x1
2 x3
3
g) x2 = x1 + 2 x2 + x3 , X (0 ) = 1
3

x3 = 4 x1
3 x3

x1 = 4 x1 2 x2 10 x3
3
X (0 ) = 2
x2
h) x2 =
1
x3 = 2 x1 x2 5 x3

x1 = x1 2 x2 x3
i) x2 = x1 + 2 x2 + e t
x3 = x1 3x2 1
3- Find a complete solution of each of the following system:
a)

(2 D + 1)x + (D + 2) y = 0
(D + 3)x + (D + 6) y = 3et

b)

(2 D + 1)x + (D 1) y = 3 cos t
(D + 2)x + (D + 3) y = 5 sin t

c)

(2 D + 1)x + (D + 2) y = 6et
(D + 2)x + (D + 4) y = 4e t

2t
d) (D + 5)x + (D + 7 ) y = 4e
(2 D + 1)x + (3D + 1) y = 0

e)

(2 D + 1)x + (D 2 + 6 D + 1)y = 0
(D + 2)x + (D 2 + 2 D + 5)y = 6 2t

457

458

Simultaneous Linear Differential Equations

f)

(2D 2 + 5)x + (D 2 + 3)y = 8 sin 3t


(D 2 + 7)x + (D 2 + 5)y = 8 sin 3t

g)

(2 D + 1)x + (D + 1) y = 0
(D 2)x + (D 1) y = 0

h)

(D + 5)x + (2 D + 1) y = e t + et
(D + 7 )x + (3D + 1) y = 0

i)

(D + 5)x + (D + 7 ) y = 2et
(2 D + 1)x + (3D + 1) y = et

j)

(2 D + 1)x + (D + 2) y = e t
(3D 7 )x + (3D + 1) y = 0

k)

(2 D + 1)x + (D + 2) y = 8e t

(D 2 + D + 9)x + (D 2 2D + 12)y = 6

l)

(3D + 1)x + (D + 7 ) y = e t
(2 D + 1)x + (D + 5) y = e t

m)

(D + 1)x + (D + 2) y = et
(3D + 1)x + (4 D + 7 ) y = 7et

n)

(D + 2)x + (D + 3) y = 4
(2 D 6)x + (3D 4) y = 2

o)

(D + 1)x + (D + 2) y = t + 1
(5D + 1)x + (6 D + 3) y = 2t + 1

Chapter 12
Special Functions
12.1 Gamma Function
The Gamma function (q ) is defined by the following integral

(q ) = x q 1e x dx , Where q>0

(1)

Some basic formulas for Gamma function are included in the


appendix.
One of the most important formulas of Gamma function is the
recursion or recurrence formula for the Gamma function.

(q + 1) = q(q)
Proof:

(2)

(q + 1) = x q e x dx
0

By integration by parts we obtain:

(q + 1) =

e x x q
0

+ q x q 1 e x dx = q(q )
0

In case of q is positive integer, then:

(q + 1) = q!

q = 1, 2, 3, 4,........

(3)

This shows that the Gamma function may be regarded as a


generalization of the factorial function.

460

Special Functions

(1)

Example 1 Find

Solution: (1) = x11 e x dx = e x


0

=1

(1 / 2)

Example 2 Find
Solution:

(1 / 2) = x (1 / 2 )1e x dx

(4)

Assume x = u 2

dx = 2u du and substitute in (4) , we get:

(1 / 2) = 2 e u du

(5)

We can say that: (1 / 2) = 2 e v dv

(6)

Multiply each term of (5) and (6) , we get:

((1 / 2) )

= 2e

u 2

du * 2 e v dv

(7)

((1 / 2) )2 = 4 e (u

+v2 )

du dv

(8)

00

Changing to polar coordinates


Where, u = r cos and v = r sin , then (8) becomes:

((1 / 2) )

/2

=4

0 0

r 2

r dr d = 4 * / 2 e r r dr

((1 / 2) ) = 4 * / 2 e
2

r 2

1 r 2
r dr = 2 * e (2r ) dr
20

461

Chapter Twelve

((1 / 2) ) = e
2

r 2

(1 / 2) =
Example 3 Find

(9)

(7 )
2(4)

Solution

(7 )
6!
=
= 60
2(4) 2 * 3!
Example 4 Find (4.8)
Solution:

(4.8) = 3.8 * 2.8 * 1.8(1.8)


From the Gamma function table (shown below) we get:

(4.8) = 3.8 * 2.8 * 1.8 * 0.9314 = 17.8382

q
1.00
1.05
1.10
1.15
1.20
1.25
1.30
1.35
1.40
1.45
1.50

(q)
1.0000
0.9735
0.9514
0.9330
0.9182
0.9064
0.8975
0.8912
0.8873
0.8857
0.8863

q
1.55
1.60
1.65
1.70
1.75
1.80
1.85
1.90
1.95
2.00

(q)
0.8889
0.8935
0.9001
0.9086
0.9191
0.9314
0.9456
0.9618
0.9799
1.0000

462

Special Functions

Example 5 Find (5.5)


Solution:

(5.5) = 4.5 * 3.5 * 2.5 * 1.5 * 0.5 (0.5)


= 4.5 * 3.5 * 2.5 * 1.5 * 0.5 * = 52.3428
In case of q<0 (negative), equation (3) can be used
Example 6 Find (3.4)
Solution:

( 0.4 )
( 2.4 )
( 1.4 )
=
=
( 3.4)( 2.4) ( 3.4)( 2.4)( 1.4)
3. 4
(0.6 )
=
( 3.4)( 2.4)( 1.4)( 0.4)
(1.6 )
=
( 3.4)( 2.4)( 1.4)( 0.4)(0.6)
0.894
=
= 0.32607
( 3.4)( 2.4)( 1.4)( 0.4)(0.6)

(3.4) =

Example 7 Find (2)


Solution:

(2) =

(1)
( 0)
=
=
( 2) 2 * 1

For any integer n the following formula can be used

(2n )!
1

n + = 2 n *
2 2
n!

(10)

463

Chapter Twelve

Proof:
1
1
3
5 3 1 1

n + = n n n ..... *
2
2
2
2 2 2 2

3 1
2n 1 2n 3 2n 5
=

...... * *
2 2
2 2 2

=
=
=
=

(2n 1)(2n 3)(2n 5).....3 *1

(2n )(2n 1)(2n 2 )(2n 3)(2n 4)(2n 5).....3 * 1


2n

(2n )(2n 2)(2n 4)......4 * 2

(2n )(2n 1)(2n 2 )(2n 3)(2n 4 )(2n 5).....3 *1


22n

(n )(n 1)(n 2)......2 *1

(2n )!

2 2n (n )!

Example 8 Find (3.5)


Solution

1
(2n )!

Q n + = 2 n
(n )!
2 2

1
(6)! 15

(3.5) = 3 + = 6
=
2 2 (3)!
8

Example 9 Evaluate the following integral:

3 x

dx

464

Special Functions

Solution:

3 x

dx = x 4 1e x dx = (4) = 3! = 6
0

Example 10 Evaluate the following integral


Solution: Let 2 x = y , 2dx = dy

6 2x

dx

Substitute in the required integral we get:

6 2x

dy 1
1
6!
45
y
dx = e y
= 7 ( y )6 e y dy = 7 (7) = 7 =
2
2 2 0
8
2
2
0

x 6 e 2 x dx =
0

45
8

Example 11 Evaluate the following integral

x
e dx

Solution:
Let t = x 4 , x = t1 / 4 ,

1
dx = t 3 / 4 dt
4

Substitute in the integral, we get

x
e

1
1 +
1
1 1 1 4
dx = t 3 / 4e t dt = =
40
4 4 4 1

4
= (1.25) = 0.96785

e x dx = 0.96785
0

465

Chapter Twelve

Example 12 Evaluate the following integral


1

Ln( x ) dx

Solution:
Assume Ln( x ) = t ,

x = e t , dx = e t dt

x = 0 t =
x =1
t = 0

When,

Substitute in the above integral we get:


1

Ln( x ) dx =

t e

) dt = (t )1 / 2 (et ) dt

= (3 / 2 ) =

1 1

=
2 2
2

Example 13 Evaluate the following integral

4 x

dx

Solution:
Assume u =

x = u2

dx = 2udu
Then at x = 0,

x=

u = 0 and

u=

466

Special Functions
4

x e

dx =

(u

2 1 / 4 u

(2udu ) = 2 u 3 / 2e u du
0

It is clear the above integral is in the form of Gamma function,


where,

q 1 = 3 / 2

4 x e

q = 5/ 2
x

dx = 2(2.5)2 * 1.5 * 0.5 * (0.5)

dx = 2.65868

4 x e
0

Example 14 Evaluate the following integral

x3

dx

Solution:
Assume x 3 = u x = u1 / 3

1
dx = u 2 / 3du
3
Substitute in the above integral we get the following:

x3

e
0

x3

dx = e u u 2 / 3du
3

0
1 2 / 3 u
dx = u
e du
30

467

Chapter Twelve

It is clear the above integral in the form of Gamma function, where,

q 1 = 2 / 3 , q = 1 / 3
3
1
1 (4 / 3)
e x dx = (1 / 3) =
= 0.8933
3
3
1
/
3

Example 15 Evaluate the following integral

x 3

x dx

Solution:
x
It is clear that 3 x = e ln 3 = e x ln 3 = e x e ln 3 = 3e x

x 3

x dx = 3 e x x 3dx
0

It is clear that the above integral is in the form of Gamma function,


where,

q 1 = 3

q = 4

3 x x 3dx = 3(4 ) = 18
0

Example 16 Evaluate the following integral

(x e
e

Solution:

)dx

468

Special Functions

Assume e x = u

e x dx = du
dx =

du
e x

du
u

At x =

u = 0 and,

At x =

u = and,

(
x e )
ln (u ) u du
ln (u ) u du
e
dx = e
e

= e
x

(
x e )
e
dx = u 2 e u du
x

It is clear that the above integral is in the form of Gamma function,


where,

q a = 2 q = 1

( 1) =

(x e
e

(0 )
=
1

)dx =

469

Chapter Twelve

12.2 Beta Function


Beta function B (m, n ) is defined by:
1

B (m, n) = x m 1 (1 x )n 1 dx

(11)

Where m > 0 , n > 0

Beta function has the following relation with Gamma function:

( m) ( n )
( m + n)

B(m, n) =

(12)

Proof

Q (m) = t m 1e t dx

(13)

Substitute in equation (13) for t = x 2 , dt = 2 xdx

(m) = x 2m 2e x 2 x dx

(14)

= 2 x 2 m 1e x dx
0

Similarly,

(n) = 2 y 2 n 1e y dy
0

Multiply both sides of (14) and (15) we get:

(15)

470

Special Functions

(m) (n) = 4 x 2 m 1 y 2 n 1e ( x

+ y2 )

dx dy

00

Change the double integral from cartesian to polar form, then:

x = r cos ,

y = r sin , x 2 + y 2 = r 2 , dx dy = rdr d
/ 2

( m) ( n) = 4

2 m 1
2 n 1 r
(r cos ) (r sin ) e

0 0

2 m + 2 n 2 r 2

e 2r dr
(m) (n) = (r )
0

/2

*2 (cos )2 m 1 (sin )2 n 1 d
0

2( m + n 1) r 2

(m) (n) = (r )
e
dr 2
0

/2

*2 (cos )2 m 1 (sin )2 n 1 d

0
( m + n 1) t

( m) ( n) = t
e dt
0

/2

*2 (cos )2 m 1 (sin )2 n 1 d
0

(m) (n) = (m + n) * B(m, n)


B ( m, n ) =

( m) ( n)
( m + n)

r dr d

471

Chapter Twelve

For all m and n we have:

B (m, n) = B (n, m)

(16)

Proof:

Substitute in (1) by

1 x = t , Then x = 1 t ,

dx = dt

x = 0 t =1
x =1 t = 0
So we have
1

B ( m, n ) = x

m 1

(1 x )

0
1

n 1

dx = (1 t )m 1 (t )n 1 ( dt )
1

= (t )n 1 (1 t )m 1 (dt ) = B (n, m)
0

B(m, n) = B(n, m)
Example 17 Evaluate the following integral
1

3
4
x (1 x ) dx

Solution:
1

(5) * (4) 4!*3!


1
3
4
x (1 x ) dx = B(5,4) = (9) = 8! = 280

472

Special Functions

Example 18 Evaluate the following integral


4

1/ 2
2
t (4 t ) dt

Solution
4

t (4 t )

1/ 2

1/ 2

t
dt = 2 t 1
4
0

dt

Assume x = t / 4 the t = 4 x, and dt = 4dx

t =0 x=0
t = 4 x =1
4

t (4 t )

1/ 2

dt = 2 (4 x )2 (1 x )1 / 2 4dx
0

= 2 * 4 * 4 ( x )2 (1 x )1 / 2 dx
2

(3) * (3 / 2)
3
= 2 7 * B 3, = 2 7
(9 / 2)
2
= 27

2!*[1 / 2 * (1 / 2)]
= 19.505
[7 / 2 * 5 / 2 * 3 / 2 * 1 / 2 * (1 / 2)]

Example 19 Evaluate the following integral


2

(8 x3 ) dx

Solution:
2

(8 x )
3

x 3
dx = 2 x1 dx
2
0

473

Chapter Twelve
3

x
Assume that = u , then x = 2 u1 / 3
2
x = 0, u = 0 And x = 2, u = 1
1
0

1/ 3 2

I = 2 * 2u1 / 3 (1 u )
I=

u
3

2 / 3

du

1/ 3
8 1 1 / 3
(
)
u
1

u
du
3 0

2 4

8 2 4 8 3 3
I = B , =
3 3 3 3
(2 )
4
= (1.333)
3
We know that (1.3) = 0.8975 and (1.35) = 0.8912
0.8975

0.0063
x
0.8
912
0.02

1.3

1.33

1.35

474

Special Functions

from the figure shown above

x
0.02
=
0.0063 0.05

x = 0.0021
(1.33) = 0.8912 + x = 0.8912 + 0.0021 = 0.8933
The same way

5
= (1.6667 ) = 0.903
3
Also,

2 3 5 3
= = * 0.903 = 1.3545
3 2 3 2
2

(8 x3 ) dx = 83 * 0.89331*1.3545 = 3.2266

Example 20 Evaluate the following integral

x 3 1 x 2 dx

Solution:

Assume x 2 = u , x = u and,
1

x3

x3

0
1
0

dx =

1 1 / 2
u
du
2

(1 x ) dx = (u1/ 2 )1/ 2 (1 u )1/ 3 12 u 1/ 2du


2

(1 x )
2

1 1 1 / 4
(1 u )1 / 3 du
dx = u
20

475

Chapter Twelve

It is clear that the above integral is in the form of Beta function,


where,

m 1 = 1 / 4 and n 1 = 1 / 3
m = 3 / 4 and n = 4 / 3

x 3 1 x 2 dx =
0

1 3 4 1 (3 / 4 ) * (4 / 3)
B , =
= 0.527
2 4 3 2
(25 / 12 )

Example 21 Evaluate the following integral:

dx

x 4 + x2

Solution:

Assume u

4
4 + x2

x2 =

4
4
u

1/ 2

x = 4
u

dx = 2u

2 4

4
u

1 / 2

At x = 0 ,

u = 1 , and,

At x = ,

u=0

dx

x 4 + x2

du

1 / 2 1 / 2

= 4
u

2 4
2u 4
4
u

1 / 2

du

476

Special Functions

dx

x 4+ x

dx

x 4 + x2

21
4

= u 1 4
40
u

x 4 + x2

2 1 1 4

= u 4
40
u

dx

dx

x 4+ x

3 / 4

3 / 4

1 1 1 4

du = u (1 u )
20
u

11
4

du = u 1 (1 u )
20
u

3 / 4

du

3 / 4

du

1 3 / 4 1 1 3 / 4
= 4
u u (1 u ) 3 / 4 du

2
0

1
2*4

3/ 4

1 / 4

(1 u ) 3 / 4 du

It is clear that the above integral is in the form of Beta function,


where,

m 1 = 1 / 4 and n 1 = 3 / 4

m = 3 / 4 and n = 1 / 4

dx

x 4 + x2
dx

x 4 + x2
dx

x 4+ x

B (3 / 4,1 / 4 )

= 0.785398

2 * 43 / 4

(3 / 4 ) * (1 / 4 )
2 * 43 / 4 (1)

(1.75) * (1.25)
2 * 43 / 4 * 0.75 * 0.25

0.9191 * 0.9064
2 * 43 / 4 * 0.75 * 0.25

Example 22 Evaluate the following integral:


1

Ln x dx

477

Chapter Twelve

Solution:

1
Assume ln = u
x
x =

1
eu

ln x = u or

= eu

1
= eu
x

dx = e u du

At x = 0 u = and
At x =

u=0

( )

1
Ln dx = u eu du = ue u du
x

0
0
It is clear that the above integral is in the form of Gamma function,
where,

q 1 = 1 q = 2
1

1
Ln dx = (2 ) = 1(1) = 1
x
0
Problems

(I) Evaluate the following Gamma functions

(6.4 ) ,

( 4.3) ,

( 2 )
(4.5) (2.3)

( 2 ),

(0.7 ),

(II) Evaluate the following integrals


1

1)

dx
1 x

2)

x3

(1 x ) dx
2

3)

q x

dx

Chapter 13
Numerical Analysis.
13.1 Numerical Solution Of Equations
13.1.1 Introduction
Equations of various kinds arise in a range of physical applications
and a substantial body of mathematical research is devoted to their
study. Some equations are rather simple: in the early of our
mathematical education we all encountered the simple linear
equation ax + b = 0 , where a and b are real numbers and a 0 ,
whose solution is given by the formula x = b / a . Many equations,
however, are nonlinear: a simple example is ax 2 + bx + c = 0 ,
involving a quadratic polynomial with real coefficients a, b, c . The
two solutions to this equation, labeled x1 and x2 , are found in terms
of the coefficients of the polynomial form the familiar formulae:

b + b 2 4ac
,
x1
2a

b b 2 4ac
x2
2a

It is easy likely that you have seen the more intricate formula for the
solution of cubic and quadratic polynomial equations. But
unfortunately there is no any closed formula for finding roots for 5th
order polynomial or any nonlinear equations.
Our goal is to develop simple numerical methods for the
approximate solution of the equation f ( x ) = 0 . Methods of the kind

Chapter Thirteen

479

discussed here are iterative in nature and produce sequences of real


numbers, which in favorable circumstances, converge to the
required solution.
13.1.2 Simple Iteration Method
In this method, we rearrange the function f ( x ) = 0 so that x has to
be in separate side of the equation, so that x = g ( x ) where

f ( x ) = g ( x ) x . Then we chose a starting value for x = xo and


compute x1 , x2 ,......xn for the following relation:

xn +1 = g ( xn )

(3)

The solution of f ( x ) = 0 is called fixed point of g ( x ) . Let us


illustrate this method with the following example.
Example 1 Find the solution of the following equation by using
simple iteration method: f ( x ) = x 2 3 x + 2 = 0
Solution: We know the solution of this equation is 1, 2. So, we
can watch the error in each iteration process. The equation can be

x2 + 2
rearranged to be like this: x =
3
If we chose x0 = 0 , then we can do the following iterations:

x02 + 2
x1 =
= 0.666 666 666
3

480 Numerical Analysis

x12 + 2
x2 =
= 0.814 814 815
3
x22 + 2
x3 =
= 0.887 974 394
3
x32 + 2
x4 =
= 0.929 499 508
3
and so on till

x10

x92 + 2
=
= 0.994 366 675
3

The results are very clear, where are going to the first root x = 1 .
To get the other root, assume x0 = 5 .

x02 + 2
x1 =
= 9.0
3
x12 + 2
x2 =
= 27.666 666 667
3
x22 + 2
x3 =
= 255.814 815
3
It is clear that, these results diverge and we can not get the solution.
If we use another value for x0 to be between 1 and 2 the results will
converge to the same root x = 1 . Then we have to try to rearrange
our equation in different manner as following:

x = 3x 2

481

Chapter Thirteen

It is clear, we can not assume xo <

2
because of the root will give
3

us imaginary part. So, chose x0 = 1.5

x1 = 3x0 2 = 1.581 138 83


x2 = 3 x1 2 = 1.656 326 202
x3 = 3 x2 2 = 1.723 072 433
x4 = 3 x3 2 = 1.780 229 56
and so on till

x10 = 3 x9 2 = 1.954 534 710


It is very clear that the results going to the second solution x = 2 .
Let us see if we choose x0 = 3 in the previous example

x1 = 3 x0 2 = 2.645 751 31
x2 = 3 x1 2 = 2.436 648 09
x3 = 3 x2 2 = 2.304 331 634
x4 = 3 x3 2 = 2.216 527 668
and so on till

x10 = 3x9 2 = 2.034 098 753


It is clear also these results will converge also to the second root

x = 2.
Convergence theory:

482 Numerical Analysis


Let x = x0 be chosen starting point for iteration. Then, if

g ( x0 ) < 1 , then the iteration process defined by (3) converges.


Let us check the previous example

x2 + 2
Q x = g (x ) =
3
g ( x ) =

2x
3

The assumption x0 = 0 gives g ( x0 ) < 1 then this assumption


converges as shown before. But when we chose

g ( x0 ) =

10
> 1,
3

so

divergence

occurs.

x = g (x ) = 3x 2
g ( x ) =

3
<1
2 3x 2

9
< 3x 2
4
3x >

9
2
4

x >

9 2

12 3

x >

1
12

So, x must be greater than

1
for convergence.
12

Also

xo = 5
when

483

Chapter Thirteen

13.1.3 Bisection Method


As we know the root of any function is the intersection of the graph
of the function with x axis . So, it is clear that f ( x ) changes its sign
on after and before the root point. This means that if f ( x ) is a
continuous on the interval between point a and b and f (a ) and

f (b ) have opposite signs, then there is at least one real root


between those two points.
Suppose f ( x ) is continuous on [a, b] and f (a ) and f (b ) have
opposite signs, i.e.,

f (a ) * f (b ) < 0 then there exists a root

x* (a, b ) . To find an approximation of x* (a, b ) , we proceed as


follows:
First, assume, for demonstration purposes, that a0 = a and

b0 = b and divide the interval to half by at the point c0 as


following:

c0 =

a0 + b0
2

So, c0 is the midpoint of the interval [a0 , b0 ] , then compute

f (c0 ) . If f (c0 ) = 0 then the point c0 is the required root and


there is no any other computation needed. If f (c0 ) 0 , then the
sign of f (c0 ) consides either with the sign of f (a0 ) or with the
sign of f (b0 ) . Thus at the end points of one of the two intervals

484 Numerical Analysis

[a0 , c0 ] or [c0 , b0 ] the function f (x ) has the same signs and at


the end points of the other opposite signs. We retain the interval
at the end points of which f ( x ) has opposite signs and reject the
other interval since it does not contain the required root. We
denote the retained interval by [a1 , b1 ] , where

c0 sign f (a0 ) = sign f (c0 )


a1 =
a0 sign f (a0 ) sign f (c0 )

(4)

c0 sign f (b0 ) = sign f (c0 )


b1 =
b0 sign f (b0 ) sign f (c0 )

(5)

Obliviously,

signs

of

f (a1 ) = sign f (a0 )

and

sign

of

f (b1 ) = sign of f (b0 ) . Therefore, f (a1 ) * f (b1 ) < 0 . The desired


root is now on the interval [a1 ,b1 ] which is of half length.
Further we proceed in similar way. Suppose we have found some
interval [ak , bk ] [a, b] at the end points of which the function

f ( x ) has opposite signs and, consequently, which contains the


desired root x* . We fiend the midpoint of the interval [ak , bk ] :

ck =

ak + bk
2

and compute f (ck ) . If f (ck ) = 0 then x* = ck . The computation


have come to an end. If f (ck ) 0 , then we set the following:

Chapter Thirteen

485

ck sign f (ak ) = sign f (ck )


ak +1 =
ak sign f (ak ) sign f (ck )

(6)

ck sign f (bk ) = sign f (ck )


bk +1 =
bk sign f (bk ) sign f (ck )

(7)

And so forth. This process may be finite if the midpoint of the


interval obtained at some step coincide with the desired root x* ,
otherwise this process is infinite. Fig.1 shows several initial steps. If
the computations are continued to the kth step, then it is natural to
take ck as an approximate value for the desired root x* . Hence, the
obvious error estimate is valid:

x * ck

ba

(8)

k +1

a = a0

a1
a2

a3

b3

b2

b = b0
b1

Fig.1 Several initial steps using bisection method.

486 Numerical Analysis


Example 2 Find the solution of the following equation by using
bisection method: f ( x ) = x 2 3 x + 2 = 0
Solution:

If

we

look

to

the

previous

f (x ) = x 2 3x + 2 = 0
Assume a0 = 0 , and, b0 = 1.5

f (a0 ) = 2 , and, f (b0 ) = 0.25


f (a0 ) * f (b0 ) < 0

a0 + b0 0 + 1.5
=
= 0.75
2
2
f (c0 ) = 0.3125

c0 =

It is clear that sign of f (c0 ) is the same as the sign of f (a0 )

a1 = c0 = 0.75 , and, b1 = b0 = 1.5

f (a1 ) = 0.3125 , and, f (b1 ) = 0.25


f (a1 ) * f (b1 ) < 0

c1 =

a1 + b1
= 1.125
2

f (c1 ) = 0.109 375


It is clear that sign of f (c1 ) is the same as the sign of f (a1 )

a2 = a1 = 0.75 , and, b2 = c1 = 1.125


f (a2 ) = 0.3125 , and f (b2 ) = 0.109 375

c2 =

a2 + b2 0.75 + 1.125
=
= 0.937 5
2
2

example

487

Chapter Thirteen

f (c2 ) = 0.066 406 25


It is clear that sign of f (c2 ) is the same as the sign of f (a2 )

a3 = c2 = 0.937 5 , and, b3 = b2 = 1.125


f (a3 ) = 0.066 406 25 , and, f (b3 ) = 0.109 375

c3 =

a3 + b3
= 1.031 25
2

f (c3 ) = 0.030 273 438


The process continues until we get the required error. The results
will be tabulated in Table(1).
Table(1) The results for Example 2.
i

f(a)

f(b)

f(c )

0 0.000000 1.500000 0.750000 2.000000 -0.250000 0.312500


1 0.750000 1.500000 1.125000 0.312500 -0.250000 -0.109375
2 0.750000 1.125000 0.937500 0.312500 -0.109375 0.066406
3 0.937500 1.125000 1.031250 0.066406 -0.109375 -0.030273
4 0.937500 1.031250 0.984375 0.066406 -0.030273 0.015869
5 0.984375 1.031250 1.007813 0.015869 -0.030273 -0.007751
6 0.984375 1.007813 0.996094 0.015869 -0.007751 0.003922
7 0.996094 1.007813 1.001953 0.003922 -0.007751 -0.001949
8 0.996094 1.001953 0.999023 0.003922 -0.001949 0.000978
9 0.999023 1.001953 1.000488 0.000978 -0.001949 -0.000488
10 0.999023 1.000488 0.999756 0.000978 -0.000488 0.000244

488 Numerical Analysis


13.1.4 False Position Method
This method is similar to the Bisection Method, since the root is
bracketed by an interval. The idea is to use information at two
endpoints a and b to choose a better iterative value. We start with

[a, b] where f (a ). f (b ) < 0 . Join points (a, f (a )), (b, f (b )) by a line,


and let x1 be the intersection of the line with the x-axis as shown in
Fig.2. Then check the sign of f ( x1 ) . If f ( x1 ) f (a ) < 0 Take

[a, x1 ] as the new interval f (x1 ) f (a ) > 0

Take [x1 , b] as the new

interval and repeat

Fig.2 False Position method at starting position.

489

Chapter Thirteen

Again, we have a sequence of intervals [a1 , b1 ] , [a2 , b2 ] each


contains a root, however bn +1 an +1 is not necessarily equal to

bn an
.
2
Line joining (a, f (a )), (b, f (b )) :

y = f (a ) +

xa
( f (b ) f (a ))
ba

y = 0 x1 = a
c=

(9)

ba
af (b ) bf (a )
f (a ) =
f (b ) f (a )
f (b ) f (a )

af (b ) bf (a )
f (b ) f (a )

(10)

The following table (Table(2)) shows a comparison between


Bisection and False Position Methods.
Table(2) A comparison between Bisection and False Position
Methods.
Bisection

c=

a+b
2

average of a and b

False Position

c=

af (b ) bf (a )
f (b ) f (a )

Waited average of a and b

Does not use information about uses information about

f (x )

f (x )

which may give some idea of


where root is located.

490 Numerical Analysis


What is the convergence criterion? f ( x ) 1 , but this may be
impossible.

(xn xn 1 )
xn

2 but this may take a long time.

How fast does it converge? In general, False position may be better,


but there are exceptions. For locally convex functions, could be
slower than the bisection method. See Fig.3 picture of locally
convex function.

Fig.3 picture of locally convex function.


We can consider a speed-up for the False Position method. The
slow convergence of the False Position method is because the
update looks like

[a, b] [a, x1 ] [a, x2 ] [a, x3 ] ...


..[stationary ]
[a, b] [x1 , b] [x1 , x2 ] [x3 , x2 ] .....[non stationary ]

491

Chapter Thirteen

Example 3 Find the solution of the following equation by using


False Position method: f ( x ) = x 2 3 x + 2 = 0
Solution:
Applying the above methodology to the above equation we get the
result shown in Table(3):
Table(3) The result of Example 3.
i

f(a)

f(b)

f(x )

0 0.000000 1.500000 1.333333 2.000000 -0.250000 -0.222222


1 0.000000 1.333333 1.200000 2.000000 -0.222222 -0.160000
2 0.000000 1.200000 1.111111 2.000000 -0.160000 -0.098765
3 0.000000 1.111111 1.058824 2.000000 -0.098765 -0.055363
4 0.000000 1.058824 1.030303 2.000000 -0.055363 -0.029385
5 0.000000 1.030303 1.015385 2.000000 -0.029385 -0.015148
6 0.000000 1.015385 1.007752 2.000000 -0.015148 -0.007692
7 0.000000 1.007752 1.003891 2.000000 -0.007692 -0.003876
8 0.000000 1.003891 1.001949 2.000000 -0.003876 -0.001946
9 0.000000 1.001949 1.000976 2.000000 -0.001946 -0.000975
10 0.000000 1.000976 1.000488 2.000000 -0.000975 -0.000488

492 Numerical Analysis


13.1.5 Illinois Method
The Illinois method (or modified position method) is to use

1
2i 1

f (c ) instead of f (c ) if c is a stagnant end point has been

repeated twice or more, where i is the number of times the end


point has been repeated. See Fig.4 A picture of the Illinois method.
This modification markedly improves the rate of convergence of the
method in general.

Fig.4 A picture of the Illinois method.


Example 4 Find the solution of the following equation by using
Illinois method: f ( x ) = x 2 3 x + 2 = 0

493

Chapter Thirteen

Solution: Applying the Illinois methodology to the above equation


we get the result shown in Table(4):
Table(4) The result of Example 4.
i

f(a)

f(b)

f(x )

0 0.000000 1.500000 1.333333 2.000000 -0.250000 -0.222222


1 0.000000 1.333333 1.200000 2.000000 -0.222222 -0.160000
2 0.000000 1.200000 1.034483 1.000000 -0.160000 -0.033294
3 0.000000 1.034483 0.969900 0.500000 -0.033294 0.031006
4 0.969900 1.034483 1.001043 0.031006 -0.033294 -0.001041
5 0.969900 1.001043 1.000030 0.031006 -0.001041 -0.000030
6 0.969900 1.000030 0.999971 0.015503 -0.000030 0.000029
7 0.999971 1.000030 1.000000 0.000029 -0.000030 0.000000

13.1.6 Newtons Method


Although the Bisection method is easy to compute, it is slow. Now,
we will consider more interesting methods of root-finding. The first
two methods are local methods, and the last, which will be discussed
in next class, is a global method. All the methods are based on using
lines to get better iterative approximations for the root of a function.
One of the most widely used methods is Newtons method.
Originally, Newton used a similar method to solve a cubic equation.
It has since been extended to differential equations. Over a very

494 Numerical Analysis


small interval, most functions can be locally approximated by a line.
This idea is the basis of Newtons method.
The idea is to start with an initial guess for the root, x1 . Then
draw a line tangent to the function at the point ( x1 , f ( x1 )) . The
tangent lines intersection with the x -axis is defined to be x2 . We
repeat this process to get x1 , x2 , x3 , ........ . See Fig.5 for example of
Newtons Method.

Fig.5 Example of Newtons Method.


Why a tangent line? If the function f ( x ) is a linear function, i.e.,

f ( x ) = ax + b then y = f ( x ) is a line. If we start off with any guess


x1 , the tangent line at ( x1 , f ( x1 )) agrees with y = f ( x ) . Therefore,
x2 = x* . I.e., for linear functions, Newtons method yields an exact
solution after one iteration.

495

Chapter Thirteen

Now, if f ( x ) is any function, we may approximate if by a linear


function.

At

the

point

(x1 , f (x1 )) ,

Taylor

expansion:

f ( x ) f ( x1 ) + f ( x1 )( x x1 ) + .......... See Fig.6 for picture of the


Taylor approx at a point x1 .

Fig.6 Picture of the Taylor approx at a point x1 .


Let f ( x ) F ( x ) = f ( x1 ) + f ( x1 )( x x1 ) which is linear. Instead of
looking for the root of f ( x ) = 0 look for a root of F ( x ) = 0 i.e.

f ( x1 ) + f ( x1 )( x x1 ) = 0

x = x1

f ( x1 )
this is the root of F ( x ) = 0
f ( x1 )

f ( x1 )
Regard it as a good approximation to x* . So, let x2 = x1
f ( x1 )
Repeating the process, we have
f ( xn )
(11)
xn +1 = xn
f ( xn )

496 Numerical Analysis

Notes regarding Newtons Method:


Need only one initial guess, whereas bisection needs a and b.
Need to compute the derivative f ( x )
Requires that

f ( x ) 0 in the neighborhood of

x* .

Otherwise, denominator blows up.


At each iteration evaluate f ( x ) and f ( x ) (two function

evaluations).
Example 5 Find the solution of the following equation by using

Newtons method: f ( x ) = x 2 3 x + 2 = 0
Solution:

Applying the Newtons methodology to the above equation we get


the result shown in Table(5):
Table(5) The result of Example 5.

xn

f(xn)

f '(xn)

0.000000000

2.000000000

-3.000000000

0.666666667

0.444444444

-1.666666667

0.933333333

0.071111111

-1.133333333

0.996078431

0.003936947

-1.007843137

0.999984741

0.000015259

-1.000030518

1.000000000

0.000000000

-1.000000000

497

Chapter Thirteen

13.1.7 Secant Method

In Newtons method, f ( x ) is needed. But f ( x ) may be difficult to


compute. May not ever know f ( x ) ; e.g. if f ( x ) is provided by a
subroutine.
Idea: do not compute f ( xn ) explicitly. Instead, approximate

f ( xn ) as follows:

f ( xn )

f ( xn ) f ( xn 1 )
xn xn 1

x n +1 = x n

x f ( xn ) xn f ( xn 1 )
f ( xn )
= n 1
f ( xn ) f ( xn 1 )
f ( xn ) f ( xn 1 )
xn xn 1

(12)
(13)

Fig.7 Picture comparing Newtons and Secant lines on a function.

498 Numerical Analysis

Fig.7 Picture comparing Newton and Secant lines on a function


(continue).
Example 6 Find the solution of the following equation by using

Secants method: f ( x ) = x 2 3 x + 2 = 0
Solution: Applying the Secants methodology to the above

equation we get the result shown in Table(6):

499

Chapter Thirteen

Table(6) The result of Example 6.

xn

f(xn)

0.000000000

2.000000000

0.500000000

0.750000000

0.800000000

0.240000000

0.941176471

0.062283737

0.990654206

0.009433138

0.999485332

0.000514933

0.999995237

0.000004763

0.999999998

0.000000002

1.000000000

0.000000000

Some comments:

Two initial guesses are needed, but does not require f (a ) * f (b ) < 0
unlike bisection. But there might be problems if the root lies outside
the convergence range.
Must have

f ( xn ) f ( xn 1 ) (similar to f ( x ) 0 in Newtons

method). I.e., a very flat function.


Another problem case might occur is a generated guess is the same
as a previous guess, resulting in the possibility of an infinite loop
that never reaches the root.

500 Numerical Analysis


13.2 Polynomial Interpolation

Suppose we have, n + 1 points

(x0 , y0 ), (x1, y1 ), (x2 , y2 ),.............. (xn , yn )


polynomial Pn ( x ) which passes through

and we need to find a


these points. Thus we

could estimate the values in between the given values. This is called
the interpolation of these given points. Fig.8 shows general example
of an interpolation.

Fig.8 General example of interpolation.


Suppose we were given two points {x0 , x1} and the values at those
points. We would draw a line as shown in Fig.9.

Fig.9 Linear example.

Chapter Thirteen

501

Suppose we were given three points {x0 , x1 , x2 }. We would draw a


parabola as sown in Fig.10.
So, for n = 1 , we have a line and for n = 2 , we have a parabola.
How about n + 1 points, {x0 , x1 , x2 , ............xn }? We would then
draw a n polynomial, Pn ( x ) .

Fig.10 Parabolic interpolation example.


Conditions:

( x0 , y0 ),
( x1, y1 ),
M

( xn , yn ),

Pn ( x0 ) = y0 a0 + a1 x0 + ....... + an x0n = y0
Pn ( x1 ) = y1 a0 + a1 x1 + ....... + an x1n = y1

Pn ( xn ) = yn a0 + a1 xn + ....... + an xnn = yn

In the above, a0 , a1 , ........, an are unknowns, and {xi } and {yi } are
known values. We can find the polynomial, if we solve the above
for a0 , a1 , ........, an

502 Numerical Analysis


Example 7 Find P1 ( x ) passing through ( x0 , y0 ) and ( x1 , y1 ) .
Solution:

P1 ( x )

has the form:

P1 ( x ) = a0 + a1 x

(14)

P1 ( x0 ) = a0 + a1 x0 = y0
a1 ( x0 x1 ) = y0 y1
P1 ( x1 ) = a0 + a1 x1 = y1
a1 =

y0 y1
x0 x1

if x0 x1

a0 = y0 a1 x0 = y0
P1 ( x ) =

y0 y1
x y x y
x0 = 0 1 1 0
x0 x1
x0 x1

x0 y1 x1 y0 y0 y1
+
x
x0 x1
x0 x1

(15)

If x0 = y0 = 0, x1 = y1 = 1, P1 ( x ) = x I.e., the polynomial P1 ( x ) = x


passes through (0, 0 ) and (1,1) . Is this the only possible solution?
Yes. Why?
Fact. For any given n + 1 points ( x0 , y0 ), ( x1 , y1 ),.............. ( xn , y n ) ,
if x0 , x1, ......., xn are distinct, i.e., xi = x j if i j then there exists
a unique interpolating polynomial Pn ( x ) of degree n i.e., there is a
unique

Pn ( x )

which

(x0 , y0 ), (x1 , y1 ),.............. (xn , yn ) .

passes
This

can

constructing a linear system of nth order equations.

be

through
proved

by

503

Chapter Thirteen

Example 8 If x0 , x1, ......., xn are distinct. Suppose we have a

polynomial Pn ( x ) of degree n, so that Pn ( xi ) = 0, i = 0, 1, 2, .......n .


What is Pn ( x ) ?
Solution:

Pn ( x ) = 0

i.e.,

interpolates

( x0 , 0), (x1, 0), ..........., ( xn , 0),

a0 = a1 = ....... = an = 0 .

Why?

Pn ( x ) = 0

and this is a unique

interpolation of the points.


Example 9 Suppose we have the following two points (2,3), (5,6).

Find a first order polynomial passing through those points.


Solution:

From (15)

P1 ( x ) =

x0 y1 x1 y0 y0 y1
x
+
x0 x1
x0 x1

P1 ( x ) =

2*6 5*3 3 6
+
x
25
25

P1 ( x ) = 1 + x
We can check if this equation passing through the given points or
not as following:

P1 (2 ) = 1 + 2 = 3 = y1
P1 (5) = 1 + 5 = 6 = y 2

504 Numerical Analysis


13.2.1 Lagranges Method and Lagrange Polynomials

Given distinct x0 , x1, ......., xn there is a unique polynomial of degree


n passing through

(x0 ,1), (x1 , 0), (x2 , 0),........, (xn , 0) l0n (x ) .See

Fig.11 for picture of l0n ( x ) .

Fig.11 Picture of l0n ( x )


In fact, we can construct a whole set of these polynomials, each
passing through 1 for a different xi value.
l0n ( x ) ( x0 , 1), ( x1 , 0 ), ( x2 , 0 ),........, ( xn , 0 )

l0n ( x0 ) = 1

l0n ( xi ) = 0, i 0

l1n ( x ) ( x0 , 0 ), ( x1 , 1), ( x2 , 0 ),........, ( xn , 0 )

l1n ( x1 ) = 1

l0n ( xi ) = 0, i 1

l2n ( x ) ( x0 , 0 ), ( x1 , 0 ), ( x2 , 1),........, ( xn , 0 )

l0n ( x2 ) = 1 l0n ( xi ) = 0, i 2

lnn ( x ) ( x0 , 0 ), ( x1 , 0 ), ( x2 , 0 ),........, ( xn , 1)

l0n ( xn ) = 1 l0n ( xi ) = 0, i n

A general short form for these polynomials is lin ( x ) where n is the

{ }

degree and i is the place in the set x j where it has value 1.

505

Chapter Thirteen

i j

0
lin ( x ) =
1

i= j

as an example for n = 1 . We have x0 , x1 such that:

l01 ( x0 ) = 1,

l01 ( x1 ) = 0

l11 ( x0 ) = 0, l11 ( x1 ) = 1
See Fig.12 for a picture of l01 ( x ) and l11 ( x ) .

Fig.12 A picture of l01 ( x ) and l11 ( x ) .


How to find l nj ( x ) ?

l0n ( x )

0
degree n n =
1

at x1 , x2 , ........, xn
at x0

Consider the following polynomial of degree n

qn ( x )

= ( x x1 )( x x2 ).....( x xn )
=

qn ( x )

at x1 , x2 , ........, xn

is almost l0n ( x ) but :

506 Numerical Analysis

qn ( x ) = ( x x1 )( x x2 ).....( x xn ) 1 in general. But

(x x1 )(x x2 ).....( x xn )
qn ( x )
=
qn ( x0 ) ( x0 x1 )( x0 x2 ).....( x0 xn )
and is a degree n polynomial.

l0n ( x ) =

(x x1 )(x x2 ).....(x xn )
qn ( x )
=
qn ( x0 ) ( x0 x1 )( x0 x2 ).....( x0 xn )

(17)

This polynomial interpolates ( x0 , 1), ( x1 , 0 ), .....( xn , 0 ) . Similarly,

lin ( x ) =

(x x0 )(x x1 ).....(x xi 1 )(x xi +1 ).......( x xn )


(18)
(xi x0 )(xi x1 ).....(xi xi 1 )(xi xi +1 ).....(xi xn )

j = 0 (x x j )
n

lin ( x ) =

j i
n
j =0
j i

(xi x j )

(19)

Interpolates ( x0 , 0 ), ( x1 , 0 ), ....., ( xi ,1), ......, ( xn , 0 )


Why Lagrange polynomials?
For a given ( x0 , y0 ), ( x1 , y1 ), ........, ( xn , y n ), consider

pn ( x ) = y0l0n ( x ) + y1l1n ( x ) + ........ + yn lnn ( x )


Where:
1. Pn ( x ) has degree n.
2. Pn ( xi ) = yi
In other words, Pn ( x ) is the interpolating polynomial for

( x0 , y0 ), ( x1, y1 ), ........, ( xn , yn )

507

Chapter Thirteen

13.2.2 Lagrange Formula

The interpolating polynomial for ( x0 , y0 ), ( x1 , y1 ), ........, ( xn , y n ) is


given by:

Pn ( x ) = y0l0n ( x ) + y1l1n ( x ) + ........ + y n lnn ( x ) =

yi lin (x )

(20)

i =0

provided xi x j , i j . What does this interpolating formula look


like? Consider n = 1
(x x1 ) + y x x0
(21)
P1 ( x ) = y0
(x0 x1 ) 1 x1 x0
13.2.3 Interpolating Functions By Polynomials.

If we have a complicated function f ( x ) as shown in Fig.13, we may


want to approximate it by a polynomial of degree n, Pn ( x ) . See
Fig.13 for a picture of general example.

Fig.13 A picture of general example.


How to approximate this function, f ( x ) ?

508 Numerical Analysis

We require Pn ( x ) and f ( x ) to have the same values at some given


set

{xi },

of

Pn ( xi ) = f ( xi ),

x0 , x1 , .........., xn .

i.e.

i = 0, 1, 2,........, n

Then, Pn ( x ) must interpolate ( x0 , f ( x0 )), ( x1 , f ( x1 )), .., ( xn , f ( xn )) .


Use the Lagrange formula,

Pn ( x ) =

f ( xi )lin (x )

i =0

This is a polynomial of degree n which interpolates f ( x ) at


x0 , x1 , .........., xn
Example 10 Suppose a function f ( x ) given by the following table

xi
f ( xi )

0
0
3

1
1
2

2
3
1

3
4
0

Find the interpolating polynomial and use it to approximate the


value of f (2.5) . Find the Lagrange polynomials.
Solution:

(x 1)(x 3)(x 4)
( 1)( 3)( 4)
(x 0)(x 3)(x 4)
l13 ( x ) =
(1 0)(1 3)(1 4)
(x 0)(x 1)(x 4)
l23 ( x ) =
(3 0)(3 1)(3 4)
(x 0)(x 1)(x 3)
l33 ( x ) =
(4 0)(4 1)(4 3)

l03 ( x ) =

509

Chapter Thirteen

2. Find interpolating polynomial.

P3 ( x ) = 3l03 ( x ) + 2l13 ( x ) + 1l23 ( x ) + 0l33 ( x )


P3 ( x ) = 3

P3 ( x ) =

(x3 8x 2 + 19x 12) + 2 (x3 7 x 2 + 12x) + (x3 5x 2 + 4 x)


12

( x3 + 6 x 2 17 x + 36)

12

3. Use P3 (2.5) to estimate f (2.5)

(
(2.5)3 + 6(2.5)2 17(2.5) + 36 )
P3 (2.5) =
= 1.281 25
12

f (2.5) 1.281 25
13.2.4 Newton Divided Differences

There are two problems with Lagranges form for the unique
interpolating formula:
1. It is expensive computationally.
2. If we have Pn ( x ) , we cant use it to find Pn +1 ( x )
The Lagrange formulation Pn ( x ) =

f (xi )lin (x ) is simple in form,

i =0

but it is difficult to compute the coefficients. So, we will look for


another form for Pn ( x ) . Note that we are not looking for another
polynomial, since there is only one unique interpolating polynomial.
What we are looking for? We are looking for another form to
express the same polynomial, that is easier to compute.

510 Numerical Analysis

Pn ( x ) = A0 + A1 ( x x0 ) + A2 ( x x0 )( x x1 ) + ....
+ An ( x x0 )( x x1 )......( x xn 1 )

(22)

And try to determine the coefficients A0 , A1 , A2 , ....... An

( xo , f (x0 ))
(x1 , f (x1 ))

(x2 , f (x2 ))

Pn ( x0 ) = f ( x0 )
Pn ( x1 ) = f ( x1 )

Pn ( x2 ) = f ( x2 )

A0 = f ( x0 )

(23)

f ( x1 ) = f ( x0 ) + A1 ( x1 x0 )

(24)

f ( x1 ) f ( x0 )
A
=
1
x1 x0

f ( x2 ) f ( x1 ) f ( x1 ) f ( x0 )

x2 x1
x1 x0
(25)
A2 =
x2 x0

New Notation:

We can note in the above expressions for A1 and A2 a relationship


in the forms of the expressions, which leads us to the following new
notation.

f [x0 ] = f ( x0 )
f [x0 , x1 ] =

f [x1 ] f [x0 ]
x1 x0

f [x0 , x1 , x2 ] =

f [x1 , x2 ] f [x0 , x1 ]
x2 x0

We call f [x0 , x1 ] =

A0 = f [x0 ]

(26)

A1 = f [x0 , x1 ]

(27)

A2 = f [x0 , x1 , x2 ]

(28)

f [x1 ] f [x0 ]
divided difference at [x1 , x2 ],
x1 x0

etc. Thus, the polynomial which interpolates:

511

Chapter Thirteen

( x0 , f (x0 )), (x1 , f (x1 )), ......., (xn , f (xn ))


can be written as:
Pn ( x ) = f [x0 ] + f [x0 , x1 ]( x x0 ) + f [x0 , x1 , x2 ]( x x0 )( x x1 ) + ....
........ + f [x0 , x1 ,...., xn ]( x x0 )( x x1 )..........( x xn 1 )
n 1

Pn ( x ) = Pn 1 ( x ) + f [x0 , x1 ,...., xn ] ( x xi )

(29)
(30)

i =0

Where,
f [ x0 ]

= f ( x0 )

f [x0 , x1 ]

f [x0 , x1 , x2 ]

f [x0 , x1 , ....., xi ]

f [x0 , x1 , ....., xi ]

f [x1 ] f [x0 ]
x1 x0

f [x1 , x2 ] f [x0 , x1 ]
x 2 x0

f [x1 , x2 ,...., xi ] f [x0 , x1 ,......xi 1 ]


xi x0

f [x1 , x2 ,...., xn ] f [x0 , x1 ,......xn 1 ]


xn x0

We can build a divided difference table very easily:


x0
x1
x2
x3
x4

f [x0 ]
f [x1 ]
f [x 2 ]
f [x3 ]
f [x 4 ]

f [x0 , x1 ]
f [x0 , x1 , x2 ]
f [x0 , x1 , x2 , x3 ]
f [x1 , x2 ]
f [x0 , x1 , x2 , x3 , x4 ]
f [x1 , x2 , x3 ]
f [x1 , x2 , x3 , x4 ]
f [x2 , x3 ]
f [x2 , x3 , x4 ]
f [x3 , x4 ]

Example 11 Find the interpolating function for the following table:


0
1
2
3
i
0
1
3
4
xi
2
1
0
f ( xi ) 3

512 Numerical Analysis

1. Find Newtons divided difference.


2. Find the interpolating function.
Solution:

1.

xi

f [xi ]

0
1

3
2

3
4

1
0

1
1/ 2
1

1/ 6
1/ 6

1 / 12

2.

P3 ( x ) = 3 + ( 1)( x 0 ) +

1
(x 0)( x 1) + 1 (x 0)(x 1)(x 3)
6
12

13.2.5 Finite Difference Errors

Consider if the points {xi } are evenly spaced. Let h be the fixed
distance between the points. Then we can define:

f ( xi ) = f ( xi + h ) f ( xi )
= f ( xi +1 ) f ( xi )

Or f i = f i +1 f i
This quantity is called the forward difference of f ( x ) at xi . Since
the points are evenly spaced, xi = x0 + ih,
For r 0 we can further define

i = 0, 1, 2, ......, n .

513

Chapter Thirteen

r +1 f i = r f i +1 r f i
With 0 f i = f i For example,

2 f i = (f i ) = ( f i +1 f i ) = f i +1 f i

= ( f i + 2 f i +1 ) ( f i +1 f i ) = f i + 2 2 f i +1 + f i

Now, let us consider the form of the Newton Divided Difference


with evenly spaced points.

f [x0 , x1 ] =

f1 f 0 1
= f 0
x1 x0 h

f [x0 , x1 , x2 ] =

f [x1 , x2 ] f [x0 , x1 ]
x2 x0

1 1
1

f1 f 0
2h h
h

1
= 2 2 f 0
2h
=

In general, and this can be easy proved via proof by induction,

f [x0 , x1 , ..., xk ] =

1
k! h k

k f 0

(31)

We can now modify the Newton interpolation formula to an


interpolation formula based on forward differences. Since the
polynomial is defined continuously, rather than with respect to the
discretely spaced points, we will define for the value x at which the
polynomial is defined,

x x0
h

(32)

514 Numerical Analysis

where is a continuous parameter.


Therefore,

x xi = x0 + h x0 ih = ( i )h
which leads to the following form for the interpolating formula

Pn ( x ) =

i i

i = 0

f0

(33)

where we have used the binomial coefficients

( 1)........( i + 1)
=
,
i
!
i

i>0

(34)

and = 1
0

(35)

For example, n = 1

P1 ( x ) = f 0 + f 0
As with Newton divided differences, we can easily construct tables
to evaluate the forward differences.

xi

fi

x0

f0

x1
x2
x3

f1
f2
f3

x4
M

f4
M

f i
f 0
f1
f 2
f 3

2 f i
2 f 0
2 f1

2 f 2

3 f i

3 f 0
3 f1

515

Chapter Thirteen

Example 12. Find the interpolating function for the following table

i
xi
f ( xi )

0
0
3

1
1
2

2
3
0

3
4
-1

. Find the forward differences.


. Find the interpolating function.
Solution:

1.
xi

fi

1
3

2
0

4
2.

f i
1
2
1

2 f i

3 f i

1
1

P3 ( x ) = 3 + ( 1)( ) + ( 1)

( )( 1) + (2) ( )( 1)( 2)

2
6
Note: forward differences of order greater than three are almost
entirely the result of differencing the rounding errors in the table
entries; therefore, interpolation in this table should be limited to
polynomials of degree less than four.
As you can see, there is nothing particularly special about forward
differences.
We can equally define backward difference interpolating functions
based on

f i = f i f i 1

(36)

516 Numerical Analysis


13.3 Numerical Integration

Quadrature comes from the process of squaring, of finding a


square equal in area to a given area, e.g., finding the area of a circle.
Now means numerical integration.
The problem is either
Given f ( x ) defined on [a, b] , and find

a f ( x )dx , or
x

Given f ( xi ) defined on {xi } , and find n f ( x )dx


x0
See Fig.14 for a generic example.

Fig.14 Picture of an example of an integration. The area of the


shaded region is the result of the integration.
Easy

example:

b
a

I = xdx =

b
a

I = Pn ( x )dx
b
a

1 2
b a2
2

Hard example I = e cos x dx = ?

or

more

generally

517

Chapter Thirteen

In many applications, if f ( x ) is complicated then

a f ( x )dx cannot

be calculated analytically must be approximated by a numerical


value
The approach:

1. Locally interpolate f ( x ) by a simple function g ( x ) , e.g., a


polynomial interpolation Pn ( x ) whose analytical integral is known.
2. Use the integral of the simpler function to approximate

b
a

f ( x )dx

locally, summing the local results as we move along.


Our goal is to get as accurate an answer as possible, with as few
function evaluations as possible.
Quadrature can be done with fixed or variable (adaptive) spacing.
13.3.1 Trapezoid Rule

The simplest polynomial approximation to a function is a piecewise


linear interpolation. See Fig.15.

Fig.15 Picture of a piecewise linear approximation to the function,


and the corresponding resulting integration.

518 Numerical Analysis

Consider a linear interpolation of f ( x ) between points xi and xi +1


Therefore,

xi +1
xi

f ( x )dx ( xi +1 xi )

f ( xi ) + f ( xi +1 )
2

So, if the step size is h, then the area of any trapezoid is

h
( f i + f i +1 )
2
The integral is thus approximately, for n + 1 points,

I ( f ) Tn ( f ) =

n 1h

2 ( fi +

i =0
h n 1

f i +1 )

n 1

= ( f i ) + ( f i +1 )
2 i =0

i =0

h
[( f 0 + f1 + f 2 + ..... + f n 2 + f n 1 ) + ( f1 + f 2 + ..... + f n 2 + f n )]
2
h
= [( f 0 + 2 f1 + 2 f 2 + ..... + 2 f n 2 + 2 f n 1 + f n )]
2

I ( f ) Tn ( f ) =

n 1

+
+
f
2
f
f
0
i n
2
i =1

(37)

Where f 0 = f (a ) and f n = f (b )
Discretization Error

To perform the integration using the Trapezoid Rule, we are


approximating f ( x ) on [x0 , x1 ] by a first-order polynomial P1 ( x ).
Thinking of this as a Taylor expansion about x0 , we know that

519

Chapter Thirteen

f ( x ) = P1 ( x ) + R2 ( x0 )

(
x x0 )2
= P1 ( x ) +

(
x x0 )3
f ( x0 ) +

f ( x0 ) + O h 4

(
x x0 )2
P1 ( x ) +

(
x x0 )3
f ( x0 ) +

f ( x0 )

( )

and in particular

f ( x1 ) P1 ( x ) +

h2
h3
f ( x0 ) +
f ( x0 )
2
6

The error E (R ) in the integral I ( f ) I (P1 ) is:


x1
x0

E (R )

(x x0 )2
2

f ( x0 )dx

f ( x0 ) x1
(x x0 )2 dx

x
0
2

f ( x0 ) ( x x0 )3

2
3

E (R )

x1
x0

f ( x0 )
(x1 x0 )3
6

(38)

Thus, the total error is the Trapezoid Rule minus the integral of

P1 ( x ) minus E (R )
h
h2
h3
E (R ) ( f ( x0 ) + f ( x1 )) hf ( x0 )
f ( x0 )
f ( x0 ) E (R )
2
2
6
h3
h3
E (R )
f ( x0 ) =
M2
12
12

(39)

520 Numerical Analysis

for a bound M 2 on f ( x ) over [x0 , x1 ]


The total possible quadrature error is the sum of all the errors for
each of the panels, [xi , xi +1 ]

M 2 h3

Tn ( f ) I ( f )
12
i =1

(40)

M 2 h 3n
=
12

( )

M 2 (b a )h 2
= O h2
12
Therefore,

M 2 (b a )h 2
Tn ( f ) I ( f )
12

(41)

So this is a second-order method.

Example 13 Evaluate I = e x cos( x )dx by composite trapezoidal


0

rule using 4 subintervals (panels).


Solution:

[a, b] = [0, ], f (x ) = e x cos(x )


n = 4, h =

ba
=
n
4

Such that x0 = 0, x1 =

, x2 =

, x3 =

3
, x4 =
4

521

Chapter Thirteen

f ( x4 )
f ( x0 )
T4 ( f ) = h
+ f ( x1 ) + f ( x2 ) + f ( x3 ) +
2
2
=

+ 1.5509 + 0 + ( 7.4605) +
4 2

n=8
n = 64
n = 512

( 23.141) = 13.336
2

T8 ( f ) = 12.382

T64 ( f ) = 12.075

T512 ( f ) = 12.070

True solution is 12.0703


13.3.2 Simpsons Rule

Now, lets locally approximate f ( x ) by a quadratic polynomial

P2 ( x ) . Hereafter, we will always assume that Y is even (for deep


reasons).
See Fig.16 the knots for P2 occur at the even points. The regions
between knots are called panels. With n + 1 points, the number of
panels is n / 2 .

Fig.16 Function approximated by piecewise quadratic polynomial.

522 Numerical Analysis

We can develop Simpsons Rule by using Lagrangian interpolation


to find P2 ( x ) over [xi , xi + 2 ] and then integrate it to find I (P2 ) .
See Fig.17.

Fig.17 Picture of a function locally approximated by a quadratic


polynomial, between the points xi and xi + 2
The interpolation function is:

P2 ( x ) = f ( xi )l02 ( x ) + f ( xi +1 )l12 ( x ) + f ( xi + 2 )l22 ( x )


where

(x xi +1 )(x xi + 2 )
(xi xi +1 )(xi xi + 2 )
(x xi +1 )(x xi + 2 )
l12 ( x ) =
(xi +1 xi )(xi +1 xi + 2 )
(x xi )( x xi +1 )
l22 ( x ) =
(xi + 2 xi )( xi + 2 xi +1 )
l02 ( x ) =

523

Chapter Thirteen

I (P2 ) =

xi + 2

P2 (x )dx

x1

I (P2 ) = f ( xi )

xi + 2

(xi + 2 xi )
6

f ( x )dx I (P2 ) =

x1

+ f ( xi +1 )

4( xi + 2 xi )
x
xi
+ f ( xi + 2 ) i + 2
6
6

h
( f i + 4 f i +1 + f i + 2 )
3

(47)

where h = xi +1 xi
To get the sum over the entire interval [a, b] we sum over all the
panels, noting that the end points of the panels are have even
numbered indicies, with h =
Sn ( f ) =

n2

i =0
i = even

ba
n

h
( f 0 + 4 f1 + f 2 ) + h ( f 2 + 4 f 3 + f 4 ) + ... + h ( f n 2 + 4 f n 1 + f n )
3
3
3
n / 2 1
h
( f i + 4 f i +1 + f i + 2 ) = h ( f 2i + 4 f 2i +1 + f 2i + 2 )
3
i =0 3

h
( f 0 + 4 f1 + 2 f 2 + 4 f 3 + 2 f 4 + 4 f 5 + .... + 4 f n 3 + 2 f n 2 + 4 f n 1 + f n )
3

Sn ( f ) =

n / 2 1
n / 22

h
f 0 + 4 f 2i +1 + 2 f 2i + 2 + f n

3
i =0
i =0

(48)

By using more advanced techniques, we can show that for even n


and f ( x ) four times differentiable, the local error per panel
(containing three points) is:

524 Numerical Analysis

M4
(49)
90
with M 4 being the bound on f (4 ) ( x ) . For the composite Simpsons
I (P2 ) I ( f ) h 5

Rule over the entire domain the upper bound on the error is

M 4 (b a ) 1 M 4 (b a )5
Sn ( f ) I ( f ) h
= 4
180
180
n
4

(50)

Therefore, Simpsons Rule is fourth-order.


Example 14 Evaluate I = e x cos( x )dx by composite Simpsons

rule using 2 subintervals (panels).


Solution:

Again, [a, b] = [0, ], f ( x ) = e x cos( x )

ba
= such that:
n
4

3
x0 = 0, x1 = , x2 = , x3 =
, x4 =
4
2
4
h
C.S .R. = [ f ( x0 ) + 4 f ( x1 ) + 2 f ( x2 ) + 4 f ( x3 ) + f ( x4 )]
3
n = 4, h =

12

[1 + 4(1.5509) + 2(0) + 4( 7.4605) + ( 23.141)] = 11.985

The exact solution is 12.070 3 . Thus with n = 4 , the Composite


Simpsons Rule has an error of 0.085 28 , as compared to the
composite Trapezoid Rule for the same n, which has an error of

1.265 7 . With n = 8 , the result of the CSR has the same

525

Chapter Thirteen

magnitude of error as the result using n = 512 with the CTR. Since
our goal is to have an accurate a result with a few a number of
function evaluations as possible, the CSR is a marked improvement
for this function.
13.3.3 Composite Rules

Composite rules are constructed in the following manner:


1.

Divide

[a, b]

[a, t1 ], [t1, t2 ],., [t p 1, b]

into

subintervals

(panels)

2. Apply the basic rule (i.e., one of the Newton-Cotes formulae


above) to each of [ti , ti +1 ]
3. For convenience, we assume each [ti , ti +1 ] has equal length and
one basic rule is applied to each interval.
Note that if there are p panels, each using a rule using m + 1 points
on each panel, then n = mp . Let h =

ba
, and xi = a + ih . For
n

example, look at Fig.18. Note that ti = xim

Fig.18 Picture showing p = 2 , m = 3 , and , n = mp = 6

526 Numerical Analysis


b
a
t1
t0

I = f ( x )dx
t2
t1

I = f ( x )dx +

tp
t p 1

f ( x )dx + ..... +

f ( x )dx

Composite Trapezoidal Rule


t i +1
ti

xi +1
xi

f ( x )dx =

f ( x )dx

h
[ f (xi ) + f (xi +1 )]
2

(51)

b
a

I = f ( x )dx
I =

p 1

t
tii+1 f (x )dx

i =0
h n 1

[ f (xi ) + f (xi +1 )]
2 i =0
f ( xn )
f ( x0 )
+ f ( x1 ) + ... + f ( xn 1 ) +
I = h
2
2
I =

(52)

Composite Simpsons Rule


h
t i +1
t i +1
ti f (x )dx = ti f (x )dx 3 [ f (x2i ) + 4 f (x2i +1 ) + f (x2i + 2 )]
b
a

I = f ( x )dx =

I =

p 1

n
1
2
x2i+2
x
i = 0 2i

t
tii+1 f (x )dx =

i =0

f ( x )dx

n
1
2 h

3 [ f (x2i ) + 4 f (x2i +1 ) + f (x2i + 2 )]

i =0

n
n

1
2

2
2
h
I =
f 0 + 4 f 2i +1 + 2 f 2i + 2 + f n
3

i =0
i =0

(53)

527

Chapter Thirteen

Example 15 Evaluate I = e cos( x ) dx by composite trapezoidal


0

rule using 4 subintervals (panels).


Solution:

[a, b] = [0, ], f (x ) = e x cos(x )


n = 4,
x3 =

h=

ba

=
such that x0 = 0, x1 = ,
n
4
4

x2 =

3
, and x4 =
4

f ( x4 )
f ( x0 )
C.T .R. = h
+ f ( x1 ) + f ( x2 ) + f ( x3 ) +
2
2
=

( 23.141) = 13.336

+
+
+

+
1
.
5509
0
7
.
4605

4 2
2

n=8
n = 64
n = 512

CTR = 12.382
CTR = 12.075
CTR = 12.070

Then the true solution is 12.0703


So in a composite method, as n gets larger the error gets smaller.
But how do we know which Y to take for a given accuracy?
13.3.4 Gaussian Quadrature

The Newton-Cotes rules and Composite rules:


b
a

f (x )dx i f (xi )
i =0

(54)

528 Numerical Analysis

n is fixed. xi are fixed.


In trapezoidal: n = 1, x0 = a and x1 = b .

i can be computed when the

{xi }

are given; i.e., they are

determined by xi
In trapezoid: 0 =

h
= 1
2

Disadvantages: xi are chosen artificially how do we know they give


us the best result?
Note that we are considering just one panel here.
Another approach

i f (xi )

i =0

I =

n is fixed, i , xi are to be determined.

i f (xi ) gives the best result.

i =0

best: it gives exact result for polynomials of highest degree


possible.
I.e., we want I

i f (xi )

if f ( x ) is a polynomial of some

i =0

degree, and we want the degree to be as high as possible.

529

Chapter Thirteen

Example 16

n = 1, [a, b] = [ 1,1]
x0 , x1 , 0 , 1 are to be determined such that

Pm ( x )dx = 0 Pm ( x0 ) + 1 Pm ( x1 )

(55)

for m as large as possible.


1. Exact for polynomial of degree 0, i.e., 55 holds for

P0 ( x ) = 1
1

11dx = 0 + 1 0 + 1 = 2
2. Exact for polynomial of degree 1, i.e., 55 holds for

P0 ( x ) = x
1

1 xdx = 0 x0 + 1x1 0 x0 + 1x1 = 0


3. Exact for polynomial of degree 2, i.e., 55 holds for

P0 ( x ) = x 2
1

xdx = 0 x02 + 1 x12 0 x02 + 1 x12 =

2
3

4. Exact for polynomial of degree 3, i.e., 55 holds for

P0 ( x ) = x 3
1

1 xdx = 0 x0 + 1x1 0 x0 + 1x1 = 0

530 Numerical Analysis

Can we expect the method to be exact for still higher degree


polynomials? No. We have 4 unknowns, x0 , x1 , 0 , 1 , and if the
method is exact for polynomials of degree 3, we already have 4
equations. This is enough to determine the 4 unknowns.
By solving the four equations in boxes above, we find:

x0 =
Thus

3
3
, x1 =
, 0 = 1, 1 = 1
3
3

(
)

f
x
dx
f
1
3 +

f
3

This is Gaussian Quadrature on [ 1,1] with two nodes.


From above, we know that

3
+
f
3

3
is exact if
f
3

f = 1, x, x 2 , x 3 .
Is it exact for all polynomials of degree 3 ? Yes:
1

f ( x )dx = a0 dx + a1 xdx + a2 x 2 dx + a3 x 3dx \

2
2
3
3

3
3
3 3
3 3

= a0 [1 + 1] + a1
+
+ a2
+ 3 + a3 3 + 3
3
3
3

2
3


3
3
3
+ a 2
+ a3
+
= a0 + a1
3
3
3

2
3

3
3
3
a0 + a1

3 + a 2 3 + a3 3

531

Chapter Thirteen

3
+
= f1
3

f
3

polynomials of degree 3

Example 17 Evaluate

1 (3 + 4 x + 8 x
1

+ 2 x 3 dx Via Gaussian

Quadrature:
2
3

3 3
3
3 + 4 x + 8 x + 2 x dx = 3 + 4 3 + 8 3 + 2 3

2
3

3 3
3
+ 8
+ 2

+ 3 + 4
3
3
3

1
1

3 34
=
= 23 + 8
3

Compare that with straight integration:


1
1

1
1

(3 + 4 x + 8x 2 + 2 x3 )dx = 23 + 83 = 343

13.3.5 Gaussian Quadrature in General


b
a

4 x 2 8x3
8x 4
+
++
3 + 4 x + 8 x 2 + 2 x 3 dx = 3x +

2
3
3

f ( x )dx

i f (xi )

i =0

532 Numerical Analysis

xi , i are chosen so that the method is exact for

1, x, x 2 ,........, x m
where m is as large as possible. What is the largest possible m for a
fixed n The number of unknowns are: 2n + 2 and also m + 1
functions m + 1 equations.
Unknown = Eqns m + 1 = 2n + 2
i.e., m = 2n + 1
Conclusion: Gaussian quadrature with n + 1 nodes (function
evaluations) is exact for a polynomial of degree 2n + 1 . In
comparison, a Newton-Cotes rule of degree n with n + 1 nodes is
exact for polynomials of degree n .
When we have to determine i , xi , we have to solve a non-linear
system.

533

Chapter Thirteen

13.4 Numerical Solution of Differential Equations


13.4.1 Initial Value Problems

Consider the first-order initial value problem:

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

(59)

To find an approximation to the solution y ( x ) of (59) on the interval

a x b , we choose N points, a = x0 inside the interval required


and construct approximations y n , to y ( xn ) , n = 0, 1, 2,....N
It is important to know whether or not a small perturbation of
(59) shall lead to a large variation in the solution. If this is the
case, it is extremely unlikely that we will be able to find a good
approximation to (59).
In considering numerical methods for the solution of (59) we
shall use the following notation:

h>0

denotes the integration step size

xn = x0 + nh is the nth node

y ( xn ) is the exact solution at xn


y n is the numerical solution at xn

f n = f ( xn , yn ) is the numerical value of f ( x ) at ( xn , y n )

534 Numerical Analysis


13.4.2 Euler's Method.

We choose N points, xn = x0 + nh where h = x f x0 / N . From


Taylor's Theorem we get:

y ( n )
(xn +1 xn )2
2
for n between xn and xn +1 , n = 0, 1, 2,....N 1 . Since
y ( xn ) = f ( xn , y ( xn )) and xn +1 xn = h , it follows that:
y ( n ) 2
y ( xn +1 ) = y ( xn ) + f ( xn , y ( xn ))h +
h
2
y ( xn +1 ) = y ( xn ) + y ( xn )( xn +1 xn ) +

(60)

(61)

We obtain Euler's method,

y n +1 = yn + hf ( xn , yn ) ,

(62)

( )

by deleting the term of order O h 2

y ( n ) 2
h
2
called the local truncation error.
The algorithm for Euler's method is as follows.

(1) Choose h such that n = x f x0 / h is an integer.


(2) Given y0 , for n = 0, 1, 2,....N , iterate the scheme

y n +1 = yn + hf ( x0 + nh, y n )
Then, y n is as an approximation to y ( xn ) .
Example 18 Use Euler's method with h = 0.1 to approximate the

solution to the initial value problem:

y ( x ) = 0.2 xy,

y (1) = 1

on the interval 1 x 1.5.

(63)

535

Chapter Thirteen

Solution: We have:

x0 = 1 , x f = 1.5 , y0 = 1 , f ( x, y ) = 0.2 xy

xn = x0 + nh = 1 + 0.1n , N =

1.5 1
=5
0.1

and, y n +1 = y n + 0.2(1 + 0.1n ) y n With y0 = 1


For n = 0, 1, 2, 3, 4 . The numerical results are listed in Table (7).
Note that the differential equation in (63) is separable. The (unique)
2
solution of (63) is y ( x ) = e (0.1x 0.1). This formula has been used to

compute the exact values y ( xn ) in the previous table.


The next example illustrates the limitations of Euler's method. In
the next subsections, we shall see more accurate methods than
Euler's method.
Table (7) Numerical results of Example 18.

xn

yn

y ( xn )

Absolute

Relative

error

error

536 Numerical Analysis


Example 19 Use Euler's method with h = 0.1 to approximate the

solution to the initial value problem

y ( x ) = 2 xy,

y (1) = 1

(64)

on the interval 1 x 1.5.


Solution: As in the previous example, we have

x0 = 1

, x f = 1.5 , y0 = 1 ,

xn = x0 + nh = 1 + 0.1n , N =
and

y n +1 = yn + 2(1 + 0.1n ) yn

1.5 1
=5
0.1

With

y0 = 1

For n = 0, 1, 2, 3, 4 . The numerical results are listed in Table(8).


The relative errors show that our approximations are not very good.
Table (8) Numerical results of Example 19.

xn

yn

y ( xn )

Absolute

Relative

error

error

537

Chapter Thirteen

13.4.3 Improved Euler's method.

The improved Euler's method takes the average if the slopes at the
left and right ends of each step. It is, here, formulated by means of a
predictor and a corrector:

( )
h
y nC+1 = ynC + [ f (xn , ynC ) + f (xn +1 , y nP+1 )],
2
y nP+1 = ynC + hf xn , y nC ,

(65)
(66)

This method is of order 2.


Example 20 Use the improved Eulers method with h =0.1 to

approximate the solution to the initial value problem of Example 19

y ( x ) = 2 xy,

y (1) = 1 on the interval 1 x 1.5.

Solution: We have

n = x0 + hn = 1 + 0.1n , n = 0, 1, ...,5.
The approximation y n to y ( xn ) is given by the predictor-corrector
scheme:

y0C = 1 ,
y nP+1 = ynC + 0.2 xn yn ,

y nC+1 = y nC + 0.1 xn ynC + xn +1 y nP+1

for n = 0, 1, . . . , 4. The numerical results are listed in Table 5.3.


These results are much better than those listed in Table(9) for
Euler's method.

538 Numerical Analysis

Table (9) Numerical results of Example 20.

xn

yn

y ( xn )

Absolute

Relative

error

error

We need to develop methods of order greater than one, which, in


general, are more precise than Euler's method.
13.4.4 Runge-Kutta Methods

Two-stage explicit Runge-Kutta methods are given by the following


formula:

k1 = hf ( xn , y n )

(67)

k 2 = hf ( xn + h, yn + k1 )

(68)

1
(k1 + k 2 )
2

(69)

y n +1 = y n +

539

Chapter Thirteen

Fourth-order Runge-Kutta method.

The fourth-order Runge-Kutta method is the very popular among


the explicit one-step methods. The four-stage Runge-Kutta method
of order 4 given by its formula:

k1 = hf ( xn , y n )

(70)

1
1

k 2 = hf xn + h, y n + k1
2
2

(71)

1
1

k3 = hf xn + h, y n + k 2
2
2

(72)

k 4 = hf ( xn + h, y n + k3 )

(73)

y n +1 = yn +

1
(k1 + 2k 2 + 2k3 + k 4 )
6

(74)

The next example shows that the fourth-order Runge-Kutta


method yields better results for (64) than the previous methods.
Example 22 Use the fourth-order Runge-Kutta method with

h = 0.1 to approximate the solution to the initial value problem of


Example 19, y ( x ) = 2 xy,

y (1) = 1 on the interval 1 x 1.5.

Solution:

We have f ( x, y ) = 2 xy and

xn = 1.0 + 0.1n n = 0, 1, 2,....5


With the starting value y0 = 1.0 , the approximation y n to y ( xn )
is given by the scheme

540 Numerical Analysis

y n +1 = yn +

0.1
(k1 + 2k 2 + 2k3 + k 4 )
6

where

k1 = 0.1 * 2 * (1.0 + 0.1n ) yn ,


k 2 = 0.1 * 2 * (1.05 + 0.1n )( y n + k1 / 2 ) ,
k3 = 0.1 * 2 * (1.05 + 0.1n )( yn + k 2 / 2 )
k 4 = 0.1 * 2 * (1 + 0.1(n + 1)( y n + k3 ))
and n = 0,1, 2, 3, 4. The numerical results are listed in Table(10).
These results are much better than all those previously obtained.
Table(10). Numerical results for Example 22.

xn

yn

y ( xn )

Absolute
error

Relative
error

Example 23 Consider the initial value problem

y = ( y x 1)2 + 2,
y (0) = 1
Compute y 4 by means of Runge-Kutta's method of order 4 with
step size h = 0.1.

541

Chapter Thirteen

Solution: The solution is given as shown in Table(11).

Table(11). Numerical results for Example 23.


n

xn

yn

Exact value
y ( xn )

Global error
y ( xn ) y n

0.0

1.000 000 000

1.000 000 000

0.000 000 000

0.1

1.200 334 589

1.200 334 672

0.000 000 083

0.2

1.402 709 878

1.402 710 0'36

0.000 000157

0.3

1.609 336 039

1.609 336 250

0.000 000181

0.4

1.822 792 993

1.822 793 219

0.000 000 226

Example 24 Use Runge-kutta fourth order approximation to obtain

y at x = 0.6 if y =

x + y and y = 0.41 at x = 0.4 ( h = 0.2 )

Solution:

y0 = 0.41 at x0 = 0.4 , h = 0.2 and x1 = 0.6


k1 = f ( x0 , y0 ) = h x0 + y0 = 0.2 * 0.4 + 0.41 = 0.18

1
1

k 2 = hf x0 + h, y0 + k1 = 0.2 * 0.5 + 0.41 + 0.09 = 0.2


2
2

1
1

k3 = hf x0 + h, y0 + k 2 = 0.2 0.5 + 0.41 + 0.1 = 0.201


2
2

k 4 = hf ( x0 + h, y0 + k3 ) = 0.2 0.5 + 0.41 + 0.09 = 0.2201


y1 = y0 +

1
(k1 + 2k 2 + 2k3 + k 4 )
6

y1 = 0.41 + 0.2003476 = 0.6103476

542 Numerical Analysis


Problems

Solve the following differential equations by the methods


indicated
Eulers method:
1- y = 2 x y , x = 0,

y = 1 , x = 0, 0.2

2- y = 2 x + y 2 , x = 0 , y = 1.4, x = 0.1, 0.3

Modified Eulers method


1- y = x 2 2 x + y ,

x = 0,

y = 0.5,

x = 0.1, 0.5

)1 / 2 ,

x = 0,

y = 1 x = 0.1, 0.2

3- y = ( x + y ) / xy,

x = 1,

y = 1,

2- y = y x 2

x = 1.0, 1.2

Runge-Kuttas method
1- y = (2 x + y )1 / 2 ,

x = 1, y = 2,

2- y = 1 x 3 / y , x = 0, y = 1,
3- y = ( x y ) / ( x + y ),

x = 1.0, 1.4
x = 0, 0.2

x = 0, y = 1 x = 0.2, 0.4

References
[1] Advanced Engineering Mathematics by C. Ray Wyle and

Louis C. Barrett, Fifth Edition, 1985, by McGraw-Hill, ISBN 007-Y66643-1.


[2] Advanced Engineering Mathematics by Erwin Kreysizig,
Third Edition, 1972 by John Wiley & Sons, Inc., ISBN 0-47150728-8.
[3] Engineering Mathematics by K. A. Stroud, Third Edition,
1992, ELBS with Macmillan, Educational Low Priced Books
Scheme. ISBN 0-333-54454-4.
[4] Theory and Problems of Engineering Mathematics for

Engineers and Scientists by Murray R. Spiegel, Schaums


Outline Series, McGraw-Hill, 1971 ISBN 07-060216-6.
[5] Numerical Methods for Engineers with Programing and

Software Applications by Steven C. Chapra and Raymond P.


Canale, 3rd Edition, 1998, McGraw-Hill, ISBN 0-07-115895-2.
[6] Engineering Mathematics by Ian Craw, Stuart Dagger and
John Pulham, the University of Aberdeen, 2001.
[7] Numerical Methods by E. A. Volkov, Translated from
Russian by L. Levant, MIR PUBLISHER MOSCOW,1986.
[8] Mathematical Handbook of Formulas and Tables, by Murray

R. Spiegel and John Liu, Schaums Outline Series, McGraw-Hill,


Second Edition, 1999, ISBN 0-07-038203-4.

Potrebbero piacerti anche