Sunteți pe pagina 1din 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 Euler’s and Runge-
Kutta’s method.
Contents

Part 1

Chapter Title Page


No. No.
1 Mathematical Numbers 1

2 Matrices 42

3 Calculus 74

4 Ordinary Differential 101

Equations
5 Linear Differential Equations 151

Of Higher Order
6 Laplace Transforms 190

7 Fourier Series 238

8 Least Square Technique 259


References

Contents

Part 2
Chapter Title Page
No. No.
9 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:
−1± (1 + 8) −1± 9 −1± 3
x= = =
2 2 2
∴ x = 1 or −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:


6± (36 − 100) 6 ± − 64
x= =
10 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 5
Of course, we are still faced with (− 1) , which cannot be
evaluated as a real number, for the same reason as before, but, if we
can replace − 1 with the letter j, then (− 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
6± (36 − 100) 6 ± − 64 6 ± j8
x= = =
10 10 10
∴ x = 0.6 + j 0.8 or x = 0.6 − j 0.8

1.6.2 Powers of j
j = −1
j 2 = −1
( )
j 3 = j 2 * j = −1 * j = − j

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

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 −j +6 8− j
= =
8 − j 3 − j4
*
3 + j4 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

-4 -3 -2 -1 0 1 2 3 4
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 -2 -1 0 1 2 3 4
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
4 2
o
3 1 180
-4 4
j4
2 -4 -3 -2 -1 0 1 2 3 4
-1
o
1 180 -2
-4 4 -j4
-3
-4 -3 -2 -1 0 1 2 3 4 -4

Fig.5 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 3

0 1 2 3 4 5
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

2 j3

1
2
0 1 2 3
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

2 z1
j1
z2 j2
1
3
-4 -3 -2 3
-1 0 1 2 3 4
-1
j4
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.

2 z1
j2
1
3
0 1 2 3 4 5
-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

5 z1 − z 2

4 u
Fig.11
3
− z2
2 z1
j2
1
3
3 -2 3
-1 0 1 2 3 4
-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 A

r
b

θ
o a x

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

Second First
90 o < θ < 180o 0 < θ < 90o
o

o x
o o
o
180 < θ < 270 o
270 < θ < 360
Third Fourth

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.
4
tan E = = 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
2
∴ tan E = = 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 = (25 + 4) = 29 = 5.385 and from
above θ = 158.2 . Then, the full polar form is

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

z = 5.385∠158.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 = 5∠323.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 = 5∠35o

Solution:
( )
z = 5 cos 35o + j sin 35o = 5(0.8192 + j 0.5736)
= 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
x
e = ∑ =1+ x + + + + ...... (1)
m=0 m! 2 ! 3! 4!

(−1) m x 2 m x2 x4
cos x = ∑ =1− + − +......... (2)
m=0 ( 2 m )! 2! 4!
∞(−1) m x 2 m +1 x3 x5
sin x = ∑ = x− + − +......... (3)
m=0 ( 2 m + 1)! 3! 5!

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


the following series

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

jθ j 2 (θ )2 j 3 (θ )3 j 4 (θ )4 j 5 (θ )5
∴e = 1 + jθ + + + + ++
2! 3! 4! 5!

∴e jθ
= 1+ jθ −
(θ )2 j (θ )3 (θ )4 j (θ )5
− + + −−
2! 3! 4! 5!


 (θ )2 (θ )4   j (θ )3 j (θ )5 
∴e = 1 − + − .... + 
j θ− + − .... (5)
 2! 4!   3! 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 (Rectangular form)
(ii) z = r (cos θ + j sin θ ) (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 1  e
= e −j = (1 − 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
From this r = 5 , tan E = − = −0.7, ∴ E = −36.87 o
4
∴θ = 360 o − 36.87 o = 323.13o
(
Then, the polar form is z = 5 cos 323.13o + j sin 323.13o . )
j 323.13o
And the polar form is z = 5.e And the the shortened

form is z = 5∠323.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 known as cos(− θ ) = cos(θ ) and
sin (− θ ) = − sin (θ ) .

( ( ) (
∴ z = 5 cos 36.87 o − j sin 36.87 o ))
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 = 3 cos 230o + j sin 230o = 3 cos130o − j sin130o = 3∠ − 130o
z = 4(cos 290o + j sin 290o ) = 4(cos 70 o − j sin 70 o ) = 4∠ − 70 o .
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 (cosθ1 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:
2∠30 * 3∠40
Solution: It is easy to do that as we get:

( )
2∠30 * 3∠40 = (2 * 3)∠ 30o + 40 o = 6∠70o
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 (cosθ1 cosθ 2 + j sin θ1 cosθ 2 − j cosθ1 sin θ 2 + sin θ1 sin θ 2 )
∴ =
z 2 r2 (
cos 2 θ 2 + sin 2 θ 2 )
z1 r1 (cosθ1 cosθ 2 + sin θ1 sin θ 2 ) + j (sin θ1 cosθ 2 − cosθ1 sin θ 2 )
∴ =
z 2 r2 1
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.

10∠95o
Example 16 Simplify the following expressions: ,
2∠44 o

Solution:
10∠95o
2∠44 o
( )
= 5∠ 95o − 44 o = 5∠51o
26Mathematical Numbers
1.6.10 DeMoivre’s Theorem
There is very important rule is called DeMoivre’s 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 DeMoivre’s Theorem to find the results of the


following expression in polar form: [3(cos110 o
+ j sin 110o )]3
Solution:

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


o o 3 3 o o

∴ [3(cos 110 + j sin 110 )] = 27(cos(330 ) + j sin (330 )) = 27∠330


o o 3 o o o

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 = 9∠44 o


Solution:
 44o 
We have z = 9∠44 = 9∠
o  = 3∠22o
 2 
 
Expansion of sin nθ and cos nθ
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 c 2 − s 2 − c 2 − s 2 + 1 )
= 4cs (1 − s 2 ) = 4cs * c 2 = 4c 3 s

∴ sin 4θ = 4 cos3 θ * sin θ


Expansions for cos n θ and sin n θ in terms of sines and cosines
of muiltiples of θ .
1
z = cos θ + j sin θ , ∴ = 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θ
Chapter One 29
1
And, = cos nθ − j sin nθ
zn
1 1
∴ z n + n = 2 cos nθ And, z n − = j 2 sin nθ
z zn
Let us collect theses four results together: z = cos θ + j sin θ

1 1
z+ = 2 cos θ z− = j 2 sin θ
z z
1 1
z n + n = 2 cos nθ 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  
 + 3 z +
1

 z3   z
But from the previous results
1 1
∴z + = 2 cos θ , and z 3 + = 2 cos 3θ
z 3
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
4
 1
∴ ( j 2 sin θ )
4
= 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 
1
Now, Q z n + = 2 cos nθ
zn
 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


1
∴ sin 4 θ = (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.
k
The other equation gives us: θ = 0 + 2π
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
k
θ = 2π , k = 0, 1, 2, 3,.........n − 1 and we can write these
n
solutions as following: z k = cos θ k + j sin θ k
k
Where θ = 2π , k = 0, 1, 2, 3,.........n − 1
n
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 )


π π kπ
Therefore; r = 1 and 4θ = + 2kπ or θ = +
2 8 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π 
α = exp j  = cos  + j sin  
 5   5   5 

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ω , , 1 + 3 j − zz
z+2+ j
٤) 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 in a
ω+z
ω
rectangular form. Find also z , ω,
z
٦) 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 2∠156 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
z1
z2
giving the

results in polar form

١٣) ( )
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 ) =
6
١٥) 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 DeMoiver’s 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 6 1
5 8 1
A = 
2 12 0
 
9 5 0
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 5 2 9
B = 6 8 12 5
 
1 1 0 0
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 5 1
2 7 0 8
A= 
5 0 4 6
 
1 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 6 1 8 6 1
5 8 1 9 6 0
A+ B = + 
2 12 0 5 9 1
   
9 5 0 11 4 0
Solution:
7+8 6+6 1 + 1  15 12 2
5+9 8+6 1 + 0  14 14 1
A+ B =  = 
2+5 12 + 9 0 + 1  7 21 1
   
9 + 11 5+4 0 + 0 20 9 0
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 6 1 k * 7 k *6 k *1
5 8 1  k * 5 k *8 k *1
k * A =k * = 
2 12 0 k * 2 k *12 k * 0
   
9 5 0  k * 9 k *5 k * 0
The multiplication operation on matrices differs 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 2 1 0 
 1 3 
If S = [1 4 3] And R = 2 0 0  Find S * R
 4 4 
 2 1
1 1 2 
 3 
Chapter Two 49
Solution:
 
 2 2 1 0 
 1 3 
S * R = [1 4 3] 2 0 0 
 4 4 
 2 1
1 1 2 
 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
3 1
Column 3 of S , R = 1 *1 + 4 * + 3 *1 = 8
4 3
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 2 1 0  17
 1 3  8 
2 0 0 * 
 4 4  13
 2 1  
1 1 2  4 
 3 
 
2 * 17 + 2 * 8 + 1 * 13 + 0 * 4   
   63 
1 3  
= 2 * 17 + 0 * 8 + * 13 + 0 * 4 = 48 
 4 4 
 1  67 1 
2 * 17 + 1 * 8 + 1 * 13 + 2 * 4   3 
 3 
50 Matrices
Example 4 Multiply the following matrices
   
 2 2 1 0   17 510  63 1250
 1 3  8 70   
R * F = 2 0 0   =  48 1215
 4 4   13 90   
 2 1    1
1 1 2  4 120  67 1450
 3   3 

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 51
 5 3  x1   93 
A=  ; X =   , and B =  
− 4 −2  x2  − 66
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  x1  a  1 0
= The matrix is the 2 by 2 identity
0
 1   x2  b  0
 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:
 5 3 93 
  . This is called an augmented matrix because we
− 4 −2 − 66
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
 1 0 a  
 
 0 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.

 5 393 
  Original augment matrix
− 4 −2 − 66

1 0.6 18.6 
  r1 ÷ 5
− 4 −2 − 66

1 0.6 18.6
  4 r1 + r2
0 0. 4 8. 4 

1 0.6 18.6
  r2 ÷ 0.4
0 1 21 

1 0 6
  −0.6 * r2 + r1
0 1 21
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 
3
  Original augmented matrix.
− 4 −2 − 56
1 0.6 14 
  r1 ÷ 5
− 4 −2 − 56
1 0.6 14
  4 * r1 + r2
0 0. 4 0 
1 0.6 14
  r2 ÷ 4
0 1 0
1 0 14
  − 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 A−1 (called A inverse) is the inverse of a

square matrix A if A −1 A = AA−1 = I where I is the identity matrix.


Once we find A1; 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 ∴ A−1 Ax = A−1 b ∴ I * x = A−1 b

This means that if we find A−1 ; we only need to multiply to solve


systems with the same matrix A for different b vectors. Please

remember that A−1b ≠ b A−1 , 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


0 2 4
A−1 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.
1 3 6 0 0 1 
 
0 − 10 − 21 0 1 − 4 − 4r1 + r2
0 2 4 1 0 0 
1 3 6 0 0 1 
 
0 1 2.1 0 − 0.1 0.4 r2 / (− 10 )
0 2 4 1 0 0 
1 3 6 0 0 1 
 
0 1 2.1 0 − 0.1 0.4  − 2r2 + r3
0 0 − 0.2 1 0.2 − 0.8
1 3 6 0 0 1 
 
0 1 2.1 0 − 0.1 0.4 r3 / (− 0.2 )
0 0 1 − 5 −1 4 
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)
x→a

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

1
Example 2 Find the limits of f ( x) = 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
lim = ∞ (undefiend )
x → 5 2 x − 10
Chapter Three 75
This limit lim f ( x) = f ( x) represents a horizontal line, which
x→a

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

constant. Then, lim f ( x) = c


x→a

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
x→a − x→a +

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


x→a − x→a +

lim f ( x) = does not exist


x→a

lim f ( x) = lim f ( x) = b
x→a − x→a +

lim f ( x) = b
x→a

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

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


x→a

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

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


x→a

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 f ( x) = b or lim f ( x) = b
x → +∞ x → −∞

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)
x→a

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 h
So, the Differentiation of function f at x is:
lim
( f (x + h ) − f (x ))
h →0 h
Chapter Three 77
If this limit exists, then it is called the derivative of function f
dy
at x, which is denoted by f ′( x) or .
dx

So, f ′( x) or
dy
= lim
( f (x + h ) − f (x ))
dx h →0 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


dx
(
d tan ( x )
e )
78 Calculus
dy du
Solution: Put u = tan ( x ) ∴ y = eu ∴ = eu and = sec 2 x
du dx
dy dy dy
But from chain rule, = . ,
dx du dx


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

d  3 2
Example 4 Find − x 
dx  
Solution:
2   1
d  3 2 2  3 −1 2  − 3 
− x  = − x =− x
dx   3 3

d  − 3 
Example 5 Find
dx  x 2 − 1 

Solution:

d  − 3  d  −  3
1 3

 
=
dx  x − 1  dx
2 
2 2
( −
)
− 3 * x − 1 2 = * x − 1 2 * 2x
 2
( )
 

d  − 3  3x 3x * x 2 − 1
∴ = =
(
dx  x 2 − 1  x 2 − 1 x 2 − 1 )
x2 − 1
2
( )
d
Example 6 Find (5 x + 7 )4
dx
d
Solution: (5 x + 7 )4 = 4(5 x + 7)3 * 5 = 20(5 x + 7 )3
dx
Chapter Three 79
d
Example 7 Find (sin (5 x + 6))
dx
d
Solution: (sin (5 x + 6)) = 5 cos(5 x + 6)
dx

Example 8 Find
d
dx
( ( ))
cos x 2

Solution:
d
dx
( ( )) ( ) ( )
cos x 2 = − sin x 2 * 2 x = −2 x * sin x 2

d
Example 9 Find (ln(3 − 4 cos x ))
dx
d 1 4 sin x
Solution: (ln(3 − 4 cos x )) = * (4 sin x ) =
dx 3 − 4 cos x 3 − 4 cos x
d
Example 10 Find (log10 (2 x − 1))
dx
d 1 2
Solution: (log10 (2 x − 1)) = *2 =
dx (2 x − 1) ln(10) (2 x − 1) ln(10)
Example 11 Find
d 5x
dx
(
e * ln (2 x − 1) )
Solution: Assume y = e5 x * ln (2 x − 1) , u = e5 x and v = ln (2 x − 1)

dy dv du
∴ y = uv , =u +v
dx dx dx
dy 1
∴ = e5 x * 2 + ln (2 x − 1) * 5 e5 x
dx (2 x − 1)
dy 2e 5 x
∴ = + 5 e5 x ln (2 x − 1)
dx (2 x − 1)
80 Calculus

Example 12 Find
d
dx
(
3 x 5 ln(sin x ) )
Solution: Assume y = 3 x 5 ln (sin x ) , u = 3 x 5 and v = ln (sin x )

dy dv du
∴ y = uv , =u +v
dx dx dx


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


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

d  e 2 x 
Example 13 Find
dx  ln (3x ) 
e2x
Solution: Assume y = , u = e 2 x and v = ln(3 x )
ln (3x )
du dv
v −u
dy
= dx 2 dx
dx v
3
2 x  ln (3 x ) * 2e
2x
 − e2x *
d e 3x
∴  =
dx  ln (3 x ) 
  (ln(3x )) 2

1
e 2 x (2 ln ( x ) + 2 ln (3) − )
x e 2 x (2 x ln ( x ) + 2 x ln (3) − 1)
= =
(ln(3x )) 2
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
dx
(
x sin 2 x cos 4 x )
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
∴ = 5 5x 4 + 2 cos(2 x ) + (− 4 sin 4 x )
y dx x sin 2 x ( cos 4 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 x 

d
Example 16 Find (1 + tan 2 x )3
dx
d
Solution: (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  
Example 17 Find 1 − cot  
dx   3
Solution:
1 
 −1
d  2  x   1  2  x   2  d   x 
1 − cot    = 1 − cot    * 1 − cot 2   
dx   3 2  3  dx   3 
Chapter Three 83
  x  d   x 
 0 − 2 cot   *  cot    
d  2  x     3  dx   3   
∴ 1 − cot   =
dx  3   x 
2 1 − cot 2   
  3 

 x   x   1 
− 2 cot  *  − csc 2    
d   x 3   3   3 
∴ 1 − cot 2    =
dx  3   x 
2 1 − cot 2   
  3 

 x  x
cot  * csc 2  
d   x 3 3
∴ 1 − cot 2    =
dx   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
1 −1
Solution: y = = x −1 ∴ y′ = − x − 2 =
x 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:
d
dx
(
3x + y 3 = )
d 2
dx
(
y +4 )
dy dy dy dy
∴ 3 + 3y2 = 2y ∴ 2y − 3y2 =3
dx dx dx dx
dy
∴ y (2 − 3 y ) =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
dx
( )
x + 4 = 5x 4

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
So, if = 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
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
∫a f (x )dx = nlim [ f (a )∆x + f (a + ∆x )∆x + f (a + 2∆x )∆x + ..... + f (a + (n − 1)∆x )∆x]
→∞
n
= lim ∑ f (xi ) ∆x
n → ∞ i =1
d
If f ( x ) = 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
f ( x )dx = ∫ ( g ( x ))dx = g ( x ) a = g (b ) − g (a )
b
∫a a dx
Properties of definite integration:
b a
∫a f (x )dx = − ∫b f (x )dx
b b
∫a kf ( x )dx = k ∫a f (x )dx
∫a [ f (x ) ± g (x )]dx = ∫a f (x )dx ± ∫a g (x )dx
b b b

b c b
∫a f ( x ) dx = ∫a f ( x ) dx + ∫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

2 u3
above integral we get: ∫ u du =
3
+c

Once the solution has been found in terms of u, substitute back into
terms of x, the final solution is:

∫ 2 x(x + 3) dx =
2 2 (x 2
+ 3 )3
+c
3
Example21 Find the results of the following integral: ∫ x x − 1 dx

Solution: Substitute u = x − 1 , then u 2 = x − 1 and x = u 2 + 1


So, 2udu = dx

∴ ∫ (
x x − 1 dx = ∫ u 2 + 1 . u . 2udu )
( )
= ∫ x x − 1. dx = ∫ u 2 + 1 2u 2 du = ∫ 2u 4 + 2u 2 du ( )
=
2u 5 2u 3
5
+
3
2
+ c = u 3 3u 2 + 5 + c
15
( )
Substitute in the above equation for u = x −1,
88 Calculus

∴ ∫ x x − 1 dx =
2
15
( 3
) (

)
x − 1  3 x − 1 + 5  + c
2

2
∴ ∫ x x − 1 dx = (x − 1)3 / 2 (3(x − 1) + 5) + c
15
2
∴ ∫ x x − 1 dx = (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

2 2 u3
above integral, we get: ∫ sin x cos x dx = ∫ u du =
3
+c

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

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

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θ .

x
It is clear that sin θ = then from the following figure, it is clear
2

4 − x2
that cos θ = ,
2
Substitute in the above integral, we get:
2
∫ 4 − x 2 dx = ∫ 4 − 4 sin 2 θ * 2 cosθ dθ x

= ∫ 4 1 − sin 2 θ * cos θ dθ θ
4 − x2

But cos 2 θ = 1 − sin 2 θ then, ∫ 4 − x 2 dx = ∫ 4 cos 2 θ dθ

1
But cos 2 θ = (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:

−1 x x 4 − x2
∴ θ = sin , sin θ = , and cos θ =
2 2 2
90 Calculus
 4 − x2 
2  −1  x  x +c
∴ ∫ 4 − x dx = 2 sin   + *
 2 2 2 
 
 2 
2  −1  x  x 4 − x +c
∴ ∫ 4 − x dx = 2 sin   +
 2 4 
 

2 x 4 − x2
−1  x 
∴ ∫ 4 − x dx = 2 sin   +
2 2
+c

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 = ∫ 4 sinh 2 θ + 4 2 cosh θ dθ

1
But cosh 2 θ = (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
 

 2
2 −1  x   x   x 
∴ ∫ 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θ

1
But sinh 2 θ = (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:

∴∫ x 2 − 4 dx = 2 cosh 2 θ − 1 * cosh θ − θ  + c
 
x
But cosh θ = ,
2
 x2 x 
2 −1 x
∴∫ x − 4 dx = 2 − 1 * − cosh +c
 4 2 2

 x x2 − 4 
2 −1 x
∴∫ x − 4 dx =  − 2 cosh +c
 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
dv du
∴ uv = ∫ u dx + ∫ v dx
dx dx
And rearranging the terms, we have
dv du
∫ u
dx
dx = uv − ∫ v 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
∴ ∫ u
dx
dx = uv − ∫ v dx or
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 v = sin x

From this formula ∫ 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 ∫ x ln x dx

Solution:
Assume u=x dv = ln x
Then, 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
∴ 2 * ∫ x ln x dx = x 2 ln x − x 2 + +c
2

2 x2
∴ 2 * ∫ x ln x dx = x ln x − +c
2

x 2 ln x x 2
∴ ∫ x ln x dx =
2

4
+c

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


Chapter Three 95
∴ du = dx and, v = sin x

From this formula ∫ 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 v = − cos x

From this formula ∫ 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 v = sin x

From this formula ∫ 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
1424 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
2
(
− e x sin x + e x sin x + c )

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

Solution: Assume u = e5 x dv = cos 3 x dx


sin 3x
∴ du = 5e5 x dx and v=
3
From this formula ∫ u dv = u v − ∫ v du we get:

5x 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
− cos 3x
∴ du = 5e5 x dx and v=
3
From this formula ∫ u dv = u v − ∫ v du we get:

e 5 x sin 3 x 5  e 5 x cos 3 x 5 
I= ∫ e 5 x cos 3 x dx = − * − + ∫ e 5 x cos 3 x dx 
3 3  3 3 

Chapter Three 97
2
5x e5 x sin 3 x 5 5 x 5
I=∫ e cos 3 x dx = + e cos 3 x −   ∫ e5 x cos 3 x dx
3 9  3  1442443
I
5x
 25   25  5x e sin 3x 5 5 x
1 +  * I = 1 +  * ∫ e cos 3 x dx = + e cos 3x
 9   9  3 9

 34   34  5x e 5 x sin 3 x 5 5 x
∴   * I =   * ∫ e cos 3 x dx = + e cos 3 x
 9   9  3 9

 9  e sin 3 x 5 5 x 
5x
∴I =∫ e 5x
cos 3 x dx =   + e cos 3 x  + c
 34  3 9 

 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


7 x + 12
In case we have integration like this one ∫ x( x + 2 )
dx we can use

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


3 4 
∫  +
x ( x + 2 )
dx . So that it is easy to integrate it. So,
 
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
(iv) Factors (ax + b )2 gives partial fractions +
ax + b (ax + b )2

(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

dx
Example 31 Find the results of the following: ∫ (x + 1)(x + 3)
Chapter Three 99
Solution : Breaking into partial fractions we get:
1 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 1
∴ A= , and B = −
2 2
So the integral is equal to:
dx  1/ 2 (− 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
dy
2- Find for the following functions:
dx
2
a) y = (1 + tan 2 x ) 3 (b) y = sin 1 − x ( )
Find the following integrals
π
x3 + 2 x 2 − x 2
 1 
(a) ∫ 3 x
dx (b) ∫  + sin x dx
0 
3 cos 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


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 (1)
dx
d2y
+ ky = cos x (2)
dx 2
x 3 y ′′′ − 7 x 2 y ′′ + 24 x y ′ − 36 y = 0 (3)
2 2
( y 2 e x y + 4 x 3 )dx + (2 xy e x y − 3 y 2 )dy = 0 (4)
∂2 y ∂2 y ∂2 y
+ = (5)
∂x 2 ∂t 2 ∂t∂x
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:

dny d n−1y d1 y d0y


f n (x) + f n−1(x) + .................f1(x) + f0 (x) = g(x) (6)
n n−1 1 0
dx dx dx dx
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 105

C=−4 C=4
C=−3 C=3
C=−2 C =2
C=−1 C=1
C=1 C=−1
C =2 C=−2
C=3 C=−3
C=4 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 L( x)dx = g ( y ) dy (7)
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:

x (2 y 2 − 1)  2   1
dx + dy = 0 Or 1 − dx +  2 y − dy = 0
( x + 2) y  ( x + 2)   y
Integrating both sides we have:
 2   1
∫  ( x + 2)  ∫ 
 1 −  dx +  2 y − dy = C
y 
  

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

( )
∴ x + y 2 = − Ln cy ( x + 2) 2 Or
2
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 107
4x dy
∴ dx + =0
( x 2 + 1) y2
Now the solution can be obtained by integrating each term
separately, it is as the following:
1
2 Ln( x 2 + 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
−1 x2
following: tan y = x + +c
2
−1  x 
2
∴ y = tan + x + c
 2 
 
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 dy 1 / x dx
∫ y
=∫
x ln x
or ∫ 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
2
( ) (
= − xe x − e x + c ∴ y 2 = 2 e x − xe x + c1)
But y (0 ) = 1 , then by substituting in the above equation we can get
2
the value of c1 , 1 = 2(1 − 0 ) + c1 ∴ c1 = − = −1
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
y′ = g   (8)
x
Where g is any given function of y / x .The form of the equation
suggests that we set:
y
=u (9)
x
∴ y = ux , by differentiation
∴ y′ = u + u ′x (10)
By substituting (10) into (8) we have:
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

xu ′ − u
Assume u = xy Then, y = u / x and y ′ =
x2
Substitute the values of u , y, y ′ in the differential equation (13) we

u  xu ′ − u 
get: (1 − u ) − x(1 + u ) =0
x  x2 
110 Ordinary Differential Equations
du
∴ 2u − xu ′(1 + u ) = 0 ∴x (1 + u ) = 2u
dx

∴ 2∫
dx
=∫
(1 + u ) du + c
1
x u
∴ 2 Ln ( x ) = Ln (u ) + u + Ln (c)

 x2 
∴ Ln =u
 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
∴∫ = ∫ dx + c1
u2 − 4
1 u − 2 u − 2
 = x + Ln(c2 ) ∴
4x
∴ Ln   = 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
  y 3   y 
2
∴ 1 +   dx − 3  dy = 0
  x   x
 
Assume u = y / x ⇒ y = ux

dy du
∴ = x+u
dx dx

( )
 du
 dx

∴ 1 + u 3 − 3u 2  x + u  = 0

du
∴ 1 + u 3 − 3u 3 − 3u 2 x=0
dx
du
∴ 1 − 2u 3 − 3u 2 x=0
dx
du
∴ 1 − 2u 3 = 3u 2 x
dx
3u 2 dx
∴∫ 3
du = ∫ + c1
1 − 2u x

1 2 * 3u 2 dx
∴ ∫
2 1 − 2u 3
du = ∫ x
+ c1


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

( )
∴ ln 1 − 2u 3 = 2 ln (cx ) = ln (cx )2
112 Ordinary Differential Equations

∴ 1 − 2u 3 = (cx )2 ∴ u3 =
1
2
(
1 − kx 2 )
Substitute in the above equation for u = y / x

( )
3
 y 1
∴   = 1 − kx 2
x 2

∴ y3 =
1 3
2
(
x 1 − kx 2 )
∴y=x 3 (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,

∂F ∂F
∴ dF = dx + dy
∂x ∂y
∂F ∂F
∴M = and N =
∂x ∂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 ∂y∂x ∂x ∂y∂x
∂M ∂N
∴ = (17)
∂y ∂x
Thus for (14) to be exact it is necessary that (17) be satisfied.
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.
∂F
To determine k ( y ) we drive from (18), and equate it to N,
∂y
∂F ∂k
where, = 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.
∂F
To determine k ( x ) we drive from (19) and equate it to M,
∂x
∂k
then we can get 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 (21)
∂y ∂x
Then (20) is exact. Therefore, its solution is F = c , where,
∂F
= M = 3x( xy − 2) (22)
∂x
∂F
And = N = ( x3 + 2 y) (23)
∂y
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
∂y ∂y 1
424 3
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
∂x ∂x 1424 3
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 2
( y 2 e x y + 4 x 3 )dx + (2 xy e x y − 3 y 2 )dy = 0 (26)
1442443 1442443
M N
∂M ∂N 2 2
Solution: = = 2 y e x y + 2 xy 3e x y
∂y ∂x
Then according to the condition (17), the equation is exact.
∂F 2
∴ = M = y 2 e x y + 4 x3 (27)
∂x
∂F 2
And = N = 2 xy e x y − 3 y 2 (28)
∂y
Chapter Four 117

∴ F = ∫  y 2 e x y + 4 x 3  dx + k ( y )
2

 
2
∴ F = e x y + x 4 + k ( y) (29)

∂F 2 ∂ k ( y)
∴ = N = 2 xy e x y +
∂y ∂y
Compare the above value with the value of N in (26) we get the
∂ k ( y)
value of .
∂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
= (30)
dx 3 y 2 tan 2 x − x 2 sin y

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

(
14444244443
) (
144424443
)
∴ 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)
M N

∂M
∴ = −2 x sin y + 6 y 2 sec 2 2 x (32)
∂y
∂N
∴ = 6 y 2 sec 2 2 x − 2 x sin y (33)
∂x
118 Ordinary Differential Equations
∂M ∂N
It is clear that, =
∂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
∂ k ( x)
equate it with M as in (31) we can obtain . Then by
∂x
integration with respect to x we can obtain k ( x ) as follows:
∂F
∂x
= 2 y 3 sec 2 2 x + 2 x cos y +
∂k ( x)
∂x
( )
= 4 − 2 x cos y − 2 y 3 sec 2 2 x
14444244443
M
∂ k ( x)
∴ = −4, ∴k ( x) = −4 x
∂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 (34)
 x   x
Solution:
 y   1
∴ M =  3 yx 2 − 2  and N =  x 3 + cos y +  (35)
 x   x
∂M ∂N 1
∴ = = 3x 2 − 2
∂y ∂x x
Chapter Four 119
Then (34) is exact. Therefore, its solution is F = c where,
∂F  y 
= M =  3 yx 2 − 2  (36)
∂x  x 
∂F  1
And = N =  x 3 + cos y +  (37)
∂y  x
Let us attempt to determine F by integrating (36) with respect to x.
y
∴ F = x3 y + + k ( y)
x
∂F 1 ∂k ( y )  3 1
∴ = x3 + + =  x + cos y + 
∂y x ∂y 1442443 x
N
∂k ( y )
∴ = cos y
∂y

∴ k ( y ) = ∫ cos y dy

∴ k ( y ) = sin y
y
∴ F = x3 y + + sin y = C
x

Example 15 Solve the following differential equation:

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

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

∂M ∂N
∴ = = 3e3 x
∂y ∂x
Then (38) is exact. Therefore, its solution is F = c where,
120 Ordinary Differential Equations
∂F
∂x
(
= M = 3e3 x y − 2 x ) (40)

∂F
And = N = e3 x (41)
∂y
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 and N = cosh x sin y (44)

∂M ∂N
= = − sinh x sin y (45)
∂y ∂x
Then (43) is exact. Therefore, its solution is F = c where,
∂F
= M = sinh x cos y (46)
∂x
∂F
And = N = − cosh x sin y (47)
∂y
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
∂y ∂y 14 4244 3
N

∂k ( y )
∴ =0 ∴ k ( y ) = c1
∂y
∴ 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 (49)

Solution: ∴ M = (tan y − sin x ) and N = x sec 2 y


∂M ∂N
∴ = = sec 2 y
∂y ∂x
Then the differential equation is exact. Therefore, its solution is
∂F
F = c where, = M = (tan y − sin x )
∂x
∂F
And = N = x sec 2 y
∂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
∂y ∂y 1424 3
N
∂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 ∴ Ln( y ) = − ∫ f ( x)dx + C *
y
∴ y ( x) = Ce − ∫ f ( x ) dx (51)
*
Where, C = e c and c, and c * are constants.
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:
1
y′ + y = x 3 This equation in the form of (52)
x
1 1
∴ f ( x) = , 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 ]
∴ y ( x) =
1
x
[ 4
]
1  x5  x4 C
∫ 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 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 [∫ x 2
e3 x dx + C ]
124 Ordinary Differential Equations
e5 x  2 2 2 2x
∴ y ( x) =  x − 3 x + 9  + C e
3
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
y=
( x + 1)2
x x
This equation is linear first order differential equation. Then we
can use the general solution, (52) to solve it.

1
∴ f ( x) = − , r ( x) =
( x + 1)2 1 1
And h = ∫ − dx = − ln x = ln 
x x x  x

− ln    
1 1
e x
ln  
e  x
(x + 1)2 dx + C 
∫
∴ y ( x) =
x 
 

 1 ( x + 1)2 
∴ y ( x) = x  ∫ dx + C 
 x x 
 ( x + 1)2 
∴ y ( x) = x  ∫ dx + C 
 x2 

  2 1  
∴ y ( x) = x  ∫ 1 + + 2 dx + C 
  x x  
 1 
∴ 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 Newton’s 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:
dv
F =m (54)
dt
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
m = mg − kv Or + v=g (56)
dt dt m
Which is linear first order differential equation and in the form of
(50). So, the solution will be in the form of (52). Thus:
k k k
∴ f (t ) = , r (t ) = g and h = ∫ dt = t
m m m
126 Ordinary Differential Equations
 kt  − t m 
k k k
− t t
∴v =e m  ∫ e g dt + C1  ∴v = e
m m  ge + C1 
m
  k 
   
 − t 
k
mg 
∴v = 1 + Ce m 
k  
 
 − t 
k
mg 
But v(0) = 0 then C = −1 ∴v = 1− e m 
k  
 
dx
To obtain the position x of the body we replace v by in the
dt
above equation and integrate and use the second initial condition
x(0) = 0 , gives:
 − t 
k
mg m 2 g 
∴x = t − 2 1− e m 
k k  
 
Which is the position of the body at any time t.

4.4.2 Newton’s Law Of Cooling


Newton’s 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
temperature in 40 minutes if the surrounding temperature is 20 C.

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


dT
Then, from Newton law we can say that: = k (T − 20)
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.0235 And, T (t ) = 20 + 80e
− 0.0235t
∴k = Ln
20  80 
To obtain the temperature after 40 minutes we can substitute in the
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.
dy  10 − y 
= ky (C s − Ca ) = ky 0.2 −  = Ky ( y + 10)
dt  100 
128 Ordinary Differential Equations
Where k and K are the constant of proportionality.
By solving the above equation by using separable variable
1  y 
method we get: 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

1  y 
Q Ln  = −0.02877t − 0.0693
10  y + 10 

1  2 
Q 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 dV = −π *102 dh h=25m
dh

of radius 10 m and height 25 m


whose axis is vertical as shown in
Fig.2
Fig.2, is filled with water. How long
will it take for all the water to escape through dV = π (.5)2 0.6 2gh dt

an orifice with 50 cm radius at the bottom of


v = 0.6 2gh
the tank?
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 (59)
by equating (57) and (59) we get the following equation:

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

ro2
∴2 h = −0.6 2 g 2
t+c (60)
r
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
ro2
results: 2 h = −0.6 2 g t + 2 Ho
2
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 .

2 25
te = 2 2
= 1505 sec . = 25.08 min .
0.6 2 * 9.81 * 0.5 / 10

Example 25 A spherical tank of R R


R-h
radius R=100 cm which contains r dh

water and has outlet of radius h

ro = 5 cm at the bottom of the tank as


shown in Fig.3. At time t = 0 the outlet is
Fig.3
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 2 gh , where ( g = 9.81m/s 2 ) is the acceleration


of the gravity.
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 Torricelli’s 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:

area * length = π ro2 * 0.6 2 gh (63)


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 20m
Now by torricelli’s law the
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.
Area = 50 cm 2
The unit volume escape from the orifice at 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:
dh
0.6 2 gh * 50 * 10 − 4 dt = −π 10 2 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 135
( )
∴ −π 20h − h 2 dh = 0.6 2 gh * 50 * 10 − 4 dt

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

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

ro2
∴2 h = −0.6 2 g 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
ro2
∴2 h = −0.6 2 g t + 2 30
r2
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,

ro2
∴2 10 = −0.6 2 g t + 2 30
10 2
Q 50 *10 − 4 = πro2 ∴ ro = 3.99cm

.0399 2
∴2 10 = −0.6 2 * 9.81 2
t + 2 30
10
tcylinder = 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
it take for all the water to escape Fig.5

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.

r
dh
h-R R

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 (71)
3 2L
Where c is the constant of integration.
At time t = 0, h = 2 R Substitute this condition in the above
equation we get the value of the constant c,
∴c =0 (72)
Substitute from (72) into (71).


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).

4 LR 3 / 2
∴ tu = (74)
3π ro2 2 g
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

dh
R-h R

h r
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 (77)
3 2L
140 Ordinary Differential Equations
Where c is the constant of integration. At time
4 LR 3 / 2
t = tu = , h = R substitute this condition in the above
3π ro2 2 g
equation we get the value of the constant c,
2 3/ 2 − π 2 4 LR 3 / 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 .

4 L(2 R )3 / 2
∴ ttotal = (79)
3π ro2 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:

4 * 16 * 83 / 2
tu = = 3468.92 sec . = 57.82 min .,
3 * π * 0.12 * 2 * 9.81

4 * 16 * (2 * 8)3 / 2
ttotal = = 9811.59 sec . = 163.52 min ., and,
3 * π * 0.12 * 2 * 9.81
∴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


dh
flows out. Determine the time
20 m
required for the tank to get empty
assuming the tank was initially θ h
completely filled with water. The velocity
with which liquid issues from an orifice is Radius = 20 cm
v = 0. 6 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
But = ∴r = h (82)
h L L
Substitute the value of r in (82) into (81) we get the following result:
2
R 
dV = −π *  h  dh (83)
L 
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 (84)
By equating (83) and (84) we get the following result:
2
R 
− π *  h  dh = πro2 * 0.6 2 gh dt
L 
 Lro2 
∴ h dh = −0.6 2 g 
3/ 2
 dt

 R 
By integrating both sides of the above equation we get the
2  Lr 2 
following: ∴ h 5 / 2 = 0.6 2 g  o t + c (85)
5  R 
 
where c is the constant of integration
At time t = 0 , h = L . Substitute this initial condition into (85):
2 2 5/ 2
∴ L5 / 2 = 0 + c ∴c = L (86)
5 5
Substitute the value of c in (86) into (85) we get the following:

2 5/ 2  Lro2  2 5 / 2
∴ h = 0.6 2 g  t + L
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
2 L5 / 2  R 
∴t = *  (87)
5 * 0. 6 2 g Lr 
 o 
Substitute the data obtained in (87) where L = 20m , R = 5m R,
ro = 0.2m
2
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 (90)
The second initial condition is y = y0 / 2 at t = 1590 years .
Substitute this condition into (90)
y0
∴ = y0 e k *1590 ∴ k = −4.36 *10 − 4
2
−4
∴ y = y0 e − 4.36 *10 t (91)
To obtain the percent disappear after one year we can do the
following:

 y (1)   y e − 4.36 *10 −4 *1 


1 −  * 100 = 1 − 0  * 100 = 0.0436 %
 y0   y0 
 
144 Ordinary Differential Equations
4.4.6 Electrical Circuits
Example 30 Find the current in the RL circuit in vR(t)
Fig.9. Assume I (0) = 0 R=10 Ω, L=2H if:

_
+
− 3t
(a) E (t ) = 40 V , (b) E (t ) = 20 e E(t)
_ I(t)
and (c) E (t ) = 50 sin 5 t .

+
Solution: From Kirchoff’s laws vL(t)
dI Fig.9
RI + L = E (t )
dt
dI R E (t )
∴ + I=
dt L L
10 40
(a) I& + 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 ∴ h = ∫ 5dt = 5t

∴ I (t ) = e − 5t [∫ e 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 ]
5 
I (t ) = e − 5t  e5t (sin 5t − cos 5t ) + k  But I (0) = 0 ∴ k = 5 / 2
2 

∴ I (t ) =
5
2
[(sin 5t − cos 5t ) + e −5t ]
Example 31
Find the current in the RC circuit in
Fig.10. Assume I (0) = 0 R=5 Ω, vR(t)
C=.02F and E (t ) = 50 sin 20 t .
+

_
+ +
Assume (a) vc (0) = 0 and E(t)
_ I(t) _ vC(t)
(b) vc (0) = 100
Solution:
From Kerchief’s laws Fig.10
1
C∫
RI + Idt = E (t )

dI 1 1 dE (t )
∴ + I=
dt RC R dt
1 1d
∴ I& + I= 50 sin 20 t
RC R dt
146 Ordinary Differential Equations
1 1
∴ I& + 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 ]


10t

∴ I (t ) = e −10t [ 4 e (cos (20 t ) + 2 sin ( 20 t )) + k ]


10t

∴ I (t ) = 4 cos (20 t ) + 8 sin ( 20 t )) + ke −10t

1
C∫
(a) For vc (0) = Idt =0
t =0

k −10t
∴ 0.2 sin( 20 t ) − .4 cos (20t ) − e =0 ∴ k = −4
10 t =0

∴ I (t ) = 4 cos (20 t ) + 8 sin ( 20 t )) − 4e −10t


1
C∫
(b) For vc (0) = Idt = 100 V
t =0

1  k −10t 
∴ 0 . 2 sin( 20 t ) − .4 cos ( 20t ) − 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 2) y ′ = cos y
xy
3) y ′ = 4) y ′ = 2 y / x
2
1+ 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 , y ( 0) = 0
7) y ′ + y 2 = 0, y (5) = 0.25 8) 9 yy ′ + 4 x = 0, y (3) = −4
[III] Find the general Solution of the following differential
equations:

dy x 2 dy x2
9) = 10) =
dx y dx y (1 + x 3 )

11)
dy
dx
+ y 2 sin x = 0 12)
dy
dx
( )(
= cos 2 x cos 2 2 y )
dy 1 − y2 dy x − e − x
13) = 14) =
dx x dx y + e y
dy
15) = y tanh x 16) ( xLn( x) )dy − ydx = 0
dx

[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, y (0) = 1
dy Ln( x)
19) = , y (1) = 0
dx (1 + y 2 )

20) y ′ = 2e x y 3 , y (0) = 0.5

21) y ′ = 3 x 2 e − y , y (−1) = 0
2
22) yy ′ = xe y , y (1) = 0
23) xyy ′ = y + 2, 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 x ye x − 1dx + e x dy = 0
2 2
٣٧)
 
٣٨) (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
x 
٤٢) 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 , y (π ) = eπ + 2 / π
2
50) 2( y + 1) y ′ − ( y + 1) 2 = x 4 , y (1) = 2 / 3 − 1
x
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 Newton’s 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


in the following figure. Assume
vR(t)

I (0) = 0 and v L (0) = 0 , vc (0) = 0


+

+ +

(a) R=200 Ω, L=short circuit, C=0.005 E(t)


_ I(t) _ vC(t)
farads and E (t ) = 200 cos 3 t
_

(b) R=160 Ω, L=20H, C=short circuit, vL(t)


and E (t ) = 500 t cos 10 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).

dny d n −1 y d1y d0y


f n ( x) + f n −1 ( x) + ......... f1 ( x) + f 0 ( x) = r ( x) (1)
n n −1 1 0
dx dx dx dx

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 2 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.
y1( x) y 2 ( x) ............. yn ( x )
y1′ ( x) y2′ ( x)
............. yn′ ( x)
W ( y1, y2 , yn ) ≠0 (3)
.............
y1n −1( x) y2n −1( x) ............. ynn −1( x)
Called the Wronskian of y1 , y 2 , 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 λ n−1 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 λ n−1 x + ........ C1 e λ1 x (5)


Where C n , C n −1 ,..............C1 are constants.
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 = Cneλn x +Cn−1eλn−1x +......(Ck xk −1 + Ck −1xk −2 +....C1)eλ1x (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 − 5λ2 + 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:
3
∴ λ2 + λ + 1 = 0 ∴ λ1,2 = −0.5 ± j .
2
Then, the solution takes the form (6).
  3   3 
∴ y = e −0.5 x  A cos x  + B sin  x 
  2   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 )
(
cos px * cn x n + cn −1 x n −1 + ......c0 + ) ( )
cos 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 )

( )
e qx cos px * c n x n + c n −1 x n −1 + ......c0 + ( )
e qx cos px * An x n + An −1 x n −1 + ...... A0 +
e sin px * (k n x + k n −1 x
qx n n −1
+ ......k 0 ) e qx sin px * (Bn x n + Bn −1 x n −1 + ......B0 )

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
∴ k1 = and k 2 = −
3 3
2 1
∴ y p ( x) = xe x − xe − 2 x
3 3
2 x 1 −2x
∴ y ( x) = y h ( x) + y p ( x) = C1e x + C 2 e − 2 x + 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 =
6 18 108
1 5 19  5 x
∴ y p ( x) =  x 2 − x + e
 6 18 108 
1 5 19  5 x
∴ 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) = 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

∴ 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
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 − 6λ2 + 12λ − 8 = 0

∴ λ1 = λ2 = λ3 = 2 ( )
∴ y h ( x) = C1 + C2 x + C3 x 2 e 2 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 + k3e 2 x . But there is a term in

homogeneous solution dependant with the assumed particular


solution. So we have to multiply it by x 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

∴ y′p′′ ( 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 .
1 1 3 3
∴ k3 = , k 2 = − , k1 = − , and k 0 = − .
6 8 8 8
1 2
(
∴ y p ( x) = − x + 3 x + 3 +
8
x3 2 x
6
e )
( )
∴ y ( x) = y h ( x) + y p ( x) = C1 + C 2 x + C3 x 2 e 2 x − (
1 2
8
)
x + 3x + 3 +
x3 2x
6
e

Example 13 Solve the following differential equation:-

3 y ′′ − 6 y ′ + 36 y = e x sin (3 x )

Solution:- The auxiliary equation is: 3λ2 − 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 e x sin 3x
∴ k2 = ∴ yp =
6 6
e x sin 3 x
[
∴ y ( x ) = yh + y p =e A cos 11x + B sin 11x +
x
6
]
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 )
( ) ( )
+ k5 x 3 + k 6 x 2 + k 2 x cos x + 3k5 x 2 + 2k6 x + k 2 sin 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
∴ y′p′ = [− 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
Substitute y p , y ′p , and y ′p′ into the differential equation and

compare both sides we get the following equation:

[− k x3
3
+ (6k5 − k 4 ) x 2 + (4k 6 + 6k3 − k1 )x + 2(k 2 + k 4 ) cos x ]
[− k x 5
3
− (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 (8)

Coefficient of x cos x = 4 ∴ 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 (10)

Coefficient of x 3 cos x = 0 ∴ − 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 (12)

Coefficient of x 2 sin x = 0 ∴ 0 = (k 6 − 6k3 ) + k 6


∴ k6 = 3k3 (13)
coefficient of x 3 sin x = 0 ∴ − 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
9  3
2  2
∴ y ( x ) = y h + y p = A cos x + B sin x +  x 3 + 5 x  cos x + x 2 sin x
9  3

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. cos B = (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
∴ λ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
1
+ A cos 5 x + B sin 5 x + C x cos x + D x sin x = (sin 5 x − sin x )
2
Coefficient of cos 5 x = 0 ∴ −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 (15)
5 1
From (14), and (15) ∴A= , 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 (17)
From (16) and (17) we get the following:
168 Linear Differential Equations Of Higher Order
1 1
C = , and D =
5 10
1
∴ yp = (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 Differential


Equations
IF we have the following differential equation:
y ′′ + f ( x ) y ′ + g ( x ) y = r ( x ) (18)
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 (19)
The general solution of this equation is:-
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′ + v′y 2 + vy 2′ (21)
We shall see that we can determine u and v as following:
u ′y1 + v′y 2 = 0 (22)
Chapter Five 169
∴ y ′p ( x) = uy1′ + vy 2′ (23)

∴ y ′p′ ( x) = u ′y1′ + uy1′′ + v′y 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′ + v′y 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′ + v′y 2′ = r (26)
Solving (22) and (26) together we get the following equation:
y2 r y1r
u′ = − and v′ = (27)
W W
Where W = y1 y 2′ − y1′ y 2
y2 r yr
∴u = −∫ dx and v = ∫ 1 dx (28)
W W
Substituting (28) into (20) we get the final form as following:-
y2 r yr
y p ( x) = − y1 ∫ dx + y2 ∫ 1 dx (29)
W W

Example 16 Solve the following differential equation:-

e2x
y ′′ − 4 y ′ + 4 y =
x
Solution:- The auxiliary equation is ∴ λ2 − 4λ + 4 = 0

∴ λ1 = λ2 = 2, ∴ y h = (c1+ c2 x ) e 2 x
170 Linear Differential Equations Of Higher Order
The particular solution can be obtained from (29)
y2 r yr
y p ( x) = − y1 ∫ dx + y 2 ∫ 1 dx
W W

e2x xe 2 x 4x
∴W = 2 x = e
2e (2 x + 1)e 2 x
xe 2 x e 2 x / x e2xe2x / x
∴ y p ( x ) = −e 2x
∫ dx + xe 2x
∫ dx
e4x e4x
∴ 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:-


2
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 e−2x
W = −x −2x
= −e − 3 x
−e − 2e
2 2
−x e−2x * 2x e x −2x e − x * 2 xe x
∴ y p ( x ) = −e ∫ − e −3x
dx + e ∫ − e −3x
dx
Chapter Five 171
2 2
x 2 ex x2 ex
∴ y p ( x) = e + −e +
1 + 2x 1+ x
2 x 
∴ y p ( x) = e x  
 1 + 3x + 2 x 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)
Coefficient of sin x = 0
∴ −2k1 − k3 + 9k3 = 0 , ∴ −2k1 + 8k3 = 0 (32)
Substitute from (30) into (32) we get:
1
∴ 8k 3 = 2 / 8 , ∴ k3 = (33)
32
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:

x cos x sin x
∴ yp = +
8 32
x sin x sin x
∴ y ( x ) = A cos 3x + B sin 3 x + + (36)
8 32
Another solution for obtaining y p by using Wronskian determinant.

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
x sin 3 x cos x x cos 3 x cos x
∴ y p = − cos 3 x ∫ dx + sin 3 x ∫ dx
3 3
Chapter Five 173
− cos 3 x  − x cos 4 x sin 4 x x cos 2 x sin 2 x 
∴ yp =  + − +
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 = 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

∴ 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
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
[( ) (
− 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 ) ]
+ 6[(k x
2
3
) ]
+ 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 (39)
Coefficient of x 2 e 2 x = 1
∴ 4k1 + 6k 2 + 6k 2 − 10k1 − 15k 2 + 6k1 = 1
1
∴ − 3k 2 = 1 , ∴ k 2 = − (40)
3
Substitute from (40) into (39) we get:
Chapter Five 175
6
∴ k1 = − , ∴ k1 = −1 (41)
(3 * 2)
Substitute from (41) into (38) we get: ko = −2
 x2 
∴ y p = − + x + 2  x e2x
 3 
 
 x2 
∴ y ( x ) = c1e + c2 e − 
2x
+ x + 2  x e2x
3x
(42)
 3 
 
Another solution to obtain y p by using the Wronskian theory
e2x e3x
y1 = e 2x
, and y 2 = e 3x
∴W = 2x 3x
= e5 x
2e 3e
2x e3 x x 2e 2 x 3x e 2 x x 2e 2 x
∴ y p = −e ∫ e 5x
dx + e ∫ e 5x
dx

( )
3
x
∴ y p = −e 2 x * − e3 x x 2 + 2 x + 2 e − x
3
2 x  x 
3
∴ y p = −e + x2 + 2x + 2
 3 
 
 x3 
∴ y ( x ) = c1e + c2 e −  + x 2 + 2 x + 2  e 2 x
2x 3x
 3 
 
3 x  x 
3
∴ y ( x ) = (c1 − 2 )e + c2 e −
2x
+ x2 + 2x  e2x
 3 
 
3 x  x 
3
∴ y ( x ) = c1 e + c2 e −
* 2x
+ x2 + 2x  e2x (43)
 3 
 
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 (46)
We have two roots of (46). So, we have three different cases,
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


takes the following form:- y ( x) = (C1 + C 2 Ln x )x
m
(49)
Case 3 If there are two complex conjugate roots m1 , m2 = α ± jβ

( )
∴ 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


m
+ 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 (54)

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
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, we get
C3 = 5 ∴ y p = 5 . Then the total solution is
( )
∴ 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 y
m
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 (55)
Where m is the mass of the body and (g=9.81 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 (57)
It is clear that from equilibrium
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 (64)

c k
The auxiliary equation is: λ2 + λ + = 0 (65)
m m
c 1
∴ λ1, 2 = − ± c 2 − 4mk (66)
2m 2m
c 1
∴α = − and β = c 2 − 4mk (67)
2m 2m
Where, λ1,2 = −α ± β (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
I (0) = 0 and v L ( 0) = 0 for
vR(t)
R=160 Ω, L=20H, C=0.002
+

_
Farads and E (t ) = 481cos10 t . + +

Solution:-, From KVL E(t)


_ I(t) _ vC(t)
VL + VR + VC = E (t )
_

di 1
L + RI + ∫ idt = 481cos10 t vL(t)
dt c
Differentiate both sides of the 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 (69)

The homogeneous solution:- λ2 + 8λ + 25 = 0 , ∴ λ = −4 ± j 3


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 183
EIy ′′
= M ( x) (73)
(1 + y ) ′2
3/ 2

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
A B

x
Deflection, y(x)
y

Fig.3
Solution:- The total weight of the beam is WL, so each end supports
1
weight is 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
1 1
(١) Force 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
1 2 1
Then the total bending moment at x is Wx − WLx .
2 2
1 1
∴ EIy ′′ = Wx 2 − WLx (75)
2 2
By solving this equation for y (0) = 0 and y ′(0) = 0 we find,
W
y ( x) = ( 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

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.

x L-x
A C
B
5-x 30000 N
x

y Deflection, y(x)
Fig.4
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 (79)
Substitute (79) into (77)

( )
∴ EI 12 A1 x 2 + 6 A2 x + 2 A3 = 1500 x 2 − 30000 x
1500 125 30000 5000
∴ A1 = = , A2 = − =− , A3 = 0
12 EI EI 6 EI EI
Then the general solution of (77) is:

∴ y ( x) =
1
EI
( )
125 x 4 − 5000 x 3 + c2 x + c1 (80)

The boundary condition is : y (0) = 0, y ( L) = 0 ,


186 Linear Differential Equations Of Higher Order

∴ c1 = 0, c2 =
1
EI
(
5000 L2 − 125L3 = )
375000
EI
(81)
Substitute (81) into (89) we get:

∴ y ( x) =
1
EI
[
125 x 4 − 5000 x 3 + 375000 x ] (82)
(b) The maximum deflection occurs at x = L / 2 = 5m , then
substitute in (82) for x = 5 we get the maximum
1328125
deflection as
EI

Example 28 10 m
L-x
cantilever beam has one A C x
end horizontally
B
imbedded in concrete
Deflection, y(x) Fig.5
12000 N
and a force 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
1500 125 12000 2000
∴ A1 = = , A2 = = , A3 = 0
12 EI EI 6 EI EI
Then the general solution of (83) is:

y ( x) =
1
EI
( )
125 x 4 + 2000 x 3 + c2 x + c1 (86)

The boundary condition is : y (10) = 0, y ′(10) = 0 ,

7.75 * 10 6 1.1 * 10 6
∴ c1 = , c2 = − (87)
EI EI
Substitute (87) into (86)

∴ y ( x) =
1
EI
[
125 x 4 + 2000 x 3 − 1.1 * 10 6 x + 7.75 * 10 6 ] (88)

(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
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 )2
١٢) 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)
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)
0
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.
Chapter Six 191
Example 1: find Laplace transform of the following function:
f (t ) = 1
∞ ∞ ∞
e − st 0 −1 1
Solution: F ( s ) = ∫ e − st f (t )dt = ∫ e − st dt = = =
0 0
−s −s s
0

Example 2: find Laplace transform of the following function:

f (t ) = e at
Solution:
∞ ∞ ∞ ∞
− st − st at − ( s − a )t e − ( s − a )t 1
F ( s ) = ∫ e f (t )dt = ∫ e e dt = ∫ e dt = =
0 0 0
− ( s − a) s−a
0

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 L−1{F ( s )} = f (t )

1
Example3 If F ( s ) = , find f (t )
s2
1 −1  1 
Solution: Since F ( s ) = , 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 L−1{F ( s )} = f (t ) ,

∴ L−1{F ( s − a )} = e at f (t ) (3)
Proof:
∞ ∞
−1 − ( s − a )t
L {F ( s − a )} = ∫ f (t ) e dt = ∫ f (t ) e at e − st dt =e at f (t )
0 0

Theorem 4
t
If, g (t ) = ∫ f (t ) dt
0

1
∴ L{g (t )} = L{ f (t )} (4)
s

1
Example 4 Let F ( s ) = , find f (t )
s(s 2 + w2 )
Chapter Six 193
 1  1
Solution: We know that L−1  2  = sin ωt
 ( s + ω 2 )  ω

−1 
 1  1 t
∴L  2  = ∫ sin ωt dt
 s ( s + ω 2 )  ω 0
 1  1
∴ L−1  2 = [1 − cos ωt ]
 s ( s + ω 2 )  ω 2

1
Example 5 Let F ( s ) = , find f (t )
s 2 (s 2 + ω 2 )
Solution: We know from the previous example that:
 1  1
L−1  2 = [1 − cos ωt ]
 s ( s + ω 2 )  ω 2

−1 
 1  1 t
∴L  2 2 = ∫ [1 − cosωt ]dt
 s ( s + ω 2 )  ω 2 0
 1  1  1 
∴ L−1  2 2  =  t − sin ω t 
 s ( s + ω 2 )  ω 2  ω 

a
Example 6 Proof that L{sin at} =
(s + a 2 )
2

e jat − e − jat
Solution: We know that: sin at =
j2
It follows from the linear character of the transform that:
1 1
L{sin at} = L{e jat } − L{e − jat }
j2 j2
194 Laplace Transforms
1 1 1 1 1 j 2a a
∴ L{sin at} = − = =
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:
s
L{cos at} =
(s + a 2 )
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:
∞ ∞
− bt − bt − st a
(a) L{ae } = ∫ ae e dt = a ∫ e − ( s + b)t dt =
0 0
s+b

Γ(3) a * 2! 2a
(b) L{at } = ∫ at 2 e − st dt = a
2
= =
0 s3 s3 s3

s 4s
(c) L{4 cos 5t} = 4 * =
s 2 + 25 s 2 + 25
Γ(1 / 2) −3 π π
(d) L{−3 / t } = −3L{t1 / 2 } = −3 = = −3
s1 / 2 s s

1 
(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
1 s 2
= − 2 =
( 2
2 s 2 s + 4 s ( s + 4) )
Chapter Six 195
Example 8 Find the Laplace transform of the following functions:

(a) e − 5t t 3 (b) e − 5t cos 4t

{
Solution: (a) L e 5t t 3 = L t 3 } { }s = s −5 = s34! =
(s − 5)4
6
s = s −5

{ }
(b) L e − 5t cos 4t = L{cos 4t} s = s + 5 =
s
s 2 + 16 s = s + 5
=
s+5
( s + 5) 2 + 16
Theorem 5
For n = 1,2,3,.....

{ n
L t f (t ) = (−1) } n 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
ds
L(e at ) = −
d 1
=
1
ds s − a (s − a )2

d d w 2 ws
(b) L {t sin wt} = − L(sin wt ) = − =
ds 2
ds s + w 2
s 2 + w2 ( )2
{ 2 d
}
(c) L t sin wt = − L(t sin wt ) = −
d 2 ws
=
6 ws 2 − 2 w3
ds ds s 2 + w 2 ( ) (s 2 + w2 )3
2
196 Laplace Transforms

{ }
L te − t cos t = −
d
ds
d
L(e − t cos t ) = − L(cos t )
ds s → s +1
(d)
=−
d  s + 1 
=
( s + 1)2 − 1
(
ds  (s + 1)2 + 1  (s + 1)2 + 1 2 )
(e) t 3 cos ωt
s
we know that L{cos ωt} =
s2 + ω 2

{ 3
}
∴ L t cosωt = (− 1)
d3 
3
 2
s
3
2
ds  s + ω 

{ 3
∴ L t cosωt = − 2 }
d 2  s 2 + ω 2 − 2 s 2 
ds  s 2 + ω 2 (  )

{ 3
}

d  s2 + ω 2
∴ L t cos ωt = 
( )2
(− 2 s ) + (s 2 − ω 2 )(2 * (s 2 + ω 2 )* 2 s )

ds 
 (s 2 + ω 2 )4 

=−
(s 2 + ω 2 ) (6 s 2 − 6ω 2 ) − 3 * 2 s (s 2 + ω 2 ) * (2 s 3 − 6ω 2 s )
3 2

(s 2 + ω 2 )6
6(s 2 + ω 2 ) (s 2 − ω 2 ) + 12 s 2 (s 2 − 3ω 2 )
2
∴ L{ t cos ωt }= −
3

(s 2 + ω 2 )5
Example 10 Solve the following differential equation:
y ′′ + 2 y ′ + 5 y = 0 , y (0) = 2, y ′(0) = −4
Solution:
Chapter Six 197

s 2Y ( s ) − sy (0) − y ′(0) + 2[ sY ( s ) − y (0)] + 5Y ( s ) = 0


2s s +1 2
∴ Y (s) = =2 −
s 2 + 2s + 5 ( s + 1) 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)
Y ( s) = (7)
H ( s)
Where G (s ) and H (s ) are polynomials of s.
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
G(s) A A2 A
Y (s) = = 1 + + .... n + W ( s) (8)
H ( s) s − a1 s − a2 s − an
Where W (s ) is denotes the sum of the partial fractions
corresponding to all the (unrepeated or repeated) linear factors of
H (s ) which are not under consideration.
198 Laplace Transforms

∴ L−1{Y ( s )} = A1 e a1t + A2 e a 2 t + ....... An e a n t + L−1{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:
G( s)
An = (s − an ) (10)
H (s) s = a
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
Chapter Six 199
Solution:

G ( s) 2s 2 − 4 A1 A2 A3
Y ( s) = = 3 = + +
H ( s ) s − 4 s 2 + s + 6 ( s − 2) ( s + 1) ( s − 3)

∴ A1 =
(s − 2) * G(s)
=
(
(s − 2) 2s 2 − 4 ) =
4
=−
4
H ( s) s = 2 (s − 2)(s + 1)(s − 3) s =2
3 * −1 3

∴ A2 =
(s + 1) * G(s)
=
( 2
(s + 1) 2s − 4 ) =
−2
=−
1
H ( s) s=−1 ( s − 2)(s + 1)(s − 3) s=−1
− 3 * −4 6

∴ A3 =
(s − 3) * G(s)
=
(s − 3) 2s 2 − 4 ( ) =
14 7
=
H ( s) s =3 ( s − 2)(s + 1)(s − 3) s =3
4 2
G ( s) − 4 / 3 − 1 / 6 7/2
∴ Y ( s) = = + +
H ( s ) ( s − 2) ( s + 1) ( s − 3)
4 1 7
∴ y (t ) = − e 2t − e − t + e3t
3 6 2
m
Case 2 Repeated factor ( s − a ) , in this case;

G(s) Am Am −1 A1
Y (s) = = + + ...... + W ( s) (11)
H ( s ) (s − a )m (s − a )m −1 (s − a )

−1 t m−1
at  t m−2 
L {Y(s)}= e Am + Am−1 + ....+ A2t + A1 + L−1W(s) (12)
 (m −1)! (m − 2)! 

G (s )
Where: Am = (s − a )m (13)
H (s )

1 d m − k (s − a )m G ( s)
Ak = , (14)
(m − k ) ! ds m − k H ( s)
s =a

Where, k = 1,2,...., m − 1
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:
4 1
s 2Y ( s ) − sy (0) − y′(0) − 3[ sY ( s ) − y (0)] + 2Y ( s ) = +
s2 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 ( s − 3) ( s − 2) ( s − 1)

2G (s ) s 4 − 7 s 3 + 13s 2 + 4 s − 12 − 12
A2 = s * = = =2
H (s ) s = 0 ( s − 3)( s 2 − 3s + 2) −6
s =0

1 d s 4 − 7 s 3 + 13s 2 + 4 s − 12
A1 = =3
( 2 − 1)! ds ( s − 3)( s 2 − 3s + 2) s =0

G (s ) s 4 − 7 s 3 + 13s 2 + 4 s − 12 1
B = (s − 3) * = =
H (s ) s = 3 s 2 ( s 2 − 3s + 2) 2
s =3

s 4 − 7 s 3 + 13s 2 + 4 s − 12
C= = −2
s 2 ( s − 3)( s − 1) s=2

G (s ) s 4 − 7 s 3 + 13s 2 + 4 s − 12 1
D = (s − 1) * = = −
H (s ) s =1 s 2 ( s − 3)( s − 2) 2
s =1

2 3 1/ 2 2 1/ 2
∴ Y (s) = + + − −
s 2 s ( s − 3) ( s − 2) ( s − 1)
1 1
∴ y (t ) = 2t + 3 + e3t − 2e 2t − et
2 2
Chapter Six 201
Case 3 Unrepeated complex factors (s − a )
2 2
Where a = α + jβ , a = α − jβ , ( s − a )( s − a ) = ( s − α ) + β

G(s) As + B
Y ( s) = = + W (s) (15)
H ( s ) (s − α )2 + β 2

1 αt
L−1{Y ( s)} = e [Ta cos β t + S a sin β t ] + L−1{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 ′′ + 2 y ′ + 5 y = 0 , y ( 0 ) = 2 , y ′( 0 ) = − 4
Solution: S 2Y ( s ) − sy (0) − y ′(0) + 2[ sY ( s ) − y (0)] + 5Y ( s ) = 0
G ( s) 2s 2s
Y ( 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
[
∴ Ra ( s ) = S a + jTa = ( s − α ) 2 + β 2
G ( s)
H ( s)
] [
= ( s + 1) 2 + 4
G(s)
H (s)
]
[
∴ Ra (a ) = S a + jTa = (−1 + j 2 + 1) 2 + 4
G (a)
H (a)
] = 2 s = −2 + j 4

∴ S a = −2, Ta = 4
1
∴ L−1{Y ( s )} = eαt [Ta cos β t + S a sin β t ] + L−1{W ( 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
1
Solution: s 2Y ( s ) − sy (0) − y ′(0) − 3[ sY ( s ) − y (0)] + 2Y ( s ) =
s −1

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 = = −1
( s − 2)
s =1

d s 2 − 3s + 3
∴ A1 =
ds ( s − 2)
s =1

2
( s − 3s + 3) − ( s − 2)(2 s − 3)
= =0
( s − 2) 2 s =1

s 2 − 3s + 3
∴ B= =1
2
( s − 1) s=2

−1 1
∴Y ( s) = +
(s − 1)2 ( s − 2)

∴ y (t ) = −tet + e 2t

Example 15 Find f (t ) if F (s ) equals:

s 3 − 7 s 2 + 14s − 9
F (s) =
( s − 1) 2 ( s − 2)3
Solution:
Chapter Six 203
A2 A1 B3 B2 B1
F (s) = + + + +
( s − 1) 2 ( s − 1) ( s − 2)3 ( s − 2) 2 ( s − 2)

s 3 − 7 s 2 + 14 s − 9
A2 = =1
( s − 2) 3 s =1

d s 3 − 7 s 2 + 14s − 9
A1 = =0
ds ( s − 2) 3 s =1

s 3 − 7 s 2 + 14s − 9
B3 = = −1
( s − 1) 2 s=2

d s 3 − 7 s 2 + 14s − 9
B2 = =0
ds ( s − 1) 2 s =2

1 d 2 s 3 − 7 s 2 + 14s − 9
B1 = =0
2! ds 2 ( s − 1) 2 s=2

1 1
∴ F (s) = 2

( s − 1) ( s − 2) 3
1
∴ f (t ) = te t − t 2 e 2t
2

s +1
Example 16 Find f (t ) if F (s ) equals: F (s) =
s ( s 2 + 2) 3
2

Solution:
A2 A1 B3 B2 B1
F (s ) =
) ( )
+ + + +
s2 s (
s2 + 2
3
) (
s2 + 2
2
s2 + 2
204 Laplace Transforms

s +1 1
∴ A2 = =
( s 2 + 2) 3 s =0
8

d s +1 1
∴ A1 = =
ds ( s 2 + 2) 3 8
s =0

(
Q s2 + 2 = 0 )3 ∴ s = ± j 2 = α + jβ

∴ α = 0, β = 2

s +1 1 1
∴ B3 = =− − j
s2 s= j 2 2 2

d s +1 s 2 − 2s (s + 1) 1 1
∴ B2 = = =− − j
ds s 2 s = j 2 s4 2 2 2
s= j 2

1 d − s 2 − 2s
∴ B1 =
2! ds s4 s= j 2

1  s 4 (− 2 s − 2 ) + 4 s 3 s 2 + 25 
=  
( ) = −0.75 − j 0.3535
2  s8  s = j 2

t 1 1  −1 1 2 1
∴ y(t ) = + +  cos 2t − sin 2 t − cos 2t − sin 2t
8 8 2 2 2 4 2
− 0.35 cos 2t − 0.75sin 2t ]
∴ y (t ) =
(t + 1) − (cos 2t + 1.24 sin 2t )
8
Chapter Six 205
Theorem 6
 f (t )  ∞
If L{ f (t )} = F ( s ) ∴ L  = ∫ F ( s ) ds (18)
 t  s
Proof:

By definition: L{ f (t )} = F ( s ) = ∫ f (t )e − st dt
0

Integrate both sides of the above equation from s to ∞ , we obtain


the following equation:
∞ ∞ ∞
∫s F ( s ) = ∫  ∫ f (t )e − st dt  ds (19)
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:

∞ ∞ ∞ ∞  e − st 
∫ F (s )ds = ∫ ∫ f (t )e − st
ds dt = ∫ f (t )  dt
s s 0 0
 − 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 ) = L−1{F (s )} = tL−1 ∫ F ( s ) ds
s
}
Example 17 Find Laplace transform of the following function
sin ωt
t
Solution: From theorem (6) we can say that:
206 Laplace Transforms

 sin ωt  ∞ ∞ ω s
L  = ∫s L{sin ωt}ds = ∫s 2 ds = tan −1
 t  s +ω 2 ω s
 sin ωt  π −1 s s
∴ L  = − tan = cot −1
 t  2 ω ω

Example 18 Find inverse Laplace transform of the following


s
function:
(s 2 − 1)2
Solution: From above theorem we have immediately that:

   ∞
 ∞ s  −1  − 1 
f (t )= tL−1  ∫ 2 2 ds  = tL  2 s 2 − 1
s
 s − 1( )
  ( )s 

 1  sinh t
∴ f (t ) = tL−1  2
 2 s(− 1
=t
 ) 2

Example 19 Find inverse Laplace transform of the following


s+2
function: F (s ) =
(s 2 + 4s + 5)2
 s+2   
−1   − 2t −1  s 
Solution: L {F (s )} = L 
−1
=e L  
( 2
 (s + 2 ) + 1 
2
) 2
(2
 s + 1  )
     ∞
− 2t −1  ∞  s   − 2t −1  − 1 
∴ L {F (s )} = t e L ∫
−1
s  2
(
  s + 1  
2
ds  = t e L  2
)  2 s + 1( )
s 

 1  t e − 2t sin t
∴ L−1{F (s )} = t e − 2t L−1  2
 2 (s + 1
=
 ) 2
Chapter Six 207
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,
uc (t ) = 1
0,
 t≥c c≥0 (20)

Its graph is shown in the following Fig.1.

uc(t)

Fig.1
t
t=c

Example 20 Find Laplace transform of uc (t )


Solution:
∞ ∞
e − cs
c
L{uc (t )} = ∫ e − st
uc (t )dt = ∫ e − st
(0)dt + ∫ e − st
(1)dt =0 +
0 0 c
s

e − cs
∴ L{uc (t )} =
s
Example 21 Find Laplace transform of 8 * u3 (t )
Solution: This function has the following shape Fig.2

8e − 3s
∴ L{8 * u3 (t )} =
s
208 Laplace Transforms

8u3(t)

t
t=3
Fig.2

f (t )
Example 22 Find
Laplace transform of the
following function 2
2 2≤t≤3
f (t ) = 
0 Otherwise 2 3
Solution: f 1 (t )
The function f (t ) is u 2 (t )
shown in Fig.3. This 2
function can expressed in f 2 (t ) 3

terms of the two u 3 (t )


functions f1 ( x ) ,and, Fig.3
f 2 ( x ) where :
f ( x ) = f1 ( x ) + f 2 ( x ) = 2u 2 (t ) − 2u3 (t )

∴ F (s ) = L{ f (t )} = L{2u 2 (t ) − 2u3 (t )} =
2e − 2 s 2e − 3s 2 e − 2 s − e − 3s
− =
( )
s s s
We can check the above solution by using the elementary Laplace
transform principles as following:

L{ f (t )} = 2 * ∫
3 − st
e dt = 2*
e − st
3
= 2 = (
 e − 3s − e − 2 s  2 e − 2 s − e − 3s )
2 −s  − s  s
2  
Chapter Six 209
Example 23 Find Laplace transform of the following function
3 0≤t ≤2 4

f (t ) = − 2 2≤t ≤6 3
A B
0 Otherwise

2
Solution:
1 Fig.4
In this example we will try to
E
get general method to convert
O 1 2 3 4 5 6
this discontinuous function in -1
terms of unit step function. If
-2 C
we look deeply to the function D
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 3 t =0 3uo (t )
BC DOWN -ve 5 t=2 − 5u 2 (t )
DE UP +ve 2 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


2 0≤t ≤3 3

f (t ) = 0 3≤t ≤ 4 A B
1 Otherwise 2
 E
Solution: 1
The function f (t ) is C
O 1 2 3 4D 5 6 7
shown in Fig.5. As -1
explained in details in Fig.5
2
the previous example we can get the following table:
Jump Direction Sign Amplitude time Equivalent
OA UP +ve 2 t =0 2uo (t )
BC DOWN -ve 2 t =3 − 2u3 (t )
DE UP +ve 1 t=4 u 4 (t )
∴ f (t ) = 2uo (t ) − 2u3 (t ) + u 4 (t )
2 − 2e − 3s + e − 4 s
∴ L { f (t )} = L{2uo (t ) − 2u3 (t ) + u 4 (t )} =
s
Chapter Six 211
Theorem 7 If F (s ) is L{ f (t )}, then:
L{uc (t ) f (t − c)} = e − cs F ( s ) (21)
Conversely If f (t ) = L−1{F ( s )}, then:
∴ L−1{e − cs F ( s )} = uc (t ) f (t − c) (22)

Proof To proof theorem 7, it is sufficient to compute the transform


of uc (t ) f (t − c) . Clearly
∞ ∞
− st
L{uc (t ) f (t − c)} = ∫ e uc (t ) f (t − c)dt = ∫ e − st f (t − c)dt
0 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 )]


d 2  1 e − 3s 
∴ L{F (t )} = (− 1)2 2 s
− 
ds  s 
(
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 ) =
[ ]
s 2 − 9se − 3s + 3e − 3s − 3e − 3s − 2s (3se − 3s + e − 3s − 1)
s4
− 9s 2 e − 3s − 6se − 3s − 2e − 3s + 2
∴ F (s ) =
s3

∴ F (s ) =
− e − 3s
s3
(9s 2 + 6s + 2)+ s23

t2
Fig.6

3
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).
Chapter Six 213

{ ( )  2
∴ L t 2uo (t ) − (t − 3)2 + 6(t − 3) + 9 u3 (t ) =
−  }+
6 9  − 3s
2
+ e
s3  s3 s 2 s 
Which is clear, the same result that we got from previous solution.

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 )]

1 e − (s −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 )
t t
e 
 
It is clear the above equation is in the form of (21).
 t  e t −1   1  e− s  1  e − ( s −1) 
∴ L e uo (t ) −  −1 u1 (t ) = − * e = − 
  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 )
π
−s
kω kωe ω
∴ F (s ) = +
s2 + ω 2
s2 + ω 2
 π
kω  − s
∴ F (s ) = 2 2
1+ e ω 
s +ω 
 
Example 28 Find Laplace transform of the following function
0 ≤ t < 2π ,
f (t ) = 
sin 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 − 2πs L{cos (t )}
1 − 2πs s 1 + s e − 2πs
∴ L{ f (t )} = +e =
s2 + 1 s2 + 1 s2 + 1
Example 29 Find Laplace transform of the following function:

f (t ) = t 2 u 2 (t )
Chapter Six 215
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:

e − 2s
Q L{u 2 (t )} =
s

{ }
∴ L t u 2 (t ) = (− 1)
2 d 2  e − 2 s 
2
ds 2  s 
= e − 2s  2
 3
s
+
4 4
+ 
s2 s 
The second method: We can modify t 2 u2 (t ) to take the form in

(21)as following: Qt 2 = (t − 2 )2 + 4(t − 2 ) + 4

{ } {( ) }
∴ L t 2u 2 (t ) = L (t − 2 )2 + 4(t − 2) + 4 u 2 (t )

∴ L{t 2u 2 (t )}=
2e − 2 s 4e − 2 s 4e − 2 s
3
+ 2 +
s s s

∴ L{t 2u 2 (t )}=  3 + 2 + e − 2 s
 2 4 4
s s s
1 − e− s
Example 30 Find the inverse transform of
s2
Solution: From the linearity of the transform (Theorem 7) we have:

1 − e − s  −1  1  −1  e − s 
−1 
f (t ) = 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:

0 ≤ t < 1,
f (t ) = 1
t,
 t ≥1
216 Laplace Transforms
Example 31 Solve the following initial value problem
y ′′ + 4 y = r (t ) y (0) = 1, y ′(0) = 0 (23)
π ≤ t < 2π ,
Where, r (t ) = 
1,
(24)
0 otherwise

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 ) (25)
Then the Laplace transform of equation (23) is:
( s 2 + 4) Y ( s ) − sy (0) − y′(0) = L{uπ (t )} − L{u 2π (t )}

2 e −πs e − 2πs
( s + 4)Y ( s ) − s = −
s s
−πs
s e e − 2πs
Y ( s) = 2 + − (26)
( s + 4) s ( s 2 + 4) s ( s 2 + 4)
To compute y (t ) we must obtain the inverse transform of each term
on the right side of equation (26). The inverse transform of the first
term of (26) is:
 s 
y1 (t ) = L−1   = cos 2t (27)
2
 ( s + 4) 
The inverse transform of the second term of (26) is:
−1 
 e − πs  
−1  −πs  A1 A2 s + A3  

L   = L  e +
 s ( s 2 + 4)    s ( s 2
+ 4) 
 

e −πs 1
∴ A1 = =
( s 2 + 4) s = 0 4
Chapter Six 217
u (t ) u (t )
∴ y2 (t ) = π + π [Ta cos 2 (t − π ) + S a sin 2 (t − π )] (28)
4 2

[
Where Ra ( s ) = S a + jTa = ( s − α ) 2 + β 2 ]HG((ss)) = S1 =
1
j2
s= j2
1 1
∴ S a + jTa = − j , then Ta = − (29)
2 2
Substitute (29) into (28) we get:
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 )
∴ y3 (t ) = [1 − cos 2 (t − 2π )] (31)
4
Combining (27), (30) and (31) we obtain finally:
y (t ) = y1 (t ) + y 2 (t ) + y3 (t )
u (t ) u (t ) (32)
= cos 2t + π [1 − cos 2 (t − π )] − 2π [1 − cos 2 (t − 2π )]
4 4

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
− st
dt
∴ L{ f (t )} = 0 − ks
s>0 (33)
1− e
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:
1 2b
L{ f (t )} = ∫
− 2bs 0
f (t )e − st dt
1− e
1  b1 * e − st dt + 2b (− 1)e − st dt 
∴ L{ f (t )} = ∫ ∫b
1 − e − 2bs  0 

 − st b 2b 
1 e e − st 
∴ L{ f (t )} =  − 
1 − e − 2bs  − s −s
 0 b 

∴ L{ f (t )} =
1  1 − 2e − bs + e − 2bs 
  =
(
1 − e − bs )2
1 − e − 2bs  s ( )(
 s 1 − e − bs 1 + e − bs
 )
∴ L{ f (t )} =
1 − e − bs (ebs / 2 − e −bs / 2 ) = 1 tanh bs
s (1 + e − bs ) s (e bs / 2 + e − bs / 2 ) s
=
2
Chapter Six 219
Example 33 Find Laplace transform of the saw tooth wave shown in
Fig.8
f(x)

k k

x
k 2k 3k
Fig.8 Saw tooth waveform.
Solution: In this case, the period of the function is k, hence;
k
1 k − st 1  e − st 
L{ f (t )} = ∫
− ks 0
te dt =  2 (− st − 1)
1− e 1 − e − ks  s  0
1 − (1 + ks )e − ks (1 + ks ) − (1 + ks )e − ks − ks
∴ { f (t )} =
(
s 2 1 − e − ks ) =
(
s 2 1 − e − ks )
(1 + ks )(1 − e − ks ) − ks (1 + ks ) k
∴ L{ f (t )} = = −
s 1− e 2
(
− ks
s )
s 1 − e − ks
2
( )
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 t
220 Laplace Transforms

f(t)

4 Fig.10
3

2
1

k 2k 3k 4k t

t+k
k

k 2k
3k 4k
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:
k
1 k t − st 1/ k  e − st 
L{ f1 (t )} = ∫
− ks 0 k
e dt =  2 (− st − 1)
1− e 1 − e − ks  s  0
Chapter Six 221

1 − (1 + ks )e − ks (1 + ks ) − (1 + ks )e − ks − ks
∴ L{ f (t )} = =
(
ks 2 1 − e − ks ) (
ks 2 1 − e − ks )
∴ L{ f (t )} =
(1 + ks )(1 − e − ks ) − ks = (1 + ks ) − 1
(
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:

1  1 k  1  (1 + ks ) k  1
L{ f (t )} =  2 + −  2 −
k s s k  s s 1− e − ks =
(
 s 1− e
− ks
) ( )
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 , 0 ≤ t <τ,
r (t ) =  τ = δ (t ) (35)
0 otherwise

222 Laplace Transforms

Where ∫ δ (t )dt = 1 (36)
−∞
∞ τ
− st 1 − st 1 − e −τs
∴ L{δ (t )} = ∫ e δ (t )dt = lim ∫e dt = lim =1 (37)
τ →0 τ τ →0 τs
0 0

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

e −πs 1
∴ Y (s) = = e −πs
( s 2 + 2 + 2) ( s + 1) 2 + 1

∴ y (t ) = uπ (t ) e − (t −π ) sin(t − π )
Chapter Six 223
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)
Solution:

_
From KVL + +

VL + VR + VC = E (t )
E(t)
_ I(t) _ vC(t)
di 1
+ RI + ∫ idt = 100 cos 5t

+
L
dt c vL(t)
Differentiate both sides of the above
Fig.11
differential equation. Then.
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
− 100 * 5
∴ s 2 I ( s ) − s − 0.2 + 4[ sI ( s ) − 1] + 5 I ( s ) =
( 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
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
∴ L−1{I1 ( s)} = e [Ta cos β1 t + S a sin β1 t ] + L−1{W ( s )}
β1
1
= [12.5 cos 5 t + 12.5 sin 5 t ] + L−1{W ( s)}
5
= 2.5[cos 5 t + sin 5 t ] + L−1{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
1 αt
∴ L−1{I 2 ( s)} = e [Ta cos β 2 t + S a sin β 2 t ] + L−1{W ( s)}
β2
= 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 ]


Chapter Six 225
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 E(t)
Fig.12
Solution: 100

From KVL
t,sec
0.1 0.2 0.3
VL + VR + VC = E (t )
di 1
L + 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
∴ I&& + I& + I= (E (t ))
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
20
∴ s 2 I ( s ) − 0.1 + 3sI ( s ) + 2 I (s ) =
s

[
∴ I ( s ) s 2 + 3s + 2 = ] 20
s
+ 0.1 =
20 + 0.1s
s
226 Laplace Transforms
G ( s) 20 + 0.1s 0.1s + 20
∴ I (s) = = =
H ( s ) s ( s 2 + 3s + 2) s ( s + 1)(s + 2 )

G(s) A B C
Let I ( s ) = = + +
H ( s ) s ( s + 1) (s + 2 )

0.1s + 20
∴ A= = 10
( s + 1)(s + 2 ) s = 0

0.1s + 20
∴ B= = −19.9
s (s + 2 ) s = −1

0.1s + 20
∴C= = 9.9
s ( s + 1) s = −2

10 19.9 9.9
∴ I (s ) = − +
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 :

 2π
500 sin 5t ⇒ 0≤t ≤
5
E (t ) = 
500 2π
 ⇒ t>
5
Solution: It is clear that E (t ) can be expressed as following:
E (t ) = 500 sin 5t − u2π / 5 (500 sin 5t − 500)
di 1
From KVL , L + RI + ∫ Idt = E (t )
dt c
Chapter Six 227
R 1 1
∴ I& + I + ∫ Idt = E (t )
L LC L
1  u 
∴ 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
50 s 50.s.e 5
∴ s 2 I (s ) − sI (0) − I&(0 ) + 3[sI (s ) − I (0 )] + 2 I (s ) = −
s 2 + 25 s 2 + 25
I (0) = 0, VL = LI&, VL (0) = 50 * I&(0 ) = 5
∴ I&(0 ) = 0.1 A / sec .

 2π 
− s
 
50s 1 − e 5 
 
[ ]
∴ I (s ) s + 3s + 2 − 0.1 =
2 
s 2 + 25


− s
2
0.1s + 50s + 2.5 − 50s e 5
∴ I (s ) =
(s + 1)(s + 2 )(s 2 + 25)
A B C
∴ I (s ) = + + 2
(s + 1) (s + 2 ) s + 25( )

− s
2
0.1s + 50s + 2.5 − 50s e 5
∴A= = 4.934
(s + 2)(s 2 + 25)
s = −1
228 Laplace Transforms

− s
0.1s 2 + 50 s + 2.5 − 50 s e 5
∴B = = −39.2217
(s + 1)(s 2
+ 25 )
s = −2
2
For s + 25 , α = 0, β = 5

− s
2
0.1s + 50s + 2.5 − 50s e 5
∴ S a + jTa = = 0 + j0
(s + 1)(s + 2 )
s = j5
4.934 39.2217
∴ I (s ) = −
(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
-π 2π
E ′(t ) π
100

t
-π π 2π

Fig.13. E (t ) and its derivatives E ′(t ).


Chapter Six 229
From KVL VL + VR + VC = E (t )
di 1
∴L + 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
∴ I&& + I& + I= (E (t ))
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
1
∴ s 2 I ( s ) − 0.1 + 3sI ( s ) + 2 I (s ) = 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:
π
− st
∫ 100 * cos t e dt
∴ L{E ′(t )} = 0
1 − e −πs
 πs 
(
100 s 1 + e
∴ L{E ′(t )} = 2
−πs
)
100s / tanh 
2
(
s +1 1− e )(
−πs
= 2
s +1 ) ( )
 πs 
100s / tanh 
1 2
∴ s 2 I ( s ) − 0.1 + 3sI ( s ) + 2 I (s ) =
50 2
s +1 ( )
230 Laplace Transforms
 πs 
2 s / tanh 
( )
∴ I ( s ) s 2 + 3s + 2 = 0.1 + 2
s2 + 1 ( )
 πs 
2 s / tanh  
0.1 2
∴ I (s) = 2
(
s + 3s + 2
+ 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 )
A B Cs + D
∴ I ( s) = + + 2
(s + 1) (s + 2) s + 1 ( )
 πs 
2 s / tanh  + 0.1 s 2 + 1
2
( )
∴A=
( )
s + 1 (s + 2 )
2
= 1.19

s = −1

 πs 
2s / tanh  + 0.1 s 2 + 1
2
( )
∴B =
( )
s + 1 (s + 2 )
2
= −0.903

s = −2
 πs 
2s / tanh   + 0.1 s 2 + 1
2
( )
S a + jTa =
(
s 2 + 3s + 2 ) =0

s = j1
1.19 0.903
∴ I (s ) = −
s +1 s + 2

∴ I (t ) = 1.19e − t − 0.903e − 2t
Chapter Six 231
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 velocity.
Assuming that y is the
displacement of the mass at time y
m
t and that the mass starts from
rest at y=0, (a) set up a
differentia equation for the motion and (b) find y at any time t.
Solution:
dy
(a) The resistive force is given by − B . The restoring force is
dt
given by − ky . Then by Newton’s law,

d2y dy
m = − B − ky + F (t )
dt dt

d2y dy
∴m + B + ky = F (t ) (42)
dt dt
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
G ( s) F ( s)
Y (s) = =
H ( s ) ms 2 + Bs + k
F ( s)
=
  2    2 
 s −  − B +  B  − k   s −  − B −  B  − k 
  2m  2m  m     2m  2m  m 
     
G(s) F (s)
Y ( s) = = (44)
H (s) B 
2 
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  
1 − sin wt
L   = e 2m
  
2 w
B 
 m  s + 2m  + R  
    
Then using the convolution theorem, we find from (44)
t B (t − u )
1 −

wm 0∫
y (t ) = F (u )e 2m sin w(t − u )du

Case 2 R=0
 
  Bt
−1  1  −
In this case L   = te 2 m
  B  
2
 m  s +  
   2 m   
Chapter Six 233
And by convolution form in (44) yields:
B (t − u )
1 t −

wm 0∫
y (t ) = F (u )(t − u )e 2m sin w(t − u )du

Case 3 R<0 In this case R = −α 2 . We have


 
  Bt
−1  1  − 2 m sinh α t
L  =e
   B 
2 
2 
α
 m  s + 2m  − α  
   

And by convolution form in (44) yields:


t B (t − u )
1 −

αm 0∫
y (t ) = F (u ) e 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
A C
B
5-x 30000 N
x

y 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
60000
each end supports weight is = 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) = ] 1500 * 2
s3

30000
s2
1  3000 30000  y ′(0)
∴ Y ( s) = − + 2
EI  s 5 4 
s  s

∴ y (t ) =
1
EI
[ ]
125 x 4 − 5000 x 3 + y ′(0) x (46)
But y (L = 10 ) = 0 , then substitute in (46), we get:
y ′(0) = 375000 / (EI )
Chapter Six 235
Substitute that in (46) we get the general solution of (45)

∴ y (t ) =
1
EI
[
125 x 4 − 5000 x 3 + 375000 x ]
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

١٠)
t
(
1 − ct
e − e − kt )
[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 0 < t <1
f (t ) =  , f (t ) is periodical
0 1< t < 2
function.
٢٠) y′′ + y = f (t ) , y (0 ) = y ′(0 ) = 0
 1 0<t <π
f (t ) =  , f (t ) is periodical function.
0 π < t < 2π
٢١) y′′ + 2 y ′ + 2 y = δ (t − π ), y ( 0) = 1, y ′( 0 ) = 0

٢٢) y ′′ + 4 y = δ (t − π ) − δ (t − 2π ), y ( 0) = 0, y ′( 0 ) = 0

٢٣) y′′ + 2 y′ + y = δ (t ) + u 2π (t ), y ( 0) = 0, y ′( 0 ) = 1
Chapter Six 237
٢٤) y′′ − y = 2δ (t − 1), y ( 0) = 1, y ′( 0 ) = 0

٢٥) y′′ + ω 2 y = δ (t − π / ω ), y ( 0) = 1, y ′( 0 ) = 0
٢٦) y′′ + 2 y ′ + 3 y = sin t + δ (t − π ), y ( 0) = 0, y ′( 0 ) = 1

٢٧) y′′ + y = δ (t − π ) cos t , y ( 0) = 0, 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
٢٤) t 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 , L=20H,

C=0.002 farads for (a) E (t ) = te − t (b)


E (t ) = 10 cosh 5 t
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:
∞   nπx   nπx  
f ( x ) = a0 + ∑  an cos   + bn sin   (1)
n =1  L   L 
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.
Chapter Seven 239
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
L 2 ∫ f ( x)dx if f ( x) is even

• ∫ f ( x) dx  0 , So,
−L 
 0 if f ( x) is odd

L L for m = n
 m πx   n πx  
1- ∫ cos   cos   dx = 
− L 144L42  44  4L 3 0 for m ≠ n
even
L
 m πx   n πx 
2- ∫ cos   sin   dx {= 0 for all m and n
 L
− L 144424443   L 
odd

L L for m = n
 mπx   n πx  
3- ∫ sin   * sin   dx 

− L 1444
L 
424444  L 3  0 for m ≠ n

even
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.
nπx
Multiplying both sides of (1) by sin and integrate with respect
L
to x from –L to L to get:
L L
 nπx   nπx 
∫ f ( x) sin 
 L 
 dx = a 0 ∫ sin 

 dx +
−L − L 1424
L3
odd
 
∞  L L 
  nπx   nπx   nπx   nπx  
∑  n ∫ sin  L  cos  L dx + bn
a ∫ sin  L  sin  L  dx 
n =1    
 − L 144424443 − L 14442444 3 
 odd even 
L
 nπx 
By applying theorem 4 we get: ∫ f ( x) sin 
 L 
 dx = bn * L
−L
1 L  nπx  1 2L  nπx  (2)
∴ bn = ∫ f ( x) sin   dx, or bn = ∫ f ( x) sin   dx
L −L  L  L 0  L 
The same way can be used to obtain a0 , an by multiplying (1) by
 nπx 
cos   and integrate with respect to x from –L to L yield,
 L 
L L
 nπx   nπx 
∫ f ( x) cos   dx = a0 ∫ cos 
 L  
 dx +
−L − L 1424
L3
even
 
∞  L L 
  nπx   nπx   nπx   n πx  
∑  n ∫ cos  L  cos  L dx + bn
a ∫  L   L  
sin cos dx
n=1    
 − L 144424443 − L 14 4424443 
 even odd 
L
 nπx 
By applying theorem 4, ∴ ∫ f ( x) cos 
 L 
 dx = a0 * 2 L + a n * L
−L
Chapter Seven 241

1 L 1 2L
2L −∫L 2L 0∫
∴ a0 = f ( x) dx, or a0 = f ( x) dx
(3)
1 L  nπx  1 2L  nπx 
∴ an = ∫ f ( x) cos  dx, or an = ∫ f ( x) cos  dx
L −L  L  L0  L 
So that Fourier coefficients can be obtained as shown in (2) and (3).

Example 1 Find Fourier series for the following function

0 for − L < x < 0


Let f ( x) = 
k for 0 < x < L
And let f (x) is periodical function with period equal to 2L as
shown in Fig.1.

f(x)

-L L
Fig.1
Solution:-

1 L k L k
a0 = ∫
2L − L
f ( x) dx = ∫
2L 0
dx =
2

1 L  nπx  k L  nπx 
an = ∫ f ( x) cos   dx = ∫ cos   dx = 0
L −L  L  L0  L 
242 Fourier Series

1 L  nπx  k L  nπx 
bn = ∫ f ( x) sin   dx = ∫ sin   dx
L −L  L  L0  L 
 0 , n even
kL 
= (1 − cos nπ )
Lπn  2 k , n odd
 πn

k 2k ∞
1  nπx 
f ( x) = +
2 Lπ

n =1, 3, 5,....... n
sin  
 L 
k 2 k   πx  1  3πx  1  5πx  
f ( x) = +  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.

1 1

0.8 0.8

0.6
terms=2 0.6
terms=3
0.4 0.4

0.2 0.2

0 0

-0.2 -0.2
-3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3

Fig.2 the partial sum of Fourier series do approach f (x) as n


increases.
Chapter Seven 243

1
1

0.8

terms=4
0.8

0.6
0.6
terms=10
0.4
0.4

0.2
0.2

0
0

-0.2
-3 -2 -1 0 1 2 3 -0.2
-3 -2 -1 0 1 2 3

0.8

0.6 terms=10
0.4

0.2

-0.2
-10 -8 -6 -4 -2 0 2 4 6 8 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,....... (4)

2L  nπx 
and bn = ∫ f ( x) sin   dx (5)
L0  L 

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,....... (6)

2L  nπx  1L
and an = ∫ f ( x) cos   dx, a0 = ∫ f ( x) dx (7)
L0  L  L0
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  nπx  2L
bn = ∫ f ( x) sin   dx = (−1) n +1, n = 1,2,3,.............
L0  L  nπ
2L ∞(−1) n +1 nπ x
∴ f ( x) = ∑
π n =1 n
sin
L

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)

−2π 2π

Fig.4
Chapter Seven 245
Solution:- This function is not odd or even. So, the Fourier
coefficients can be determined as follows,

1 L 1 2π 2 4π 2
2 L −∫L 2π 0∫
∴ a0 = f ( x) dx = x dx =
3

1 2L  nπx  1 2π 2  nπx 
∴ an = ∫ f ( x) cos   dx = ∫ x cos   dx
L 0  L  π 0  π 

1  sin nx − cos nx − sin nx  4
∴ an =  x 2 − 2x + 2  =
π n n2 n3  0 n2

1 L  nπx  1 2π 2  nπx 
∴ bn = ∫ f ( x) sin   dx = ∫ x sin   dx
L −L  L  π 0  π 

1  − cos nx − sin nx cos nx  − 4π
∴ bn =  x 2 − 2x + 2  =
π n n2 n3  0 n

2 4π 2 ∞  4 4π 
∴ f ( x) = x = + ∑  2 cos nx − sin nx 
3 n =1 n n 

Example 4 Expand f ( x) = sin x, 0 < x < π . Find Fourier series if


the period is 2 π .
f(x)

x
-π 2π
π
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 =
L0 π0 π
2L  nπx  2π  nπx 
an = ∫ f ( x) cos   dx = ∫ sin x cos   dx
L0  L  π 0  π 

2π 1π
=
π ∫ 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 
− 2(1 + cos(nπ ))
∴ an = , if n ≠ 1
(
π n2 − 1 )
∴ a1 = 0

2 2 ∞ (1 + cos(nπ ))
∴ f ( x) = ∑−
π π n=2 (n 2 − 1) cos nx

2 4  cos 2 x cos 4 x cos 6 x 


∴ f ( x) = −  2 + 2 + 2 + ............
π π  2 −1 4 −1 6 −1 
Chapter Seven 247
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

-2 2

Solution:-Because of the function f (x) is even function then

bn = 0 . Also,

1L 12
a0 = ∫ f ( x) dx = ∫ x dx = 1
L0 20

2L  nπx  22  nπx 
an = ∫ f ( x) cos   dx = ∫ x cos   dx
L0  L  20  2 
2
  2  n πx    − 4  n πx   
=  x sin    −  2 2 cos   
  nπ  2   n π  L   0

4
= 2 2
(cos nπ − 1)
n π
4 nπx
f ( x) = 1 + ∑ (cos nπ − 1) cos
n 2π 2 2

8  πx 1 3πx 1 5πx 
f ( x) = 1 −  cos + cos + cos + ...... 
π2 2 32 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:
1  m n πx s L m nπ xs
an =  − ∑ J s sin − ∑ J s′ cos +
nπ  s =1 L nπ s =1 L
(10)
 L 
2 m
nπ x s  L 
3 m
nπ x s 
  ∑ s J ′′ sin +   ∑ s J ′′′ cos − − + + ... 
 nπ  s =1 L  nπ  s =1 L 

1  m nπ x s L m nπ x s
bn =  ∑ J s cos − ∑ J s′ sin −

nπ  s =1 L nπ s =1 L
(11)
 L 
2 m
nπ x s  L 
3 m
nπ x s 
  ∑ s J ′
′ cos +   ∑ s J ′
′′ sin − − + +..... 
 nπ  s =1 L  nπ  s =1 L 

Chapter Seven 249
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:

1  m 1 m
an =  − ∑ J s sin n xs − ∑ J s′ cos n xs +
nπ  n s =1
 s =1
(12)
1 m 1 m 
∑ J s′′ sin n xs + ∑ J s′′′ cos n xs − − + +.....
n2 s =1 n3 s =1 

1  m 1 m
bn =  ∑ J s cos n xs − ∑ J s′ sin n xs −
nπ  n s =1
 s =1
(13)
1 m 1 m 
2 ∑ s 3 ∑ s
J ′′ cos n x + J ′′′ sin n x + − − + + ..... 
n s =1
s
n s =1
s 

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)
π

J2
J1
x

-π π
Fig.7
250 Fourier Series

Solution:-
Jumps at x1 = 0 Jumps at x2 = π
f J1 = −π J 2 = −π

1π 1π π
π 0∫
a0 = f ( x) dx = ∫ x dx =
π0 2

As we see this function neither even nor odd. Then an can be


obtained from equation (12) and the above table as follows:

1  m 
an =  − ∑ J s sin n x s  = 1 (− J1 sin n x1 − J 2 sin n x2 )
nπ   nπ
 s =1 
1
an = (sin n 0 + sin n π ) = 0 for all n.
n
bn can be obtained from equation (13) and the above table as
follows:

1  m  1
bn =  ∑ J s cos n x s  =
 (J cos n x1 + J 2 cos n x2 )
 nπ 1
nπ  s =1 
1
∴ bn = (cos n 0 + cos n π ) = 2 , n = 2, 4, 6, 8,.....
n n
Otherwise bn = 0 .

1 1 1 
∴ f ( x) = 2  sin 2 x + sin 4 x + sin 6 x + ......
2 4 6 
Chapter Seven 251
Example 7 Find Fourier transform without integration for the even
waveform f ( x) = x, 0 ≤ x < π as shown in Fig.8.
Solution:-
Jumps at x1 = 0 Jumps at x2 = π
f J1 = 0 J2 = 0
f′ J1′ = 2 J 2′ = −2

1π 1π π
π 0∫
a0 = f ( x) dx = ∫ x dx =
π0 2
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)
π

-π π

f(x)

π

-1

Fig.8
252 Fourier Series

1  m m 
an =  − ∑ J s sin n x s − 1 ∑ J s′ cos n x s 
nπ  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 =  − (2 cos n 0 − 2 cos n π ) = 2 , n = 1, 3,5,7,...
nπ  n  n π
π 4 1 1 1 
f ( x) = −  cos x + cos 3x + cos 5 x + cos 7 x + ......
2 π  9 25 49 
Example 8 Find Fourier transform without integration for the odd
waveform f ( x) = x, 0 ≤ x < π as shown in Fig.9.
Solution:-
Jumps at x1 = 0 Jumps at x2 = π
f J1 = 0 J 2 = −2π
f′ 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 π Fig.9
equation (13) as following : x
-π π

1  m  1 n +1 2
bn =  ∑ J s cos n xs  =
  nπ
(− 2π cos n π ) = (− 1)
nπ  s =1  n
 1 1 1 
f ( x) = 2  sin x − sin 2 x + sin 3x − sin 4 x + ...... 
 2 3 4 
Chapter Seven 253
Example 9 Find Fourier transform of the waveform in Fig.10:

f(x)
Fig.10
Io
7π 11π
π 6 6 2π
π 5π
6 6
− Io

Jumps at Jumps at Jumps at Jumps at


x1 = π / 6 x2 = 5π / 6 x3 = 7π / 6 x4 = 11π / 6
f 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 :
 m  I nπ 5nπ 7 nπ 11nπ 
 ∑ J s cos n x s  = o  cos
1
bn =  − cos − cos + cos 
nπ  nπ  6 6 6 6 
 s =1 
2 3I o
and bn = − , n = 5, 7, 17, 19

Otherwise bn = 0

2 3 Io  1 1 1 1 
∴ f ( x) =  sin x − sin 5 x − sin 7 x + sin 11x + sin 13 x − − + +.... 
π  5 7 11 13 
254 Fourier Series

Example 10 Find Fourier transform of the waveform in Fig.11.


f (x)
1 cos x

Fig.11

−π −π / 2 π /2 π 3π / 2 2π

x π /6 5π / 6 7π / 6 11π / 6
f (x ) J1 = I o J 2 = −Io J3 = −Io J 4 = Io

ao = a n = 0

1  m 
bn =  ∑ J s cos nxs 
nπ  s =1 

Io  nπ 5nπ 7 nπ 11nπ 
=  cos − cos − cos + cos .... 
nπ  6 6 6 6 
2 3
∴ bn = I o , n = 1, 11, 13, 23, 25,

2 3
∴ bn = − I o , n = 5, 7, 17, 19,....

∴ bn = 0 n = else where(2, 3, 4, 6, 8, ....

2 3I o  1 1 1 1 
∴ f (x ) =  sin x − sin 5 x − sin 7 x + sin 11x + sin 13x.... 
π  5 7 11 13 
Chapter Seven 255
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
2 L −∫L
a0 = f ( x) dx

1 L  nπx 
an = ∫ f ( x) cos   dx. (14)
L −L  L 
1 L  nπx 
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
∞   nπx   nπx  
f ( x) = ∑  an cos   + bn sin   (15)
n=0   L   L 
0   − nπx   − nπx  
∴ f ( x) = ∑  a− n cos   − bn sin  
n = −∞   L   L 
1 
 nπx   nπx  
∴ f ( x) = ∑  an cos   + bn sin   (16)
n = −∞   L   L 
Therefore we can write the sum of (15) and (16) as follows:
∞ 
 nπx   nπx  
∴ 2 f ( x) = ∑  an cos   + bn sin  
n = −∞   L   L 
1 ∞   nπx   nπx  
∴ f ( x) = ∑  an cos   + bn sin   (17)
2 n = −∞   L   L 
256 Fourier Series

Where now, for n = 0, ± 1, ± 2, , ± 3........., ± ∞


Form (17) can be further written more compactly using the
complex notations:
 nπ x 
∞ −i
 
∴ f ( x) = ∑  cn e L
, − L < x < L (18)
n = −∞ 
 
nπ x
1 L i
Where cn = ∫
2L − L
f ( x ) e L dx

The form (18) is equivalent to normal Fourier series form but this
form is Sometimes preferred it is coefficients are easier to
remember.
1
cn = (an + jbn )
2

Example 11 Use the complex method to find Fourier transform of


the following function:

0 for − L < x < 0


Let f ( x) = 
k for 0 < x < L
Let f (x) is periodical function with period equal to 2L as shown in
Fig.12.
f(x)

-L L
Fig.12
Chapter Seven 257

1 L k L k
2 L −∫L 2 L 0∫
Solution:- a0 = f ( x ) dx = dx =
2

nπ x L
nπ x nπ x j
1 L j kL j ke L

2 L −∫L L 0∫
cn = f ( x) e L dx = e L dx =
L j nπ
L x =0

k  
cn = j
k
2nπ
(
1− e jnπ
) =j

2nπ 
1 − (cos nπ + j sin
1 2 n3π )

=0, for all n 

2k
cn = j , Otherwise cn = 0

Substitute in equation (18) we get:
 nπ x 
∞ − j
 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 
∞ 
L  = j 2k  cos π x − j sin π x
 −j
∴ f ( x ) = ∑  cn e
n = −∞ 
 π  L L
 
1 3π x 3π x  1  5π x 5π x  
+  cos − j sin  +  cos − j sin  + ...
3 L L  5 L L  
k 2 k   πx  1  3πx  1  5πx  
∴ f ( x) = +  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
− 1 if −π / 2 < x < 0

١) f ( x) =  1 if 0< x <π /2
0 if π /2< x <π

0 if −π < x < 0

٢) f ( x) =  − 1 if 0< x <π /2
1 if π /2< x <π

٣) f ( x) = x −π < x < π
٤) f ( x) = x 2 −π < x < π
٥) f ( x) = x 3 −π < x < π
٦) f ( x) = x −π < x < π
π + x if −π / 2 < x < 0
٧) f ( x) = 
 π −x if 0< x <π
x if −π / 2 < x < π / 2
٨) f ( x) = 
π − x if π / 2 < x < 3π / 2
 x 2 if −π / 2 < x < π / 2
٩) f ( x) =  2
π / 4 if π / 2 < x < 3π / 2
 sin x if 0 < x <π
١٠) f ( x) = 
0 if π < x < 2π
١١) f ( x) = sin x −π < x < π
 cos x if 0< x <π
١٢) f ( x) = 
0 if π < x < 2π
١٣) 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:
Chapter Eight 263
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  2
1 2 3 
  c0   
X = 1 3 , c =   , and, y = 7 
  c1   
1 4 8 
1 5 9 
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
Chapter Eight 265
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  2
1 2 3 
1 1 1 1 1     c0   1 1 1 1 1   
 1 2 3 4 5  1 3  c  = 1 2 3 4 5   7 
    1   
1 4 8 
1 5 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
 1 x1   y1 
 1 x2  y 
  c0   2 
X = M M  c=  y= M 

1

xn −1  c1   
  yn −1 
 1 xn   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,


Chapter Eight 267
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 1 3
1 0 0 c0  1
   
X =1 1 1 , c = c1 , y = − 1
  c2   
1 2 4 1
 1 3 9   3 

X T Xc = X T y

1 −1 1
1 1 1 1 1  1 0 0  c0 
  
− 1 0 1 2 
3 1 1 1  c1 
  
 1 0 1 4 9   1 2 4  c2 
 1 3 9 
5 5 15  c0   7 
 5 15 35 c1  =  7 
   
15 35  
99 c2  33
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
19 5 6
y= − 1 + x2
35 7 7
Let's graph this curve and fill in our chart:
Chapter Eight 269
x y Expected y error (error) 2
-1 3 4 −4 16
3
35 35 1225
0 1 19 16 256
35 35 1225
1 -1 − 11 − 24 576
35 35 1225
2 1 19 16 256
35 35 1225
3 3 4 −4 16
3
35 35 1225
32
We find that the sum of the squared errors is . 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

 1 x1 x12   y1 
  y 
 1 x2 x22  c0 
 2 
X = M M M  c = c1  y= M 
   
 1 xn −1 xn2−1  c2  y
 n −1 
 1 xn xn2   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

 1 x1 x12 K x1m  c0   y1 


  c  y 
 1 x2 x22 K m
x2  1   2 
X = M M M O 
M , c = M , y =  M 
     
 1 xn −1 xn2−1 K xnm−1   c m −1   y n −1 
 1 xn1 xn2 K xnm  cm   yn 

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).
Chapter Eight 271
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:-
n n
s= ∑ ei = ∑ yi − a0 − a1xi (3)
i =1 i =1
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,
n n
Sr = ∑ ei2 = ∑ ( yi, data − yi, mod el ) 2
i =1 i =1
(4)
n
= ∑ ( 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.

∂S r n
∴ = −2 ∑ ( yi − a0 − a1 xi ) = 0 (5)
∂a0 i =1

∂S r n
∴ = −2 ∑ [( yi − a0 − a1 xi )xi ] = 0 (6)
∂a1 i =1


Steven C. Chapman and Raymond P. Canale Numerical Method of
Engineering , book, McGraw-Hill international edition, third edition,1998
Chapter Eight 273
By simplifying the above equations we can obtain the following:
n n n
∑ yi − ∑ a0 − ∑ a1xi = 0 (7)
i =1 i =1 i =1
n n n
∑ yi xi − ∑ a0 xi − ∑ a1xi2 = 0 (8)
i =1 i =1 i =1

The above two equations (7) and (8) can be further simplified to be
as following:
 n  n
na0 +  ∑ xi a1 = ∑ yi
  (9)
 i =1  i =1

 n   n  n
 ∑ xi a0 +  ∑ xi2 a1 = ∑ xi yi (10)
   
 i =1   i =1  i =1
n n n
n ∑ xi yi − ∑ xi * ∑ yi
a1 = i =1 i =1 i =1 (11)
2
 n   n 
n ∑ xi2  −  ∑ xi 

 i =1   i =1 
a0 = y − a1 x (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 (13)
For this case the sum of squares of the residuals is:
274 Least Square Technique

∑ (yi − a0 − a1xi − a2 xi2 )


n 2
Sr = (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

( )
∂S r n
= −2 ∑ yi − a0 − a1 xi − a2 xi 2 = 0 (15)
∂a0 i =1

∂S r
∂a1
n
[( )]
= −2 ∑ yi − a0 − a0 xi − a2 xi 2 xi = 0 (16)
i =1

∂S r
∂a2
n
[( ) ]
= −2 ∑ yi − a0 − a0 xi − a2 xi 2 xi2 = 0 (17)
i =1

These equations can be set equal to zero rearranged to develop the


following set of normal equations:

( )
n n n
na0 + ∑ ( xi ) a1 2
+ ∑ x a2 = ∑ yi
i =1 i =1 i =1

+ ∑ (xi 2 )a1 + ∑ (xi 3 )a2 = ∑ xi yi


n n n n
∑ (xi ) a0 (18)
i =1 i =1 i =1 i =1

∑ (xi 2 )a0 + ∑ (xi )a1 + ∑ (xi )a2 = ∑ xi 2 yi


n n n n
3 4
i =1 i =1 i =1 i =1
Chapter Eight 275
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 1 2 3 4 5 6 7

yi 2 3 5 6 8 7 9

Solution:-
xi yi xi * yi
xi2 xi3 xi4 xi2 yi
1 2 2 1 1 1 2
2 3 6 4 8 16 12
3 5 15 9 27 81 45
4 6 24 16 64 256 96
5 8 40 25 125 625 200
6 7 42 36 216 1296 252
7 9 63 49 343 2401 441
∑ 28 40 192 140 784 4676 1048

Then,
276 Least Square Technique

7 a0 28a1 140a2 = 40
28a0 140a1 140a2 = 192
140a0 784a1 467a2 = 1048
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:
Chapter Eight 277
n n n
na0 + ∑ cos(ω t ) a1 + ∑ sin(ω t )b1 = ∑ yi
i =1 i =1 i =1
n n n n
∑ cos(ω t ) a0 + ∑ cos 2 (ω t ) a1 + ∑ cos(ω t )b1 = ∑ cos(ω t ) yi
i =1 i =1 i =1 i =1
n n n n
∑ sin(ω t ) a0 + ∑ cos(ω t ) + sin(ω t ) a1 + ∑ sin 2 (ω t )b1 = ∑ sin(ω t ) y i
i =1 i =1 i =1 i =1

By solving the above equations we can get a0 , a1, b1 . Then,


n yi
a0 = ∑ (21)
i =1 n
2 n
a1 = ∑ yi * cos(ω t ) (22)
n i =1
2 n
b1 = ∑ yi * sin(ω t ) (23)
n i =1
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 )....
(24)
.............................................. + am cos(mω t ) + bm sin(mω t ) + e
Where n must be > 2m + 1, or m ≤ (n − 1) / 2 . In this case:
n yi
a0 = ∑ (25)
i =1 n
2 n
a j = ∑ yi * cos( jω t ) (26)
n i =1

2 n
b j = ∑ yi * sin( jω t ) (27)
n i =1
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
∴ b1 = ∑ yi * sin(ω t ) = 102.2
n i =1
If we use the exact Fourier transform will get:
1 2L 100 0.08 0.18 

2 L 0∫ .02 0.∫02
a0 = f ( x ) dx =  dt − ∫ dt  = 0
0.12 
2L  πt  200 0.08  πt 
a1 = ∫ f (t ) cos   dt = ∫ cos   dt = 0
L0 L .01 0.02  0.01 
Chapter Eight 279

2L  πx  200 0.08  π t 
b`1 = ∫ f ( x) sin   dx =
.01 0.∫02  0.01 
sin   dt = 127.324
L0 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 y i
y i cos x i y i sin x i
1 0 0 0 0
2 0.001 0 0 0
3 0.002 100 80.90161308 58.7786441
4 0.003 100 58.77834693 80.90182898
5 0.004 100 30.90141996 95.10574244
6 0.005 100 -0.000367321 100
7 0.006 100 -30.90211865 95.10551542
8 0.007 100 -58.77894126 80.90139717
9 0.008 0 0 0
10 0.009 0 0 0
11 0.01 0 0 0
12 0.011 0 0 0
13 0.012 -100 80.90118126 58.77923843
14 0.013 -100 58.77775259 80.90226079
15 0.014 -100 30.90072128 95.10596945
16 0.015 -100 -0.001101962 99.99999999
17 0.016 -100 -30.90281733 95.1052884
18 0.017 -100 -58.7795356 80.90096535
19 0.018 0 0 0
20 0.019 0 0 0
sum 0.19 0 161.796153 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
Chapter Eight 281
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 1


T(I), Y(i)
Input N, M
A(0)=SUMY/N
SUMY=0, WO=2*.14*f

If M>(N-1)/2 For J=1 to M


M=(N-1)/2

For I=1 to N
Is Abs(A(J)) > 0.1
SUMY=SUMY+Y(I) Print A(J)

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

1 End

Flowchart of Basic computer program to determine Fourier


coefficients of function in Example 2.

Example 3 Use the method


1v
of least square to find
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
Chapter Eight 283
20 intervals in your calculations and 200 intervals in the computer
program per period).
Solution: f = 1000 Hz , ω o = 2π * 1000 = 6283

t,ms f (t ) f (t ) cos ω o t f (t ) sin ω


0.00 0.00 0.000000 0.000000
0.05 0.05 0.047553 0.015450
0.10 0.10 0.080903 0.058777
0.15 0.15 0.088171 0.121350
0.20 0.20 0.061810 0.190209
0.25 0.25 0.000012 0.250000
0.30 0.30 -0.092689 0.285322
0.35 0.35 -0.205706 0.283169
0.40 0.40 -0.323589 0.235138
0.45 0.45 -0.427964 0.139093
0.50 0.50 -0.500000 0.000046
0.55 0.55 -0.523098 -0.169906
0.60 0.60 -0.485449 -0.352617
0.65 0.65 -0.382124 -0.525815
0.70 0.70 -0.216398 -0.665711
0.75 0.75 -0.000104 -0.750000
0.80 0.80 0.247101 -0.760882
0.85 0.85 0.499509 -0.687743
0.90 0.90 0.728027 -0.529128
0.95 0.95 0.903452 -0.293725
1.00 1.00 1.000000 -0.000185


10.50 0.50 -3.16
284 Least Square Technique
n yi 10.5
∴ a0 = ∑ n
=
20
= 0.525
i =1

2 n 2
∴ a1 = ∑
n i =1
yi * cos(ω t ) =
20
* 0.5 = 0.05

2 n 2
∴ b1 = ∑
n i =1
yi * sin(ω t ) =
20
* (−3.16) = −0.316

If we use the exact Fourier transform will get the following results

1 2L
a0 =
2L
∫ f ( x) dx
0
0.001
1 0.001  1 1000t 2 
.001  0∫
=  1000t dt  =   = 0.5
 .001  2  0

1 2L  πt  1 0.001  πt 
a1 = ∫ f (t ) cos   dt =
0.05 0∫
1000 t * cos   dt = 0
L 0 L  0.0005 
1 2L  πt 
b1 = ∫ f (t ) sin   dt =
L 0 L
1 0.001  πt 
= ∫
0.05 0
1000 t * sin   dt = −0.16
 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

1 ∞
functions: = ∑ x m = 1 + x + x 2 + x 3 + x 4 + ......
1 − x m=0

xm x 2 x3 x 4
x
e = ∑ =1+ x + + + + ......
m=0 m! 2 ! 3! 4!
∞ (−1) m x 2m x2 x4
cos x = ∑ (2m)! = 1 −
2!
+
4!
− +.........
m=0

(−1) m x 2m +1
∞ x3 x5
sin x = ∑ = x− + − +.........
m=0 ( 2 m + 1)! 3! 5!
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 dy
2
+ P( x) + Q( x) y = 0 (3)
dx dx
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 ....... (5)
m=0
Chapter Nine 287

∴ y′′ = ∑ m(m −1)cm xm−2 = 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:

m  x 2 x 4 x 6 x8 
∴ y= ∑ cm x = c0 1 − + − +
2! 4! 6! 8!
− +........
m=0  
 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
Chapter Nine 289

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 2c2
Coefficients of x = 0 , 5 * 4 c5 − 2c2 = 0 , c5 = = 0,
5*4
Coefficients of x 4 = 0 , ∴ 6 * 5 c6 − 2c3 = 0 ,
2c3 2 * 2c0
∴ c6 = = ,
6 *5 6 *5*3* 2
Coefficients of x 5 = 0 , ∴ 7 * 6 c7 − 2c4 = 0 ,
2c4 2 * 2c1
∴ c7 = = ,
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 2*2 23
∴ 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 ,

2 2 2*2 23
∴ c10 = c7 = * c1 = c1 ,
10 * 9 10 * 9 7 * 6 * 5 * 3 10 * 9 * 7 * 6 * 5 * 3
Coefficients of x 9 = 0 ,
2c8
∴ 11 * 10 c11 − 2c8 = 0 , and ∴ c11 = = 0,
11 * 10
Substitute the values of c0 , c1 , c2 ,...... into (4) we get the final
solution as following:
 2 3 22 6 23 
∴ y = c0 1 + x + x + x 9 + ...
 3 * 2 6*5*3* 2 9 *8* 6 *5*3* 2 
 2 4 22 7 23 
+ 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− + − + − +.........
m=0 ( 2 m )! 2 ! 4! 6! 8!

Assume, y = ∑ cm x m = c0 + c1x + c2 x 2 + c3 x 3 + .......
m=0
Chapter Nine 291
Then y ′ and y ′′ can be obtained as in (5) and (6) respectively.
Substitute these power series in the differential equation we get:

m−2  
∞ x 2 x 4 x 6 x8 ∞
∑ m ( m − 1) c m x +  1 − + −
2! 4! 6! 8!
+ − +..... ∑ cm x m = 0
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.

m  x2 1 4 1 6 
∴ y= ∑ cm x = c0 1 − +
2 4*3
x −
6*5
x + −.......
m=0  
 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: y ′′ − xy = 0
Solution:
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 ∑ cm x m −1 = 0
m=0 m=0
∞ ∞
∴ 2c2 + (3 * 2c3 )x + ∑ m(m − 1)cm x m − 2 − co x − ∑ cm x m +1 = 0
1=4
m 4 442444 3 1=4
m 1 243
assume n = m − 2 assume n = m +1
∞ ∞
(2c2 ) + (3 * 2c3 − c0 )x + ∑ (n + 2) (n + 1)cn + 2 x n − cn −1 x n =
∑ 0
n=2 n=2
co c
∴ c2 = 0 , c3 = = o
3 * 2 3!

∴ ∑ [(n + 2)(n + 1)cn + 2 − cn −1 ]x n = 0
n=2

cn −1
∴ cn + 2 =
(n + 2)(n + 1) n = 2,3,4,....
c1 c2 c c0
∴ c4 = , ∴ c5 = = 0 , ∴ c6 = 3 = ,
4*3 5*4 6 * 5 6 * 5 * 3!
c4 c1 c1 c5
∴ c7 = = = , ∴ c8 = = 0,
7 * 6 7 * 6 * 4 * 3 7 * 3 * 4! 8*7
c6 co co
∴ c9 = = = ,
9 * 8 9 * 8 * 6 * 5 * 3! 9 * 2 * 6!
c7 c1 c1
∴ c10 = = = ,
10 * 9 10 * 9 * 7 * 3 * 4! 9 * 7 * 6!
Chapter Nine 293
c8 c9 co
∴ c11 = = 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−2 m −1
∴ ∑ m(m − 1)cm x −x ∑ mcm x − ∑ cm x m = 0
m=0 m=0 m=0
∞ ∞
∴ ∑ m(m − 1)cm x m−2
− ∑ (m + 1)cm x m = 0
m =0 m=0

∴ 2c2 + (3 * 2c3 )x + ∑ m(m − 1)cm x m − 2 − co − 2c1x
1=4
m 4 4424443
assume n = m − 2

− ∑ (m + 1)cm x m = 0
1=4
m 1 42443
assume n = m
294 Power Series Solution Of Differential Equations
c0 c
∴ 2c 2 − c 0 = 0 , ∴ c 2 = , ∴ 3 * 2 * c3 − 2c1 = 0 ∴ c3 = 1
2! 3

∴ ∑ [(n + 2)(n + 1)cn + 2 − (n + 1)cn ]x n = 0
n=2

(n + 1)cn cn
∴ cn + 2 = ∴ cn + 2 =
(n + 2)(n + 1) n = 2,3,4,.... (n + 2) n = 2,3,4,....
c2 c c3 c c c0
∴ c4 = = o , ∴ c5 = = 1 , ∴ c6 = 4 =
4 4*2 5 5*3 6 6*4*2
c5 c1 c1 c6 co
∴ c7 = = = , ∴ c8 = =
7 7 * 5 * 3 7 * 3 * 4! 8 8*6*4*2
c7 c1 c8 co
∴ c9 = = , ∴ c10 = =
9 9*7*5*3 10 10 * 8 * 5 * 4 * 2
 x2 x4 x6 x8 x10 
∴ y ( x ) = co 1 + + 2 + 3 + 4 + 5 + ......
 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−2 m−2
∴ ∑ m(m − 1)cm x −x ∑ m(m − 1)cm x + ∑ cm x m = 0
m=0 m =0 m=0
Chapter Nine 295
∞ ∞ ∞
m−2 m −1
∴ ∑ m(m − 1)cm x − ∑ m(m − 1)cm x + ∑ cm x m = 0
m=0 m=0 m=0

∴ 2c2 + (3 * 2c3 )x + ∑ m(m − 1)cm x m − 2 − 2 * 1c3 x −
1=4
m 4 4424443
assume n = m − 2
∞ ∞
∑ m(m − 1)cm x m −1 + co + c1x + ∑ cm x m = 0
1=4
m 3 442444 3 m
14= 224
3
assume n = m −1 n=m

c
∴ 2c2 + c0 = 0 , ∴ c2 = − 0 ∴ 3 * 2 * c3 − 2c2 + c1 = 0 ,
2!
co c1
∴ c3 = − −
6 6

∴ ∑ [(n + 2)(n + 1)cn + 2 − n(n + 1)cn +1 + cn ]x n = 0
n=2

∴ cn + 2 =
(n + 1) c − cn
(n + 2)(n + 1) n +1 (n + 2)(n + 1) n = 2,3,4,....
n cn
∴ cn + 2 = cn +1 −
(n + 2) (n + 2)(n + 1) n = 2,3,4,....
2c3 c c c c c c
∴ c4 = − 2 =− o − 1 + o =− o − 1,
4 4*3 12 12 24 24 12
3c4 3c3 − 3c0 3c1 co c1
∴ c5 = − = − + + ,
5 5 * 4 5 * 24 5 * 12 6 * 5 * 4 6 * 5 * 4
co c
∴ c5 = − − 1,
5 * 4 * 3 24
296 Power Series Solution Of Differential Equations
4c5 c − 2c 0 2c1 co c1
c6 = − 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 
 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 (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−2
∴2 ∑ m(m − 1)cm x + ∑ m(m − 1)cm x m
m =0 m=0
∞ ∞
−x ∑ mcm x m −1 + 4 ∑ cm x m = 0
m=0 m=0
∞ ∞
∴2 ∑ 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 m−2 + 2co + 3c1 x +
1=4
m 4 4424443
assume n = m − 2

∑ (m 2 − 2m + 4)c m x m

=0
1=4
m 2 44
424444
3
assume n = m
Chapter Nine 297

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,....

4c 2 4c c
∴ c4 = − = o = o,
2*4*3 4! 3!

∴ c5 =
− 7c3
=
7c1
, ∴ c6 = −
(4 * 2 + 4)c4 =−
co
,
2 * 5 * 4 10 * 16 2*6*5 30

∴ c7 = −
(5 * 3 + 4)c5 =−
19c1
2*7*6 1920
 x4 x6 
∴ y ( x ) = co 1 − x +
2
− + ......
 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

h
(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 ∑ mcm x m −1 +λ ∑ cm x m = 0
m=0 m=0 m=0

∴ (2c2 + λc0 ) + (3 * 2c3 − 2c1 + λc1 )x + ∑ m(m − 1)cm x m − 2
1=4
m 4 4424443
assume m = n + 2
∞ ∞
m −1
− 2 x ∑ mcm x +λ ∑ cm x m = 0
14 m =4
2 44 = 244
4244m4 3
assume m = n


∴ (2c2 + λc0 ) + (3 * 2c3 − 2c1 + λc1 )x + ∑ (n + 2)(n + 1)cn + 2 x n
n=2
∞ ∞
n
− 2 ∑ ncn x +λ ∑ cn x n = 0
n=2 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 of x1 = 0 , ∴ 3 * 2 c3 − 2c1 + λc1 = 0 ,
(2 − λ )
∴ c3 = c1 ,
3* 2
Coefficients of x n = 0 , ∴ (n + 2 )(n + 1)cn + 2 − 2ncn + λcn = 0 ,
Chapter Nine 299
2n − λ
∴ cn + 2 = c
(n + 2)(n + 1) n
Substitute the values of c0 , c1 , c2 ,...... into (4) we get:
∞  λ (4 − λ )(−λ ) 4 (8 − λ )(4 − λ ) 6 
∴ y= ∑ cm x m = c0 1 − 2! x 2 + 4!
x +
6!
x + .... +
m=0  
 (2 − λ ) 3 (6 − λ )(2 − λ ) 5 (10 − λ )(6 − λ )(2 − λ ) 7 
c1  x + x + x + x + ..
 3! 5! 7! 

∴ 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(m − 1)cm x m − 2 − ∑ mcm x m
m =0 m=0 m=0
∞ ∞
m −1
− ∑ mcm x + ∑ cm x m + 4 = 0
m=0 m=0

∴ − c1 x + ∑ m(m − 2)cm x m + 9 * 2c2 + 9 * 3 * 2c3 x
1=4
m 2 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
1=4
m 4 442444 3 1=4
m 34244 3 m 1=42
0 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
+ 9 ∑ (n + 2 )(n + 1)cn + 2 x n
n=2 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
c1 2c 2 5c
Coefficient of x1 = 0 ∴ c3 = + = 51
9 *3* 2 9 *3* 2 3
∞ ∞
∑ [n(n − 2)cn + 9(n + 2)(n + 1)cn + 2 − (n + 1)cn +1 ]x n
+ ∑ cn − 4 x n = 0
n=2 n=4
∴ x [0co + 9 * 4 * 3c4 − 3c3 ] + x [3 * 1c3 + 9 * 5 * 4c5 − 4c4 ] +
2 3

∞ ∞
∑ [n(n − 2)cn + 9(n + 2)(n + 1)cn + 2 − (n + 1)cn +1 ]x n
+ ∑ cn − 4 x n = 0
n=4 n=4

∑ [n(n − 2)cn + 9(n + 2)(n + 1)cn + 2 − (n + 1)cn +1 + cn − 4 ]x n = 0
n=4

3c3 5
Coefficient of x 2 = 0 ∴ c4 = = 2 7 c1
(9 * 4 * 3) 2 * 3
4c − 3c3 13
Coefficient of x 3 = 0 ∴ c5 = 4 =− c
(9 * 5 * 4) 2*3 9 1

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....
Chapter Nine 301

5c5 − 4 * 2c4 − co 72 1
∴ c6 = = − 2 12 c1 − co
9*6*5 2 *3 2 * 5 * 32
6c − 5 * 3c5 − c1 181 * 487 1
∴ c7 = 6 = − 14 c1 − co
9*7*6 3 *7 2 * 5 * 7 * 34
7 c − 6 * 4c 6 − c 2 23 * 4363 43
∴ c8 = 7 = − 14 4 c1 + 4 6 o
c
9 *8* 7 3 *2 2 *7*3
 x 6
x 7
x8 
∴ y ( x ) = co 1 − 2
− + + ......
 2 * 5 * 3 2 * 5 * 7 * 34 2 4 * 7 * 36 
 x2 5x3 5x 4 13 x 5 72 x6
+ c1  x + + 5 + 2 7− 9
− 2 12
 9 * 2 3 2 * 3 2 * 3 2 *3
181 * 487 x 7 23 * 4363 x 8 
− − .......
314 * 7 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 (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−2
∴ ∑ m(m − 1)cm x + ∑ m(m − 1)cm x m
m=0 m=0
∞ ∞
−4 ∑ mcm x m + 6 ∑ cm x m = 0
m=0 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
1=4
m 4 4424443
assume n = m − 2

∑ (m 2 − 5m + 6) cm x m = 0

1=4
m 2 44
424444
3
assume n = m
c1
∴ 2c2 + 6co = 0, ∴ c2 = −3co , and c3 = −
3

∑ [(n + 2)(n + 1)cn + 2 + (n 2 − 5n + 6)cn ]x n = 0


n=2

∴ cn + 2 = −
(n 2 − 5n + 6 )
cn
(n + 2)(n + 1) n = 2,3, 4,....
∴ c4 = 0 , ∴ c5 = 0 , and, cn + 2 = 0

[ 2
]  x3 
∴ 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 m−2 m −1
( x + 1) ∑ m(m − 1)cm x +x ∑ mcm x − ∑ cm x m = 0
m=0 m=0 m=0
Chapter Nine 303
∞ ∞
∴ ∑ m(m − 1)cm x m
+ ∑ m(m − 1)cm x m − 2
m=0 m=0
∞ ∞
+ ∑ mcm x m − ∑ cm x m = 0
m=0 m=0

∴ (2c2 − c0 ) + (3 * 2c3 + c1 − c1 )x + ∑ m(m − 1)cm x m
1=4
m 2 4
42444
3
assume m = n
∞ ∞ ∞
+ ∑ m(m − 1)cm x m − 2 + ∑ mcm x m − ∑ cm x m = 0
1=4
m 4 442444 3 m 1=4
2 44 424 m =4
2 44
3
assume m = n + 2 assume m = n

∴ (2c2 − c0 ) + 6c3 x + ∑[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 = cn
2+n
Substitute the values of c0 , c1 , c2 ,...... into (4) we get:

∴y= ∑ cm x m = c1x +
m=0
 x 2
1 1 * 3 6 1 * 3 * 5 8 1 * 3 * 5 * 7 10 
c0 1 + − 2 x4 + 3 x − 4 x + 5
x ....
 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 dy
+ v2 − 4 vy = 0 (11)
dx 2 dx

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 + ∑ mcm v m +1 − 4 ∑ cm v m +1 = 0
m=0 m=0 m =0
∞ ∞
∴ ∑ m(m − 1)cm v m − 2 + ∑ (m − 4)cm v m +1 = 0
m=0 m=0
∴ 2c2 + (3 * 2c3 + (0 − 4)c0 )v +
∞ ∞
∑ m(m − 1)cm v m − 2 + ∑ (m − 4)cm v m +1 = 0
1=4
m 4 442444 3 m 1=4
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
Chapter Nine 305

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 ,
5−n
∴ cn + 2 = 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, ….
c1 c c c0
∴ c4 = Also, ∴ c6 = 0 , c9 = − 0 , c12 =
4 45 324 42768
Substitute the values of c0 , c1 , c2 ,...... into (12) we get:
∞  v6 v9 v12   v 4 
∴y= ∑ cm v m
= c0 1 + − + 
− +... + c1 v +
 45 324 42768   4 
m=0 
But v = x − 1 , substitute in the above equation, we get:
∞  ( x − 1) 6 ( x − 1)9 ( x − 1)12
m 
y = ∑ cm ( x − 1) = c0 1 + − + − +...
m=0  45 324 42768 
 ( x − 1) 4 

+ c1 ( x − 1) +
 4 

∴ 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
lim
m→∞ n =0
∑ cn ( x − a ) n 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.
Chapter Nine 307
• 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 dy
+x + ( x 2 + 4) y = 0
dx 2 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 dy
+ ex + sin( x) y = 0
dx 2 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

d2y dy
( x 2 − 1) + 2x + 6y = 0
dx 2 dx
d2y dy2x 6
∴ + + y=0
dx 2 ( x 2 − 1) dx ( x 2 − 1)
2x 6
We have P ( x) = and Q ( x ) = which are
( x 2 − 1) ( x 2 − 1)
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 2x
(x + 1) P(x ) = (x + 1) * = = 1 Also,
x 2 − 1 x − 1 x = −1
6 6( x + 1)
(x + 1)2 Q( x ) = ( x + 1)2 * 2 = = −1
x −1 x − 1 x = −1
Chapter Nine 309
It is clear that the point x = −1 is regular singular point.
‰ For x = 1
2x 2x
(x − 1) P(x ) = (x − 1) * 2
= = 1 Also,
x −1 x + 1 x =1

( x − 1)2 Q( x ) = ( x − 1)2 * 26 = 6( x − 1) = 1
x −1 x + 1 x =1
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 2 d2y dy
( x − 4) + ( x − 2) +y=0
dx 2 dx
d2y 1 dy 1
∴ 2
+ 2 dx
+ 2 2
y=0
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

1 1
( x + 2) P ( x ) = 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

1 1
( x − 2) P ( x ) = and ( x − 2) 2 Q( x) = are analytic
( x + 2) 2 ( x + 2) 2
function at x = 2 is a regular singular point of the differential
equation.
Chapter Nine 311
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 ) r
∑ cm ( x − a ) m
= ∑ cm ( x − a ) m + r (13)
m=0 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 :


1 1
y ′′ + y′ − y=0 (14)
3x 3x
Solution:
1 1
From (14) we have P( x ) = and Q( x ) = − which are not
3x 3x
1
analytical at point x=0 but xP( x ) = and
3
x
x 2Q( 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 , (15)
m =0
312 Power Series Solution Of Differential Equations

∴ y′ = ∑ (m + r )cm x m + r −1 , (16)
m=0


∴ y ′′ = ∑ (m + r )(m + r − 1)cm x m + r − 2 (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 −1
+ ∑ ( m + r )cm x − ∑ cm x m + r =0
m=0 m=0

∞ ∞
m + r −1
∑ (m + r )(3m + 3r − 3 + 1)cm x − ∑ cm x m + r =0
m=0 m =0

∴ r (3r − 2)c0 x r −1 + x r ∑ (m + r )(3m + 3r − 2)cm x m −1
1=4
m 1 44442444443
n = m −1

− xr ∑ cm x m = 0
m
14= 024
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 , (18)

and (n + r + 1)(3n + 3r + 1)cn +1 − cn = 0 n = 0, 1, 2, 3,......


Since nothing is gained by taking c0 = 0 , we must have
r (3r − 2) = 0 .
Chapter Nine 313
cn
∴ cn +1 = n = 0, 1, 2, 3,.. (19)
(n + r + 1)(3n + 3r + 1)
2
The two values of r that satisfy (18), r1 = and r2 = 0 , when
3
substitute in (19), give us two different recurrence relations:
2
For r1 = , substitute in (19) we get:
3
cn
cn +1 = n = 0, 1, 2, 3,...... (20)
(3n + 5)(n + 1)
c0 c1 c0
∴ c1 = , ∴ c2 = =
5 *1 8* 2 2 *5*8
c2 c0
∴ c3 = =
11 * 3 3!*5 * 8 * 11
c3 c0
∴ c4 = =
14 * 4 4!*5 * 8 * 11 * 14
c0
∴ cn = n = 1,2,3,......
n!*5 * 8 * 11 * ......(3n + 2)
Thus we obtain the first solution:
 ∞ 1 
∴ y1 ( x) = co x 2 / 3 1 + ∑ xn  (21)
 n =1n!*5 * 8 * 11 * ......(3n + 2) 
For r2 = 0 , substitute in (19) we get:
cn
cn +1 = n = 0, 1, 2, 3,...... (22)
(n + 1)(3n + 1)
Where as iteration of (22) yields:
314 Power Series Solution Of Differential Equations
c0 c c0 c2 c0
c1 = , c2 = 1 = , c3 = =
1 *1 2 * 4 2!*1 * 4 3 * 7 3!*1 * 4 * 7
c c0
c4 = 3 =
4 * 10 4!*1 * 4 * 7 * 10
c0
∴ cn = n = 1, 2, 3,......
n!*1 * 4 * 7 * ......(3n − 2)
 ∞ 1 
∴ y 2 ( x) = co x 0 1 + ∑ xn  (23)
 n =1 n!*1 * 4 * 7 * ......( 3n − 2 ) 
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.
Chapter Nine 315
9.5 Indicial Equation
Equation (18) is called the indicial equation of the problem, and
2
the values r1 = 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 −1
+x n
∑ [(n + r + 1)(n + r + 3)cn +1 − cn ] = 0
 n=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, ........ (25)
cn
It follows that, when r1 = 0 , cn +1 =
(n + 1)(n + 3)
c0 c 2c0 c 2c
∴ c1 = , ∴ c2 = 1 = , ∴ c3 = 2 = 0
1* 3 2 * 4 2!*4! 3 * 5 3!*5!
c3 2c
∴ c4 = = 0
4 * 6 4!*6!
2c 0
∴ cn = , 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)! 
∞ 1
Or y1 ( x) = c0 ∑ n!*(n + 2)! x n x <∞ (26)
n=0
Chapter Nine 317
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
cn +1 = n = 2, 3, .....
(n − 1)(n + 1)
c2 c3 2c c 2c
∴ c3 = , ∴ c4 = = 2 , ∴ c5 = 4 = 2
1* 3 2 * 4 2!*4! 3 * 5 3!*5!
2c 0
∴ cn = , n = 2, 3, 4,...... (28)
(n − 2)!*n!
Thus we can write
∞ 2
−2
∴ y 2 ( x ) = c2 x ∑ xn x <∞ (29)
n = 2 ( n − 2)! * n!

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 = ∑ cm x m + r1 , c0 ≠ 0, (30)
m =0

y2 = ∑ bm x m + r2 , b0 ≠ 0, (31)
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:
Chapter Nine 319
∞ ∞
m + r −1
2 ∑ (m + r )(m + r − 1)cm x + ∑ (m + r )cm x m + r −1
m=0 m =0
∞ ∞
+ ∑ ( m + r ) cm x m + r + ∑ cm x m + r = 0
m =0 m =0
∞ ∞
∑ (m + r )(2m + 2r − 1)cm x m + r −1 + ∑ (m + r + 1)cm x m + r =0
m=0 m =0

∴ r (2r − 1)c 0 x r −1 + x r ∑ (m + r )(2m + 2r − 1)c m x m−1
1=4
m 1 44442444443
n = m −1

+ xr ∑ (m + r + 1)c m x m =0
1=4
m 0 442444
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 
1
Which implies that r (2r − 1) = 0 , ∴ r1 = , and r2 = 0
2
(n + r + 1)(2n + 2r + 1)cn +1 + (n + r + 1)cn = 0 n = 0,1, 2, 3,......
1 − cn
For r1 = : ∴ cn +1 = n = 2, 3, .....
2 2(n + 1)
− c0 − c1 c
∴ c1 = , ∴ c2 = = 20 ,
2 *1 2*2 2 *2
− c2 −c
∴ c3 = = 3 0 ,
2 * 3 2 * 3!
320 Power Series Solution Of Differential Equations
(−1) n c0
∴ cn = n = 1,2,3,......
2 n * n!
Thus from (30) and (31) we can write the final solution as:

1/ 2  n
∞ (−1) n ∞ (−1) n
∴ y1 ( x) = c0 x 1 + ∑ n x  = c0 ∑ n x n +1 / 2
 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
cn +1 = n = 2, 3, .....
2n + 1
− c0 − c1 c
∴ c1 = , ∴ c2 = = 0
1 3 1* 3
− c2 − c0 − c3 − c0
∴ c3 = = , ∴ c4 = =
5 1* 3 * 5 7 1* 3 * 5 * 7
(−1) n c0
∴ cn = n = 1, 2, 3,......
1 * 3 * 5 * 7.....(2n − 1)
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)
Chapter Nine 321
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 + r )(m + r − 1)cm x m + r −1 + ∑ (m + r )cm x m + r −1
m=0 m=0
∞ ∞
m+r
+ ∑ ( m + r ) cm x − 2 ∑ cm x m + r = 0
m=0 m=0
∞ ∞
m + r −1
∑ (m + r )(2m + 2r − 1)cm x + ∑ ( m + r − 2) c m x m + r = 0
m =0 m =0

r −1
∴ r (2r − 1)c0 x +x r
∑ (m + r )(2m + 2r − 1)cm x m −1
1=4
m 1 44442444443
n = m −1

r
+x ∑ ( m + r − 2) c m x m = 0
1=4
m 0 4424443
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,......
1
∴ r1 = , r2 = 0
2
3 
 − n c n
1
∴ cn +1 =  
2
For r1 = :
2  3
 n +  ( 2 n + 2)
 2 n = 2, 3, .....

c c c
At n = 0 ∴ c1 = 0 , At n = 1∴ c2 = 1 = 0
2 20 40
− c2 − c0 − c3 co
At n = 2 ∴ c3 = = , At n = 3 ∴ c4 = =
42 1680 24 40320
− c4 co
At n = 4 ∴ c5 = =−
22 887040
Thus we can write
 x x2 x3 x4 x5 
∴ y1 ( x) = c0 x1 / 2 1 + + − + − + −.......
 2 40 1680 40320 887040 
Now for r2 = 0

− (n − 2 )cn (2 − n )cn
∴ cn +1 = = 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
Chapter Nine 323
∴ 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 −1
∑ (m + r )(m + r − 1)cm x + ∑ ( m + r ) cm x m + r
m=0 m=0
∞ ∞
−6 ∑ (m + r )cm x m + r −1 − 3 ∑ cm x m + r = 0
m=0 m=0

r (r − 7)c0 x r −1 + x r ∑ (m + r )(m + r − 7)cm x m −1
14 m =4
1 4442444443
n = m −1

+ xr ∑ (m + r − 3)cm x m = 0
1=4
m 0 442444
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,......

∴ cn +1 =
(3 − n ) c , n = 0, 1, 2, 3, 4,.......
(n + 1)(n − 6) n
3 c c
∴ c1 = co , ∴ c2 = − 1 = 0 ,
1 * (− 6) 5 10
c c
∴ c3 = − 2 = − 0 , ∴ c4 = c5 = c6 = 0 ,
12 120
c7 =
(− 3) c = 0 = Undefined number.
6
7*0 0
Chapter Nine 325
This implies that co and c7 can be chosen arbitrarily.

−4
And for n ≥ 7 , ∴ c8 = c7 ,
8 *1
5 4*5
∴ c9 = − c8 = c7 ,
9*2 2! 8 * 9
6 − 4*5*6
∴ c10 = − 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 1 3
∴ 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 1 3
y ( x) = C1 1 − x + x 2 − x
 2 10 120 
 7 ∞ (−1) n +1 4 * 5 * 6.....(n − 4) n 
+ C2  x + ∑ x 
 n =8 ( n − 7 )! 8 * 9 * 10 .....n 
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 + r )cm x m + r −1
m=0 m =0
∞ ∞
m+r
− ∑ ( m + r ) cm x + 2 ∑ cm x m + r = 0
m =0 m=0
∞ ∞
∑ (m + r )(m + r − 5)cm x m + r −1
+2 ∑ (m + r − 2)cm x m + r =0
m=0 m=0

r (r − 5)c0 x r −1 + x r ∑ (m + r )(m + r − 5)cm x m −1
14 m =4
1 4442444443
n = m −1

r
−x ∑ ( m + r − 2) c m x m = 0
1=4
m 0 4424443
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,......
Chapter Nine 327
(n + r − 2)
∴ cn +1 = cn n = 0, 1, 2, 3,......
(n + r + 1)(n + r − 4)
( n − 2)
At r2 = 0 ∴ cn +1 = cn n = 0, 1, 2, 3,......
(n + 1)(n − 4)
− 2co co − c1 c
At n = 0 , ∴ c1 = = , At n = 1 , ∴ c2 = = o
−4 2 2 * −3 4 * 3

At n = 2 , ∴ c3 =
(2 − 2)c2 = 0, At n = 3 , ∴ c4 =
c3
=0
3 * (− 2) 5 *1
2c4 0
At n = 4 , c5 = = Undefined number
5 * (4 − 4 ) 0

Assume c5 = c5*

3c5* c5* 4c6 c5*


At n = 5 , ∴ c6 = = , At n = 6 , ∴ c7 = =
6 *1 2 7*2 7
5c7 5c5*
At n = 7 , ∴ c8 = =
8*3 8*7*3
6c8 5c5*
At n = 8 , ∴ c9 = =
9 * 4 6 * 7 *8*3
7c8 c5*
At n = 9 , ∴ c10 = =
10 * 5 10 * 6 * 8 * 3
 x x2   x6 x7 5 x8 5x9 
∴ y ( x) = co 1 + +  + c5*  x 5 + + + + + ...
 2 12   2 7 8 * 21 42 * 24 
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 + r )(m + r − 1)cm x m + r + 5 ∑ (m + r )cm x m + r
m=0 m =0

+ 3 ∑ cm x m + r = 0
m=0

xr ∑ ((m + r )(m + r − 1 + 5) + 3)cm x m = 0
m =0
Chapter Nine 329
 
 ∞ 
∴ x r (r + 4 ) + 3 + ∑ ((m + r )(m + r + 4) + 3)cm x  = 0
r m
 1=4
m 1 4444 42444444 3
 n=m


∴x r
∑ ((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 −3
∑ ((n + (− 3))(n + (− 3) + 4) + 3)cn x n = 0
n =1

∴ x −3 ∑ ((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
At n = 2, ∴ ((2 − 3)(2 + 1) + 3)c2 = (− 1 * 3 + 3)c2 = 0, or , c2 =
0
Then, c2 is undefined number, so we can get the solution in terms
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 , c0 ≠ 0, and y2 ( x ) = y1 ( x) Ln x (32)
m=0

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 + r )(m + r − 1)cm x m + r −1
m=0 m=0
∞ ∞ ∞
+ 3 ∑ (m + r )cm x m+r
− ∑ (m + r )cm x m + r −1
+ ∑ cm x m + r =0
m=0 m=0 m =0

 ∞
∴ x r  ∑ ((m + r )(m + r − 1 + 3) + 1)cm x m
m = 0
∞ 
− ∑ (m + r )(m + r − 1 + 1)cm x m −1  = 0
m =0 
Chapter Nine 331

 ∞
∴ x  ∑ ((m + r )(m + r + 2) + 1)cm x m
r
m 1=4
0 44442444443
 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

r
x
n=0

∑ [(n + 1) 2 cn − (n + 1) 2 cn +1 ]x n = 0

r
∴x
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 c ln ( x )
So, y1 ( x ) = o , and y2 ( x ) = y1 ( x ) ln ( x ) = o
1− x 1− x
∴ y ( x ) = C1 y1 ( x ) + C2 y 2 ( x ) =
1
1− x
( )
C1* + C2* ln ( 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+r
∴ ∑ (m + r )(m + r − 1)cm x + 3 ∑ ( m + r )cm x m + r
m =0 m=0

+ ∑ cm x m + r =0
m=0
Chapter Nine 333

∴x r
∑ ((m + r )(m + r − 1 + 3) + 1)cm x m = 0
m=0

 
 ∞ 
∴ x r (r + 2) + 1 + ∑ ((m + r )(m + r + 2) + 1)cm x  = 0
r m
 1=4
m 1 44442444443 
 n=m



∴x r
∑ ((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 r
∑ ((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 Bessel’s 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+r
∑ (m + r )(m + r − 1)cm x + ∑ ( m + r )c m x m + r
m=0 m=0
∞ ∞
+ ∑ cm x m + r + 2 − v 2 ∑ cm x m + r =0
m=0 m=0

(r 2 − r + r − v 2 )c0 x r +

∑ [(m + r )(m + r − 1) + (m + r ) − v ]c
∞ ∞
x r 2
mx
m
+x r
∑ cm x m + 2 = 0
m =1 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=1 m=0 
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 =1 m=0 
 
 ∞ ∞ 
v +1 v m m+2
∴ (1 + 2v)c1 x + x  ∑ c m m ( m + 2v ) x + ∑ c m x =0
m 1=4
2 442444 3 m1=42
0 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 − 2
∴ cn = 2 2
= 0 n = 2, 3,4,5,...... (35)
(n + v) − v
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
∴ c2 k = , k = 1,2,3,4,......
2 2 k (k + v)
− co − c2 c0
∴ c2 = , c4 = = ,
2 2 4
2 1(1 + v) 2 * 2(2 + v) 2 * 1 * 2(1 + v)(2 + v)
− c4 c0
c6 = 2 =− 6 ,
2 * 3(3 + v) 2 * 1 * 2 * 3(1 + v)(2 + v)(3 + v)
336 Power Series Solution Of Differential Equations
(−1) k co
∴ c2 k = , k = 1,2,3,.... (36)
2 2k k! (1 + v)(2 + v)(3 + v)....(k + v)
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)
Γ(1 + v + k )
(k + v)(k − 1 + v).....(3 + v)(2 + v)(1 + v) =
Γ(1 + v)
Hence we can write (37) as:

(−1) k Γ(1 + v)co


c2 k = 2k
, k = 1,2,3,....
2 k! Γ(1 + v + k )
In the above formula co is still arbitrary, and since we are looking
only for particular solution, it is convenient to choose:
1
co =
2 v Γ(1 + v)

(−1) k
So that finally: c2 k = , k = 0,1,2,3,.... (37)
2 2k + v k! Γ(1 + v + k )
So substituting the above results into assumed solution for v ≥ 0 :
Chapter Nine 337

∴ y ( x) = ∑ c2 k x 2 k + v
k =0

∞ 2k + v
(−1) k  x
∴ y ( x) = ∑   (38)
k =0 k ! Γ (1 + v + k ) 2
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) :


∞ 2k + v
(−1) k  x
J v ( x) = ∑   (39)
k =0 k ! Γ (1 + v + k ) 2
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,
∞ 2k − v
(−1) k  x
J − v ( x) = ∑   (40)
k =0 k ! Γ (1 − v + k ) 2
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 Bessel’s equation and this is a
complete solution of Bessel’s 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
cos vπ J v ( x) − J − v ( x)
Yv ( x) = (42)
sin vπ
Instead of J − v ( x ) as a second, independent solution of Bessel’s

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
Bessel’s 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 on 0<x<∞
4

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)
Chapter Nine 339
cos vπ J v ( x) − J − v ( x)
And, Yv ( x) = (44)
sin vπ
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 Neumann’s 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:
2
J1 / 2 ( x ) = sin x
πx
2
In the same way we can get: J −1 / 2 ( x ) = cos x
πx
cos vπ J1 / 2 ( x) − J −1 / 2 ( x)
∴ Y1 / 2 ( x) =
sin vπ
π 2 2
cos sin x − cos x
∴ Y1 / 2 ( x) = 2 π x π 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.
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
J − m ( x) = ∑   (45)
k =m k ! Γ (1 − m + k )  2 
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 

∞ 2 j+m
(−1) j * (−1) m  x 
∴ J − m ( x) = ∑  
j =0( j + m )! Γ (1 + j ) 2

∞ 2 j+m
m (−1) j  x
∴ J − m ( x) = (−1) ∑  
( j
j = 0 123 + m )! Γ
1
(1
424
+
3 
j ) 2
= Γ ( j + m +1) !j
∞ 2 j+m
m (−1) j
 x
∴ J − m ( x) = (−1) ∑  
j =0 j! Γ( j + m + 1)
2
In the above summation, assume the index j = k .
∞ 2k + m
m (−1) k  x
∴ J − m ( x) = (−1) ∑ k! Γ(k + m + 1)
 
k =0 2
∞ 2k + v
(−1) k  x
But we know that, J v ( x) = ∑  
k =0 k ! Γ (1 + v + k ) 2
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 Bessel’s 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:
cos vπ J v ( x) − J − v ( x)
(a) Yv ( x) = (47)
sin vπ
(b) Yn ( x ) = lim
{ Yv ( x ) (48)
v→n

This function is known as the Bessel function of the second kind of


order v or Neumann’s function of order v. after some modification of
equation (48) we can get the following equation for Yn ( x ) as
following:

2  x  x
n ∞ (− 1)m −1 (hm + hm + n ) 2m
Yn ( x ) = J n ( x ) ln + γ  + ∑ 2m + n x
π  2  π m=0 2 m! (m + n )!
(49)
x − n n −1
(n − m − 1)! x 2m

π
∑ 2m − n
m=0 2 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
1 1 1
ho = 0, and hs = 1 + + + .... + , (s = 1,2,....) (50)
2 3 s
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 )

 ∞ (− 1) hm 2m 
m −1
2  x
Y0 ( x ) =  J 0 ( x ) ln + γ  + ∑ x  (51)
π   2  m =1 2 2m (m!)2 

Example 28 Solve the following differential equation:

x 2 y ′′ + x y ′ + ( x 2 − 4 ) y = 0 on 0<x<∞

Solution: It is clear that v 2 = 4, 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 Bessel’s Function


2n
J n +1 ( x ) = J n ( x ) − J n −1 ( x )
x
1
J n′ ( x ) = [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 )
Chapter Nine 343
2  sin x − x cos x 
Example 29 Show that (a) J 3 / 2 ( x ) =   and
πx  x 
2  x sin x + cos x 
(b) J − 3 / 2 ( x ) = −  
πx  x 
2n
Solution: (a) Q J n +1 ( x ) = J n ( x ) − J n −1 ( x )
x
1 1
Let n = ∴ J 3 / 2 ( x ) = J1 / 2 ( x ) − J −1 / 2 ( x )
2 x
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
2  sin x  2  sin x − x cos x 
∴ J 3 / 2 (x ) =  − cos x  =  
πx  x  πx  x 
2n
(b) Q J n +1 ( x ) = J n ( x ) − J n −1 ( x )
x
1 1
Let n = − ∴ J1 / 2 ( x ) = − J −1 / 2 ( x ) − J − 3 / 2 ( x )
2 x
1
∴ J − 3 / 2 ( x ) = − J1 / 2 ( x ) − J −1 / 2 ( x )
x
2 2
Q J1 / 2 ( x ) = sin x and Q J −1 / 2 ( x ) = cos x
πx πx
2 1 2
∴ J −3 / 2 (x ) = − 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 
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
Chapter Nine 345
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 2 y ′′ + xy ′ − 6 − x 2 y = 0

٣٨) x y ′′ + xy ′ + (x + 9 )y = 0
2 2

٣٩) x ( x + 1) y′′ − (5x + 8x + 3)xy′ + (9 x


2 2 2 2
)
+ 11x + 4 y = 0

٤٠) Find J1 / 2 and J −1 / 2


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 f ( x + ∆x, y ) − f ( x, y )
fx = = lim =
∂x ∆x → 0 ∆x
(1)
∂f f ( x, y + ∆y ) − f ( x, y )
fy = = lim =
∂y ∆y → 0 ∆y
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 )
Chapter Ten 347
Solution:
∂f ∂f
(a) f x = = 4 x 3 y 2 , and fy = = 2x4 y
∂x ∂y
∂f
(b) f x = = e x sin( 2 x + y ) + 2e x cos(2 x + y )
∂x
∂f
fy = = 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:
∂f
(a) f x = = sinh ( x − 6 y ) − ye − xy
∂x
∂f
∴ fx = = sinh (2 − 6) − e − 2 = − sinh 4 − e − 2
∂x ( 2,1)

∂f
fy = = −6 sinh ( x − 6 y ) − xe − xy
∂y

∂f
∴ fy = = −6 sinh (−4) − 2e − 2 = 6 sinh 4 − 2e − 2
∂y ( 2,1)

x ∂u 1 ∂u
Example 3 If u = x y Show that + = 2u
y ∂x Ln x ∂y
Solution:
348 Partial Differential Equations

∂u x ∂u
= y x y −1 , ∴ = xy = u (2)
∂x y ∂x
∂u 1 ∂u
= x y Ln x , ∴ = xy = u (3)
∂y Ln x ∂y
x ∂u 1 ∂u
Add (2) and (3) we get: + = 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 )
fx = = lim =
∂x ∆x → 0 ∆x
∂f f ( x, y + ∆y, z ) − f ( x, y, z )
fy = = lim = (4)
∂y ∆y → 0 ∆y
∂f f ( x, y, z + ∆z ) − f ( x, y, z )
fz = = lim =
∂z ∆z → 0 ∆z

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
Chapter Ten 349
10.4 Total Differentials
For function f = f ( x, y, z ) , the differential of this function df is
expressed by the following form:
∂f ∂f ∂f
df = dx + dy + dz = f x dx + f y dy + f z dz (5)
∂x ∂y ∂z

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  ∂ 2 f
f xx =  = 2 (6)
∂x  ∂x  ∂x
∂  ∂f  ∂ 2 f
f xy =  = (7)
∂y  ∂x  ∂y∂x
∂  ∂f  ∂ 2 f
f yx =   = (8)
∂x  ∂y  ∂x∂y
∂  ∂f  ∂ 2 f
f yy =   = 2 (9)
∂y  ∂y  ∂y
∂  ∂f  ∂2 f
Thus the notation f xy or   or means that we
∂y  ∂x  ∂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
= * (10)
dt dx dt
For, y = Y ( x ), and , x = X (t )

dy
Example 6 If y = 2 x 2 , and , x = 5t 2 Find
dt
Solution: From (10) we can get the following results
dy dy dx
= * = 4 x * 10t = 40 xt
dt dx dt
dy
But, x = 5t 2 ∴ = 200t 3
dx
Chapter Ten 351
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
∴ = * + * (11)
dt ∂x dt ∂y dt

Example 7 Suppose that z = x 2 y, x = t3, and y = t2


Use the Chain rule to find dz / dt .
Solution:
dz ∂ z d x ∂ z d y
Q = * + *
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
= + (12)
∂s ∂x ∂s ∂y ∂s
∂z ∂z ∂x ∂z ∂y
= + (13)
∂t ∂x ∂t ∂y ∂t
352 Partial Differential Equations

∂z ∂z
Example 8 If z = e x sin y , x = st 2 , y = s 2 t find 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 ∂y ∂f ∂z
= + + (14)
∂s ∂x ∂s ∂y ∂s ∂z ∂s
∂f ∂f ∂x ∂f ∂y ∂f ∂z
= + + (15)
∂t ∂x ∂t ∂y ∂t ∂z ∂s

Example 9 If f = x 4 y + y 2 z 3 , where x = r s et , y = r s 2 e − t , and


∂f
y = r s 2 e − t . And find the value of where r = 2, s = 1, t = 0
∂s
Solution:
∂f ∂f ∂x ∂f ∂y ∂f ∂z
∴ = + +
∂s ∂x ∂s ∂y ∂s ∂z ∂s
Chapter Ten 353


∂f
∂s
( )( ) ( )( )(
= 4 x 3 y ret + x 4 + 2 y z 3 2rse − t + 3 y 2 z 2 r 2 sin t)( )
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
∂z F ∂z Fy
= − x and =− (16)
∂x Fz ∂y Fz

x2 y2 z2 ∂z ∂z
Example 10 If + + = 1, Find and
a2 b2 c2 ∂x ∂y
Solution:

x2 y2 z2
Let
2
+ 2
+ 2
−1 = 0
a b c
∂z Fx 2x / a2 c2 x
∴ =− =− =− 2
∂x Fz 2z / c2 a z

∂z Fy 2 y / b2 c2 y
∴ =− =− =− 2
∂y Fz 2z / c 2
b z
354 Partial Differential Equations

10.8 Applications
In this section we will drive the differential equations which governs
the conduction of heat in solids.
y
In the following sections some
basic problems associated with x
this equation are solved. In the L
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
H= (17)
d
Where the positive proportionality factor k is called the thermal
conductivity and depends only on the material between the two
plates. The physical law expressed by equation (17) is known as
Newton’s 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
Chapter Ten 355
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

1 Q∆t Q∆t
∆u = = (21)
s ∆m sρ A∆x
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:
Q ∆t
u ( x0 + θ ∆x, t + ∆t ) − u ( x0 + θ ∆x, t ) = (22)
s ρ A ∆x
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 )
Ak =
∆x
(23)
u ( x0 + θ ∆x, t + ∆t ) − u ( x0 + θ ∆x, t )
sρ A
∆t
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:
k
α2 = (25)
ρs
Chapter Ten 357
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
A 2 +B +C 2 +D +E + Fu = G (28)
∂x ∂x∂y ∂y ∂x ∂y
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
∂x∂y
Chapter Ten 359
Solution: The above partial differential equation can be written
∂  ∂z 
in the following form:   = x 2 y
∂x  ∂y 
By integrating the above equation with respect to x we fiend:
∂z 1 3
= x y + F (y) where F ( y ) is arbitrary.
∂y 3
Integrating the above equation with respect to y we get:
1 3 2
z= x y + ∫ F ( y )dy + G ( x ) where G ( x ) is arbitrary.
6
The above results can be written in the following form:
1 3 2
z= x y + H ( y ) + G(x )
6
The above equation has two arbitrary functions and is therefore a
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 )
1 3 2
∴z= x y + H ( y ) + x 2 − H (0)
6
Since z (1, y ) = cos y , we have from above equation,
1 2
∴ cos y = y + H ( y ) + 1 − H (0)
6
1 2
∴ H ( y ) = cos y − y − 1 + H (0 )
6
1 1
∴ z = x 3 y 2 + cos y − y 2 + x 2 − 1
6 6
360 Partial Differential Equations

∂ 2u ∂u
Example 13 Solve t +2 = x2
∂x∂t ∂x
∂  ∂u 
Solution: Write the equation as t + 2u  = x 2
∂x  ∂t 
∂u 1
Integrating with respect to x, ∴ t + 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
 ln t 2  1 x 3 F (t )  
∴u =e − ln t 2
*∫ e  + dt + H ( x )
 3 t t  
  
 2  1 x 3 F (t )  
∴ t u = ∫ t 
2
+ dt + H ( x )
 3 t 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”.
Chapter Ten 361
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 )
= (34)
X ( x ) α 2 T (t )
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

condition, u ( L, t ) = k1e −α λ t sin λ t = 0 will be satisfied if sin λ t


2 2

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 nπx
u ( x, t ) = cn e − n π α t / L sin , n = 1,2,3,...... (39)
L
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.

4π x
Example 14 Let f ( x) = 3 sin
L
nπ x
∴ u n ( x,0) = cn sin = f ( x)
L
Provided n=4 and cn =3.
The solution to the complete boundary value problem is:
2 2 2 4πx
u ( x, t ) = 3e −16 π α t / L sin = 0, n = 1,2,3,......
L
Chapter Ten 365
Example 15: Use the method of separation of variables to solve the
following partial differential equation:

∂u ∂ 2u
= ,
∂t ∂x 2
3πx 9πx
where u x (0, t ) = 0, u (2, t ) = 0 , and, u ( x,0 ) = 8 cos − 6 cos
4 4
Solution:
Assume u ( x, t ) = X ( x) T (t )

∂u ∂ 2u
Q = ∴ X ( x )T ′(t ) = X ′′( x )T (t )
∂t ∂x 2
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 − λ
2
t

Q u ( x, t ) = X ( x) T (t )

∴ u ( x, t ) = e − λ (K1 cos λx + K 2 sin λx )


2
t

∴ u x ( x, t ) = e − λ (− K1λ sin λx + K 2λ cos λx )


2
t
366 Partial Differential Equations

∴ u x ( x, t ) = λe − λ (K 2 cos λx − K1 sin λx )
2
t

Q u x (0, t ) = 0

∴ u x (0, t ) = λe − λ (K 2 ) = 0
2
t

∴ K2 = 0
Q u (2, t ) = 0

∴ u (2, t ) = e − λ ( K1 cos 2λ ) = 0
2
t


∴ 2λ = for n=1, 3, 5,….
2

∴λ = for n=1, 3, 5,….
4
2  nπ 
∴ u ( x, t ) = e − λ t  K1 cos x
 4 

∴ u ( x,0) = K1 cos x
4
3πx 9πx
Q u ( x,0 ) = 8 cos − 6 cos
4 4
By comparing the above equations we get the following:
nπ 3πx 9πx
∴ K1 cos x = 8 cos − 6 cos
4 4 4
From the first term we get the following:∴ K1 = 8 and n = 3

From the second term we get the following:∴ K1 = −6 and n = 9


9 2 81 2
− π t 3π  − π t 9π 
∴ u ( x, t ) = 8e 16  cos x  − 6e 16  cos x
 4   4 
Chapter Ten 367
Example 16: Use the method of separation of variables to solve the
following partial differential equation:

∂2 y ∂2 y
(b) =4 , where y (0, t ) = 0, y ( x,0 ) = 0, yt ( x,0 ) = 5 sin πx
∂t 2 ∂x 2
Solution: Assume u ( x, t ) = X ( x) T (t )

∂2 y ∂ 2u
Q 2
=4 2
∴ X ( x )T ′′(t ) = 4 X ′′( x )T (t )
∂t ∂x
X ′′( x ) T ′′(t )
∴ = = − λ2
X ( x ) 4T (t )

∴ X ′′( x ) + λ2 X ( x ) = 0 (42)

∴ T ′(t ) + 4λ2T (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 2λt + k 4 sin 2λt
Q u ( x, t ) = X ( x) T (t )
∴ y ( x, t ) = (k1 cos λx + k 2 sin λx ) * (k3 cos 2λt + k 4 sin 2λt )
Q y (0, t ) = 0 ∴ y (0, t ) = (k1 ) * (k3 cos 2λt + k 4 sin 2λt ) = 0
It is clear that k1 = 0 otherwise (k3 cos 2λt + k 4 sin 2λt ) 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 2λt )
∴ yt ( x, t ) = (k 2 sin λx ) * (k 4 * 2λ * cos 2λt )
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
5
∴ k2 k4 =

5
∴ y ( x, t ) = (sin πx * sin 2π t )

Example 17: Use the method of separation of variables to solve the


following partial differential equation:

∂2 y ∂2 y
(c)
2
=4 2
, where y (0, t ) = 0, y ( x,0 ) = 0, and
∂t ∂x
yt ( x,0 ) = 3 sin 2πx − 2 sin 5πx
Assume u ( x, t ) = X ( x) T (t )

∂2 y ∂ 2u
Q =4
∂t 2 ∂x 2
∴ X ( x )T ′′(t ) = 4 X ′′( x )T (t )
X ′′( x ) T ′′(t )
∴ = = −λ2
X ( x ) 4T (t )
Chapter Ten 369

∴ X ′′( x ) + λ2 X ( x ) = 0 (44)

∴ T ′(t ) + 4λ2T (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 2λt + k 4 sin 2λt
Q u ( x, t ) = X ( x) T (t )
∴ y ( x, t ) = (k1 cos λx + k 2 sin λx ) * (k3 cos 2λt + k 4 sin 2λt )
Q y (0, t ) = 0 ∴ y (0, t ) = (k1 ) * (k3 cos 2λt + k 4 sin 2λt ) = 0
It is clear that k1 = 0 otherwise (k3 cos 2λt + k 4 sin 2λt ) 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 2λt )
∴ yt ( x, t ) = (k 2 sin λx ) * (k 4 * 2λ * cos 2λt )
Q yt ( x,0 ) = 3 sin 2πx − 2 sin 5πx
∴ yt ( x,0 ) = (k 2 sin λx ) * (k 4 * 2λ ) = 3 sin 2πx − 2 sin 5πx
Then for the first term of yt ( x,0 ) , ∴ λ = 2π

3
∴ (k 2 ) * (k 4 * 4π ) = 3 ∴ k 2 k 4 =

Then for the second term of yt ( x,0 ) , ∴ λ = 5π
370 Partial Differential Equations

−2
∴ (k 2 ) * (k 4 * 10π ) = −2 ∴ k 2 k 4 =
10π
3
∴ y ( x, t ) = (sin 2πx * sin 4π t ) − 1 (sin 5πx * sin 10π t )
4π 5π

10.9.2 Solution Using Fourier Series


πx mπ x
Let f ( x) = b1 sin + ........ + bm sin
L 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
nπ x
a function which assumes the initial value bn sin 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 nπx
− n 2π 2α 2 t / L2
∑ n
u ( x, t ) =b e sin
L
.... (46)
n =1
Which satisfies the desired initial condition.
In order to satisfy the initial condition (30) we must have:
m nπx
u ( x , 0) = ∑ bn sin L
= f ( x).... (47)
n =1

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
Chapter Ten 371
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  nπx 
bn = ∫ f ( x) sin   dx (48)
L0  L 
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:
∞ 2 2 nπx
α 2 t / L2
u ( x, t ) = ∑ bn e − n π sin
L
.... (49)
n =1

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 0 < x < 50,


(b) u ( x,0) = 
100 − x 50 < x < 100

Where ( α 2 = 1.14 cm 2 / sec )


372 Partial Differential Equations
Solution: From equation (49)
∞ 2 2 nπx
α 2 t / L2
∴ u ( x, t ) = ∑ bn e − n π sin
L
.... ,
n =1

α 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  nπx  2 100  nπx 


bn = ∫ f ( x) sin   dx = ∫ 50 sin   dx
L0  L  100 0  100 
100
100   nπx  100(1 − cos nπ )
= − cos  =
nπ   100  0 nπ
200
=
nπ n =1,3,5,7,..........

200 −π 2 1.142 t / 10000 πx 1 −9π 2 1.142 t / 10000 3πx


u( x, t ) = e sin + e sin
π  L 3 L
1 2 2 5πx 
+ e−25π 1.14 t / 10000sin + ....
5 L 
Chapter Ten 373
(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 x

2L  nπx 
bn = ∫ f ( x) sin   dx
L0  L 
2 50  nπx 
100
 nπx  
=  ∫ x sin   dx + ∫ (100 − x) sin   dx 
100  0  100  50  100  
400 sin( nπ / 2)
=
n 2π 2
400  2 2 πx 1 2 2 3πx
u ( x, t ) = 2  e −π 1.14 t / 10000 sin − e − 9 π 1.14 t / 10000 sin
π  L 9 L
1 2 2 5πx 
+ 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 − λ
2
t

Q u ( x, t ) = X ( x) T (t )
∴ u ( x, t ) = e − λ (K1 sin λx + K 2 cos λx )
2
t

∴ 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 )
π

−π π
Chapter Ten 375

1π π2
∴ ao =
π ∫ π (1 − x )dx = π − 2
0

2π nπx
∴ an =
π
∫ π (1 − x ) cos π
dx
0


∴ an =
π ∫ π (1 − x ) cos nxdx
0
u = (1 − x ) dv = cos nx
sin nx
du = −dx v=
n
 (1 − x ) sin nx π 1 π 
∴ an = 2  + ∫ sin nxdx 
 n 0 n0 
1 π
2 4
∴ an = 2  2 (− cos nx )  = 2 (1 − cos nx ) = 2 n = 1, 3, 5,....
 n 0  n n
π2  1
∴ u ( x,0 ) = π − + 4cos x + cos 3x +
2  9
1 1 
+ cos 5 x + cos 7 x + ......
25 49 

∴ u ( x ,0 ) = ∑ k 2 cos λx
λ =0

π2  1
∴ u ( x, t ) = π − + 4e − 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 ) + 2λ2T (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λ
2
t

∴ u ( x, t ) = e − 2 λ (K1 sin λx + K 2 cos λx )


2
t
Q u ( x, t ) = X ( x) T (t )

Q u (0, t ) = 0 ∴ u (0, t ) = e − 2λ (K 2 ) = 0
2
t
∴ K2 = 0

Q u (4, t ) = 0 ∴ u (4, t ) = e − 2λ (K1 sin 4λ ) = 0
2
t
∴λ =
4
Chapter Ten 377
n 2π 2
− t nπ
∴ u ( x, t ) = e 8  K sin 
x
1
 4 
nπ x
Qu ( x,0) = 25 x = K1 sin
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

x
4
4

2L nπx 50 4 nπx
∴ bn = ∫ 25 x sin
L0 L
dx ∴ bn = ∫
4 0
x sin
4
dx

25  4 2 nπx 
4
nπx 4
∴bn =  sin − x cos 
2  n 2π 2 4 nπ 4 0 

− 200
∴bn = cos nπ

− 200
∴bn = , n = 2, 4, 6, ......

200
∴bn = , n = 1, 3, 5, ......

378 Partial Differential Equations

200  πx 1 2πx 1 3πx 1 4πx 


∴ u ( x ,0 ) = sin − sin + sin − sin + ......
π  4 2 4 3 4 4 4 
 −π 2 t π2

9π 2
200  8 πx 1 2 − t 2πx 1 t 3πx
∴ u ( x, t ) = e sin − e sin + e 8 sin
π  4 2 4 3 4

1 4πx 
− e − 2π t sin
2
+ ......
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 .
Chapter Ten 379
By solving equation (57) we get the following:

T (t ) = ce − λ
2
t

Q u ( x, t ) = X ( x) T (t )

∴ u ( x, t ) = e − 2 λ (K1 sin λx + K 2 cos λx )


2
t

∴ u x ( x, t ) = λe − 2λ (K1 cos λx − K 2 sin λx )


2
t

Q u x (0, t ) = λe − 2λ (K1 ) = 0 ∴ K1 = 0
2
t

∴ u x (π , t ) = λe − 2λ (− K 2 sin λπ ) = 0
2
t

∴λ = n

∴ u ( x, t ) = e − 2 λ (K 2 cos nx )
2
t
(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

x
−π π
380 Partial Differential Equations

1 L 1π π3 π2
f ( x )dx 2
2 L −∫L
∴ ao = ∴ ao = ∫ x dx = =
π0 3π 3

1 L 2π
∴ an = ∫ f ( x ) cos nx dx 2
π 0∫
∴ an = x cos nx dx
L −L
π
2  2x 2 x2 
∴ an =  2 cos nx − 3 sin nx + sin nx 
π  n n n  0

2  2π 
∴ an = cos nx
π  n 2 
4
∴ an = cos nπ
n2
4
∴ an = for n = 2, 4,6,....
n2
4
∴ an = − for n = 1,3,5,....
n2
π2  1 1 
∴ u ( x, o ) = + 4 − cos x + cos 2 x − cos 3x + ..... 
3  4 9 

π2  1 1 
∴ u ( x, t ) = + 4 − e − t cos x + e − 4t cos 2 x − e − 9t cos 3x + .....
3  4 9 
Chapter Ten 381
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 2πx − 6 sin 4πx
Solution: Taking the Laplace transform of the given differential
equation with respect to t, we have:

∞ − st  ∂ u 
2
∞ − st  ∂u 
∫ e  dt =∫ e  4 2 dt
0  ∂t  0  
 ∂x 
Which can be written as:

∞ − st ∂2 ∞ − st
s∫ e udt − u ( x,0 ) = 4 ∫ e u dt
0
∂x 2 0
∂ 2U
Or sU − u ( x,0 ) = 4 (59)
∂ x2

where U = U ( x, s ) = L{u ( x, t )} = ∫ e − st udu
0
Using the given condition u ( x,0 ) = 10 sin 2πx − 6 sin 4πx (60)

∂ 2U
becomes: 4 − sU = 6 sin 4πx − 10 sin 2πx (61)
∂x 2
Taking the Laplace Transform of the conditions
u (0, t ) = 0, u (3, t ) = 0 , we have: L{u (0, t )} = 0, L{u (3, t )} = 0
Or U (0, s ) = 0, U (3, s ) = 0 (62)
Solving the ordinary differential equation (61) subject to condition
(62) by the usual elementary methods as following:
382 Partial Differential Equations

4λ2 − 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 4πx + B sin 4πx + D cos 2πx + F sin 2πx

∴U ′p ( x, s ) = −4π A sin 4πx + 4π B cos 4πx


− 2πD sin 2πx + 2πF cos 2πx
∴U ′p′ ( x, s ) = −4 2 π 2 A cos 4πx − 4 2 π 2 B sin 4πx
− 2 2 π 2 D cos 2πx − 2 2 π 2 F sin 2πx

(
∴ 4 * − 42π 2 A cos4πx − 42π 2 B sin 4πx − 22π 2 D cos2πx − 22π 2 F sin 2πx )
− s( A cos4πx + B sin 4πx + D cos2πx + F sin 2πx) = 6 sin 4πx − 10sin 2πx
By comparing coefficients in both sides we get:
−6
A = 0 , D = 0 ∴ − 64π 2 B − sB = 6 ∴ B =
s + 64π 2
10
And − 16 π 2 F − sF = −10 ∴ F =
s + 16π 2
6 sin 2πx 6 sin 4πx
∴U ( x, s ) = U h + U P = C1e s /2x
+ C2 e − s /2 x
+ −
s + 16π 2 s + 64π 2
But from (62) U (0, s ) = 0,
∴ C1 + C2 = 0 And, U (3, s ) = 0

∴ C1e3 s /2
+ C2e −3 s /2
+0=0

But, C 2 = −C1 ∴ C1  e3 s /2
− e −3 s /2
=0
 
Chapter Ten 383
Then must be C1 = 0 ∴ C2 = 0
10 sin 2πx 6 sin 4πx
∴ U ( x, s ) = −
s + 16π 2 s + 64π 2
By taking the inverse Laplace transform we find:

u ( x, t ) = 10e −16π
2 2
t
sin 2πx − 6e − 64π t
sin 4πx
Which is the required solution:
10 sin 2πx 6 sin 4πx
∴ U ( x, s ) = −
s + 16π 2 s + 64π 2
By taking the inverse Laplace transform we find the required
solution as following:

u ( x, t ) = 10e −16π
2 2
t
sin 2πx − 6e − 64π t
sin 4πx

Example 23 Use the method of Laplace Transforms to solve the


following partial differential equation s:

∂u ∂ 2u
= , where u (0, t ) = 0, u (4, t ) = 0 , and
∂t ∂x 2
πx
u ( x,0 ) = 6 sin + 3 sin πx
2
Solution: As explained in the previous example
∂ 2U
∴ sU − u ( x,0) = 2
(63)
∂ x

Where U = U ( x, s ) = L{u ( x, t )} = ∫ e − st udu
0

πx
Using the given condition u ( x ,0 ) = 6 sin + 3 sin πx , (63)
2
becomes:
384 Partial Differential Equations

∂ 2U πx
− sU = 6 sin + 3 sin πxx (64)
∂x 2 2
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 x + B sin x + D cos πx + F sin πx
2 2
π π π π
∴U ′p ( x, s ) = − A sin x+ B cos x
2 2 2 2
− πD sin πx + πF cosπx

π2 π π2 π
∴U ′p′ ( x, s ) = − A cos x − B sin x
4 2 4 2
− π 2 D cosπx − π 2 F sinπx
π2 π π2 π
− A cos x− 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
Chapter Ten 385
π
By comparing the coefficient of cos x and cos πx we get the
2
following constants: A = 0, D = 0

π
By comparing the coefficient of sin x and sin πx we get the
2
π2
following constants: − B − sB = −6
4
6 3
∴ B= and − π 2 F − sF = −3 ∴F =
π2 s +π 2
s+
4

∴U ( x, s ) = U h + U P = C1e s /2x
+ C2 e − s /2 x

6 πx 3
+ sin + sin πx
s +π 2 4 2 s +π 2

QU (0, s ) = 0, ∴ C1 + C 2 = 0

And , QU (4, s ) = 0 ∴ C1e 4 s


+ C2 e − 4 s
+0=0

But, C 2 = −C1 ∴ C1  e 4 s − e − 4 s  = 0
 
Then must be C1 = 0 ∴ C2 = 0
6 πx 3
∴U ( x, s ) = U h + U P = 2
sin + 2
sin πx
s +π 4 2 s +π
By taking the inverse Laplace transform we find:

∴ u ( x, t ) = 6e − (π ) sin πx + 3e −π
2 2
4t t
sin πx
2
386 Partial Differential Equations

Problems

f ( x, y ) = x 2 sin y, and
1) If
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
Find , f x , f y , f z
3) Find all second partial derivatives of

f ( x, y, z ) = e 2 x sinh y cosh z
4) Suppose that:
 y
z = sin( xy ) cos  , x = te − t , y = sinh t
 x
dz
Use the Chain rule to find
dt
5) If z = x Ln y, x = st 2 , y = s 2 t
∂z ∂z
Find and
∂t ∂s
6) If sin 2 x + cos 2 y + tan 2 z = 1
∂z ∂z
Find 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


Chapter Ten 387
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
3πx 9πx
u ( x,0 ) = 8 cos − 6 cos
4 4
∂2 y ∂2 y
(b) =4 , where
∂t 2 ∂x 2
y (0, t ) = y (5, t ) = 0, y ( x,0 ) = 0, yt ( x,0 ) = 5 sin πx

∂2 y ∂2 y
(c)
2
=4 2
, where y (0, t ) = y (5, t ) = 0, y ( x,0 ) = 0, and
∂t ∂x
yt ( x,0 ) = 3 sin 2πx − 2 sin 5πx

(9) 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
388 Partial Differential Equations

∂u ∂ 2u
(b) = 2 u x (0, t ) = u x (π , t ) = 0, u ( x,0) = x 2
∂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
πx
u ( x,0 ) = 6 sin + 3 sin πx
2
∂u ∂ 2u
(a) = , where u x (0, t ) = 0, u x (2, t ) = 0 , and
∂t ∂x 2
u ( x,0 ) = 4 cos πx − 2 cos 3πx
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
(1)
...........................................................................
an1 x1 + an 2 x2 + ................ + ann xn = λxn
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,
λ − a11 − a12 ...... − a1n
− a21 λ − a22 ....... −a2n
det (λI − A) = =0 (4)
.............................................
− an1 − an 2 λ − ann
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:
λ−4 5
det (λI − A) =
−1 λ+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
or to: − x1 + x2 = 0
− 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
[λ1I − A]  = 
1
   =   and that:
1  − 1 1 1 0
5 − 1 5 5 0
[λ2 I − A]  = − 1 5 1  = 0
1
      

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:
λ −3 2 5
∴ det (λI − A) = − 4 λ +1 5 = λ3 + λ2 − 16λ + 20
2 1 λ +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
4 x1 −3x3 = 0
which is equivalent to
2 x2 − x3 = 0
Setting 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
− x1 + 2 x2 + 5 x3 = 0
(2 I − A)X = 0 is: − 4 x1 + 3x2 + 5 x3 = 0
2 x1 + x2 + 5 x3 = 0
x1 + x3 =0
This system is equivalent to
x2 +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:
4 6 6
1 3 2
 
− 1 − 5 − 2
Solution:
λ − 4 − 6 −6 
det (λI − A) =  − 1 λ − 3 − 2  = 0
 
 1 5 λ + 2
∴ (λ − 4 )(λ − 3)(λ + 2 ) + 10 + 6(− (λ + 2 ) + 2 ) − 6(− 5 − (λ − 3)) = 0

∴ λ3 − λ2 + 4λ − 4λ2 + 4λ − 16 + 12 = 0

∴ λ3 − 5λ2 + 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 
x   − 3
 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
 2 = c 2 1 
x   − 2
 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 4
det (λI − A) = − 3 λ 2 =0
−6 2 λ +3

∴ λ3 − 4λ2 + 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 =
 2  1 3 
c
x   0
 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  
x  2
 3  1 

 
Example 5 Find the characteristic values and the corresponding
characteristic vectors of each of the following matrix:
2 4 −6
4 2 −6
 
− 6 − 6 − 15
Solution:
λ−2 −4 6
det (λI − A) = − 4 λ−2 6 =0
6 6 λ + 15

∴ λ3 + 11λ2 − 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 ∴ x3 = 0 , and x1 = − x2
Let x1 = c1 ∴ x2 = −c1

 x1   1
   
∴  x2  = c1  − 1
x   0
 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
−1
∴ x3 = 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 
x   4
 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 4 7
det (λI − A) = − 7 λ+2 5 =0
− 10 4 λ +6

∴ λ3 − 3λ2 + 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
x   1
 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 
x   − 2
 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
c3
∴ x2 =
2
 x1   2
   
∴  x2  = c3 1 
x   2
 3  

Example 7 Find the characteristic values and the corresponding


characteristic vectors of each of the following matrix:
4 6 6
1 3 2
 
− 1 − 4 − 3
Solution:
λ−4 −6 −6
det (λI − A) = − 1 λ −3 −2 =0
1 4 λ +3

∴ λ3 − 4λ2 − λ + 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 
x   − 1
 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 
x   − 1
 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 (41)
−7
∴ x3 = 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:
3 2 1 1 
− 1 1 6 6 
A= 
− 1 2 2 − 2
 
 1 −2 2 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 405
3 2 1 1
− 1 1 6 6
 
− 1 2 2 − 2
 
 1 −2 2 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:
λ − 3 − 2 −1 −1 
 1 −6 

 1
λ −1 − 6
−2 λ−2
[ ]
 = (λ − 4 )2 (λ − 2)2 + 1 = 0
2 
 
 −1 2 − 2 λ − 6
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 + j1 − 2 − 1 −1 
 1 1 + j1 − 6 −6 
[(2 + j1)I − A] =  
 1 −2 j1 2 
 
 −1 2 − 2 − 4 + j1

x1 + x4 = 0
1
x2 + (− 1 + j1)x 4 = 0
2
x3 + + x4 = 0
With 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
X = c2   , c2 ≠ 0 .
 2 
 
 −2 
Having found these vectors, we know from Theorem 1 that the
characteristic vectors corresponding to the characteristic value
 2 
− 1 − j1
λ3 = 2 − j1 of A are the vectors x = c3   , c3 ≠ 0
 2 
 
 −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 )
(44)
.........................................................................
qnn (D )xn = g n (t )

Example 9 Find a complete solution of the following linear


differential system:
dx dy
+ 2x + + 6 y = 2e t ,
dt dt
dx dy
2 + 3x + 3 + 8 y = −1
dt dt
Solution: As a rule, the steps in a reduction of a constant-
coefficient 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
1
   e − t 

 − 2  2 t  − 2e 
2t
x2 (t ) =   e =  
 1  2 t 
 e
Satisfy the homogeneous system corresponding to the given system,
which is:
dx dy
+ 2x + + 6 y = 2e t ,
dt dt
dx dy
2 + 3x + 3 + 8 y = −1
dt dt
and that the vector function is as following:

− 11 t − 3 − 11e − 3
t
v(t ) =  e +  1  =   satisfies the non-
 5  t
   5e + 1
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 (59)

(D3 − D 2 + 4D − 4)x = 8 + 32e2t (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:
1
∴y =− (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
x   4 cos 2t   4 sin 2t 
 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 ) p12 (D ) .... p1n (D )
p21 (D ) p22 (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

2 D 2 + 3D − 9 D 2 + 7 D − 14
following:
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) y + (D + 2)z = 2et
(D − 1)x + Dy + (D − 2)z = aet
(D + 1)x + (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:

x −y + 4z = (2 − a )et
(D − 1)x + Dy + (D − 2 )z
= aet
0 = (a − 3) et
Of course, this reduced system is equivalent to the given one.
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 + x3
x2′ = 4 x1 − x2 −4 x3 (69)
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
418 Simultaneous Linear Differential Equations

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:
λa + b − c =0
− 4a +(λ + 1)b + 4c = 0 (70)
3a + b +(λ − 4 )c = 0
The corresponding characteristic equation is as following:
λ 1 −1 0 0 −1
− 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 −1 1 
A= 4 − 1 − 4
 
− 3 − 1 4 
If λ = λ1 = −1 system (70) becomes linear system as following:
−a+b−c =0
a−c =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 
 
X = c1 2 e + c2 0 e + c3 − 1 e3t
−t   t
     
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
(71)
x2′ = 2 x1 − 3 x2

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:
λ − 1 2   a  0 
 − 2 λ + 3 b  = 0 (72)
    
and the characteristic equation is
λ − 1 2 
 − 2 λ + 3 = λ + 2λ + 1 = (λ + 1) = 0
2 2
 
Hence, λ1 = −1 is a repeated characteristic value of A. Setting
λ = −1 in (72), we obtain the linear system
− 2a + 2b = 0
which is equivalent to a −b = 0
− 2a + 2b = 0
1
Clearly,   is a characteristic vector of A corresponding to
1
λ1 = −1 , and
1
X =  e −t (73)
1
is a particular solution of (71)
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 ue− t 
  to be a fundamental matrix of (71).
e− t −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 )
(75)
v′ = 2(u − v )
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 (77)
 k 2 + 2k1t 
The Wronskian of this vector function and (73) has the following
value:
k1 + k 2 + 2k1t 1 − 2t
  e = k1e − 2t ≠ 0
 k 2 + 2k1t 1
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 (1 + 2t )e − t
 
e − t −t 
2te 
as a fundamental matrix, and
1 (1 + 2t ) − t
X = c1   e − t + c2  e
1
  2t 
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:

a  − t c  − t (a + ct )e 
−t
b  e + d te =  
(b + dt )e 
     − t

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
(78)
x2′ = 3 x1 + 2 x2
This system will have a solution of the type
a  λt
b  e (79)
 
if, and only if:
λ − 2 3   a  0 
− 3 = (80)
 λ − 2 b  0
Solving the characteristic equation as following:
λ − 2 3 
− 3  = λ2 − 4λ + 13 = 0
 λ − 2
424 Simultaneous Linear Differential Equations
we obtain λ1 = 2 + j 3 and λ2 = 2 − j 3 as conjugate complex

2 −3
characteristic values of the coefficient matrix A =  .
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
1  (2 + j 3)t
− e (81)
 j 
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:

 2t j 3t e  2t cos 3t + j sin 3t
j 3t
1  2t
− e e =   e = − j (cos 3t + j sin 3t ) e
 j  j
− je  3t  
Chapter Eleven 425
 2t j 3t e cos 3t  e 2t sin 3t 
2t
1
∴ e e = + j 
− j  2 t
e sin 3t  2 t
− e cos 3t 
It is now easy to verify that the real vector functions:
cos 3t  2t sin 3t  2t
sin 3t  e and − cos 3t  e
   
Form a basis for all real solutions of system (78). Thus, we are
able to write a complete solution:
cos 3t  2t sin 3t  2t
X = c1   e + c2 − cos 3t  e of the given differential
sin 3t   
system using only one of the two conjugate characteristic values of
A.

Example 15 Find a complete solution of the following first order


x1′ = −2 x1 − 13x2
systems:
x2′ = x1 + 4 x2
Solution:
− 2 − 13
A=
1 4 

λ+2 13
det (λI − A) = =0
−1 λ −4
(λ + 2 )(λ − 4 ) + 13 = 0
λ2 − 2λ + 5 = 0 ∴ λ1,2 = 1 ± j 2
For λ1 = 1 + j 2
426 Simultaneous Linear Differential Equations

3 + j 2 13  a  0
 −1 − 3 + j 2  b  = 0
    
(3 + j 2 )a + 13b = 0
(3 + j 2)a = −13b
Let a = C1 .‫ﺧﻄﺄ! اﻹﺷﺎرة اﻟﻤﺮﺟﻌﻴﺔ ﻏﻴﺮ ﻣﻌﺮّﻓﺔ‬

1 
  λt 1 13  1+ j 2
X 1 = C1  − 1  e = C 
 − 3 − j 2 e
 (3 + j 2 )  13
1
 
 13 
13  1+ j 2
= c1  e
 − 3 − j2
13  0  
∴ X 1 = c1e t   cos 2t −   sin 2t 
 − 3   − 2 
 0  13  
∴ X 2 = c2 et   cos 2t +   sin 2t 
 − 2   − 3 
13  0  
∴ X = X 1 + X 2 = c1et   cos 2t −   sin 2t 
 − 3   − 2 
 0  13  
+ c2 et   cos 2t +   sin 2t 
 − 2   − 3 

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
λ +3 4
det (λI − A) = =0
−2 λ −1
(λ + 3)(λ − 1) + 8 = 0
λ2 + 2λ + 5 = 0 ∴ λ1,2 = −1 ± j 2

For λ1 = 1 + j 2

2 + j 2 4   a  0 
 −2 − 2 + j 2  b  = 0
    
(2 + J 2)a + 4b = 0 and − 2a + (− 2 + j 2)b = 0
∴ a = (− 1 + j1)b
Let b = c1 ∴ a = (− 1 + j1)c1

 x1  a
  = c1  e (−1+ j 2 )t
 x2  b 
a  − 1 + j1
  = c1  
b   1 
− 1 1 
θ =   , and, φ =  
1 0 
 − 1 1  
∴ X 1 = c1e − t   cos 2t −   sin 2t 
1   0 
1   − 1 
∴ X 2 = c2 e − t   cos 2t +   sin 2t 
 0  1  
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=
2 1 

λ +3 2
det (λI − A) = =0
−2 λ −1
(λ + 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
 x2   − 1
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 + v′e − 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 1
W = = 2c2t − c3 − (c2 + 2c2t − c3 ) = 0
c2 + 2c2t − c3 − 1

c3 = 0
∴ u = −2c2t , and v = 2c2t + c2

1   − 2t  − t
∴ X = c1  e − t + c2  e

 1  2t + 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
λ−4 2
det (λI − A) = =0
− 25 λ + 10
(λ − 4)(λ + 10) + 50 = 0
λ2 + 6λ + 10 = 0
∴ λ1, 2 = −3 ± j1

Eigen values For λ1 = −1

(− 7 + j1)a + 2b = 0
−1
Let a = c1 ∴b = c1 (− 7 + j1)
2
1 
a   1 2 
  = c1  7 1  = c1  
b
   − j  2  7 − j1 
2 2
2 0 
θ =   , and φ= 
7  − 1
 2  0  
X 1 = c1e − 3t   cos t −   sin t 
 7   − 1 
 0   2 
X 2 = c2 e − 3t   cos t +   sin t 
 − 1 7 
2 cos t  − 3t 2 sin t 
∴ X = c1e − 3t   + c 2 e  
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
 2  4 cos t − 3 sin t 

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 
 
x3′ = 8 x1 − 3 x3 − 8
Solution:
 3 0 − 1
A = − 2 2 1 
 
 8 0 − 3
λ −3 0 1
der (λI − A) = 2 λ−2 −1 = 0
−8 0 λ +3
λ3 − 2λ2 − λ + 2 = 0
∴ λ1 = 1 , λ1 = −1 , and λ3 = 2
Eigen values for λ1 = 1
− 2a +c = 0
2a −b −c = 0
− 8a +4c = 0
432 Simultaneous Linear Differential Equations
Let a = c1 ∴ c = 2c1 and b = 0

 x1  1 
   
∴ X 1 =  x2  = c1  0 et
x   2
 3  
Eigen values for λ2 = −1
− 4a +c = 0
2a −3b −c = 0
− 8a +2c = 0
Let a = C2 ∴ c = 4C2
Substitute values of a and c into the second equation we get the
following:
3b = 2C2 − 4C2
−2
∴b = C2
3
 x1  3 
   
∴ X 2 =  x2  = c2  − 2 e − t
x  12 
 3  
Eigen values for λ3 = 2
−a +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
x   0
 3  
 x1  1  3   0
    t   −t  
∴ X =  x2  = c1 0 e + c2  − 2 e + c3 1 e 2t
x   2 12   0
 3      
− 1 
Q x(0) = 2 
 
− 8

− 1  1  3  0
     
∴ 2  == c1  0  + c2  − 2  + c3 1 
 
− 8  2 12  0
     
∴ −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
 x   4 12 
 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:
 p11 (D ) p12 (D ).... p1n (D ) 
 p (D ) p ( D ).... p ( D )
P(D ) =  21 22 2 n 
.............................................. 
 
 pn1 (D ) pn 2 (D ).... pnn (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 ) (86)
The associated homogeneous equation is:
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 eλt ,


P(λ )k = 0 (88)
We will have a nontrivial solution if, and only if,
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 = e−t (90)
(4 D + 6)x + (5D + 4) y + (20 D − 12)z = 7e − t
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 =0
(λ + 2)a + (λ + 3)b + (2λ + 3)c =0 (91)
(4λ + 6)a + (5λ + 4)b + (20λ − 12)c =0
The characteristic equation of this system is:
(λ + 1) (λ + 2) (λ + 3)
(λ + 2) (λ + 3) (2λ + 3) =0
(4λ + 6) (5λ + 4) (20λ − 12)
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
a−c =0 a + 3c = 0 a + 9c = 0
, ,
b + 2c = 0 b−c =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 
c1 − 2 e + c2 − 1 e + c3 − 6 e3t
 2t
(92)
     
1  − 1 − 1 
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:

ke ( p + jq )t + k e ( p − jq )t k +k k −k 
= e pt  cos qt − sin qt 
2  2 j2 
= e pt [θ (k ) cos qt − φ (k ) sin qt ] (94a)

ke ( p + jq )t − k e ( p − jq )t k −k k −k 
= e pt  cos qt + sin qt 
j2  j2 2 
= 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 (96)
.........................................................
k1t m −1e rt + k 2t m − 2 e rt + .......k m −1te rt + k m e rt
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
2
= λ4 + 2λ2 − 8λ + 5 = 0 (98)
λ +1 λ +1
with roots 1, 1, − 1 ± j 2 . For the root -1 + j2, (98) simplifies to:

4 − j 2 − 6 + j8 k1  0


 j2 − 2 − j 4   k  = 0  (99)
  2   
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   2
θ (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 
 0  1  
  2 1  
x2 = e − t   cos 2t +   sin 2t 
1  0  

For the repeated root λ = 1 , and a trial solution ae t , (88)


becomes:
442 Simultaneous Linear Differential Equations

10 10 a1  0


P(1)a =  =
2 2  a2  0

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
− 1te + b  e (100)
   22 
Substituting this into the original system, we obtain two equations
each of which reduces to: 2b12 + 2b22 = 1
1
Hence, we can take b12 = 0 and b22 = .
2
Two solutions associated with the double root λ = 1 are therefore
1 
x3 = aet =   et
− 1
0 
t 1  t   t
t
and x4 = b1te + b2 e =  te + 1 e
− 1  
2
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 ) (102)
in which the h' s are constant 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 (104)
1   2
then write the complementary function, found in Example 21, as:
c1 + 2c2  − t − 2c1 + c2  − t
xh =   e cos 2t +  −c  e sin 2t
 c 2   1 
 c3  (105)
+  et + c4  e − t cos 2t
1
− c3 + c4  − c 
 4
 2 
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
=  a  e =  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
2 e of f (t ) , we note that, since both e and te occur in terms of
t t
 
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  d 
Where b =   c =   d =  1  are constant vectors to be
b2  c2  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 + mλm −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 + 2mλm −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
(103)
b1 + 2b2 + c1 + c2 =0
2b1 + 2b2 +3c1 +8c2 +10d1 +10d 2 =2
2b2 + c1 +2c2 +2d1 +2d 2 =2
When reduced to row echelon form, the augmented matrix of this
system becomes:
1 0 0 0 0 0− 1
0 0 0 0 0 0 1 
 
0 0 1 0 − 2 − 2 − 2
 
0 0 0 1 2 2 1 
0 0 0 0 0 0 0 
 
0 0 0 0 0 0 0 
448 Simultaneous Linear Differential Equations
which gives us the following:
b1  0  0   − 1 
b  0  0  1 
 2      
c1  2   2   − 2
  = k1   + k 2   +  
c 2   − 2 − 2 1 
d1  1  0  0 
       
d 2  0  1  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
v= e +  t e +  te
9 2 1  1 
In the following there are some different examples to help
students in understanding this chapter.

Example 23 Find a complete solution the following system:


(D + 2 )x + (D + 4 )y = 1 (104)

(D + 1)x + (D + 5) y = 2 (105)
Solution: Subtract (105) from (104) we get the following
equation:
x − y = −1 (106)
Multiply (3) by (D + 1)
Chapter Eleven 449
∴ (D + 1)x − (D + 1) y = −(D + 1)
∴ (D + 1)x − (D + 1) y = −1 (107)
Subtract (107) from (105) we get the following equation:
∴ (2 D + 6 ) y = 3
dy
2 + 6y = 3
dt
This is first order ordinary differential equation. The solution of this
equation is as following:
1
y (t ) = + c1e − 3t
2
Substitute y (t ) into (106)
∴ x − y = −1
−1
∴x = + c1e − 3t
2
x 1  − 1  1
∴   =   + c1  e − 3t
 y 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
 2t − 1
∴λ = 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 = −2et (115)

(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 + 6λ2 + 11λ + 6 = 0
λ1 = −1 , λ2 = −2 , and λ3 = −3
For λ1 = −1
9a + 2b − 3c = 0
− 3a − 2b − c = 0
−4b − 6c = 0
−3 2
Let c = c1 ∴b = c1 ∴a = c1
2 3
x 4 
  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
Chapter Eleven 453
After simplification of the above equation we get the following:
30 14
Let c = c2 ∴ b = − 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

x 1 
   
X 3 =  y  = c3  − 2 e − 3t
z  1 
   
14e t 
 
Q f (t ) =  − 2et 
 
 4e 
t
 
∴λ = 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
454 Simultaneous Linear Differential Equations

 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 (117)

(3D + 1)x + (3D + 5) y = cos t (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

∴ x′p (t ) = − A sin t + B cos t


Chapter Eleven 455
∴ x′p′ (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
x1′ = 3x1 + 2 x2
a)
x2′ = − 2 x1 − x2

−3
x1′ = x1 − 2 x2
b) 2
5
x2′ = 2 x1 + x2
2

x1′ = 3 x1 − 2 x2
c)
x2′ = 5 x1 − 3 x2

x1′ = 3 x1 + 2 x2
d)
x2′ = − 2 x1 − x2

x1′ = x1 − x2
e)
x2′ = x1 + 3 x2

x1′ = −2 x1 + x2
X (0 ) =  
3
f)
x2′ = − 3x1 + 2 x2 + 2 sin t 4
Chapter Eleven 457
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 
h) x2′ = x2 X (0 ) = − 2
x3′ = 2 x1 − x2 − 5 x3 − 1 
 

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:


(2 D + 1)x + (D + 2) y = 0
a)
(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

d) (D + 5)x + (D + 7 ) y = 4e
2t

(2 D + 1)x + (3D + 1) y = 0

(2 D + 1)x + (D 2 + 6 D + 1)y = 0
(D + 2)x + (D 2 + 2 D + 5)y = 6 2t
e)
458 Simultaneous Linear Differential Equations

(2D 2 + 5)x + (D 2 + 3)y = −8 sin 3t


f)
(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

(2 D + 1)x + (D + 2) y = 8e −t
k)
(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)
0

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) (2)
Proof:

Γ(q + 1) = ∫ x q e − x dx
0
By integration by parts we obtain:
∞ ∞
Γ(q + 1) = −e − x x q + q ∫ x q −1 e − x dx = qΓ(q )
0
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

Example 1 Find Γ(1)


∞ ∞
Solution: Γ(1) = ∫ x1−1 e − x dx = − e − x =1
0
0

Example 2 Find Γ(1 / 2)


Solution:

Γ(1 / 2) = ∫ x (1 / 2 )−1e − x dx (4)
0
Assume x = u 2 ∴dx = 2u du and substitute in (4) , we get:
∞ 2
Γ(1 / 2) = 2 ∫ e − u du (5)
0
∞ 2
We can say that: Γ(1 / 2) = 2 ∫ e − v dv (6)
0

Multiply each term of (5) and (6) , we get:


∞ ∞
(Γ(1 / 2) ) −u 2 2
2
= 2∫e du * 2 ∫ e − v dv (7)
0 0
∞∞
(Γ(1 / 2) )2 = 4 ∫ ∫ e − (u
2
+v2 )
du dv (8)
00
Changing to polar coordinates
Where, u = r cos θ and v = r sin θ , then (8) becomes:
π /2∞ ∞
(Γ(1 / 2) ) −r 2 2
2
=4 ∫ ∫e r dr dθ = 4 * π / 2 ∫ e − r r dr
0 0 0
∞ ∞
 1  −r 2
∴ (Γ(1 / 2) ) = 4 * π / 2 ∫ e
2 −r 2
r dr = 2π *  −  ∫ e (−2r ) dr
0  20
Chapter Twelve 461

∴ (Γ(1 / 2) ) = −π e
2 −r 2

0
∴ Γ(1 / 2) = π (9)

Γ (7 )
Example 3 Find
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 Γ(q) q Γ(q)
1.00 1.0000 1.55 0.8889
1.05 0.9735 1.60 0.8935
1.10 0.9514 1.65 0.9001
1.15 0.9330 1.70 0.9086
1.20 0.9182 1.75 0.9191
1.25 0.9064 1.80 0.9314
1.30 0.8975 1.85 0.9456
1.35 0.8912 1.90 0.9618
1.40 0.8873 1.95 0.9799
1.45 0.8857 2.00 1.0000
1.50 0.8863
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:
Γ(− 2.4 ) Γ(− 1.4 ) Γ(− 0.4 )
Γ(−3.4) = = =
− 3. 4 (− 3.4)(− 2.4) (− 3.4)(− 2.4)(− 1.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)

Example 7 Find Γ(−2)


Solution:
Γ(−1) Γ ( 0)
Γ(−2) = = =∞
(− 2) − 2 * −1
For any integer n the following formula can be used

 1 π (2n )!
Γ n +  = 2 n * (10)
 2 2 n!
Chapter Twelve 463
Proof:
 1  1  3  5 3 1 1
Γ n +  =  n −  n −  n − ..... * Γ 
 2  2  2  2 2 2 2
 2n − 1  2n − 3  2n − 5  3 1
=   ...... * * π
 2  2  2  2 2

π
= n
(2n − 1)(2n − 3)(2n − 5).....3 *1
2
π (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
 2 2 (n )!
 1 π (6)! 15 π
∴ Γ(3.5) = Γ 3 +  = 6 =
 2  2 (3)! 8

Example 9 Evaluate the following integral:



3 −x
∫x e dx
0
464 Special Functions
∞ ∞
3 −x
Solution: ∫x e dx = ∫ x 4 −1e − x dx = Γ(4) = 3! = 6
0 0


6 −2x
Example 10 Evaluate the following integral ∫x e dx
0
Solution: Let 2 x = y , ∴2dx = dy
Substitute in the required integral we get:
∞ ∞ 6 ∞
 y dy 1 1 6! 45
∫x
6 −2x
e dx = ∫   e− y = 7 ∫ ( y )6 e− y dy = 7 Γ(7) = 7 − =
0 
0
2 2 2 0 2 2 8

45
∴ ∫ x 6 e − 2 x dx =
0
8

∞ 4
−x
Example 11 Evaluate the following integral ∫ e dx
0

Solution:
1
Let t = x 4 , ∴ x = t1 / 4 , ∴ dx = t − 3 / 4 dt
4
Substitute in the integral, we get
 1
∞ ∞ Γ 1 + 
−x 4 1 1 1 1  4
∫e dx = ∫ t − 3 / 4e − t dt = Γ  =
40 4 4 4 1
0  
4
= Γ(1.25) = 0.96785
∞ 4
∴ ∫ e − x dx = 0.96785
0
Chapter Twelve 465
Example 12 Evaluate the following integral
1
∫ − Ln( x ) dx
0

Solution:

Assume − Ln( x ) = t , ∴ x = e − t , dx = −e − t dt
x = 0 ⇒t = ∞
When,
x =1 ⇒t = 0
Substitute in the above integral we get:

( ) dt = ∫ (t )1 / 2 (et ) dt
1 0 ∞
∫ − Ln( x ) dx = ∫ t −e −t

0 ∞ 0
1  1 π
= Γ(3 / 2 ) = Γ  =
2  2 2

Example 13 Evaluate the following integral



∫4 x e− x
dx
0

Solution:
Assume u = x

∴ x = u2
∴ dx = 2udu
Then at x = 0, u = 0 and
x=∞ u=∞
466 Special Functions

∫ (u )
∞ ∞ ∞
2 1 / 4 −u
∴∫ x e 4 − x
dx = e (2udu ) = 2 ∫ u 3 / 2e − u du
0 0 0

It is clear the above integral is in the form of Gamma function,


where,
q −1 = 3 / 2 ∴q = 5/ 2

∴ ∫ 4 x e− x
dx = 2Γ(2.5)2 * 1.5 * 0.5 * Γ(0.5)
0

∴ ∫ 4 x e− x
dx = 2.65868
0

Example 14 Evaluate the following integral



− x3
∫e dx
0

Solution:

Assume x 3 = u ∴ x = u1 / 3
1
∴ dx = u − 2 / 3du
3
Substitute in the above integral we get the following:
∞ ∞
− x3 1 
∴ ∫e dx = ∫ e − u  u − 2 / 3du 
0 0 3 

− x3 1 ∞ − 2 / 3 −u
∴ ∫e dx = ∫ u e du
0
30
Chapter Twelve 467
It is clear the above integral in the form of Gamma function, where,
q − 1 = −2 / 3 , ∴ q = 1 / 3

1 1  Γ(4 / 3) 
∴ ∫ e − x dx = Γ(1 / 3) = 
3
 = 0.8933
0
3 3  1 / 3 

Example 15 Evaluate the following integral



−x 3
∫3 x dx
0

Solution:
−x
It is clear that 3− x = e ln 3 = e − x ln 3 = e − x e ln 3 = 3e − x
∞ ∞
−x 3
∴ ∫3 x dx = 3 ∫ e − x x 3dx
0 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 −x
)dx
∫e
−∞

Solution:
468 Special Functions

Assume e − x = u

∴ −e − x dx = du
du − du
∴ dx = =
− e− x u
At x = ∞ u = 0 and,
At x = −∞ u = ∞ and,
∞ ∞
(x −e )
−x
0
− ln (u )− u  − du  − ln (u ) − u du
∴ ∫ e dx = e ∫  = e
 u 
∫ e
u
−∞ ∞ 0
∞ ∞
(x −e )
−x
dx = u − 2 e − u du
∴ ∫ e ∫
−∞ 0

It is clear that the above integral is in the form of Gamma function,


where,
∴ q − a = −2 ∴ q = −1
Γ(0 )
∴ Γ(− 1) = =∞
−1

(x − e −x
)dx = ∞
∴ ∫e
−∞
Chapter Twelve 469
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)
0

Where m > 0 , n > 0


Beta function has the following relation with Gamma function:
Γ ( m) Γ ( n )
B(m, n) = (12)
Γ( m + n)
Proof

Q Γ(m) = ∫ t m −1e − t dx (13)
0

Substitute in equation (13) for t = x 2 , dt = 2 xdx


∞ 2
∴ Γ(m) = ∫ x 2m − 2e − x 2 x dx (14)
0
∞ 2
= 2 ∫ x 2 m −1e − x dx
0

Similarly,
∞ 2
Γ(n) = 2 ∫ y 2 n −1e − y dy (15)
0

Multiply both sides of (14) and (15) we get:


470 Special Functions
∞∞ 2
+ y2 )
Γ(m) Γ(n) = 4 ∫ ∫ x 2 m −1 y 2 n −1e − ( x 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
∫ (r cos θ ) (r sin θ ) e
2
2 m −1 2 n −1 − r
∴ Γ ( m) Γ ( n) = 4 ∫ r dr dθ
0 0

∞ 2 m + 2 n − 2 − r 2 
∴ Γ(m) Γ(n) =  ∫ (r ) e 2r dr 
 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)
Γ ( m) Γ ( n)
∴ B ( m, n ) =
Γ ( m + n)
Chapter Twelve 471
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 0
B ( m, n ) = ∫ x m −1
(1 − x )
n −1
dx = ∫ (1 − t )m −1 (t )n −1 (− dt )
0 1
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
∫ x (1 − x ) dx
4 3

Solution:
1
Γ(5) * Γ(4) 4!*3! 1
∫ x (1 − x ) dx = B(5,4) = Γ(9) = 8! = 280
4 3

0
472 Special Functions

Example 18 Evaluate the following integral


4
∫ t (4 − t ) dt
2 1/ 2

0
Solution
4 4 1/ 2
2t
∫ t (4 − t )
2 1/ 2
dt = 2∫ t 1 −  dt
0 
0
4
Assume x = t / 4 the t = 4 x, and dt = 4dx
t =0⇒ x=0
t = 4 ⇒ x =1
4 4
∴ ∫ t (4 − t )
2 1/ 2
dt = 2 ∫ (4 x )2 (1 − x )1 / 2 4dx
0 0
4
= 2 * 4 * 4 ∫ ( x )2 (1 − x )1 / 2 dx
2

0
 3 Γ(3) * Γ(3 / 2)
= 2 7 * B 3,  = 2 7
 2 Γ(9 / 2)
2!*[1 / 2 * Γ(1 / 2)]
= 27 = 19.505
[7 / 2 * 5 / 2 * 3 / 2 * 1 / 2 * Γ(1 / 2)]

Example 19 Evaluate the following integral

(8 − x3 ) dx
2
3
∫x
0
Solution:

(8 − x )   x 3 
2 2
∫x
3 3
dx = ∫ 2 x1 −   dx
 2 
0 0  
Chapter Twelve 473
3
 x
Assume that   = u , then x = 2 u1 / 3
2
∴ x = 0, u = 0 And x = 2, u = 1

1
(
∴ I = 2 * ∫ 2u1 / 3 (1 − u )
0
) 1/ 3  2
 u
3
−2 / 3 
du

I=
3 ∫0
(
8 1 −1 / 3
u (1 − u))
1/ 3
du

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

x 0.02
from the figure shown above =
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

(8 − x3 ) dx = 83 * 0.89331*1.3545 = 3.2266
2
∴∫x 3
0

Example 20 Evaluate the following integral

( )
1
∫ x 3 1 − x 2 dx
0

Solution:
1 −1 / 2
Assume x 2 = u , ∴ x = u and, ∴ dx = u du
2

(1 − x ) dx = ∫ (u1/ 2 )1/ 2 (1 − u )1/ 3 12 u −1/ 2du


1 1
2
∴∫ x3
0 0

(1 − x )
1
1 1 −1 / 4
∴∫ x3 2
dx = ∫ u (1 − u )1 / 3 du
0
20
Chapter Twelve 475
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

( ) 1  3 4  1 Γ(3 / 4 ) * Γ(4 / 3)
1
∴ ∫ x 3 1 − x 2 dx = B ,  = = 0.527
0
2 4 3 2 Γ(25 / 12 )

Example 21 Evaluate the following integral:



dx
∫ (
x 4 + x2 )
0

Solution:
4 4
Assume u , ∴ x2 = −4
4 + x2 u
1/ 2
4 
∴ x =  − 4
u 
−1 / 2
−2  4 
∴ dx = −2u  − 4 du
u 
At x = 0 , u = 1 , and,
At x = ∞ , u=0
1 / 2  −1 / 2 −1 / 2
( )
∞ 0
dx 4  u −2  4 
∴∫ = ∫  − 4 
0 (
x 4 + x2 ) 1 
u 


  − 2u  − 4 
4 u 
du
476 Special Functions
∞ −3 / 4 −3 / 4
dx 2 1 −1  4  1 1 −1  4 
∴∫ = ∫ u  − 4 du = ∫ u  (1 − u )
0 (
x 4 + x2 ) 40 u  20 u 
du

∞ −3 / 4 −3 / 4
dx 21 4  11 4 
∴∫ = ∫ u −1  − 4  du = ∫ u −1  (1 − u )
0 (
x 4+ x 2
) 40 u  20 u 
du


dx 1 − 3 / 4 1 −1 3 / 4
∴∫ ∫ u u (1 − u )− 3 / 4 du
0 (
x 4 + x2 ) = 4
2 0
∞ 1
dx 1
∴∫ = ∫u
−1 / 4
(1 − u )− 3 / 4 du
0 (
x 4+ x 2
) 2*4 3/ 4
0

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 B (3 / 4,1 / 4 ) Γ(3 / 4 ) * Γ(1 / 4 )
∴∫
0 (
x 4 + x2 ) =
2 * 43 / 4
=
2 * 43 / 4 Γ(1)

dx Γ(1.75) * Γ(1.25) 0.9191 * 0.9064
∴∫
0 (
x 4 + x2 ) =
2 * 43 / 4 * 0.75 * 0.25
=
2 * 43 / 4 * 0.75 * 0.25

dx
∴∫
0 (
x 4+ x 2
) = 0.785398

Example 22 Evaluate the following integral:


1
1
∫ Ln x dx
0
Chapter Twelve 477
Solution:
1 1
Assume ln  = u ∴ − ln x = u or = eu
 x x
1
∴x = = e−u ∴ dx = −e − u du
eu
At x = 0 u = ∞ and
At x = ∞ u=0

( )
1 0 ∞
1
∴ ∫ Ln dx = ∫ u − eu du = ∫ ue − u du
0  x ∞ 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
0  x

Problems
(I) Evaluate the following Gamma functions
Γ(− 2 )
Γ(6.4 ) , Γ(− 4.3) , Γ(0.7 ), Γ(− 2 ),
Γ(4.5) Γ(2.3)
(II) Evaluate the following integrals

(1 − x ) dx
1 1 ∞
dx 2 q −x
1) ∫ 2) ∫ x3 3) ∫x q dx
q
0 1− x 0 0
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 − b − b 2 − 4ac
x1 , x2
2a 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

x92 + 2
x10 = = 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
Chapter Thirteen 481
2
It is clear, we can not assume xo < 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
2x
g ′( x ) =
3
The assumption x0 = 0 gives g ′( x0 ) < 1 then this assumption

converges as shown before. But when we chose xo = 5


10
g ′( x0 ) = > 1, so divergence occurs. Also when
3
x = g (x ) = 3x − 2
3
g ′( x ) = <1
2 3x − 2
9
∴ < 3x − 2
4
9
∴ 3x > −2
4
9 2
∴x > −
12 3
1
∴x >
12
1
So, x must be greater than for convergence.
12
Chapter Thirteen 483
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:
a0 + b0
c0 =
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 =  (4)
a0 sign f (a0 ) ≠ sign f (c0 )
c0 sign f (b0 ) = sign f (c0 )
b1 =  (5)
b0 sign f (b0 ) ≠ sign f (c0 )
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 ] :


ak + bk
ck =
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 =  (6)
ak sign f (ak ) ≠ sign f (ck )
ck sign f (bk ) = sign f (ck )
bk +1 =  (7)
bk sign f (bk ) ≠ sign f (ck )
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:
b−a
x * − ck ≤ k +1
(8)
2

a = a0 a1 a3 x
b3
a2 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 example

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
∴c0 = = = 0.75
2 2
f (c0 ) = 0.3125
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
a1 + b1
c1 = = 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
a2 + b2 0.75 + 1.125
c2 = = = 0.937 5
2 2
Chapter Thirteen 487
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
a3 + b3
c3 = = 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 a b c 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.


Chapter Thirteen 489
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 )) :

x−a
y = f (a ) + ( f (b ) − f (a )) (9)
b−a
b−a af (b ) − bf (a )
y = 0 ⇒ x1 = a − f (a ) =
f (b ) − f (a ) f (b ) − f (a )
af (b ) − bf (a )
∴ c= (10)
f (b ) − f (a )
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 False Position
a+b af (b ) − bf (a )
c= c=
2 f (b ) − f (a )
average of a and b 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 )
≤ ε 2 but this may take a long time.
xn
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 ]
Chapter Thirteen 491
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 a b x 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
f (c ) instead of f (c ) if c is a stagnant end point has been
2i −1
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
Chapter Thirteen 493
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 a b x 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 Newton’s 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 Newton’s 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 Newton’s 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 line’s 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


Newton’s Method.

Fig.5 Example of Newton’s 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, Newton’s method yields an exact


solution after one iteration.
Chapter Thirteen 495
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
f ( x1 )
∴ x = 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 )
∴ xn +1 = xn − (11)
f ′( xn )
496 Numerical Analysis
Notes regarding Newton’s 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

Newton’s method: f ( x ) = x 2 − 3 x + 2 = 0
Solution:
Applying the Newton’s methodology to the above equation we get
the result shown in Table(5):
Table(5) The result of Example 5.

i xn f(xn) f '(xn)
0 0.000000000 2.000000000 -3.000000000
1 0.666666667 0.444444444 -1.666666667
2 0.933333333 0.071111111 -1.133333333
3 0.996078431 0.003936947 -1.007843137
4 0.999984741 0.000015259 -1.000030518
5 1.000000000 0.000000000 -1.000000000
Chapter Thirteen 497
13.1.7 Secant Method
In Newton’s 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 −1 )
f ′( xn ) ≈ (12)
xn − xn −1
f ( xn ) x f ( xn ) − xn f ( xn −1 )
∴ x n +1 = x n − = n −1 (13)
f ( xn ) − f ( xn −1 ) f ( xn ) − f ( xn −1 )
xn − xn −1

Fig.7 Picture comparing Newton’s 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

Secant’s method: f ( x ) = x 2 − 3 x + 2 = 0
Solution: Applying the Secant’s methodology to the above
equation we get the result shown in Table(6):
Chapter Thirteen 499
Table(6) The result of Example 6.

i xn f(xn)
0 0.000000000 2.000000000
1 0.500000000 0.750000000
2 0.800000000 0.240000000
3 0.941176471 0.062283737
4 0.990654206 0.009433138
5 0.999485332 0.000514933
6 0.999995237 0.000004763
7 0.999999998 0.000000002
8 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 Newton’s
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 ) and we need to find a

polynomial Pn ( x ) which passes through 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 ), Pn ( x0 ) = y0  a0 + a1 x0 + ....... + an x0n = y0
( x1, y1 ), Pn ( x1 ) = y1  a0 + a1 x1 + ....... + an x1n = y1

M  M
( xn , yn ), 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 
y0 − y1
a1 = if x0 ≠ x1
x0 − x1
y0 − y1 x y −x y
a0 = y0 − a1 x0 = y0 − x0 = 0 1 1 0
x0 − x1 x0 − x1
x0 y1 − x1 y0 y0 − y1
P1 ( x ) = + x (15)
x0 − x1 x0 − x1
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 passes through


(x0 , y0 ), (x1 , y1 ),.............. (xn , yn ) . This can be proved by
constructing a linear system of nth order equations.
Chapter Thirteen 503
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., a0 = a1 = ....... = an = 0 . Why? Pn ( x ) = 0
interpolates ( x0 , 0), (x1, 0), ..........., ( xn , 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)
x0 y1 − x1 y0 y0 − y1
P1 ( x ) = + x
x0 − x1 x0 − x1
2*6 − 5*3 3 − 6
∴ P1 ( x ) = + x
2−5 2−5
∴ 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 Lagrange’s 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
M
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.
Chapter Thirteen 505
0 i≠ j
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 ) ?

0 at x1 , x2 , ........, xn
l0n ( x ) degree n n = 
1 at x0
Consider the following polynomial of degree n
qn ( x ) = ( x − x1 )( x − x2 ).....( x − xn )
= 0 at x1 , x2 , ........, xn

qn ( x ) is almost l0n ( x ) but :


506 Numerical Analysis
qn ( x ) = ( x − x1 )( x − x2 ).....( x − xn ) ≠ 1 in general. But
qn ( x ) (x − x1 )(x − x2 ).....( x − xn )
=
qn ( x0 ) ( x0 − x1 )( x0 − x2 ).....( x0 − xn )
and is a degree n polynomial.
qn ( x ) (x − x1 )(x − x2 ).....(x − xn )
∴ l0n ( x ) = = (17)
qn ( x0 ) ( x0 − x1 )( x0 − x2 ).....( x0 − xn )
This polynomial interpolates ( x0 , 1), ( x1 , 0 ), .....( xn , 0 ) . Similarly,
(x − x0 )(x − x1 ).....(x − xi −1 )(x − xi +1 ).......( x − xn )
∴lin ( x ) = (18)
(xi − x0 )(xi − x1 ).....(xi − xi −1 )(xi − xi +1 ).....(xi − xn )
∏ j = 0 (x − x j )
n

j ≠i
∴lin ( x ) = (19)

n
j =0
(xi − x j )
j ≠i

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 )
Chapter Thirteen 507
13.2.2 Lagrange Formula
The interpolating polynomial for ( x0 , y0 ), ( x1 , y1 ), ........, ( xn , y n ) is
given by:
n
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
P1 ( x ) = y0
(x − x1 ) + y x − x0 (21)
(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 of {xi }, x0 , x1 , .........., xn . i.e.

Pn ( xi ) = f ( xi ), i = 0, 1, 2,........, n
Then, Pn ( x ) must interpolate ( x0 , f ( x0 )), ( x1 , f ( x1 )), .., ( xn , f ( xn )) .
Use the Lagrange formula,
n
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


i 0 1 2 3
xi 0 1 3 4
f ( xi ) 3 2 1 0

Find the interpolating polynomial and use it to approximate the


value of f (2.5) . Find the Lagrange polynomials.
Solution:

l03 ( x ) =
(x − 1)(x − 3)(x − 4)
(− 1)(− 3)(− 4)
l13 ( x ) =
(x − 0)(x − 3)(x − 4)
(1 − 0)(1 − 3)(1 − 4)
l23 ( x ) =
(x − 0)(x − 1)(x − 4)
(3 − 0)(3 − 1)(3 − 4)
l33 ( x ) =
(x − 0)(x − 1)(x − 3)
(4 − 0)(4 − 1)(4 − 3)
Chapter Thirteen 509
2. Find interpolating polynomial.

P3 ( x ) = 3l03 ( x ) + 2l13 ( x ) + 1l23 ( x ) + 0l33 ( x )

P3 ( x ) = 3
(x3 − 8x 2 + 19x − 12) + 2 (x3 − 7 x 2 + 12x) + (x3 − 5x 2 + 4 x)
− 12 6 −6

P3 ( x ) =
(− x3 + 6 x 2 − 17 x + 36)
12
3. Use P3 (2.5) to estimate f (2.5)

P3 (2.5) =
(− (2.5)3 + 6(2.5)2 − 17(2.5) + 36 )
= 1.281 25
12
∴ f (2.5) ≈ 1.281 25

13.2.4 Newton Divided Differences


There are two problems with Lagrange’s form for the unique
interpolating formula:
1. It is expensive computationally.
2. If we have Pn ( x ) , we can’t use it to find Pn +1 ( x )
n
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 ) + ....
(22)
+ An ( x − x0 )( x − x1 )......( x − xn −1 )
And try to determine the coefficients A0 , A1 , A2 , ....... An
( xo , f (x0 )) Pn ( x0 ) = f ( x0 ) ⇒ A0 = f ( x0 ) (23)

 f ( x1 ) = f ( x0 ) + A1 ( x1 − x0 )

(x1 , f (x1 )) Pn ( x1 ) = f ( x1 ) ⇒ f ( x1 ) − f ( x0 ) (24)
A
 1 =
 x1 − x0
f ( x2 ) − f ( x1 ) f ( x1 ) − f ( x0 )

x2 − x1 x1 − x0
(x2 , f (x2 )) Pn ( x2 ) = f ( x2 ) ⇒ A2 = (25)
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 ) ⇒ A0 = f [x0 ] (26)
f [x1 ] − f [x0 ]
f [x0 , x1 ] = ⇒ A1 = f [x0 , x1 ] (27)
x1 − x0
f [x1 , x2 ] − f [x0 , x1 ]
f [x0 , x1 , x2 ] = ⇒ A2 = f [x0 , x1 , x2 ] (28)
x2 − x0
f [x1 ] − f [x0 ]
We call f [x0 , x1 ] = divided difference at [x1 , x2 ],
x1 − x0
etc. Thus, the polynomial which interpolates:
Chapter Thirteen 511
( 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 ) + ....
(29)
........ + f [x0 , x1 ,...., xn ]( x − x0 )( x − x1 )..........( x − xn −1 )
n −1
∴ Pn ( x ) = Pn −1 ( x ) + f [x0 , x1 ,...., xn ]∏ ( x − xi ) (30)
i =0
Where,
f [ x0 ] = f ( x0 )
f [x1 ] − f [x0 ]
f [x0 , x1 ] =
x1 − x0
f [x1 , x2 ] − f [x0 , x1 ]
f [x0 , x1 , x2 ] =
x 2 − x0
f [x1 , x2 ,...., xi ] − f [x0 , x1 ,......xi −1 ]
f [x0 , x1 , ....., xi ] =
xi − x0
f [x1 , x2 ,...., xn ] − f [x0 , x1 ,......xn −1 ]
f [x0 , x1 , ....., xi ] =
xn − x0

We can build a divided difference table very easily:


x0 f [x0 ]
f [x0 , x1 ]
x1 f [x1 ] f [x0 , x1 , x2 ]
f [x1 , x2 ] f [x0 , x1 , x2 , x3 ]
x2 f [x 2 ] f [x1 , x2 , x3 ] f [x0 , x1 , x2 , x3 , x4 ]
f [x2 , x3 ] f [x1 , x2 , x3 , x4 ]
x3 f [x3 ] f [x2 , x3 , x4 ]
f [x3 , x4 ]
x4 f [x 4 ]

Example 11 Find the interpolating function for the following table:


i 0 1 2 3
xi 0 1 3 4
f ( xi ) 3 2 1 0
512 Numerical Analysis
1. Find Newton’s divided difference.
2. Find the interpolating function.
Solution:
1.
xi f [xi ]
0 3
−1
1 2 1/ 6
−1/ 2 − 1 / 12
3 1 −1/ 6
−1
4 0
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, i = 0, 1, 2, ......, n .


For r ≥ 0 we can further define
Chapter Thirteen 513

∆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.
f1 − f 0 1
f [x0 , x1 ] = = ∆f 0
x1 − x0 h
f [x1 , x2 ] − f [x0 , x1 ]
f [x0 , x1 , x2 ] =
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,
1
∴ f [x0 , x1 , ..., xk ] = ∆k f 0 (31)
k! h k
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
µ= (32)
h
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
n u 
Pn ( x ) = ∑  i ∆i f0 (33)
i = 0 
where we have used the binomial coefficients
 µ  µ (µ − 1)........(µ − i + 1)
  = , i>0 (34)
i
  i !

µ
and   = 1 (35)
0 
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 ∆f i ∆2 f i ∆3 f i L
x0 f0
x1 f1 ∆f 0
∆2 f 0
x2 f2 ∆f1 ∆3 f 0
∆2 f1 M
x3 f3 ∆f 2 ∆3 f1
∆2 f 2
x4 f4 ∆f 3
M M
Chapter Thirteen 515
Example 12. Find the interpolating function for the following table
i 0 1 2 3
xi 0 1 3 4
f ( xi ) 3 2 0 -1

١. Find the forward differences.


٢. Find the interpolating function.
Solution:
1.
xi fi ∆f i ∆2 f i ∆3 f i
0 3
−1
1 2 −1
−2 2
3 0 1
−1
4 −1
2.

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


b
∫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
I = ∫ xdx =
a 2
(
1 2
b − a2 ) or more generally

b
I = ∫ Pn ( x )dx
a
b
Hard example I = ∫ e cos x dx = ?
a
Chapter Thirteen 517
b
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.


b
2. Use the integral of the simpler function to approximate ∫ f ( x )dx
a

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

xi +1 f ( xi ) + f ( xi +1 )
Therefore, ∫ f ( x )dx ≅ ( xi +1 − xi )
xi 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,
n −1h
I ( f ) ≅ Tn ( f ) = ∑ 2 ( fi + f i +1 )
i =0
h  n −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

h  n −1 
∴ I ( f ) ≅ Tn ( f ) = 
 0 f + 2 ∑ i n 
f + f (37)
2  i =1 
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


Chapter Thirteen 519
f ( x ) = P1 ( x ) + R2 ( x0 )
( x − x0 )2 ( x − x0 )3
= P1 ( x ) +
2
f ′′( x0 ) +
6
( )
f ′′′( x0 ) + O h 4

( x − x0 )2 ( x − x0 )3
≅ P1 ( x ) + f ′′( x0 ) + f ′′′( x0 )
2 6
and in particular

h2 h3
f ( x1 ) ≅ P1 ( x ) + f ′′( x0 ) + f ′′′( x0 )
2 6
The error E (R ) in the integral I ( f ) − I (P1 ) is:

x1 (x − x0 )2
E (R ) ≈ ∫ f ′′( x0 )dx
x0 2
f ′′( x0 ) x1
≈ ∫x
(x − x0 )2 dx
2 0

x1
f ′′( x0 )  ( x − x0 )3 
≈  
2  3  x0

f ′′( x0 )
∴ E (R ) ≈ (x1 − x0 )3 (38)
6
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 (39)
12 12
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 ]
n  M 2 h3 
Tn ( f ) − I ( f ) ≤ ∑   (40)
 12 
i =1 

M 2 h 3n
=
12
M 2 (b − a )h 2
12
= O h2 ( )
Therefore,

M 2 (b − a )h 2
Tn ( f ) − I ( f ) ≤ (41)
12
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 )


b−a π
n = 4, h = =
n 4
π π 3π
Such that x0 = 0, x1 = , x2 = , x3 = , x4 = π
4 2 4
Chapter Thirteen 521
 f ( x0 ) f ( x4 ) 
T4 ( f ) = h  + f ( x1 ) + f ( x2 ) + f ( x3 ) +
 2 2 

=
π 1
+ 1.5509 + 0 + (− 7.4605) +
(− 23.141) = −13.336
4  2 2 

n=8 T8 ( f ) = −12.382
n = 64 T64 ( f ) = −12.075
n = 512 T512 ( f ) = −12.070
True solution is − 12.0703

13.3.2 Simpson’s Rule


Now, let’s 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 Simpson’s 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 )
l02 ( x ) =
(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 )
Chapter Thirteen 523
xi + 2
∴ I (P2 ) = ∫ P2 (x )dx
x1

(xi + 2 − xi ) 4( xi + 2 − xi ) x − xi
∴ I (P2 ) = f ( xi ) + f ( xi +1 ) + f ( xi + 2 ) i + 2
6 6 6
xi + 2
h
∴ ∫ f ( x )dx ≅ I (P2 ) = ( f i + 4 f i +1 + f i + 2 ) (47)
x1
3

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
b−a
numbered indicies, with h =
n
h
Sn ( f ) = ( 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 h n / 2 −1
= ∑ ( f i + 4 f i +1 + f i + 2 ) = ∑ h ( f 2i + 4 f 2i +1 + f 2i + 2 )
i =0 3 i =0 3
i = even

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
h n / 2 −1 n / 2−2 
∴ Sn ( f ) =  f 0 + 4 ∑ f 2i +1 + 2 ∑ f 2i + 2 + f n  (48)
3  i =0 i =0


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
I (P2 ) − I ( f ) ≤ h 5 (49)
90
with M 4 being the bound on f (4 ) ( x ) . For the composite Simpson’s
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 ) ≤ h4
= 4 (50)
180 n 180
Therefore, Simpson’s Rule is fourth-order.

Example 14 Evaluate I = ∫ e x cos( x )dx by composite Simpson’s

rule using 2 subintervals (panels).


Solution:

Again, [a, b] = [0, π ], f ( x ) = e x cos( x )


b−a π
n = 4, h = = 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
π
= [1 + 4(1.5509) + 2(0) + 4(− 7.4605) + (− 23.141)] = −11.985
12
The exact solution is − 12.070 3 . Thus with n = 4 , the Composite
Simpson’s 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
Chapter Thirteen 525
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] into subintervals (panels)
[a, t1 ], [t1, t2 ],……., [t p −1, b]
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
b−a
on each panel, then n = mp . Let h = , 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
∴ I = ∫ f ( x )dx
a
t1 t2 tp
∴ I = ∫ f ( x )dx + ∫ f ( x )dx + ..... + ∫ f ( x )dx
t0 t1 t p −1

Composite Trapezoidal Rule


h

t i +1
ti
f ( x )dx = ∫
xi +1
xi
f ( x )dx ≅ [ f (xi ) + f (xi +1 )] (51)
2
b
I = ∫ f ( x )dx
a
p −1
t
∴I = ∑ ∫tii+1 f (x )dx
i =0
h n −1
∴I = ∑ [ f (xi ) + f (xi +1 )]
2 i =0
 f ( x0 ) f ( xn )
∴ I = h + f ( x1 ) + ... + f ( xn −1 ) + (52)
 2 2 

Composite Simpson’s Rule


h
∫ti f (x )dx = ∫ti f (x )dx ≅ 3 [ f (x2i ) + 4 f (x2i +1 ) + f (x2i + 2 )]
t i +1 t i +1

n
−1
p −1 2
b t x2i+2
∴ I = ∫ f ( x )dx = ∑ ∫tii+1 f (x )dx = ∑ ∫ f ( x )dx
a x
i =0 i = 0 2i
n
−1
2 h
∴I = ∑ 3 [ f (x2i ) + 4 f (x2i +1 ) + f (x2i + 2 )]
i =0
 n
−1
n
−2 
 2 2 
h
∴I = f 0 + 4 ∑ f 2i +1 + 2 ∑ f 2i + 2 + f n  (53)
3 i =0 i =0 
 
 
Chapter Thirteen 527
π
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 )


b−a π π π
n = 4, h= = such that x0 = 0, x1 = , x2 = ,
n 4 4 2

x3 = , and x4 = π
4
 f ( x0 ) f ( x4 )
C.T .R. = h  + f ( x1 ) + f ( x2 ) + f ( x3 ) +
 2 2 

=
π 1
+ + +

− +
(− 23.141)  = −13.336
1 .5509 0  7 .4605 
4  2  2 
n=8 CTR = −12.382
n = 64 CTR = −12.075
n = 512 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 n
∫ f (x )dx ≅ ∑ ω i f (xi )
a
(54)
i =0
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
h
In trapezoid: ω0 = = ω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
n
I≅ ∑ ωi f (xi ) n is fixed, ωi , xi are to be determined.
i =0
n
∴I = ∑ ω i f (xi ) gives the “best” result.
i =0

“best:” it gives exact result for polynomials of highest degree


possible.
n
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.
Chapter Thirteen 529
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 2
∫−1 xdx = ω0 x02 + ω1 x12 ⇒ ω0 x02 + ω1 x12 =
3
4. Exact for polynomial of degree 3, i.e., 55 holds for

P0 ( x ) = x 3
1 3 3 3 3
∫−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:
3 3
x0 = − , x1 = , ω0 = 1, ω1 = 1
3 3
1  3  3
Thus ∫−1 f ( x )dx ≅ f 
 3  +
− f  
   3 
This is Gaussian Quadrature on [− 1,1] with two nodes.

 3  3
From above, we know that f  −  + f   is exact if
 3   3 

f = 1, x, x 2 , x 3 .
Is it exact for all polynomials of degree ≤ 3 ? Yes:
1 1 1 1 1
∫−1 f ( x )dx = a0 ∫ dx + a1 ∫ xdx + a2 ∫ x 2 dx + a3 ∫ x 3dx \
−1 −1 −1 −1

 3 3  3  3 
2 2  3  3 
3 3
= a0 [1 + 1] + a1 − + 
 + a2  −        
 +  3   + a3  − 3  +  3  

 3 3   3
         

  3   3 
2
 3  
3
= a0 + a1  −  + a 2  −  + a3  −   +
  3   3   3  

  3  3
2
 3 
3
a0 + a1  
  3  + a 2  3  + a3  3  
       
Chapter Thirteen 531
 3  3
= f1  −  + f  
 3   3 
polynomials of degree ≤ 3

∫−1 (3 + 4 x + 8 x )
1 2
Example 17 Evaluate + 2 x 3 dx Via Gaussian

Quadrature:
 2
 3 
3
1
( 2 3
)
 3  3
∫ 3 + 4 x + 8 x + 2 x dx = 3 + 4 3  + 8 3  + 2 3  
−1
       
 − 3 − 3
2
− 3 
3
+ 3 + 4  + 8  + 2  
  3   3   3  

  3   34
2
= 23 + 8   =
  3   3

Compare that with straight integration:
1


1
−1
( 
)
3 + 4 x + 8 x 2 + 2 x 3 dx = 3x +
4 x 2 8x3
2
+
3
++
8x 4 
3 

 −1

∴∫
1
−1
(3 + 4 x + 8x 2 + 2 x3 )dx = 23 + 83 = 343

13.3.5 Gaussian Quadrature in General

b n
∫ f ( x )dx ≅ ∑ ω i f (xi )
a
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.
Chapter Thirteen 533
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 )
y ( xn +1 ) = y ( xn ) + y ′( xn )( xn +1 − xn ) + (xn +1 − xn )2 (60)
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 (61)
2
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 (63)
on the interval 1 ≤ x ≤ 1.5.
Chapter Thirteen 535
Solution: We have:
x0 = 1 , x f = 1.5 , y0 = 1 , f ( x, y ) = 0.2 xy

1.5 − 1
∴ xn = x0 + nh = 1 + 0.1n , N = =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)

solution of (63) is y ( x ) = e (0.1x − 0.1). This formula has been used to


2

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 ,

1.5 − 1
∴ xn = x0 + nh = 1 + 0.1n , N = =5
0.1
and y n +1 = yn + 2(1 + 0.1n ) yn 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
١٫٠٠ ١٫٠٠٠٠ ١٫٠٠٠٠ ٠٫٠٠٠٠ ٠٫٠٠
١٫١٠ ١٫٠٢٠٠ ١٫٢٣٣٧ ٠٫٠٣٣٧ ٢٫٧٣
١٫٢٠ ١٫٤٦٤٠ ١٫٥٥٢٧ ٠٫٠٨٨٧ ٥٫٧١
١٫٣٠ ١٫٨١٥٤ ١٫٩٩٣٧ ٠٫١٧٨٤ ٨٫٩٥
١٫٤٠ ٢٫٢٨٧٤ ٢٫٦١١٧ ٠٫٣٢٤٤ ١٢٫٤٢
١٫٥٠ ٢٫٩٢٧٨ ٣٫٤٩٠٤ ٠٫٥٦٢٥ ١٦٫١٢
Chapter Thirteen 537
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:

( )
y nP+1 = ynC + hf xn , y nC , (65)

y nC+1 = ynC + [ f (xn , ynC ) + f (xn +1 , y nP+1 )],


h
(66)
2
This method is of order 2.

Example 20 Use the improved Euler’s 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
y n +1 = y n + (k1 + k 2 ) (69)
2
Chapter Thirteen 539
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  (71)
 2 2 
 1 1 
k3 = hf  xn + h, y n + k 2  (72)
 2 2 
k 4 = hf ( xn + h, y n + k3 ) (73)
1
y n +1 = yn + (k1 + 2k 2 + 2k3 + k 4 ) (74)
6
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
0.1
y n +1 = yn + (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 Relative
error 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.
Chapter Thirteen 541
Solution: The solution is given as shown in Table(11).
Table(11). Numerical results for Example 23.
n xn yn Exact value Global error
y ( xn ) y ( xn ) − y n
0 0.0 1.000 000 000 1.000 000 000 0.000 000 000
1 0.1 1.200 334 589 1.200 334 672 0.000 000 083
2 0.2 1.402 709 878 1.402 710 0'36 0.000 000157
3 0.3 1.609 336 039 1.609 336 250 0.000 000181
4 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
1
y1 = y0 + (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
Euler’s 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 Euler’s method

1- y ′ = x 2 − 2 x + y , x = 0, y = 0.5, x = 0.1, 0.5

(
2- y ′ = y − x 2 )1 / 2 , x = 0, y = 1 x = 0.1, 0.2
3- y ′ = ( x + y ) / xy, x = 1, y = 1, x = 1.0, 1.2

Runge-Kutta’s method

1- y ′ = (2 x + y )1 / 2 , x = 1, y = 2, x = 1.0, 1.4

( )
2- y ′ = 1 − x 3 / y , x = 0, y = 1, x = 0, 0.2
3- y ′ = ( x − y ) / ( x + y ), 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 0-
07-Y66643-1.
[2] “Advanced Engineering Mathematics” by Erwin Kreysizig,
Third Edition, 1972 by John Wiley & Sons, Inc., ISBN 0-471-
50728-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, Schaum’s
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, Schaum’s Outline Series, McGraw-Hill,
Second Edition, 1999, ISBN 0-07-038203-4.

S-ar putea să vă placă și