0% found this document useful (0 votes)
5 views287 pages

Numerical Methodsaaa

Uploaded by

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

Numerical Methodsaaa

Uploaded by

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

ACKNOWLEDGEMENTS

I am grateful to all those persons in the University of Gondar who have a believed on me for
this work. I am greatly thankful to my department council and those persons who have a
direct impact on these teaching materials.

I sincerely thank my Editors, [Link] A., Yohanis B., Sisay L. for their help and professionalism
on this work.
I would like to thank Mr. Abiyu E. Mr. Gosaye A. and [Link] A. for their support and
guidance on the work.

Finally, I express my heartfelt thanks to my wife Rahel Araya not only for her encouragement
and support but also for sharing all the pain, frustration, and fun of producing the martial.

I would appreciate being informed of errors, or receiving other comments and helpful
suggestions about the book.

Prepared by Haileyesus T., UOG Page I


PREFACE

The present Teaching material ‘Numerical Analysis I ' is planned to cover the syllabus of
Numerical Analysis I of different Ethiopian Universities in Natural science mainly to the
University of Gondar.

The subject matter is presented in a very systematic and logical manner. In each chapter, all
concepts, definitions and large number of examples in the best possible way have been
discussed in detail and simpler manner so that the students should feel no difficulty to
understand the subject.

In this teaching material, I tried to present algorithm and computer program in met lab, so that
students can see how computation are easily obtained through computer program. Brief
discussion on the contents included in each chapter shall be presented.

Thorough care has been taken to eradicate errors but perfection cannot be claimed. So that the
readers are requested for constructive suggestions to improve the book and it will be gratefully
accepted.

Haileyesus Tessema

June, 2015
haileyesust@[Link]

Prepared by Haileyesus T., UOG Page II


Table of Contents
ACKNOWLEDGEMENTS ......................................................................................................................... I
PREFACE ............................................................................................................................................... II
Table of Contents ................................................................................................................................ III
List of Figures ......................................................................................................................................VI
List of Tables.....................................................................................................................................VII
CHAPTER -1: ERROR ............................................................................................................................. 1
1.1 ACCURACY OF NUMBERS ............................................................................................................ 2
1.2 PRECISION AND ACCURACY ........................................................................................................ 3
1.3 ERRORS........................................................................................................................................ 4
1.4 SOURCES OF ERROR .................................................................................................................... 4
1.5 ABSOLUTE AND RELATIVE ERRORS ............................................................................................. 6
1.6 GENERAL FORMULA FOR ERROR ................................................................................................ 9
1.7 INVERSE PROBLEM .................................................................................................................... 11
1.8 ERROR IN SERIES APPROXIMATION .......................................................................................... 13
REVIEW EXERCISE ............................................................................................................................... 15
CHAPTER-2: SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL
EQUATIONS ........................................................................................................................................ 17
2.1 GRAPHICAL METHOD ................................................................................................................ 19
2.2 DIRECT METHODS ..................................................................................................................... 20
2.3 INDIRECT OR ITERATIVE METHODS .......................................................................................... 20
2.3.1 Bisection method ............................................................................................................... 21
2.3.2 Regula-Falsi Method ........................................................................................................... 26
2.3.3 Secant method ................................................................................................................... 33
2.3.4 Iteration Method (fixed point iteration) ............................................................................ 38
2.3.5 Newton-Raphson Method .................................................................................................. 44
2.4 ORDER (RATE) OF CONVERGENCE OF ITERATIVE METHODS .................................................... 52
2.4.1 Rate of Convergence of Bisection Method ........................................................................ 52
2.4.2 Rate of Convergence of Newton-Raphson Method ........................................................... 52
2.4.3 Rate of Convergence of Regula-Falsi Method .................................................................... 53
2.5 MULTIPLE ROOTS ...................................................................................................................... 55
2.6 ROOT OF POLYNOMIAL EQUATIONS ........................................................................................ 57
2.6.1 Muller’s Method ................................................................................................................. 57
REVIEW EXERCISE ............................................................................................................................... 62

Prepared by Haileyesus T., UOG Page III


CHAPTER –3: SOLUTION OF SYSTEM OF LINEAR EQUATIONS......................................................... 64
3.1 DIRECT METHODS ..................................................................................................................... 68
3.1.1 Matrix inversion method .................................................................................................... 70
3.1.2 Cramer's rule ...................................................................................................................... 71
3.1.3 Gauss elimination method ................................................................................................. 73
3.1.4 Gauss-Jordan method......................................................................................................... 81
3.1.5 LU -Decomposition ............................................................................................................. 86
3.1.6 Cholesky’s Decomposition.................................................................................................. 91
3.1.7 Partition Method ................................................................................................................ 96
3.2 ITERATIVE METHODS ................................................................................................................ 98
3.2.1 Jacobi's iterative or Gauss-Jacobi's method ....................................................................... 99
3.2.2 Gauss-Seidel Method ....................................................................................................... 106
REVIEW EXERCISE ............................................................................................................................. 121
CHAPTER 4: FINITE DIFFERENCES .................................................................................................... 123
4.1 FORWARD DIFFERENCE........................................................................................................... 124
4.2 BACKWARD DIFFERENCE......................................................................................................... 128
4.3 CENTRAL DIFFERENCES ........................................................................................................... 132
4.4 DIVIDED DIFFERENCE .............................................................................................................. 134
4.5 OTHER DIFFERENCE OPERATORS ............................................................................................ 136
4.6 RELATION BETWEEN OPERATORS........................................................................................... 137
4.7 ESTIMATION OF ERROR BY DIFFERENCE TABLE ...................................................................... 143
4.8 TECHNIQUE TO DETERMINE THE MISSING TERM ................................................................... 147
REVIEW EXERCISE ............................................................................................................................. 151
CHAPTER – 5: INTERPOLATION ....................................................................................................... 152
5.1 INTERPOLATION WITH EQUAL INTERVALS ............................................................................. 153
5.1.1 Newton’s forward difference Interpolation ........................................................................ 153
5.1.2 Newton’s backward difference interpolation ...................................................................... 158
5.1.3 Central Difference interpolation Formula ........................................................................... 165
[Link] Gauss's Forward Difference Formula ........................................................................ 165
[Link] Gauss's Backward Difference Formula .......................................................................... 169
[Link] Stirling’s formula ....................................................................................................... 173
[Link] Bessel's Interpolation Formula ...................................................................................... 175
[Link] Laplace-Everett's Formula ............................................................................................. 178
INTERPOLATION WITH UNEQUAL INTERVALS .............................................................................. 182

Prepared by Haileyesus T., UOG Page IV


5.2.1 Lagrange’s interpolation formula ..................................................................................... 182
5.2.2 Inverse Lagrange interpolation ........................................................................................ 187
5.2.3 Newton’s divided difference interpolation ...................................................................... 189
REVIEW EXERCISE ............................................................................................................................. 194
CHAPTER – 6: NUMERICAL DIFFERENTIATION ............................................................................... 196
6.1 DERIVATIVES FOR EQUALLY SPACED DATA............................................................................. 197
6.1.1 Derivation Using Newton’s Forward difference Interpolation
Formula...................................................................................................................................... 197
6.1.2 Derivatives Using Newton’s Backward Difference Interpolation
Formula...................................................................................................................................... 202
6.1.3 Derivative Using Stirling's difference formula .................................................................. 207
6.2 DERIVATIVE FOR UNEQUALLY SPACED DATA ......................................................................... 211
6.2.1 Derivative Using Newton’s Divided Difference Formula .................................................. 211
REVIEW EXERCISE ............................................................................................................................. 215
CHAPTER – 7: NUMERICAL INTEGRATION ...................................................................................... 216
7.1 GENERAL QUADRATURE FORMULA FOR EQUIDISTANT ORDINATES ..................................... 217
7.1.1 Trapezoidal Rule ............................................................................................................... 218
7.1.2 Simpson’s / Rule .......................................................................................................... 222
7.1.3 Simpson’s 3/8 Rule ................................................................................................. 227
7.1.4 Boole's rule ....................................................................................................................... 230
7.1.5 Weddle’s rule ................................................................................................................... 232
7.2 ROMBERG'S METHOD ............................................................................................................. 235
7.3 INTEGRATION RULES BASED ON NON-UNIFORM MESH SPACING ......................................... 243
7.3.1 Gauss-Legendre Integration Rules ................................................................................... 244
7.3.2 Gauss-Chebyshev integration rules ............................................................................... 251
7.4. NUMERICAL MULTIPLE INTEGRALS ........................................................................................ 254
7.4.1 Numerical Double Integral ............................................................................................... 254
7.4.2 Numerical Triple Integrals ................................................................................................ 261
REVIEW EXERCISE ............................................................................................................................. 264
8. APPENDICES ......................................................................................................................... 266
9. ANSWER TO PROBLEMS ........................................................................................................... 272
10. REFERENCES .......................................................................................................................... 278

Prepared by Haileyesus T., UOG Page V


List of Figures

Figure 1.1: Accuracy and Precision ……………………………………………………………………………..3


Figure 2 .1: The graphical representation of intersection of two functions…………………….19
Figure: 2.2 Shows the existence of a root of a continuous function b/n ,  … ….……….21
Figure 2.3: Solution of () = 0 between  =  and  =  ………………………………..22
Figure 2.4: Method of false position graphically…………………………………………………………….26
Figure 2.5: The secant method ……………………………………………………………………………………….33
Figure 2.6: Muller’s method…………………………………………………………………………………………….57
Figure 7.1: Integration of a function ……………………………………………………………………………..217
Figure 7.2: Graphical representation of Trapezoidal rule for m= n= 1 and m= n= 2………..254
Figure 7.3: Weights in the Simpson’s rule……………………………………………………………………...258
Figure7.4: Graphical representation of Simpson's rule for m= n= 2 and m=n= 4…………….259

Prepared by Haileyesus T., UOG Page VI


List of Tables

Table 4.1: Forward difference table……………………………………………………………………...125


Table 4.2: Backward difference table……………………………………………………………………..129
Table 4.3: Central difference table…………………………………………………………………………133
Table 4.4: Divided difference table………………………………………………………………………..134
Table 4.5: The spread of Error………………………………………………………………………………..143

Table 5.1: Gauss's Forward Difference table…………………………………………………………………...166

Table 5.2: Gauss's Backward Difference table………………………………………………………………….170

Table 7.1: Nodes and Weights for the Gauss-Legendre Integration Methods…………248

Prepared by Haileyesus T., UOG Page VII


Prepared by Haileyesus T., UOG Page VIII
CHAPTER -1: ERROR
Chapter objectives;
At the end of this chapter, you will be able to:

 Define the concept of error.


 Identify sources of error.
 Mention types of error.
 Identify absolute, relative, and percentage errors.
 Compare precision and accuracy.
 Drive and use the general formula for an error.
 Drive and use the inverse problem.
 Find the number of terms needed in series approximation

INTRODUCTION
Numerical technique is widely used by scientists and engineers to solve their problems.
Analytical methods have certain limitations in practical applications. Exact solutions are not
possible. A major advantage for numerical technique is that a numerical answer can be
obtained even when a problem has no analytical solution. However, the result from numerical
analysis is an approximation, in general, which can be made as accurate as desired. The
reliability of the numerical result will depend on an error estimate or bound, therefore the
analysis of error and the sources of error in numerical methods is also a critically important
part of the study of numerical technique.
The main purpose of numerical analysis and scientific computing is to develop efficient and
accurate methods to compute approximations to quantities that are difficult or impossible to
obtain by analytic means. It has been convincingly argued that controlling rounding errors is
just a small part of this, and that the main business of computing is the development of
algorithms that converge rapidly. Even if we acknowledge the truth of this statement, it is still
necessary to be able to control different sources of errors, including round off errors, so that
these will not interfere with the computed results.

Prepared by Haileyesus T., UOG Page 1


1.1 ACCURACY OF NUMBERS

There are two types of numbers, exact and approximate.


a) Exact number: Number with which no uncertainly is associated, to no approximation is
taken, are known as exact numbers. For example 5, 21/6, 12/3, ….
b) Approximate number: There are numbers, which can't be expressed by a finite number of
digits. Numbers which represent the exact numbers to a certain degree of accuracy is called
approximate numbers. For instance √2 =1.41421 ...,e=2.7183 ....,e.t.c are not exact
numbers since they contain infinitely many non-terminating digits. Therefore the numbers
obtained by retaining a few digits from the exact number are called approximates numbers.
e.g., 3.142, 2.718 are the approximate values of / and e.
c) Significance figure: Significant figures are digits used to express a number. The digits 1,
2, 3, 4, 5, 6, 7, 8, 9 are significant digits. ‘0’ is also a significant figure except when it is
used to fix the decimal point or to fill the places of unknown or discarded digits.
For example, each number 5879, 3.487, 0.4762 contains four significant figures while the
numbers 0.00486, 0.000382, 0.0000376 contains only three significant figures since zeros only
help to fix the position of the decimal point. Similarly, in the number 0.0002070, the first four
‘0’s are not significant figure since they serve only to fix the position of decimal point and
indicate the place values of the other digits. The other two ‘0’s are significant.
EXAMPLE 1.1:Let's see some examples
The number 2.0683 contains five significant figures.
2300 two
23.0 two
6
2.3 ×10 two
d) Round off: If we divide 2 by 7, we get 0.285714... a quotient which is a non-terminating
decimal fraction. For using such a number in practical computation, it is to be cut-off to a
manageable size such as 0.28, 0.286, 0.2857,.... etc. The process of cutting off super-flouts
digits and retaining as many digits as desired is known as rounding off a number or we can say
that process of dropping unwanted digits is called rounding-off.
Numbers are rounded-off according to the following rules: To round-off the number to n
significant figures, discard all digits to the right of nth digit and if this discarded number is
i) Less than 5 in (n+ 1)th place, leave the nth digit unchanged e.g., 8.893 to 8.89.

Prepared by Haileyesus T., UOG Page 2


ii) Greater than 5 in (n+ 1)th place, increase the nth digit by one e.g.,5.3456 to 5.346.
iii) Exactly 5 in (n+ 1)th place, increase the nth digit by unity if it is odd otherwise leave it
unchanged. e.g., 11.675 to 11.68, 11.685 to 11.68.
EXAMPLE 1.2: Round-off the following numbers correct to four significant figures:
28.3643, 179.267, 23.395, 45268

SOLUTION: After retaining first four significant figures we have:


(i) 28.3643 becomes 28.36 (iii) 23.395 becomes 23.40 (digit in
(ii) 179.267 becomes 179.3 the fourth place is odd)
(iv) 452685300 becomes 4527 ×105
1.2 PRECISION AND ACCURACY

The errors associated with both calculations and measurements can be characterized with
regard to their accuracy and precision. Accuracy refers to how closely a computed or measured
value agrees with the true value. Accuracy is governed by the errors in the numerical
approximation. Precision refers to how closely individual computed or measured values agree
with each other. Precision is governed by the number of digits being carried in the numerical
calculations. Precision and accuracy are quantified by the errors in a numerical calculation.
These concepts can be illustrated graphically using an analogy from target practice. The
cross sign on each target in Fig.1.l can be thought of as the predictions of a numerical
technique, whereas the bull's-eye represents the truth.
Neither Precise NOR accurate: Precise, but NOT accurate:

Accurate but NOT precise: Accurate and precise:

Figure 1.1 Accuracy and Precision

Prepared by Haileyesus T., UOG Page 3


1.3 ERRORS

A computer has a finite word length and so only a fixed number of digits are stored and used
during computation. This would mean that even in storing an exact decimal number in its
converted form in the computer memory, an error is introduced. This error is machine
dependent and is called machine epsilon. After the computation is over, the result in the
machine form (with base b) is again converted to decimal form understandable to the users and
some more error may be introduced at this stage. In general, we can say that
Error = True value – Approximate value

1.4 SOURCES OF ERROR


Numerical results are affected by many types of errors. Some sources of error are difficult to
influence; others can be reduced or even eliminated by, for example, rewriting formulas or
making other changes in the computational sequence. Errors are propagated from their sources
to quantities computed later, sometimes with a considerable amplification or damping. It is
important to distinguish between the new error produced at the computation of a quantity (a
source error), and the error inherited (propagated) from the data that the quantity depends on.
(i) Errors in Given Input Data
Input data can be the result of measurements which have been contaminated by different types
of errors. In general one should be careful to distinguish between systematic errors and random
errors. A systematic error can, for example, be produced by insufficiencies in the construction
of an instrument of measurement; such an error is the same in each trial. Random errors depend
on the variation in the experimental environment which cannot be controlled.
(ii) Rounding Errors during the Computations
A rounding error occurs whenever an irrational number, for example π, is shortened (“rounded
off”) to a fixed number of digits, or when a decimal fraction is converted to the binary form
used in the computer. The effect of such rounding can be quite noticeable in an extensive
calculation, or in an algorithm which is numerically unstable.
Example: when we use / = 3.1416 for computation which leads an error, because we can use
/ = 3.14159265 more better approximation than the first.

Prepared by Haileyesus T., UOG Page 4


(iii) Truncation Errors
These are errors committed when a limiting process is truncated (broken off) before one has
come to the limiting value. A truncation error occurs, for example, when an infinite series is
broken off after a finite number of terms, or when a derivative is approximated with a
difference quotient (although in this case the term discretization error is better). Another
example is when a nonlinear function is approximated with a linear function.
(iv) Simplifications in the Mathematical Model
In most of the applications of mathematics, one makes idealizations. In a mechanical problem
one might assume that a string in a pendulum has zero mass. In many other types of problems
it is advantageous to consider a given body to be homogeneously filled with matter, instead of
being built of atoms. For a calculation in economics, one might assume that the rate of interest
is constant over a given period of time. The effects of such sources of error are usually more
difficult to estimate than the types named in (i), (ii), and (iii).
(v) “Human” Errors and Machine Errors
In all numerical work, one must expect that clerical errors, errors in hand calculation, and
misunderstandings will occur. When one uses computers, one can expect errors in the program
itself, typing errors in entering the data, operator errors, and(less frequently) pure machine
errors. Errors which are purely machine errors are responsible for only a very small part of the
strange results which (occasionally with great publicity) are produced by computers. Most of
the errors depend on the so-called human factor. As a rule, the effect of this type of error
source cannot be analyzed with the help of the theoretical considerations of this chapter! We
take up these sources of error in order to emphasize that both the person who carries out a
calculation and the person who guides the work of others can plan so that such sources of error
are not damaging. One can reduce the risk of such errors by suitable adjustments in working
conditions and routines. Stress and fatigue are common causes of such errors.

Generally the errors may be divided into the following different types:
i) Inherent error: The inherent error is that quantity which is already present in the
statement of the problem before its solution. The inherent error arises either due to
the simplified assumptions in the mathematical formulation of the problem or due to
the errors in the physical measurements of the parameters of the problem. Inherent

Prepared by Haileyesus T., UOG Page 5


Error can be minimized by obtaining better data, by using high precision computing
aids and by correcting obvious errors in the data.
ii) Round-off error: The round-off error is the quantity, which arises from the process
of rounding off numbers. It sometimes also called numerical error. Also round off
denote a quantity, which must be added to the finite representation of a compound
number in order to make it the true representation of that number. The round-off
error can be reduced by carrying the computation to more significant figures at each
step of computation. At each step of computations, retain at least one more
significant figure than that given in the data, perform the last operation, and then
round off.
iii) Truncation error: These types of errors caused by using approximate formulae in
computation or on replace an infinite process by a finite one that is when a function
f(x) is evaluated from an infinite series for x after ‘truncating’ it at a certain stage,
we have this type of error.

For instance, if 6 =7 8 =1 + + + + ….. is replaced by 1 + + = 6? .


8: 8= 8: 8=
;! >! ;! >!
+

Then the truncation error is

6 - 6? =
8@ 8B 8D
A! C! E!
+ + +…

1.5 ABSOLUTE AND RELATIVE ERRORS

a) Absolute error: Absolute error is the numerical difference between the true value of a
quantity and its approximate value. Thus if ? is the approximate value of quantity  then
| − ? | is called the absolute error and denoted by J? . Therefore
J? = | − ? |
The unit of exact or unit of approximate values expresses the absolute error.
b) Relative error: The relative error JK , defined by

JK =L L=
8M8N ON
8 8

Where ? is the approximate value of quantity . The relative error is independent of units.
c) Percentage error: The percentage error in ? which is the approximate value of x is given
by

JP = 100XJ? = 100XL L
8M8N
8

Prepared by Haileyesus T., UOG Page 6


The percentage error is also independent of units.

EXAMPLE 1.3: Find the absolute, percentage and relative errors if 6 is rounded-off to three
decimal digits. Given 6 = 0.005998.
SOLUTION: If 6 is rounded-off to three decimal places we get 6? = 0.006. Therefore
Error = True value – Approximate value
Error =0.005998 – 0.006 = – 0.000002
Absolute Error = Ea= |JQQRQ| =0.000002

Relative Error = JK =L L = [Link] =[Link] = 0.0033344


SMSN ON [Link];
S

Percentage error = JP = 100XJK = 100XL L= 100X0.0033344 =0.3344


SMSN
S

EXAMPLE 1.4: Round-off the number 75462 to four significant digits and then calculate its
absolute error, relative error and percentage error.
SOLUTION: After rounded-off the number to four significant digits we get 75460.
Therefore,
Absolute Error J? = |6 − 6? | =|75462 − 75460| =2

JK =L L=
SMSN ON ;
S S
Relative Error = XCAE; = 0.0000265

Percentage Error JP = 100XJ? = 0.00265


EXAMPLE 3: Three approximate values of number 1/3 are given as 0.30, 0.33 and 0.34.
Which of these three is the best approximation?
SOLUTION: The number, which has least absolute error, gives the best approximation.
6 = =0.33333
Y
>
True value

When approximate value 6? is 0.30 the Absolute Error is given by:


J? = |6 − 6? | =|0.33333 − 0.30| = 0.03333
When approximate value 6? is 0.33 the Absolute Error is given by:
J? = |6 − 6? | =|0.33333 − 0.33| = 0.00333
When approximate value ? is 0.34 the Absolute Error is given by:
J? = |6 − 6? | =|0.33333 − 0.34| = 0.00667
Here absolute error is least when approximate value is 0.33. Hence 0.33 is the best
approximation.

Prepared by Haileyesus T., UOG Page 7


IMPORTANT RULES
I) If 6a is the approximate value of X correctly rounded off to n decimal places then
|X − X [ | ≤ x10M^

]

II) If 6a is the approximate value of 6, after truncating to n digits, then

L L<10M^_Y
SMSN
S

III) If 6a is the approximate value of 6, after rounding-off to n digit, then

L L<]x10M^_Y
SMSN 
S

IV) If 6a is the approximate value of 6 correct to n significant digits, then

L L<10M^
SMSN
S

EXAMPLE 1.5: If 6=8/9 and the exact decimal representation of X is 0.888. Find the absolute
error using an appropriate rule when it is rounded-off to three decimal digits.
SOLUTION: We have 6=8/9, n= 3
The decimal representation of X rounded-off to three decimal digits is X= 0.889
Then

Ea =L − 0.889L = L − L
V V VVU
U U YTTT

=L L
VTTTMVTTY
UTTT

=L L
MY
UTTT

≤ x10M>

]
[ by rule 1 ]

Therefore,
Ea = ≤ x10M>

]

Prepared by Haileyesus T., UOG Page 8


1.6 GENERAL FORMULA FOR ERROR

Let 6=f(Y , ; , … , b ) be the function having n variables. To determined the error δX in X


dueto the errors δY , δ; , … , δb in Y , ; , … , b respectively.
6 + c6= f(Y +δY , ;_ δ; , … , b + δb ) ………(1.1)
Using Taylor’s series for more than two variables, to expand the R.H.S. of above equation, we
get

6 + c6 = f(Y , ; , … , b )+(δY )+ [(δY ); : +(δ; )


dS dS dS Y dg
:
; dg
:
+δ; +…+δb
d8e d8: d8f ; d8e d8::
+

………….+(δb );
dg
:

d8f
: ]+…………………… ……….(1.2)

Errors δY , δ; , … , δb all are small so that the terms containing (δY ); ,(δ; ); ,…,(δb );
and higher powers of δY , δ; , … , δb are being neglected.
Therefore

6 + c6= f(Y , ; , … , b )+(δY d8 +δ; d8 +…+δb d8 )


dS dS dS
e : f
..……..(1.3)

Since 6=f(Y , ; , … , b ),we have

c6 = δY
dS dS dS
+δ; +…+δb
d8e d8: d8f
………(1.4)

Eq. (1.4) represents the general formula for Errors. If eq. (1.4) divided by X we get relative
error
δie jh δi: jh δik jh
S S d8e S d8: S d8f
δh
Er = = + + ……..+

On taking the modulus of both sides, we get maximum relative error

L L≤L L+L L+……+L L,


δie jh δi: jh δik jh
S S d8e S d8: S d8f
δh

Also from eq. (1.2), by taking modulus we get maximum absolute error.

|δX| ≤ LδY L+Lδ; L+……+Lδb L


dS dS dS
d8e d8: d8f

EXAMPLE 1.5: If l= and the errors in , o, p be 0.001. Compute the relative maximum
Ai: m=
n@

error in l when = o = p = 1.

SOLUTION: We know cl = c + co + cp
dq dq dq
d8 dr dn

= =
dq Vim= dq Y;i: m: dq MYEi: m=
d8 n@ dr n@ dn nB
Since = , ,

Prepared by Haileyesus T., UOG Page 9


Also the errors c, co, cp may be positive or negative, therefore absolute values of terms on
R.H.S is,

|cl|= L cL +L coL +L cpL


Vim= Y;i: m: MYEi: m=
n@ n@ nB

= 8(0.001) + 12(0.001) + 16(0.001)


= 0.036
Also the maximum relative error is

Er =L L = where l = 4 at  = o = p = 1
sq T.T>E
q A
=0.009

EXAMPLE 1.6: If l = 2t 6– 5t, find the percentage error in u at t = 1, if error in t is 0.05.


SOLUTION: Given u = 2t 6– 5t

δl =δt dv =( 12V5-5) δt
dq

Now

δt6100
dq ( Y;wB MC)
q ;wD – Cw
x100 =

x0.056100
( Y;MC)
(;– C)
=

= − >x5 = -11.667%
X

Hence maximum percentage error Ep= 11.667%


EXAMPLE 1.7: The allowable error in Q and ℎ is 0.12% and 0.505% when Q = 4.5cm and

ℎ =5.5cm respectively, find the percentage error in R where R=;{ + ; .


K: {

SOLUTION: Here we have

δR =δ Q + δh
d| d|
dK d{
d| K d| MK : Y
dK { d{ ;{: ;
= and = +
~
K
The percentage error in r = X100 = 0.12

⇒ δr =
Y
YTT
(0.12)X 4.5= 0.0054

{
The percentage error in h = X100 = 0.505

⇒ δh =
Y
YTT
(0.505)X 5.5= 0.028

Now

Prepared by Haileyesus T., UOG Page 10


δR = δ Q dK + δh d{
d| d|

= (0.0054) + (0.028) + 0.5


A.C M(A.C):
C.C ;(C.C):

= (0.0054)(0.8182)+ (0.028)(0.8347)
= 0.00441828+ 0.0233716
= 0.02778988
Therefore the percentage error in R is

|
Ep= X 100
T.T;XXVUVV
(@.B): B.B
 _ 
= X 100
:(B.B) :

T.T;XXVUVV
CT.C/YY
= X 100

= 0.605 %

1.7 INVERSE PROBLEM

To find the error in the function X= f(Y , ; , … , b ) is to have a desired accuracy and to
evaluate errors δY , δ; , … , δb in Y , ; , … , b we have
dS dS dS
δX = δY d8 +δ; d8 +…+δb d8
e : f

Using the principle of equal effects, which states


dS dS dS
δY =δ; =…=δb
d8e d8: d8f

This implies that

δX= „δY or δY =


dS ~h
d8e b
g
†e

Similarly, we get

δ; = , δ> = , …….., δb =


~h ~h ~h
g g g
b b b
†: †= †f

and so on.
This formula is useful where error in the dependent variable is given and we are asked to find
errors in those independent variables of the respective relation.

Prepared by Haileyesus T., UOG Page 11


EXAMPLE 1.8: If r =3h (h6– 2k), find the percentage error in h and k at h=k=1, if the
percentage error in r is 25.
SOLUTION: We have r = 3ℎX − 6ℎ‡

= 21ℎE − 6‡ and = −6h


dK dK
d{ dˆ
Therefore,

δh = and δ‡ =
~ ~
‰ ‰
; ;
Š ‹

But the percentage error in r is


δr 0.25
Œ x 100 = 0.25Œ ⇒ δr = Œ xr Œ
Q 100
= x|3ℎX − 6ℎ‡|
T.;C
YTT

= 0.0025x3
= 0.0075
Now
~{ Y ~
{ { ; ‰
a) Percentage Error in h = x100 = [ ]x100
Š

Y [Link]
Y ; (YC)
= [ ] x100

= [0.00025 x100]
= 0.025

b) Percentage Error in k =L L x100 =  ( )  x100


~ˆ Y ~
ˆ ˆ ;
‰
‹

Y [Link]
= Y[ ; (E)
] x100

= [ 0.000625 x100]
= 0.0625

EXAMPLE 1.9: How accurately should the length and time of vibration of a pendulum should
be measured in order that the computed value of g is correct to 0.01%.


SOLUTION: Period of vibration T is given by T = 2/Ž , where l is the length of pendulum.


A‘ :  d A‘: d A‘ : 
’: d
Therefore, g = = ’: and d’ =(−2) ’=

δ“ = and δ— =
~” ~”
• •
; ;
……….(1.5)
– ˜

Prepared by Haileyesus T., UOG Page 12


But the percentage error in g is


~” ~”
 @™: –
x100 =0.001 x100 =0.001 ………..(1.6)
˜:

~ Y ~”
  ; •
a. Percentage Error in l = x100 = [ ]x100
–

Y ~”
@™:
= [
;( : )
] x100 [ from eq.(1.5) ]
˜

Y ~”
@™: –
= ;[
( : )
x100]
˜

= 0.01= 0.005%
Y
;
[ from eq. (1.6) ]

b. Percentage Error in T =L ’ x100 L


=  x100 
Y ~”
’ ;
• [ from eq.(1) ]
˜

=A  @™: – x100
Y ~”

˜:

Y
A
= x 0.01 = 0.0025% [ from eq. (1.6) ]

1.8 ERROR IN SERIES APPROXIMATION

The error committed in a series approximation can be evaluated by using the remainder after n
terms. Taylor’s series for () at  =  is given by,

() = () + ( − )′() + ′′() + ′′′() +…+  (bMY) () +œb ()
(8M?): (8M?)= (8M?)f›e
;! >! (bMY)!

Where œb () =  (b) () ; <  < .


(8M?)f
b!

This term œb () is called remainder term and for a convergent series it tends to zero as n→∞.
Thus if we approximate () by the first „ terms of a series then maximum error committed in
this approximation is given by the œb () and if accuracy required is already given then it is
possible to find the number of terms „ such that the finite series yields the required accuracy.

EXAMPLE 1.10: The Maclaurin’s expansion for 7 8 is given by

7 8 =1 +  + 7Ÿ , 0 <  < 
8: 8= 8 (f›e) 8f
;! >! (bMY)! b!
+ +……….+ +

Prepared by Haileyesus T., UOG Page 13


Find the number of terms, such that their sum yields the value of 7 8 correct to 8 decimal places
at  = 1.

7 8 =1 +  + 7 Ÿ ,0 <  < 
8: 8= 8 (f›e) 8f
;! >! (bMY)! b!
SOLUTION: Given that + +…+ +

Then the remainder term is,

œb () = 7Ÿ
8f
b!

When  =x gives a maximum absolute error

Ea(max) = b! 7 8
8f

And the maximum relative error


[(¡[i) 8f
¢£ b!
Er(max) = =

Hence at  = 1, Er(max) =
Y
b!

For an 8 decimal accuracy at  = 1, < x10-8⇒ n=12


Y Y
b! ;

Hence we have 12 terms of the expansion in order that its sum is correct to 8 decimal places.

EXAMPLE 1.11: The function f(x) = tan–1x can be expanded as

¤„ MY =  −
8= 8B 8 :f›e
-…………+(−1)bMY
> C ;bMY
+ +-------

Find „ such that series determines ¤„ MY (1) correct to eight significant digits.

SOLUTION: If we retain „ terms then („ + 1)th term = (−1)b


8 :f¥e
;b_Y

For  = 1,(n+1)th term =


(MY)f
;b_Y

To determine a ¤„ MY (1) correct up to eight significant digits,

L L< x10-8⇒ 2„ + 1> 2x108⇒ „=108+1


(MY)f Y
;b_Y ;

Prepared by Haileyesus T., UOG Page 14


1. Find the number of terms in the series expansion of the function () = ¦R§  , such
REVIEW EXERCISE

that their sum gives the value of ¦R§  correct to five decimal places for all values of  in
the range − ≤  ≤ . Find also the truncation error.
‘ ‘
; ;

2. Two sides and included angle of a triangle are 9.6 cm, 7.8 cm and 45°respectively. Find the
possible error in the area of a triangle if the error in sides is correct to a millimeter and the
angle is measured correct to one degree.
3. The error in the measurement of area of a circle is not allowed to exceed 0.5%. How
accurately the radius should be measured.
4. In a ∆ABC, b = 9.5 cm, c = 8.5 cm and A = 45o, find allowable errors in b, c, and A such that
the area of ∆ABC may be determined nearest to a square centimeter.
5. Round off the following numbers to four significant figures:
a) 8.46235 c) 0.0022218
b) 0.70029 d) 9.235101
6. Round off the following numbers to two decimal places:
i) 48.21416
ii) 2.385
iii) 52.275
iv) 81.255

Prepared by Haileyesus T., UOG Page 15


7. Find the absolute, relative and percentage errors of the approximations as

≈ 0.1
Y
YY
a)

≈ 0.44
A
U
b)

≈ 0.56
C
U
c)

d) 5007932≈ 5008
8. Prove that the relative error of a product of three non-zero numbers does not exceed the sum
of the relative errors of the given numbers.
9. If S = 42o3p–4, find the maximum absolute error and maximum relative errors in S. When
errors in  = 1 , o = 2, p = 3 respectively are equal to 0.001, 0.002, 0.003.

10. Compute the relative maximum error in the function u = 7 : , when  = o = p = 1 and

8

errors in , o, p be 0.001.
11. Find the number of terms of the exponential series such that their sum yields the value of ex
correct to 8 decimal places at  = 1.

Prepared by Haileyesus T., UOG Page 16


CHAPTER-2: SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL
EQUATIONS
Chapter objectives
At the end of this chapter you will be able to:

 Define Algebraic and Transcendental equation.


 Identify when the system of linear equation has a unique solution.
 Define root of a function.
 Define consistence.
 Define open and bracketing iterative methods.
 State reasons of the drawback of direct and graphical methods.
 Mention some of iterative methods for solution of nonlinear equations.
 Understand how we use each of direct methods.
 Understand the relation and rate of convergence of each iterative method.
 State the difference between direct and iterative methods.
 Compare the rate of convergence of those iterative methods.
 Find the nth approximation formula for iterative methods.
 Define multiple roots and iterative methods for these roots.
 Mention numerical methods and analysis root of polynomial equations.
 Know the formula of Muller's method.

INTRODUCTION
One of the most common problem encountered in engineering and science is that given a
function(), find the values of  for which() = 0. The solution (values of) are known as the
roots of the equation () = 0,or the zeroes of the function ().
We have seen that expression of the form
() = T + Y  + ;  ; + >  > + … … + b  b
where ª 's are constant (b ≠0) and „ is a positive integer, is called a polynomial in  of degree „,
and the equation ( )=0 is called an algebraic equation of degree n.

Prepared by Haileyesus T., UOG Page 17


If () contains some other functions like exponential, trigonometric, logarithmic etc., then ()
= 0 is called a transcendental equation. For example,  > − 3 + 6 = 0,  C – 7 A +3 ; +
36– 7 = 0 are algebraic equations of third and fifth degree, whereas  ; – 3 ¦R§  + 1 = 0,
7 8 – 2 = 0, “R«YT
8
=1.2 ,are transcendental equations. In both cases, if the coefficients are pure
numbers, they are called numerical equations.
The roots of equations may be real or complex. In general, an equation may have any number of
(real) roots or no roots at all. For example, §¬„ –  = 0 has a single root, namely,  = 0,
whereas ¤„–  = 0 has infinite number of roots ( = 0, ± 4.493, ± 7.725, …).
Simple root: A number α is a simple root of () = 0, if (­) = 0 and ′(­) ≠ 0. Then, we can
write () as
() = ( − ­)«(), «(­) ≠ 0.
For example, since ( − 1) is a factor of () =  > +  − 2 = 0, we can write
() = ( − 1)(  ; +  + 2) = ( − 1)«(), «(1) ≠ 0.
Alternatively, we find (1) = 0, ′() =3 ; +1, ′(1) = 4 ≠ 0. Hence,  = 1 is a simple root of
() = 3 +  − 2 = 0.
Multiple root: A number α is a multiple root of multiplicity ¯, of () = 0, then, we can write
() as
() = ( − ­)° «(), g(­) ≠ 0
For example, consider the equation () =  > −3 ; + 4 =0. We find
(2) = 0,′() =3 ; − 6, ′(2) = 0, ′′() = 6 − 6, ′′(2) = 6 ≠ 0
Hence,  = 2 is a multiple root of multiplicity 2(double root) of () =  > −3 ; + 4 =0. We can
write
() =( − 2); ( + 1) = ( − 2); «(), «(2) =3 ≠ 0
REMARK: A polynomial equation of degree „ has exactly „ roots, real or complex, simple or
multiple, where as a transcendental equation may have one root, infinite number of roots or no
root. In this chapter we shall only derive methods for finding only the real roots. There are three
types of methods available to find the roots of algebraic and transcendental equations of the
form () = 0.

Prepared by Haileyesus T., UOG Page 18


2.1 GRAPHICAL METHOD

To solve the equation () = 0, using graphical method we usually write () = 0 as
Y () = ; () where Y () and ; () are both functions of . Then we draw the graphs of oY =
Y () and o; = ; () on the same axes. The real roots of the given equation are the intersections
of the two curves, since at these points oY = o; and so of the function o = ().
EXAMPLE 2.1: Solve the equation “R«YT
8
= 1, graphically.
SOLUTION: The given equation “R«YT
8
=1
Can be written it as

“R«YT
8 Y
8
=

Where “R«YT simpler than “R«YT , constructing the curves y= “R«YT and o = 8, we get
8 Y 8 8 Y
8
and

 −coordinate of the point of intersection as 2.5.


o

o=8
Y

1 2 3 4 

y= “R«YT
8

Figure 2 .1: the graphical representation of intersection of two functions.


Therefore, the approximate value of the root of ±²³´±µ = 0.1, is c= 2.5.
Graphical techniques are of limited practical value because they are not very precise.
However, graphical methods can be utilized to obtain rough estimates of roots. These
estimates can be employed as starting guesses for the other numerical methods discussed
in this chapter.
Aside from providing rough estimates of the root, graphical interpretations are useful for
understanding the properties of the functions and anticipating the pitfalls of the numerical
method.

Prepared by Haileyesus T., UOG Page 19


2.2 DIRECT METHODS
METHODS

Direct methods give the exact value of the roots in a finite number of steps. We assume here
that there are no rounds off errors. Direct methods determine all the roots at the same time. For
example, the roots of the quadratic equation a 2+  + ¦ = 0, a ≠0, can be obtained using the
method.

 = ;?[-b±√; − 4¦ ]
Y

There are direct methods for finding all the roots of cubic and fourth degree polynomials.
However, these methods are difficult to use. For higher order polynomial and non-polynomial
equations, it is difficult and in many cases impossible to get a closed form solution.

2.3 INDIRECT OR ITERATIVE METHODS

These methods are also called 'trial and error'. Indirect or iterative methods are based on the
concept of successive approximations. We start with one or two initial approximations to the root
and obtain a sequence of approximationsT , Y ,…, b until we obtain the desired degree of
accuracy. These methods generally give only one root at a time. The iterative methods are further
divided into two categories:
i. bracketing and
ii. open methods.
The bracketing methods require the limits between which the root lies, whereas the open
methods require the initial estimation of the solution. Bisection and False position methods are
two known examples of the bracketing methods. Among the open methods, the Newton-
Raphson and the method of fixed point iteration are most commonly used. The most popular
method for solving a non-linear equation is the Newton-Raphson method and this method has a
high rate of convergence to a solution.
In this chapter, we present the following indirect or iterative methods:
1. Bisection Method.
2. Method of False Position (Regular Falsi Method).
3. Secant method.
4. Iteration method (fixed point iteration).
5. Newton-Raphson Method (Newton’s method).

Prepared by Haileyesus T., UOG Page 20


Criterion to terminate iteration procedure Since, we cannot perform infinite number of
iterations, we need a criterion to stop the iterations. We use one or both of the following
criterion:
i) The equation () = 0 is satisfied to a given accuracy or (ˆ ) is bounded by an
error tolerance  (where 0 <  < 1)
|(ˆ )| ≤ 
ii) The magnitude of the difference between two successive iterates is smaller than a
given accuracy or an error bound .
|ˆ_Y − ˆ | ≤ 
Theorem :( Intermediate value theorem)
If () is continuous on some interval ,  and () and () are of opposite signs (i.e.
()() < 0), then the equation () = 0 has at least one real root or an odd number of real
roots in the interval (a, b).
o
Root 1 Root 2
()

  

Root 3
Figure: 2.2 Shows the existence of a root of a continuous function b/n , .
2.3.1 Bisection method
It is also called as Bolzano method or Interval halving method. This is one of the simplest iterative
methods based on the intermediate value theorem '' If () is continuous on some interval , 
and () and () are of opposite signs (i.e. ()() < 0), then the equation () = 0 has at
least one real root or an odd number of real roots in the interval (, )''. For definiteness, let
() be negative and () be positive. Then there is a root of () = 0, lying between  and .
Let the first approximation be

Y = ( + )
Y
;
(i.e., average of the ends of the range)

Prepared by Haileyesus T., UOG Page 21


Now if (Y ) = 0 then Y is a root of() = 0. Otherwise, the root will lie between  and Y or
Y and  depending upon whether (Y ) is positive or negative.
o
() > 0
True solution

 ; Y  
 () < 0

Figure 2.3: Solution of () = 0 between  =  and  = 


Then, we bisect the interval and continue the process till the root is found with the desired
accuracy. In the above figure, (Y ) is negative; therefore, the root lies in between  and Y ).
The second approximation to the root now is

; = ( + Y )
Y
;

If (; ) is negative, then the root lies in between ; and , otherwise it lies between ; and Y
and using the graph the third approximation to the root is

> = (Y + ; )
Y
;

and so on. The bisection is repeated until the interval has been reduced to a small value ε (where
0< ε <1), so that |b_Y − b |< ε
Procedure for Bisection Method to Find the Root of the Equation f(x) = 0
Step 1: Choose two initial guess values (approximation) a and b (say  > ) such that
(). () < 0.

Step 2: Evaluate the midpoint Y of  and  given by Y = ( + ) and also evaluate (Y ).
Y
;

Step 3: If (). (Y ) < 0, then set  = Y else set  = Y . Then apply the formula of step 2

Step 4: Stop evaluation when the difference of two successive values of obtained from step
2, is numerically less than the prescribed accuracy.

EXAMPLE 2.2: Find the root of the equation  3–  – 1 = 0 lying between 1 and 2 by
Bisection method.

Prepared by Haileyesus T., UOG Page 22


SOLUTION: Let () =  3–  – 1
Since (1) = −1, which is negative and (2) = 5, which is positive
Therefore, (1) is negative and (2) is positive, so at least one real root will lie between 1 and 2.
First iteration: Now using Bisection Method, we can take first approximation
Y = ;( + )= ;(1+ 2) = 1.5
Y Y

and (Y ) = 0.875 >0. Therefore, the root will now lie between 1 and 1.5.
Second iteration: The Second approximation is given by
; = ( + Y )= (1+ 1.5 )= 1.25
Y Y
; ;

and (Y ) =– 0.297 < 0. So, the root will now lie between 1.25 and 1.5.
The rest results of the iteration are shown in Table:
v ª (ª ) Interval
a=1 -1
iteration b=2 5 (1,2)
1 1.5 0.875 (1,1.5)
2 1.25 – 0.297 (1.25,1.5)
3 1.375 0.2246 (1.25,1.375)
4 1.313 – 0.0494 (1.313,1.375)
5 1.344 0.0837 (1.313,1.344)
6 1.329 0.0183 (1.313,1.329)
7 1.321 – 0.0158 (1.321,1.329)
8 1.325

From above iterations, the root of the equation up to three places of decimals is 1.325, which is
of desired accuracy.
EXAMPLE 2.3: Find one root of 7 8 – 3 = 0 correct to two decimal places using the method
of Bisection.
SOLUTION: Let () = 7 8 – 3
(1.5) = –0.01831 and (1.6) =0.1530
Since (1.5) = –0.01831, which is negative and (1.6) = 0.1530, which is positive
Therefore, at least one real root will lie (1.5, 1.6).

Prepared by Haileyesus T., UOG Page 23


First iteration: Now using Bisection Method, we can take first approximation
Y = ( + )= (1.5+ 1.6) = 1.55
Y Y
; ;

and  (Y ) = 0.06147 > 0. Therefore, the root will now lie between 1.5 and 1.55.
Second iteration: The Second approximation is given by
; = ;(a+ Y )= ;(1.5+ 1.55 )= 1.525
Y Y

and (; ) = 0.02014 > 0. So, the root will now lie between 1.5 and 1.525.
The rest results of the iteration are shown in Table:

ª (ª ) Interval
=1.5 0.01831
iteration =1.6 0.1530 (1.5,1.6)
1 1.55 0.06147 (1.5,1.55)
2 1.525 0.02014 (1.5,1.525)
3 1.5125 0.00056 (1.5,1.5125)
4 1.50625 –0.00896 (1.5125,1.50635)
5 1.50938 –0.00422 (1.5125,1.50938)
6 1.51094 –0.00184 (1.5125,1.51094)

Hence the root of () = 0 is  = 1.51 accurate up to two decimal places.


MAT LAB CODE FOR BISECTION METHOD
function x=bisection(f,a,b,varargin);
% function x=bisection(f,a,b,P1,P2,...);
% f : function for which we want to find a zero
% a,b : lower and upper bounds of the interval (a<b)
% P1,... : parameters of the function
% x solution
c=input('Enter Function:','s');
f=inline(c);
epsi = 1e-8;
a=input('enter lower bound>');
b=input('enter upper bound>');
x0 = a;
x1 = b;
y0 = feval(f,x0,varargin{:});
y1 = feval(f,x1,varargin{:});
if a>=b

Prepared by Haileyesus T., UOG Page 24


error('a should be greater than b')
end
if y0*y1>=0
error('a and b should be such that f(a)f(b)<0!')
end
err = 1;
while err>0;
x2 = (x0+x1)/2;
y2 = feval(f,x2,varargin{:});
if y2*y0<0;
x1 = x2;
y1 = y2;
else
x0 = x1;
x1 = x2;
y0 = y1;
y1 = y2;
end
err = abs(x1-x0)-epsi*(1+abs(x0)+abs(x1));
end
x = x2;
Sample output
Enter Function:[.^2-5*+3]
enter lower bound>0
enter upper bound>1
ans =
0.6972

EXERCISE 2.1
1. Find a root of () = 3– 4– 9 = 0 correct to three decimal places by using bisection
method.
2. Find the positive root of () =  3– 3 + 1.06 = 0, by method of bisection, correct to
three decimal places.
3. Compute one positive root of 2– 3§¬„ – 5 = 0, by bisection method, correct to three
significant figures.

Prepared by Haileyesus T., UOG Page 25


2.3.2 Regula-Falsi Method
This method is essentially same as the bisection method except that instead of bisecting the
interval. We choose two points T and Y such that (T ) and (Y ) have opposite signs. Since
the graph of o = () crosses the -axis between these two points, a root must lie in between
these points. Consequently (T ) .(Y ) < 0. Equation of the chord joining points(T , (T )),
and (Y , (Y )) is

o − (T ) = ( − T )
¸(8e )M¸(8¹ )
8e M8¹
..……….(2.1)

The method consists in replacing the curve PQ by means of the line PQ and taking the point of
intersection of the line with x-axis as an approximation to next the root.

Figure 2.4: Method of false position

So the line PQ cuts  −axis when o = 0, which givens


Y − T
 = T − º » (T )
 (Y ) − (T )
Therefore, the value of ; can also be put in the following form

; = T − ¼¸(8 e)M¸(8 ½ (T )


8 M8
¹
)
………..(2.2)
e ¹

=¼ ½
8¹ ¸(8e )M8e ¸(8¹ )
¸(8e )M¸(8¹ )

This is the general formula for Regula-Falsi method.


If the value of (T ) .(; ) < 0, rename ; as Y and T as T then go to the next step. If not,
rename ; as T and Y as Y then go to the next step. The procedure is repeated till the root is
found to desired accuracy. That is the values of |b_Y − b |< ε where ε is very small number.

Prepared by Haileyesus T., UOG Page 26


Procedure for the False Position Method to Find the Root of the Equation f(x) = 0
Step 1: Choose two initial guess values (approximations) T and Y (say T < Y ) such
that (T ) .(Y ) < 0.
Step 2: Find the next approximation ; using the formula
Y − T
; = T − º » (T )
 (Y ) − (T )
Step 3: If (Y ) .(; ) < 0, and then go to the next step. If not, rename T as Y and then go to
the next step.
Step 4: Evaluate successive approximations using the formula
Y − T
; = T − º » (T )
 (Y ) − (T )
But before applying the formula for ; , ensure that (T ) .(Y ) < 0
Step 5: Stop the process when where ε is the prescribed accuracy.
|b_Y − b |< ε
EXAMPLE 2.4: Find a real root of the equation () =  3–  2– 2 = 0 by Regula-Falsi method.
SOLUTION: Let () =  3– 2– 2
Then, (0) = −2 < 0, (1) = −2 < 0 and (2) = 2 > 0
Thus, the root lies between 1 and 2
So taking xT = 1, xY = 2,  (xT ) = −2 and (xY ) = 2, then using the Regula-Falsi method.
First iteration:

x; = xT − ¼¾(i ½ f(xT )
ie Mi¹
e )M¾(i¹ )

=1 − ¼ ½ (−2)
;MY
;M(M;)

= 1.5
Now,  (1.5) = (1.5)3– (1.5)2– 2
= 3.375 – 4.25 = – 0.875 < 0
Thus, the root lies between 1.5 and 2.
Second iteration: let xT = 1.5, xY = 2, (T ) = – 0.875, (Y ) = [Link]

x> = xT − ¼ ½ f(xT )
ie Mi¹
¾(ie )M¾(i¹ )

= 1.5 − º;MÀ– [Link]Á» (– 0.875)


;MY.C

Prepared by Haileyesus T., UOG Page 27


= 1.6522
Now,  (1.6522) = (1.6522)3– (1.6522)2– 2
= 4.5101 – 4.7298
= – 0.2197 < 0
Thus, the root lies between 1.6522 and 2.
Third iteration: let T = 1.6522, xY = 2, (T ) = – 0.2197, (Y ) = [Link]

xA = xT − ¼ ½ f(xT )
ie Mi¹
¾(ie )M¾(i¹ )

=1.6522 − ¼;—T.;YUXÃ(−0.2197)
;[Link];;

= 1.6866
Now,  (1.6866) = (1.6866)3– (1.6866)2– 2
=4.7977 – 4.8446 = – 0.0469 < 0
Thus, the root lies between 1.6866 and 2.
Fourth iteration: let xT = 1.6866, xY = 2, (T ) = – 0.0469, (Y ) = [Link]

x> = xT − ¼¾(i e)M¾(i ½ f(xT )


i Mi
¹
e ) ¹

= 1.6866 − º;MÀ– [Link] Á» (– 0.0469 )


;[Link]

= 1.6938
Now,  (1.6938) = (1.6938)3– (1.6938)2– 2
= 4.8594 – 4.8690 = – 0.0096 < 0
Thus, the root lies between 1.6938 and 2.
Fifth iteration: let xT = 1.6938, xY = 2, (T ) = – 0.0096, (Y ) = [Link]

x> = xT − ¼ ½ f(xT )
ie Mi¹
¾(ie )M¾(i¹ )

= 1.6938 − º » (– 0.0096 )
;[Link]>V
;MÀ– [Link] Á

= 1.6953
Now,  (1.6953) = (1.6953)3– (1.6953)2– 2
= 4.8724 – 4.8740 = – 0.0016 < 0
Therefore, the root lies between 1.6953 and 2.
Sixth iteration: let xT = 1.6953, xY = 2, (T ) = – 0.0016, (Y ) = [Link]

Prepared by Haileyesus T., UOG Page 28


x> = xT − ¼¾(i e)M¾(i ½ f(xT )
i Mi
¹
e ) ¹

= 1.6953 − º;MÀ– [Link] Á» (– 0.0016 )


;[Link]>

= 1.6953 + 0.0002
= 1.6955
Hence, the root is 1.695 correct to three places of decimal.

EXAMPLE 2.5: Use the Regula-Falsi methods to determine the root of the equation cos  − 7 8 =0
which lies in the interval (0, 1).
SOLUTION: Let () = ¦R§  − 7 8 = 0
(0) = 1and (1) = −2.17797952
Since (0) and (1) are of opposite signs, therefore the root lies between 0 and 1, so taking
xT =0, xY =1, (T ) = 1 and (Y ) = −2.17797952, then by Regula-Falsi method, we get
First iteration:

x; = x T − ¼ ½ f(xT )
ie Mi¹
¾(ie )M¾(i¹ )

= xT − ¼ ½ (1)
YMT
M;.YXXUXUC;MY

= 0.3146653378
Now, f (0.3146653378) = cos (0.3146653378) – (0.3146653378)7 (T.>YAEEC>>XV)
=0.519871175 > 0
So that the root lies between 0.3146653378 and 1.
Second iteration: let xT =0.3146653378, xY =1, (T ) = 0.519871175 and (Y ) = -2.17797952

x> = xT − ¼ ½ f(xT ),
ie Mi¹
¾(ie )M¾(i¹ )

= 0.3146653378 − ¼M;.YXXUXUC;[Link]½ (0.519871175)


YMT.>YAEEC>>XV

= 0.4467281466
Now,  (0.4467281466) = ¦R§ (0.4467281466)– (0.4467281466)7 ([Link];VYAEE)
= 0.203544710 > 0
So that the root lies on the interval (0.4467281466, 1)
The rest results of the iteration are shown in Table:

Prepared by Haileyesus T., UOG Page 29


ª (ª ) Interval
a=0 1
iteration b=1 -2.17797952 (0,1)
1 0.3146653378 0.519871175 (0.3146653378,1)
2 0.4467281466 0.203544710 (0.4467281466,1)
3 0.4940153366 0.708077 (0.4940153366,1)
4 0.5099461404 0.236077 (0.5099461404,1)
5 0.5152010099 0.776011 (0.5152010099,1)
6 0.5169222100 0.253886 (0.5169222100,1)
7 0.5174846768 0.829358 (0.5174846768,1)
8 0.5176683450 0.27086 (0.176683450,1)
9 0.5177478783 0.288554 (0.5177478783,1)

Hence the root of () = 0 is  = 0.5177 approximated up to four decimal places.


EXAMPLE 2.6: Find the real root of the equation () = 3– 9 + 1 = 0 by Regula-Falsi
method.
SOLUTION: Since the given function is a polynomial function of degree three. Hence it has three
roots. Now (0) = 1, (1) = −7 , (2) = −9 and (3) = 1. So that we can see there is a root
between 0 and 1 and also 2 and 3. Now let's find the root which lies between 2 and 3. So taking
T =2, Y =3, (T ) = −9 and (Y ) = 1, then using the Regula-Falsi method.
First iteration:

x; = xT − ¼¾(i e)M¾(i ½ f(xT )


i Mi
¹
e ) ¹

=2−¼ ½ (−9)
>M;
YM(MU)

=2.9
Now, (2.9) =( 2.9)3– 9(2.9 ) + 1
=– 0.711 < 0
So that the root lies between 2.9and 3.
Second iteration: let T = 2.9, Y = 3, (T ) = −0.711, (Y ) = [Link]

x> = xT − ¼¾(i e)M¾(i ½ f(xT )


i Mi
¹
e ) ¹

Prepared by Haileyesus T., UOG Page 30


= 2.9 − ¼YM([Link]) ½ (−0.711)
e i M;.U

= 2.9416
Now, (2.9416) = ( 2.9416)3– 9(2.9416) + 1
=– 0.0207< 0
So that the root lies between 2.9416 and 3.
The rest results of the iteration are shown in Table:
ª (ª ) Interval
=2 -9
iteration =3 1 (2,3)
1 2.9 – 0.711 (2.9,3)
2 2.9416 – 0.0207 (2.9416,3)
3 2.9428 – 0.0003 (2.9428,3)
4 2.942817

Hence the root of () = 0 is  = 2.9428 approximated up to four decimal places.


Remark: Major weakness of the false-position method: it is one sidedness. That is, as iterations
are proceeding, one of the bracketing points will tend to stay fixed. This can lead to poor
convergence, particularly for functions with significant curvature.
Mat lab cod for False Position Method
% Function that calculates approximate solution using RegulaFalsi
(or) False Position Method
a=input('Enter Function:','s');
f=inline(a);
xl=input('Enter lower guess:') ;
xu=input('Enter upper guess:');
tol=input('Enter tolerance(recommended 0.001):');
for i=2:100
if f(xu)>f(xl)
xr=xu-((f(xu)*(xu-xl))/(f(xu)-f(xl)));
else
xr=xl-((f(xl)*(xl-xu))/(f(xl)-f(xu)));
end
if f(xu)*f(xr)<0
xl=xr;

Prepared by Haileyesus T., UOG Page 31


else
xu=xr;
end
if f(xl)*f(xr)<0
xu=xr;
else
xl=xr;
end
xnew(1)=0;
xnew(i)=xr;
if abs((xnew(i)-xnew(i-1))/xnew(i))<tol,break,end
end
str = ['Root: ', num2str(xr), '']
Sample out put
Enter Function:[x^2-5*x+3]
Enter lower guess:0
Enter upper guess:1
Enter tolerance(recommended 0.001):0.001
str =
Root: 0.65675

EXERCISE 2.2
1. Compute the root of the equation  ; + 4 + 4 = 0, by regular-Falsi method, correct to
three decimal places.
2. Compute the root of the equation  > − 4 − 9 = 0, by Regular –Falsi method, correct
to two decimal places.
3. Compute the root of the equation §¬„ + ¦R§ = 1, by Regula-Falsi method, correct to
four decimal places.

Prepared by Haileyesus T., UOG Page 32


2.3.3 Secant method
The secant method is similar to the Regula-Falsi method, except for the fact it drop the condition
that () should have opposite signs at the two points used to generate the next approximation.
Instead, it always retains the last two points to generate the next. Thus, if bMY and b are two
approximations to the root, then the next approximationb .

b_Y = b − ¼¸(8 f)M¸(8 ½ (b )


8 M8
f›e
f›e )
, n=1,2,…
f

Geometrically, in Secant method we replace the function () by a straight line passing through
the points (bMY ,  bMY ) and (b , b ) and take the point of intersection of the straight line
with the x-axis as the next approximation to the root.

Fig. 2.5: The secant method


EXAMPLE 2.7: A real root of the equation  !  3– 5 9 1 ! 0 lies in the interval (0, 1).
Perform four iterations of the Secant method.
SOLUTION: We have T ! 0, Y ! 1, T ! 1 and Y ! I3. Then by secant method
First iteration:

; ! Y I ¼ ½ Y
8e M8¹
¸8e M¸8¹

=1I¼ ½ I3
YMT
M>MY

= 0.25
Hence, ; ! 0.25and ; ! – 0.23437.
Second iteration:

> ! ; I ¼ ½ ;
8: M8e
¸8: M¸8e

= 0.25 I ¼– T.;>A>XMM> ½ – 0.23437


T.;C MY

Prepared by Haileyesus T., UOG Page 33


= 0.186441
Hence, > = 0.186441and (> ) = 0.074276.
Third iteration:

A = > − ¼ ½ (> )
8= M8:
¸(8= )M¸(8: )

= 0.186441 − º » (0.074276)
[Link].;C
[Link];XEMÀ– T.;>A>XÁ

=0.201736
Hence, A = 0.201736 and (A ) = – 0.000470.
Fourth iteration:

C = A − ¼ ½ (A )
8@ M8=
¸(8@ )M¸(8= )

= 0.201736 − ºÀ– » (– 0.000470)


T.;TYX>[Link]
[Link]ÁM [Link];XE

= 0.201640
EXAMPLE 2.8: Find the root of the equation () = 4 §¬„  + 2= 0 by Secant method.
SOLUTION: In this method we neglect the condition  (b ). (bMY ) < 0. Initially take T = −1
and Y = −2 and (T ) = – 2.36588 ,(Y ) = 0.36281, the next approximation to the root by
Secant method is given by
First iteration:

; = Y − ¼ ½ (Y )
8e M8¹
¸(8e )M¸(8¹ )

= −1 − º » (0.36281)
M;M(MY)
T.>E;VYMÀ– ;.>ECVV Á

= – 2 + 0.13296
=– 1.86704
Hence, ; =– 1.86704 and (; ) = – 0.33992.
Second iteration: Now, the next approximation > can be obtained by using the values of Y and
; in Secant method, which is given by

> = ; − ¼ ½ (; )
8: M8e
¸(8: )M¸(8e )

= – 1.86704 − ¼(– T.>>UU;)MT.>E;VY½ (– 0.33992)= – 1.93135


(M [Link])M(M;)

Hence, > =– 1.93135 and (> ) = – 0.01269.


Third iteration:

Prepared by Haileyesus T., UOG Page 34


A = > − ¼¸(8 =)M¸(8 ½ (>
8 M8
:
)
= :

= – 1.93135 – ºÀ– [Link];EUÁMÀ– T.>>UU;Á» (– 0.01269)


À– Y.U>Y>CÁ–(– [Link])

=– 1.93384
Hence, A =– 1.93384 and (A ) = 0.00045.
Fourth iteration:

C = A − ¼¸(8 @)M¸(8 ½ (A )


8 M8
=
@ ) =

= – 1.93384 – º » (0.00045)
(– Y.U>>VA) –(– Y.U>Y>C)
[Link]À– [Link];EUÁ

= – 1.93375
Hence, C =– 1.93375 and (C ) = – 0.00002.
Fifth iteration:

E = C − ¼¸(8 B)M¸(8 ½ (C )


8 M8
@
B ) @

= – 1.93375 – º » (– 0.00002)
À– Y.U>>XCÁ–(– Y.U>>VA)
À– [Link];Á[Link]

= – 1.93375
Thus, the approximation value to the root is –1.93375, correct up to five decimals.
EXAMPLE 2.9: Find the root of the equation  3– 2 – 5 by Secant method.
SOLUTION: Here () = 3– 2 – 5 then (2) = – 1, (3) = 16 and (2) (3) < 0
Therefore initial approximations are taken as T = 2, Y = 3, (T ) =-1 and (Y ) = 16
Then by Secant method, the next approximation is given by
First iteration:

; = Y − ¼¸(8 e)M¸(8 ½ (Y )


¹ 8 M8
)e ¹

=3−¼ ½ (16)
>M;
YEM(MY)

= 2.0588
Hence, ; = 2.0588and (; ) = – 0.3911.

Second iteration:

> = ; − ¼¸(8 :)M¸(8 ½ (; )


8 M8
e
)
: e

Prepared by Haileyesus T., UOG Page 35


= 2.0588 − ¼– T.>UYYMYE½ (– 0.3911)
;.TCVV M>

= 2.0813
Hence, > = 2.0813and (> ) = – 0.1468.
Third iteration:

A = > − ¼ ½ (> )
8= M8:
¸(8= )M¸(8: )

= 2.0813 − º » (– 0.1468)
;.TVY> M;.TCVV
– [Link]À– T.>UYYÁ

= 2.0948
Hence, A = 2.0948 and (A ) = – 0.0028.
Fourth iteration:

C = A − ¼¸(8 @)M¸(8 ½ (A )


8 M8
=
@ ) =

= 2.0948 − ºÀ– [Link];VÁM (– [Link])» (– 0.0028) = 2.0945


;.TUAV M;.TVY>

Hence, C = 2.0948 and (C ) = – 0.0006.


Fifth iteration:

E = C − ¼ ½ (C )
8B M8@
¸(8B )M¸(8@ )

= 2.0948 − ºÀ– [Link]ÁM (– [Link];V)» (– 0.0006) =2.0945


;.TUAV M;.TUAV

Thus, the root can be taken as 2.0945 correct to four decimals.


A Mat lab program for secant method
function [x,iter]=secant(x0,x00,f)
% newton-raphson algorithm
N = 100; eps = 1.e-5; % define max. no. iterations and error
maxval = 10000.0; % define value for divergence
xx1 = x0; xx2 = x00;
while N>0
gp = (f(xx2)-f(xx1))/(xx2-xx1);
xn = xx1-f(xx1)/gp;
if abs(f(xn))<eps
x=xn;
iter = 100-N;
return;
end;
if abs(f(xn))>maxval

Prepared by Haileyesus T., UOG Page 36


iter=100-N;
disp(['iterations = ',num2str(iter)]);
error('Solution diverges');
abort;
end;
N = N - 1;
xx1 = xx2;
xx2 = xn;
end;
iter=100-N;
disp(['iterations = ',iter]);
error('No convergence');
abort;
% end function
Sample output
>>[x,iter] = secant(-10.0,-9.8,f001)
x=
-0.6180
iter =
11
EXERCISE 2.3
1. Use Secant method to determine the root of the equation ¦R§ – 7 8 = 0.
2. Using Secant method, find the root of – 7 M8 = 0 correct to three decimal places by taking
T =1and Y =1.5.
3. Find the real root of the equation  2– 5 + 2 = 0 between 4 and 5 by secant method.

Prepared by Haileyesus T., UOG Page 37


2.3.4 Iteration Method (fixed point iteration)
The first step in this method is to rewrite the given equation f(x) = 0 in an equivalent form a
 = Æ() ………… (2.3)
There are many ways of rewriting () = 0 in this form.
For example, () =  3– 5 + 1 = 0, can be rewritten in the following forms.

 = ,  = ( 5 − 1)= ,  = Ž
e
8 = _Y C8MY
C 8
, etc. .............. (2.4)

Now, finding a root of () = 0 is same as finding a number α such that ­ = Æ(­), that is, a
fixed point of Æ(). A fixed point of a function Æ is a point α such that ­ = Æ(­). This result is
also called the fixed point theorem.
Using Eq. (2.3), the iteration method is written as
b_Y = Æ(b ), „ = 0, 1, 2, … ……………(2.5)
The function Æ() is called the iteration function. Starting with the initial approximationT , we
compute the next approximations as
Y = Æ(T )
; = Æ(Y )
……………….
b_Y = Æ(b )
The stopping criterion is same as used earlier. Since, there are many ways of writing () = 0 as
 = Æ(), it is important to know whether all or at least one of these iteration methods converges.
REMARK: Convergence of an iteration method b_Y = Æ(b ), n= 0, 1, 2, ..., depends on the
choice of the iteration function Æ(), and a suitable initial approximation x0, to the root.
Consider again, the iteration methods given in eq. (2.4), for finding a root of the equation f () =
 3– 5 + 1 = 0 The positive root lies in the interval (0, 1).

b =
8f = _Y
C
i. , n= 0, 1, 2, ….

With T = 1, we get the sequence of approximations as


Y = 0.4, ; = 0.2128, > = 0.20193, A = 0.20165, C = 0.20164.
The method converges and x ≈ C =0.20164 is taken as the required approximation to the root.

b = ( 5b − 1)= , n= 0, 1, 2, …
e
ii.
With T = 1, we get the sequence of approximations as
Y = 1.5874, ; = 1.9072, > = 2.0437, A = 2.0968, ….

Prepared by Haileyesus T., UOG Page 38


Which does not converge to the root in (0, 1).

b = Ž
C8f MY
8f
iii.

With T = 1, we get the sequence of approximations as


Y = 2.0, ; = 2.1213, > = 2.1280, A = 2.1284, ….
Which does not converge to the root in (0, 1).
Now, we derive the condition that the iteration function Æ() should satisfy in order that the
method converges.
Condition of convergence
The iteration method for finding a root of f(x) = 0, is written as
b_Y = Æ(b ), n= 0, 1, 2, …. ……………..(2.6)
Let α be the exact root. That is,
­ = Æ(­) …………(2.7)
We define the error of approximation at the nth iterate as
b = b − ­, n=0, 1, 2, …
Subtracting eq. (2.7) from eq. (2.6), we obtain
b_Y − ­= Æ (b+1 ) −φ(α)
= (b − ­) Æ′(¤b ) (using the mean value theorem) ………. (2.8)
Or b_Y = Æ′(¤b )b , b ≤ ¤b ≤ α
Setting n = n– 1, we get b = Æ′(¤bMY )bMY , bMY ≤ ¤bMY ≤ α
Hence,
b_Y = Æ′(¤b )Æ′(¤bMY )bMY
Using eq. (2.8) recursively, we get
b_Y =Æ Ç (¤b )Æ Ç (¤bMY ) … . Æ Ç (¤T )T
The initial error ε0 is known and is a constant. We have
|b_Y |= |Æ Ç (¤b )||Æ Ç (¤bMY )| … |Æ Ç (¤T )||T |
Let |Æ Ç (¤b )| ≤ ¦, n = 0, 1, 2, …..
Then,
|b_Y | = ¦ b_Y |T | …………(2.9)
For convergence, we require that |b_Y | → 0 as n→ ∞. This result is possible, if and only
if c < 1. Therefore, the iteration method eq. (2.6) converges, if and only if
|Æ Ç (b )| ≤ ¦ ≤ 1, n = 0, 1, 2, …

Prepared by Haileyesus T., UOG Page 39


Or |Æ Ç ( )| ≤ ¦ ≤ 1, for all  in the interval (a, b). …………(2.10)
Let us now check whether the methods converge to a root in (0, 1) for the above example
() = 3– 5 + 1 = 0.

Æ() = , Æ′() = , and |Æ′()|= < 1 for all  in 0 <  <1. Hence, the method
8 = _Y >8 : >8 :
C C C
i.

converges to a root in (0, 1).

Æ() = ( 5 − 1)= , Æ′() = . Now |Æ′()|< 1, when  is close to 1 and| Æ′() | > 1
e
C
:
>( C8MY)=
ii.

in the other part of the interval. Convergence is not guaranteed.

Æ() = Ž , Æ′() = .Again, | Æ′() |< 1, when  is close to 1 and


C8MY Y
= e
8
;8 : ( C8MY):
iii.

| Æ′() | > 1 in the other part of the interval. Convergence is not guaranteed.
Procedure for Iteration Method to Find the Root of the Equation f(x) = 0
Step 1: Take an initial approximation as T .

Step 2: Find the iteration function which satisfies the condition |Æ′()|<1 and the first
approximation Y by using the formula Y = Æ(T )
Step 3: Follow the above procedure to find the successive approximations b_Y using the
formula b_Y = Æ(b )when „ =1, 2,…..
Step 4: Stop the process when where ε is the prescribed accuracy.
|b_Y − b |< ε

EXAMPLE 2.10: Find a real root of 3– 2– 3 = 0, correct to three decimal places using fixed
point iteration method.
SOLUTION: Here () =  3– 2– 3 = 0
Also (0) = −3 < 0, (1) = −4 < 0, and (2) = 1 > 0. Therefore, root of the equation
lies between 1 and 2. Since (1) < (2), we can take the initial approximation T = 1
now we have to rewrite the given equation in the following forms, such that we will take for the
successive approximation the one which satisfies the condition |Æ′()| < 1 at the initial
approximation.

 =
8 = M>
;
i.

 = 8 :M;
>
ii.

Prepared by Haileyesus T., UOG Page 40


 = (2 + 3)=
e
iii.

Case 1: let  = Æ()= , then Æ′() = and |Æ′(T )| = |Æ′(1)| =1.5 > 1. So it is failed.
8 = M> >8 :
; ;

Case 2: let  = Æ()= , then Æ′() = and |Æ′(T )| = |Æ′(1)| =6 > [Link] failed.
> >(;8)
8 : M; (8 : M;):

Case 3: let  = Æ()=(2 + 3)= , then Æ′() = and |Æ′(T )| = |Æ′(1)|=0.24000 <[Link]
e
;
:
>(;8_>)=

iterative method can be applied with this iterative function.


First iteration:

Y = Æ (T )=(2T + 3)= =1.709975


e

Second iteration:

; = Æ(Y )=(2Y + 3)= =1.85856


e

Third iteration:

> = Æ(; )=(2; + 3)= =1.88681


e

Fourth iteration:

A = Æ (> )=(2> + 3)= =1.89208


e

Fifth iteration:

C = Æ (A )=(2A + 3)= = 1.89366


e

Sixth iteration:

E = Æ (C )=(2C + 3)= =1.89325


e

Seventh iteration:

X = Æ (E )=(2E + 3)= =1.89328


e

Eighth iteration:

V = Æ (X )=(2X + 3)= = 1.89329


e

Hence, from the 7th and 8th iterations, we can conclude that one of the real roots of () = 0 is
1.8933 correct to four decimal places.
EXAMPLE 2.11: Find a real root of ¦R§ = 3 – 1, correct to three decimal places using fixed
point iteration method.
SOLUTION: Here, we have () = ¦R§ – 3 + 1.

Prepared by Haileyesus T., UOG Page 41


We observe that (0) = 2 > 0 and (//2) =-3( π/2) +1 =-3.712389 < 0. Implies the root lies
between 0 and π/2. Let T =0.5 is the initial approximation.
Now, the given equation can be re-written as:
i.  = ¦R§ -1(1 − 3)

 = (¦R§  + 1)
Y
>
ii.

Now let's check that which satisfies the condition |Æ′()|<1 at the initial approximation.

Case 1: let  = Æ()= ¦R§ -1(1 − 3), then Æ′() =


MY(M>)
ÊYM(YM>8):
and

|Æ′(T )| = |Æ′(0.5)| = 3.464 > 1. So it is failed.

Case 2: let  = Æ()=> (¦R§  + 1), then Æ′() =


Y M˪b8
>
and

|Æ′(T )| = L L =L L |§¬„|< 1.
M˪b8 Y
> >

Hence iterative method can be applied with this iterative function.


First iteration:

Y = Æ(T )= (cos T + 1) = 0.625861


Y
>

Second iteration:

; = Æ(Y )= (cos Y + 1) = 0.603496


Y
>

Third iteration:

> = Æ (; )= (cos ; + 1) = 0.607785


Y
>

Fourth iteration:

A = Æ(> )= (cos > + 1) = 0.606972


Y
>

Fifth iteration:

C = Æ(A )= (cos A + 1) = 0.607126


Y
>

Sixth iteration:

E = Æ(C )= (cos C + 1) = 0.607097


Y
>

Therefore, from the 5 and 6th iterations, we can conclude that the real roots of () = 0 is
th

0.6071 correct to four decimal places.


EXAMPLE 2.12: Find the smallest negative root in magnitude of the equation 3 4+ 3+ 12 +
4 = 0, using the method of successive approximations.

Prepared by Haileyesus T., UOG Page 42


SOLUTION: We have () = 3 4+  3+ 12 + 4 = 0, (0) = 4, (−1) = −6.
Since, (– 1) (0) < 0, the smallest negative root in magnitude lies in the interval (– 1, 0).
Write the given equation as

(3 3+ 2+ 12) + 4 = 0 and  = − = Æ()


A
>8 = _8 : _Y;

We obtain

Æ Ç ()=
A(U8 : _;8
>8 = _8 : _Y;

We find | φ′(x) |< 1 for all x in the interval (– 1, 0). Hence, the iteration converges.
The iteration method is written as

b_Y = − >(8
A
f)
= _(8
f)
: _Y;

Let T = – 0.25be the initial approximation to the root. We obtain the following results.
First iteration:

Y = Æ(T )= −
A
>(8¹ )= _(8¹ ): _Y;
= – 0.33290

Second iteration:

; = Æ(Y )= −
A
>(8e )= _(8e ): _Y;
= – 0.33333

Third iteration:

> = Æ(; )= −
A
>(8: )= _(8 :)
: _Y;
= – 0.33333

The required approximation to the root is  ≈– 0.33333


EXERCISE 2.4
1. Use the method of Iteration to find a positive root between 0 and 1 of the equation
3+  + 1 = 0
2. By Iteration method, find √30
=

3. Use the method of Iteration to find a positive root between 0 and 1 of the equation

§¬„ =
8_Y
8MY
.

Prepared by Haileyesus T., UOG Page 43


2.3.5 Newton-Raphson Method
This method can be derived from Taylor’s series as follows. Let () = 0 be the equation for
which we are assuming T be the initial approximation and h be a small corrections to T (i.e
0 < ℎ < 1) , so that
(T + ℎ) = 0 ………….(2.11)
Expanding eq. (2.11) by Taylor’s series, we get

(T + ℎ) =  (T ) + ℎ′(T ) +  ÇÇ (T )+…..= 0


{:
;!

Since ℎ is small, we can neglect second and higher degree terms in hand therefore, we get
(T ) + ℎ′(T ) = 0 …………(2.12)
From which we have,

ℎ = − ¸Ç(8¹ ) where ′(T ) ≠ 0


¸(8 )
¹

Hence, if T be the initial approximation, then next (or first) approximation Y is given by

Y = T +ℎ = T −
¸(8¹ )
¸Ç(8¹ )

The next and second approximation ; is given by

; = Y − ¸Ç(8e )
¸(8 )
e

In general

b_Y = b −
¸(8f )
¸Ç(8f )

This formula is well known as Newton-Raphson formula.


The iterative procedure terminates when the relative error for two successive approximations
becomes less than or equal to the prescribed tolerance.
Procedure for Newton-Raphson Method to Find the Root of the Equation f(x) = 0
Step 1: Take a trial solution (initial approximation) as T .Find (T ) and ′(T ).

Step 2: Find next (first) approximation Y by using the formula Y = T − ¹ ¸(8 )


¸Ç(8 )
.
¹

Step 3: Follow the above procedure to find the successive approximations b_Y using the
formula

b_Y = b − when „ =0,1, 2,…..


¸(8f )
¸Ç(8f )

Step 4: Stop the process when where ε is the prescribed accuracy |b_Y − b |< ε.

Prepared by Haileyesus T., UOG Page 44


EXAMPLE 2.13: Use Newton-Raphson method to find the real root near 2 of the equation
 4– 11 + 8 = 0 accurate to five decimal places.
SOLUTION: Let () =  4– 11 + 8 , then ′() = 4 3−11 and it is given that T = 2.
Now (b ) = bA – 11b + 8 and ′(xn) = 4b> – 11, then using the Newton-Raphson formula, we
have

b_Y = b − = b −
¸(8f ) 8f
@ – YY8 _ V
f
¸Ç(8f ) = – YY
A8f

8f ÀA8f
= – YYÁM(8 @ – YY8 _ V)
f f
A8f
= – YY
=

A8f
@ – YYi M8 @ _YY8 M V)
k f f
= – YY
A8f
=

>8f
@M V

A8f
= – YY
=

First iteration:

Y =
>8¹@ M V
A8¹= – YY
= 1.90476

Second iteration:

; =
>8e@ M V
A8e= – YY
= 1.89209

Third iteration:

> =
>8:@ M V
A8:= – YY
= 1.89188

Fourth iteration:

A =
>8=@ M V
A8== – YY
= 1.89188

Therefore, the 3th and 4th iteration values are the same, hence the real roots of () = 0 is
1.89188correct to five decimal places.
EXAMPLE 2.14: Find the smallest positive real root of the equation  = 7 M8 using the Newton-
Raphson’s method.
SOLUTION: Let () = 7 8 − 1 then ′() = 7 8 +7 8 = (1 + ) 7 8 and (0) = −1 < 0
,(1) =1.718282>0. Then let's take T = 1. Now f(b ) =b 7 8f – 1 and ′(b ) = (1+b )7 8f , then
using the Newton-Raphson formula, we have

b_Y = b − = b -
¸(8f ) ik Ì †f – Y
¸Ç(8f ) (Y_ik )¢£k

Prepared by Haileyesus T., UOG Page 45


=
8f ((Y_ik )¢£k ))M(ik Ì †f – Y)
(Y_ik )¢£k

=
8f ¢£k _(ik): ¢£k Mik Ì †f _ Y)
(Y_ik )¢£k

=
(ik ): ¢£k _ Y)
(Y_ik)¢£k

First iteration:

Y =
(i¹ ): ¢£¹ _ Y)
(Y_i¹ )¢£¹
= 0.6839397

Second iteration:

; =
(ie ): ¢£e _ Y)
(Y_ie )¢£e
= 0.5774545

Third iteration:

> =
(i: ): ¢£: _ Y)
(Y_i: )¢£:
= 0.5672297

Fourth iteration:

A =
(i= ): ¢£= _ Y)
(Y_i= )¢£=
= 0.5671433

Hence the required root is 0.5671 correct to 4 decimal places


EXAMPLE 2.15: Find the real root of the equation 4– – 10 = 0 using the Newton-Raphson’s
method.
SOLUTION: For  () =  4– – 10 , we find that
(0) = −10, (1) = −10 and (2) = 4.
Hence, the smallest positive root lies in the interval (1, 2). Then let's take T =2.
Now (b ) = b A − b − 10 and ′(b ) =4b > − 1 , then using the Newton-Raphson formula,
we have

b_Y = b − = b -
¸(8f ) 8f @ M8f MYT
¸Ç(8f ) A8f = MY

=
8f (A8f = MY))M(8f @ M8f MYT)
A8f = MY

=
A8f @ M8f M8f @ _8f _YT)
A8f = MY

>8f @ _YT)
A8f = MY
=

First iteration:

Y =
>8¹ @ _YT)
A8¹ = MY
= 1.8710

Prepared by Haileyesus T., UOG Page 46


Second iteration:

; =
>8e @ _YT)
A8e = MY
= 1.8558

Third iteration:

> =
>8: @ _YT)
A8: = MY
= 1.8556

Hence, the root correct to three decimal places is 1.856.


Remark: Newton-Raphson method has a disadvantage when the derivative function, ′(), is
unavailable or prohibitively costly to evaluate. It always converges if the initial approximation is
sufficiently close to the root otherwise it diverges.
Mat lab cod for Newton-Raphson method
function [x,iter]=newton(x0,f,fp)
% newton-raphson algorithm
N = 100; eps = 1.e-5; % define max. no. iterations and error
maxval = 10000.0; % define value for divergence
xx = x0;
while (N>0)
xn = xx-f(xx)/fp(xx);
if abs(f(xn))<eps
x=xn;iter=100-N;
return;
end;
if abs(f(xx))>maxval
disp(['iterations = ',num2str(iter)]);
error('Solution diverges');
break;
end;
N = N - 1;
xx = xn;
end;
error('No convergence');
return;
% end function

Prepared by Haileyesus T., UOG Page 47


Sample output
f001 = inline('x.^3-2*x.^2+1','x')
f001 =
Inline function:
f001(x) = x.^3-2*x.^2+1
>> f01p = inline('3*x.^2-2*x.','x')
f01p =
Inline function:
f01p(x) = 3*x.^2-2
>> [x,iterations] = newton(2,f001,f01p)
x=
1.6180
iterations =
39
EXERCISE 2.5
1. Use Newton-Raphson method to find a root of the equation  3– 3– 5 = 0.
2. Find the four places of decimal, the smallest root of the equation 7 M8 = §¬„ .
3. Find cube root of 3 correct to three decimal places by Newton’s iterative method.

4. Apply Newton’s formula to find the values of (30)B. .


e

Prepared by Haileyesus T., UOG Page 48


Newton's Iterative Formula for Obtaining Inverse, square root, Cubic root e.t.c
Inverse: the quantity -1 can also be considered as a root of the equation −  = 0.
Y
8
i.

Here () = −  ⇒ ′() = −


Y Y
8 8:
. Hence, by Newton's formula, we get the simple recursion

formula

b_Y = b −
¸(8f )
¸Ç(8f )
e
( M?)
= b –
†f
e
M
†f :

= b (2−b )
ii. Square root: The quantity √ can be considered as a root of the equation 2− = 0. Here
() = 2− ⇒ ′() = 2 .From this, by Newton's formula, we get a recursion formula

b_Y = b −
¸(8f )
¸Ç(8f )

= b − (b +
8f : M? Y ?
;8f ; 8f
= )

Inverse square root: the inverse square root  is the root of the equation8: −  = 0. From
Y
iii.

this we get an iterative formula


b_Y =
8f
;
(3−b ; )

iv. Formula for pth root and reciprocal pthroot: For computing pth root of a, we can solve the
equation  P –  =0. Here () =  P –  ′() = Í PMY .
Hence, by Newton's formula, we obtain the recursion formula

b_Y = b −
¸(8f )
¸Ç(8f )

=b − P8f
8 Î M?
Λe
f

(PMY)8f Î _?
P8f Λe
= for p=2, 3, 4 ,…..

For instance for Í = 3

b_Y =
;8f = _? Y ?
= (2b + )
>8f : > 8f

Similarly, the reciprocal of Íth root of a can be obtained by solving the equation 8Î - a =0.
Y

By Newton's method () = –  ′() = −Í M(PMY) .


Y

Then

Prepared by Haileyesus T., UOG Page 49


b_Y = b − ¸Ç(8f )
¸(8 )
f

= b −
8f Î M?
MP8f ›(Λe)

= b [ ] for Í=3, 4, 5, ….
(PMY)_?8f Î
P

For instance for Í = 3

b_Y = b [
;_?8f =
>
]

EXAMPLE 2.16: Evaluate √29 to five decimal places by Newton-Raphson iterative method.
SOLUTION: Let  = √29 , then  ; − 29 = 0
We consider () =  ; − 29 and ′() = 2
The Newton-Raphson iteration formula gives

b_Y = b − = b -
¸(8f ) 8f : M;U
¸Ç(8f ) ;8f
:
8f ( ;8f )M(8f M;U)
;8f
=
:
= ;( b + 8 )
;8f : M8f _;U) 8f : _;U Y ;U
;8f ;8f
= =
f

Now (5) = – 4 < 0 and (6) = 7 > 0. Hence, a root of () = 0 lies between 5 and 6.
Taking T = 5.3, as the initial approximation and using the above simplified formula, we have
First iteration:

Y = ( T +
Y ;U
; 8¹
) = 5.38585

Second iteration:

; = ;( Y + 8 ) = 5.38516
Y ;U
e

Third iteration:

> = ( ; +
Y ;U
; 8:
) = 5.38516

Since ; = > up to five decimal places, √29 = 5.38516


EXAMPLE 2.17: Evaluate √17to five decimal places by Newton-Raphson iterative method.
=

SOLUTION: Now we have


8 < 17 < 27

√8<√17< √27
= = =
[taking cubic root to each side]
2 < √17< 3
=

Prepared by Haileyesus T., UOG Page 50


The iterative formula for the given equation is

b_Y =
;8f = _? Y ?
>8f :
= >(2b +8 )
f

Taking T =2.5 as an initial approximation, we get


First iteration:

Y = (2T +
Y ?
> 8¹
) = 2.5733

Second iteration:

; = (2Y +
Y ?
> 8e
) = 2.5713

Third iteration:

> = >(2; + 8 ) = 2.57128


Y ?
:

Fourth iteration:

A = (2> +
Y ?
> 8=
) = 2.57138

Since > and A are accurate to four decimal places hence the required root is 2.5713.

EXERCISE 2.6
1. A root of () = 7 8 – 22 lies in the interval (1, 2). Determine this root with the Newton-
Raphson method to five decimal accuracy.
2. Find the cube root of 10.

3. Show that the square roots of N= AB is given by √Ï = + , where S= A+B


Ð Ñ
A Ð

Prepared by Haileyesus T., UOG Page 51


2.4 ORDER (RATE) OF CONVERGENCE OF ITERATIVE METHODS
Convergence of an iterative method is judged by the order at which the error between successive
approximations to the root decreases. The order of convergence of an iterative method is said to
be ‡th order convergent if ‡ is the largest positive real number such that

limª→Ò L ÌÓ¥e
‹ L ≤A
Ì
Ó

Where A, is a non-zero finite number called asymptotic error constant and it depends on
derivative of () at an approximate root 7ª and 7ª_Y are the errors in successive approximation.

2.4.1 Rate of Convergence of Bisection Method


In Bisection Method, the original interval is divided into half interval in each iteration. If we take
mid points of successive intervals to be the approximations of the root, one half of the current
interval is the upper bound to the error.
In Bisection Method,
7ª_Y =0.57ª
ÌÓ¥e
ÌÓ
or =0.5

Hence 7ª and 7ª_Y are the errors in ¬ th and (¬ + 1)th iterations respectively. Comparing the above
equation with

limª→Ò L L ≤A
ÌÓ¥e
ÌÓ ‹

We get k= 1 and A= 0.5. Thus the Bisection Method is first order convergent or linearly
convergent.

2.4.2 Rate of Convergence of Newton-Raphson Method

Let α denotes the exact value of the root of () = 0, and let ª andª_Y , be two successive
approximations to the actual root α. If 7ª and 7ª_Y are the corresponding errors, we have
ª = ­ + 7ª and ª_Y = ­ + 7ª_Y
by Newton-Raphson’s iterative formula

­ + 7ª_Y = ­ + 7ª −
¸(Ô_ÌÓ )
¸Õ (Ô_ÌÓ )

7ª_Y − 7ª = −
¸(Ô_ÌÓ )
¸Õ (Ô_ÌÓ )
,

7ª_Y = 7ª − ¸Õ (Ô_ÌÓ )
¸(Ô_Ì )
Ó

Prepared by Haileyesus T., UOG Page 52


Ö :
¸(Ô)_ÌÓ ¸Õ (Ô)_ Ó ¸ÕÕ (Ô)_⋯
= 7ª − :!
ÖÓ : ÕÕÕ
¸ Õ (Ô)_ÌÓ¸
ÕÕ (Ô)_ ¸ (Ô)_⋯
[ by Taylor's expansion]
:!

Ö :
ÌÓ ¸Õ (Ô)_ Ó ¸ÕÕ (Ô)_⋯
= 7ª − Ö
:!
:
¸Õ (Ô)_ÌÓ ¸ÕÕ (Ô)_ Ó ¸ÕÕÕ (Ô)_⋯
[ b/c f(α) = 0 ]
:!

[ On neglecting higher powers of 7ª ]


Ó Ì : ¸ÕÕ (Ô)
= ; ¸Õ (Ô)_Ì ¸ÕÕ (Ô) 
Ó

ÌÓ : ¸ÕÕ (Ô)
; ¸Õ (Ô){Y_ Ì ÙÕÕ (Ú)}
=
Ó Õ Ù (Ú)

+ 7ª
ÌÓ : ¸ÕÕ (Ô) ¸ÕÕ (Ô) -1
; ¸Õ (Ô) ¸Õ (Ô)
= [1 ]

− 7ª
ÌÓ : ¸ÕÕ (Ô) ¸ÕÕ (Ô)
; ¸Õ (Ô) ¸Õ (Ô)
= {1 +…..}

− { } +……….
ÌÓ : ¸ÕÕ (Ô) ÌÓ = ¸ÕÕ (Ô) ;
; ¸Õ (Ô) ; ¸Õ (Ô)
=

= − { } +……..
ÌÓ¥e Y ¸ÕÕ (Ô) ÌÓ ¸ÕÕ (Ô) ;
ÌÓ : ; ¸Õ (Ô) ; ¸Õ (Ô)

[Neglecting higher order terms of 7ª ]


¸ÕÕ (Ô)
;¸Õ (Ô)
=

Hence by definition, the order of convergence of Newton-Raphson method is 2. i.e., Newton-


Raphson method is quadraticaly convergence.
This also shows that subsequent error at each step is proportional to the square of the previous
error and as such the convergence is quadratic.

2.4.3 Rate of Convergence of Regula-Falsi Method

The general iterative formula for False Position Method is given by

ª_Y = ªMY − ¼ ½ (ªMY )


8Ó M8ӛe
¸(8Ó )M¸(8ӛe )
……………..(2.13)

Where ª_Y , ª , ªMY are successive approximations to the required root of () = 0.
Let α be the actual (true) root of () = 0, i.e., (­) = 0. If 7ª_Y , 7ª , 7ªMY are the successive
errors in the (¬+1)th, (¬)th, (¬ −1)th iterations respectively, then
ª_Y = ­ + 7ª_Y , ª = ­ + 7ª and ªMY = ­ + 7ªMY ………………(2.14)
Using these in eq. (2.14), we obtain

­ + 7ª_Y = ­ + 7ª −
(¢Ü M¢Ü›e )¾(Ý_¢Ü )
¾(Ý_¢Ü )–¾(Ý_¢Ü›e )

7ª_Y =7ª −
(ÌÓ MÌӛe )¸(Ô_ÌÓ )
¾(Ý_¢Ü )–¸(Ô_Ìӛe )
…………….(2.15)

Prepared by Haileyesus T., UOG Page 53


Expanding (α + eß ) and (α + eßMY ) in Taylor's series around ­, we have
Ö :
(ÌÓ MÌӛe ){¸(Ô)_ÌÓ ¸Õ (Ô)_ Ó ¸ÕÕ (Ô)_⋯ }
7ª_Y = 7ª − Ö : Ö
:!
:
à¾(Ý )_ÌÓ ¸Õ (Ô)_ Ó ¸ÕÕ (Ô)_⋯ áM{¸(Ô)_Ìӛe ¸Õ (Ô)_ ӛe ¸ÕÕ (Ô)_⋯ }
:! :!

Ö :
(ÌÓ MÌӛe ){¸(Ô)_ÌÓ ¸Õ (Ô)_ Ó ¸ÕÕ (Ô)}
= 7ª − :!
Ö :›Öӛe : ÕÕ
à(ÌÓ MÌӛe )¸Õ (Ô)_{ Ó }¸ (Ô)á
, [ on ignoring the higher order terms ]
:!

Ö :
{ ¸(Ô)_ÌÓ ¸Õ (Ô)_ Ó ¸ÕÕ (Ô) }
= 7ª − Ö ›Ö
:!
â¸Ç(Ô)_{ Ó Ó›e }¸ÕÕ (Ô)ã
:

Ö :
{ ÌÓ ¸Õ (Ô)_ Ó ¸ÕÕ (Ô) }
7ª − Ö ›Ö
:!
â¸Ç(Ô)_{ Ó Ó›e }¸ÕÕ (Ô)ã
=
:

Ö : ÙÕÕ (Ú)
{ ÌÓ _ Ó Õ }
= 7ª −
:! Ù (Ú)
Ö ›Ö ÙÕÕ (Ú)
àY_{ Ó Ó›e } Õ á
: Ù (Ú)

= 7ª − { 7ª + }[1 +{ } ¸Õ (Ô) 
ÌÓ : ¸ÕÕ (Ô) ÌÓ MÌӛe ¸ÕÕ (Ô) -1
;! ¸Õ (Ô) ;

= 7ª − { 7ª + }[1 − â ã ¸Õ (Ô) + ⋯ 
ÌÓ : ¸ÕÕ (Ô) ÌÓ MÌӛe ¸ÕÕ (Ô)
;! ¸Õ (Ô) ;

= 7ª −  + −  ¸Õ (Ô)  
ÌÓ (ÌÓ MÌӛe) ¸ÕÕ (Ô) ÌÓ : ¸ÕÕ (Ô) ÌÓ : (ÌÓ MÌӛe) ¸ÕÕ (Ô) ;
; ¸Õ (Ô) ;! ¸Õ (Ô) A

7ª_Y =7ª 7ªMYM ;¸Õ (Ô) + 0(7ª ; )


¸ÕÕ (Ô)

If 7ª ?bä 7ªMY are very small, then ignoring 0(7ª ; ), we get

7ª_Y =7ª 7ªMY


¸ÕÕ (Ô)
;¸Õ (Ô)
…………(2.16)

which can be written as


7ª_Y =7ª 7ªMY M ………….(2.17)

Where M =
¸ÕÕ (Ô)
;¸Õ (Ô)
and would be a constant.

In order to find the order of convergence, it is necessary to find a formula of the type
7ª_Y =å7ª ˆ , with an appropriate value of k …………….(2.18)
With the help ofeq. (5), we can write

7ª =å7ªMY ˆ or 7ªMY =( Ó )‹
Ì e
æ

Now, substituting the value of 7ª_Y and 7ªMY in eq.(2.18), we get

å7ª ˆ =7ª ( æÓ )‹ .M
Ì e

Prepared by Haileyesus T., UOG Page 54


7ª ˆ =MåM(Y_‹) 7ª (Y_‹)
e e
or …………..(2.19)
Comparing the powers of 7ª on both sides of eq. (2.19), we get
‡ = 1 + (1/‡)
or ‡2 – ‡ − 1 = 0 ………….(2.20)
From eq. (2.20), taking only the positive root, we get ‡ = 1.618. By putting this value of ‡ in eq.
(2.18), we have
7ª_Y =å7ª [Link] or A =
ÌÓ¥e
ÌÓ [Link]ç

Therefore the order (or rate) of convergence of false position method is 1.618. Hence regula-falsi
is supper linear convergence.

2.5 MULTIPLE ROOTS

A multiple root corresponds to a point where a function is tangent to the x-axis. For example, a
double root results from
() = ( − 3)( − 1)( − 1)
or, multiplying terms, () =  3−5 2+7 − 3. The equation has a double root because one value
of  makes two terms equal to zero. Graphically, this corresponds to the curve touching the x-axis
tangentially at the double root.
A triple root corresponds to the case where one x value makes three terms in an equation equal
to zero, as in
() = ( − 3)( − 1)( − 1)( − 1)
or, multiplying terms, () =  4−6 3+122−10 + 3. Notice that the graphical depiction again
indicates that the function is tangent to the axis at the root, but that for this case the axis is
crossed. In general, odd multiple roots cross the axis, whereas even ones do not. For example,
the quadruple root in does not cross the axis.
Let α be a root of the equation
() = 0 ……………….(2.21)
which is repeated m times, then (­) =0, ′(­) = 0, …..,  (°MY) (­) =0 and  (°) (α) ≠0. Such
equation can be written as
() = ( − ­)° «() = 0

Prepared by Haileyesus T., UOG Page 55


In other words , if α is a root of () = 0 repeated times , then it is also a root of ′() = 0
repeated (¯ − 1) times ,of ′′() = 0 repeated (¯ − 2) times and so on.

MULTIPLE ROOTS BY NEWTON'S METHOD: Let ­ be a root of the polynomial equation () = 0
which is repeated m times. If T , Y , …., b_Y be its successive approximations, then on the lines
of Newton's iterative method , we have

b_Y = b − ¯ , where ¯ is a multiplicity o


¸(8f )
¸Ç(8f )

Which is called the generalized Newton's formula.


When ¯ = 1, it is reduced to the Newton's Raphson formula.
REMARK: If the initial approximation T is sufficiently close to the root ­ , then the equations

T − ¯ , T − (¯ − 1) , b − (¯ − 2)
¸(8¹ ) ¸Ç(8¹ ) ¸ÕÕ (8f )
¸Ç(8¹ ) ¸ÇÇ(8¹ ) ¸(=) (8¹ )
, ………

will have the same root.

EXAMPLE 2.18: Find the double root of the equation 3− 2− + 1 = 0
SOLUTION: Let () =  3− 2− + 1. Then ′() = 32−2 − 1 and ′′() = 6 − [Link]
(1) = 0 and (−1) = [Link] this  = 1 „è  = −1 are the roots of . Since  is a
polynomial of degree 3, one of this root is a double root.
Starting with T =0.9, we have

T − 2
¸(8¹ ) [Link]
¸Ç(8¹ ) MT.>X
= 0.9 – 2( ) = 1.003

And

T −
¸Ç(8¹ ) MT.>X
¸ÇÇ(8¹ ) >.A
= 0.9 - = 1.009

The closeness of these values implies that there is a double root near  = 1
Therefore choosing Y =1.01 for the next approximation, we get

Y − 2
¸(8e ) [Link];
¸Ç(8e ) [Link]>
= 1.01 – 2( ) = 1.001

And

Y −
¸Ç(8e ) [Link]>
¸ÇÇ(8e ) [Link]
= 1.01 – = 1.001

This shows that there is a double root at  =1.001, which is quite near the actual root  = 1.

Prepared by Haileyesus T., UOG Page 56


2.6 ROOT OF POLYNOMIAL EQUATIONS

A polynomial of degree n has the form


Í() = T + Y  + ;  ; + ⋯ + b  b
Where ª 's called the coefficients of function Í, are constants and b ≠ 0. Although the
coefficients can be complex numbers, we will limit our discussion to cases where they are real.
For such cases, the roots can be real and/or complex.
The roots of such polynomials follow these rules:
For an nth-order equation, there are n real or complex roots. It should be noted that
these roots will not necessarily be distinct.
If n is odd, there is at least one real root.
If complex roots exist, they exist in conjugate pairs (that is, ­ + ê¬ and ­ − ê¬), where
i =√−1.

2.6.1 Muller’s Method


Muller’s method is an iterative method and free from the evaluation of derivative as in Newton-
Raphson method. This method can be used to determine the both real and complex root of
equation () = 0.

Here o = Í() is approximated by a second degree parabola passing through these three points
Figure 2.6: Muller’s method

( ªM; , oªM; ), ( ªMY , oªMY ), ( ª , oª ), in the neighborhood of the root.


Let
Í() =A(x − ª ) ; + B(-ª ) + oª ……………..(2.22)
be a parabola passing through the points , ( ªM; , oªM; ), ( ªMY , oªMY ), ( ª , oª )

Prepared by Haileyesus T., UOG Page 57


Substituting ªMY „è ªM; in eq. (2.22), we have
oªMY = A(ªMY − ª ) ; + B(ªMY -ª ) + oª ……………(2.23)
oªM; = A(ªM; − ª ) ; + B(ªM; -ª ) + oª …………….(2.24)
Eq. (2.23) and eq. (2.24) can be written as
oªMY − oª = A(ªMY − ª ) ; + B(ªMY -ª )
oªM; − oª = A(ªM; − ª ) ; + B(ªM; -ª ) ………………(2.25)

To find the values of A and B, we will solve simultaneously. To find value of A multiply the top of
eq. (2.25) by (ªM; − ª ) and the bottom by (ªMY − ª ). Then we obtain
(8ӛ: M8Ó )(rӛe MrÓ )M(8ӛe M8Ó )(rӛ: MrÓ )
(8ӛe M8ӛ: )(8ӛe M8Ó )(8ӛ: M8Ó )
A=

Similarly to find the value of B, multiply the top of eq. (2.25) by (ªM; − ª ); and the bottom by
(ªMY − ª ); . Then we obtain
(8ӛ: M8Ó ): (rӛe MrÓ )M(8ӛe M8Ó ): (rӛ: MrÓ )
(8ӛ: M8ӛe )(8ӛe M8Ó )(8ӛ: M8Ó )
B=

From A and B, the quadratic equation Í() = A(x − ª ) ; + B(x-ª ) + oª = 0 give the next
approximation

ª_Y − ª =
Më±Êë : MAærÓ

…………….(2.26)

A direct solution from eq.(2.26) leads to inaccurate results. And therefore it is usually written in
the form

ª_Y − ª =−
;rÓ
ë±Êë : MAærÓ
……………..(2.27)

Note that:
1. If B>0, we use the positive sign with square root of equation and if B < 0, we use negative
sign with square root of the equation.
2. Once ª_Y is determined, the process is repeated. This brings up the issue of which point
is discarded. Two general strategies are typically used:
(i) If only real roots are being located, we choose the two original points that are nearest to
the new root estimate, ª_Y .
(ii) If both real and complex roots are being evaluated, a sequential approach is employed.
That is, just like the secant method, ªMY , ª , and ª_Y take the place of ªM; , ªMY , and ª .

Prepared by Haileyesus T., UOG Page 58


EXAMPLE 2.19: Find the root of the equation () = 3− 2− − 1 = 0 Muller’s method, taking
initial approximations as T = 0, Y = 1, ; = 2
SOLUTION: Let ªM; = 0, ªMY = 1, ª = 2
Then oªM; = −1, oªMY = −2, oª = 1
Now, we obtain
(8ӛ: M8Ó )(rӛe MrÓ )M(8ӛe M8Ó )(rӛ: MrÓ )
(8ӛe M8ӛ: )(8ӛe M8Ó )(8ӛ: M8Ó )
A=
(TM; )(M;MY)M(YM;)(MYMY )
(YMT)(YM;)(TM;)
=

= 2
(8ӛ: M8Ó ): (rӛe MrÓ )M(8ӛe M8Ó ): (rӛ: MrÓ )
(8ӛ: M8ӛe )(8ӛe M8Ó )(8ӛ: M8Ó )
B=

TM; ): (M;MY)MYM; ): (MYMY )


(TMY)(YM;)(TM;)
=

=5
The next approximation to the desired root is

ª_Y = ª −
;rÓ
ë±Êë : MAærÓ
,

=2−
;Y
C±Ê;CMA(;)(Y)

=2−
;Y
C_Ê;CMA(;)(Y)
[taking +ve sign, b/c B > 0 ]

= 1.780776
The procedure can now be repeated with three approximations as 1, 2, and 1.780776.
Let ªM; = 1, ªMY = 2, ª = 1.780776
Then oªM; = −2, oªMY = 1, oª = −0.304808
Now, using the formula like in the above we obtain
A=3.780773 and B= 5.123098
The next approximation to the desired root is

ª_Y = ª −
;rÓ
ë±Êë : MAærÓ

= 1.780776 −
;(MT.>TAVTV)
C.Y;>TUV_Ê(C.Y;>TUV): MA(>.XVTXX>)(MT.>TAVTV)

= 1.837867
The procedure can repeat with three approximations as 2, 1.780776, and 1.837867.
Let ªM; = 2, ªMY = 1.780776, ª = 1.837867

Prepared by Haileyesus T., UOG Page 59


Then oªM; = 1, oªMY = −0.304808, oª = −0.007757
Now, using the formula like in the above we obtain
A=4.619024 and B= 5.467225
The next approximation to the desired root is

ª_Y = ª −
;rÓ
ë±Êë: MAærÓ

= 1.837867 −
;([Link])
[Link];;C_Ê([Link];;C): MA([Link];A )([Link])

= 1.839284
The procedure can now be repeated with three approximations as 1.780776, 1.837867, and
1.839284.
Let ªM; = 1.780776, ªMY = 1.837867, ª = 1.839284
Then oªM; = −0.304808, oªMY = −0.007757, oª =– 0.000015
Now, using the formula like in the above we obtain
A=4.20000 and B= 5.20000
The next approximation to the desired root is

ª_Y = ª −
;rÓ
ë±Êë : MAærÓ
,

= 1.839284 −
;(– [Link])

C.;_Ž(C.;): MA(A.; )(– [Link])

= 1.839287
Hence the required root is 1.839287.
EXAMPLE 2.20: Using Muller’s method, find the root of the equation () = 3– 2 – 5 = 0,
which lies between 2 and 3.
SOLUTION: Let ªM; = 1.9, ªMY = 2, ª = 2.1
Then oªM; =– 1.941, oªMY = −1, oª = 0.061
Now, we obtain
(8ӛ: M8Ó )(rӛe MrÓ )M(8ӛe M8Ó )(rӛ: MrÓ )
(8ӛe M8ӛ: )(8ӛe M8Ó )(8ӛ: M8Ó )
A=
([Link];.Y )([Link])M(;M;.Y)([Link] )
(;MY.U)(;M;.Y)([Link];.Y)
=

=6
(8ӛ: M8Ó ): (rӛe MrÓ )M(8ӛe M8Ó ): (rӛ: MrÓ )
(8ӛ: M8ӛe )(8ӛe M8Ó )(8ӛ: M8Ó )
B=

Prepared by Haileyesus T., UOG Page 60


([Link];.Y ): ([Link])M(;M;.Y ): ([Link] )
([Link];.Y)(;M;.Y)([Link];.Y)
=

= 11.21
The next approximation to the desired root is

ª_Y = ª −
;rÓ
ë±Êë : MAærÓ

= 2.1 −
;([Link])
YY.;Y±Ê(YY.;Y): MA(E)([Link])

= 2.094542
The procedure can now be repeated with three approximations as 2, 2.1 and 2.094542.
Let ªM; = 2, ªMY = 2.1, ª = 2.094542
Then oªM; = −1, oªMY = 0.061, oª =– 0.0001058
Now, using the formula like in the above we obtain
A=6.194492 and B= 11.161799
The next approximation to the desired root is

ª_Y = ª −
;rÓ
ë±Êë : MAærÓ

= 2.094542 −
;(– [Link])

YY.YEYXUU_Ž([Link]): MA([Link];)(– [Link])

= 2.094551
Hence the required root is 2.0945 correct up to 4 decimal places.

Prepared by Haileyesus T., UOG Page 61


1. Use the Bisection method to find a solution accurate to four decimal places for  = ¤„
REVIEW EXERCISE

in the interval (4.4, 4.6).

2. Determine the solution of the equation 8 – (– §¬„ ) = 0 by using the Bisection method
U
;

accurate to five decimal places in the interval (2, 3). Use the Bisection method to compute
the root of 7 8 – 3 = 0 correct to three decimal places in the interval (1.5, 1.6).
3. Find the root of “R«  = ¦R§ correct to two decimal places using Bisection method.
4. Use the Bisection method to find a root of the equation  3– 4– 9 = 0 in the interval
(2, 3), accurate to four decimal places.
5. Use Bisection method to find the smallest positive root of ¦R§  =(1/2) + §¬„ in the
interval (0.41, 043). Use an error tolerance of = 0.0001.
7. Use the method of False Position to find solution accurate to within 10–4 for the function
() = – ¦R§  in the interval (0, π/2).
8. Use the method of False Position to find solution accurate to within 10–4 for the function
() = – 0.8 – 0.2 §¬„  = 0 in the interval (0, π/2).
9. Use the method of False Position to solve the equation ¤„  + 1 =0 accurate to three
decimal places starting with 2.5 and 3.0 as the initial approximations to the root.
10. Use the method of False Position to solve the equation 7 8 – ¦R§  =0 correct to four
decimal places in the interval (0, 1).
11. Use the method of False Position to find a root correct to three decimal places of the
function () =  3– 4– 9 = 0. ).
12. Find a root of the equation ¤„ – ¤„ℎ = 0 using the secant method with initial
approximations: T = 7 and Y = 7.5.
13. Find a root of the equation 6–– 1 = 0 using the secant method approximations: T =2 and
Y = 1.0.
14. Use the method of fixed point iteration to determine a solution accurate to within 10–2 for
 4– 3 2– 3 =0 on [1, 2]. Use T =1.
15. Use the method of fixed point iteration to find a root of the equation 7 8 – 3 =0 in the
interval (0, 1) accurate to four decimal places.

Prepared by Haileyesus T., UOG Page 62


16. A root of () =  3– 10 2+ 5 =0 lies close to  =0.7. Determine this root with the
Newton-Raphson method to five decimal accuracy.
17. A root of () = 3–  2– 5 = 0 lies in the interval (2, 3). Determine this root with the
Newton-Raphson method for four decimal places.
18. Find a root of the equation 3– 3 2+ 4 = 0 using using Muller’s method given that a root is
near 1.0.
19. Find a root of the equation 3– 3– 5 =0 using using Muller’s method given that a root is
near 4.6.

Prepared by Haileyesus T., UOG Page 63


CHAPTER –3: SOLUTION OF SYSTEM OF LINEAR EQUATIONS

Chapter objectives
At the end of this chapter you will be able to:
 Describe the system of linear equations.
 Identify if the system of linear equation has a unique solution.
 Define direct and iterative methods.
 State some of direct methods used for solving system of linear
equations.
 Understand how we use the different direct methods.
 Understand the relation and rate of convergence of each method.
 State the difference between direct and iterative methods.
 State the sufficient condition for iterative methods.
 Compare the rate of convergence of those iterative methods.
 Find the nth approximation formula for iterative methods.

INTRODUCTION
Consider a system of n linear algebraic equations in n unknowns Y , ; , …, b :
YY Y + Y; ; + ⋯ + Yb b = Y
;Y Y + ;; ; + ⋯ + ;b b = ;
⋮ ⋮ ⋯ ⋱ ⋮
………….(3.1)
bY Y + b; ; + ⋯ + bb b = b
In matrix notation we write the system as
AX =b …………(3.2)
Where

ða ó ð x2 ó ð b2 ó
a a .... a x b
å=ï
11 12 1n 1 1

ï M M ò ï M ò ï M ò
21 a 22
..... a2n
, X= and b=
M O
î an1 a n2
.... a nn ñ î xn ñ î bn ñ
The matrix [A | b], obtained by appending the column b to the matrix A is called the
Augmented matrix. That is

Prepared by Haileyesus T., UOG Page 64


ða a :b ó
a 11 a 12
.... a :b
1n 1

(A: b ) =ï
ï ò
.... M ò
21 a 22
..... 2n 2
.... ....
î a n1 a n2
.... a :b
nn n ñ
Linear systems of equations are associated with many problems in engineering and science, as
well as with applications of mathematics to the social sciences and quantitative study of business
and economic problems.
If the column vector  = 0, then the system in eq. (3.1) is called homogeneous. If b≠ 0, then the
system in eq (3.1) is called non-homogeneous. i.e at least one b is non-zero.

A system of linear equations in n unknowns has a unique solution, provided that the
determinant of the coefficient matrix is non-singular i.e., if |A| ≠0. The rows and columns of a non-
singular matrix are linearly independent in the sense that no row (or column) is a linear
combination of the other rows (or columns).

Definition 3.1( Elementary row operations): Reducing matrices to nice and simple forms if any of
the following elementary row operations is performed.
i) Interchanging two rows:œª ↔ œõ
ii) Multiplying a row by a non-zero number:‡ œª → œª
iii) Add a multiple of another row to a given row:œª + ‡ œõ → œª

Definition 3.2: A matrix is said to be in echelon form (also called a row echelon matrix) if it
satisfies the following three conditions:
a) All zero rows (rows consisting entirely of zeros) are at the bottom.
b) Each leading non- zero entry of a row in a column is to the right of the leading entry of
a row above it.
c) All entries in a column below a leading entry are zero.

EXAMPLE 3.1: Given matrices


2 2 −3 1 5 2 0 1 1 0 −3 4
A= ö0 3 1 0 ÷ ø = ö0 4 5 0÷ ù = ö4 0 2 5 ÷
0 0 0 0 0 0 0 2 0 1 3 2
From this A and B are echelon forms but C is not in echelon form.

Prepared by Haileyesus T., UOG Page 65


Definition 3.3: A matrix is said to be in reduced echelon form (also called a row reduced -echelon
matrix) if it also satisfies the following condition in addition to echelon form.
i) The leading entry in each non-zero row is 1.
ii) Each leading in each row is the non-zero entry in its column.

EXAMPLE 3.2.: The following matrices are in row reduced echelon form

ð0 0 1 0ó 1 2 0 0
1 2 0 0

A=ï , ø = ö0 0 1 0÷
0 0 0 1ò 0 0 0 1
î 0 0 0 0 ñ
And the following are not in row reduced echelon form
1 0 5 1 0 5 1 0 0
ù = ö 0 1 3÷ ú = ö0 2 1÷ J = ö0 0 0÷
0 0 1 0 0 0 0 0 1

Definition 3.4 (Rank) The number of non-zero rows in the echelon form of a matrix is called the
rank of a matrix A , it is denoted by rank(å) or û(å).

1 2 1
EXAMPLE 3.3: Compute the echelon form reduced echelon form and rank of

B=ö2 3 1÷
1 1 2
SOLUTION:
1 2 1 ||: M;| e →|: 1 2 1
= M|e →|=
B=ö2 3 1÷ üýýýýýýýþ ö0 −1 −1÷
1 1 2 0 −1 1
|= _|: →|= 1 2 1
üýýýýýýþ ö0 −1 −1÷.
0 0 2
This is the echelon form. Therefore rank (B) =3.
Y
| →|=
; =
M|: →|:
1 2 1
üýýýýþ ö0 −1 −1÷
0 0 2
|: _|= →|:
|e M|= →|e
1 2 1
üýýýýýýþ ö0 1 −1÷
0 0 1
|e M;|: →|e 1 2 0
üýýýýýýýþ ö0 1 0÷
0 0 1
Prepared by Haileyesus T., UOG Page 66
1 0 0
ö0 1 0÷
0 0 1
This is the reduced echelon form of matrix B.
The solution of the system in eq. (3.1) depends on the consistent of the system and this consistent
is checked using rank.
The system of eq. (3.1) is consistent (has at least one solution), if
Rank (A) =Rank [A | b] = r
 If r = n, then the system has unique solution.
 If r < n, then the system has (n – r) parameter family of infinite number of solutions.
a) The system of eq. (3.1) is inconsistent(has no solution) if
Rank (A) ≠Rank [A | b].
Linear algebraic equations occur in almost all branches of engineering. Their most important
application in engineering is in the analysis of linear systems (any system whose response is
proportional to the input is deemed to be linear). Linear systems include structures, elastic solids,
heat flow, seepage of fluids, electromagnetic fields and electric circuits i.e., most topics taught in
an engineering curriculum. If the system is discrete, such as a truss or an electric circuit, then its
analysis leads directly to linear algebraic equations.
Here are two classes of methods for solving system of linear equations:
direct methods and
Iterative methods.
Direct methods: The common characteristics of these methods are that they transform the original
equation into equivalent equations (equations that have the same solution) using elementary row
operations that can be solved more easily. These methods take finite steps and give an exact
solution to the system.
Some of direct Methods:
a) matrix inversion method
b) Cramer's rule
c) Gauss Elimination Method
d) Gauss-Jordan Method
e) Lu-decomposition method
f) Cholesky’s method
g) partition method

Prepared by Haileyesus T., UOG Page 67


Iterative methods: We call also as indirect methods, start with an initial guess of the solution x,
and then repeatedly refine the solution until a certain convergence criterion is reached. Iterative
methods are generally less efficient than direct methods due to the large number of iterations
required. But they do have significant computational advantages if the coefficient matrix is very
large and sparsely populated (most coefficients are zero). Iterative procedures are self-correcting,
meaning that round off errors (or even arithmetic mistakes) in one iteration cycle are corrected in
subsequent cycles. A serious drawback of iterative methods is that they do not always converge to
the solution. The initial guess affects only the number of iterations that are required for
convergence.
Indirect or Iterative Methods:
i. Jacobi’s Iteration Method
ii. Gauss-Seidal Iteration Method

3.1 DIRECT METHODS

If the system of equations has some special forms, then the solution is obtained directly.
We consider three such special forms.
Let A be a diagonal matrix, A =D. That is, we consider the system of equations in eq.(2)
become Dx = b .i,e
YY Y = Y
;; ; = ;
⋱ ⋮
bb b = b
This system is called a diagonal system of equations. Solving directly, we obtain

ª = , ªª ≠ 0,i=1, 2,…, n



?ÓÓ

Let A be a lower triangular matrix, A = L. That is, we consider the system of equations in
eq.(2) become Lx =b . i.e

YY Y = Y
;Y Y + ;; ; = ;
⋮ ⋮ ⋯ ⋱ ⋮
bY Y + b; ; + ⋯ + bb b = b
This system is called a lower triangular system of equations. Solving for the unknowns in the order
x1,x2,….,xn ,we get

Prepared by Haileyesus T., UOG Page 68


e
Y =
?ee
.

; =
: M?:e 8e
?::
.

……………………
f M∑f›e
e ?f 8
b =
?ff
.

The unknowns are obtained by forward substitution and this procedure is called the forward
substitution method.
Let A be an upper triangular matrix, A = U. That is, we consider the system of equations in
eq.(2) become Ux =b . i.e
YY Y + Y; ; + ⋯ + Yb b = Y
;; ; + ⋯ + ;b b = ;
⋱ ⋮
bb b = b
This system is called an upper triangular system of equations. Solving for the unknowns in the
order xn,xn-1,….,x1 ,we get
b =
f
?ff
,
f›e M?f›e 8f
bMY =
?f›ef›e
,

…………………………
e M∑f
: ?e 8
b =
?ee
,

The unknowns are obtained by back substitution and this procedure is called the back substitution
method.
Mat lab cod for upper triangular system
%%M-file: Usolve.m
function X= Usolve(U,b)
%input: upper triangular matrix U, right hand side vector b
%output: solution X
n=max(size(U)); %determines the dimension of the matrix U
X(n) = b(n)/U(n,n);
for k=n-1:-1:1 %Backward for loop
X(k) = ( b(k) - sum( U(k, k+1:n).*X(k+1:n) ))/U(k,k);
end

Prepared by Haileyesus T., UOG Page 69


>> U =[2, 0 ,0 ,0; 3, 1.5, 0 ,0; 2, 0, 2.5, 0; 2, 3, 0, 5];
>> b=[2;0;1; -1];
>> X= Upsolve(U,b)
X=
1.0000 0 0.4000 -0.2000

3.1.1 Matrix inversion method


Consider the following system of linear simultaneous equations:
YY Y + Y; ; + Y> > = Y
;Y Y + ;; ; + ;> > = ; …………..(3.3)
>Y Y + >; ; + >> > = >

which can be written as

Ax=b …………(3.4)

YY Y; Y> Y


Where
Y
A=ö;Y ;; ;> ÷ , x = ö; ÷ and b= ö; ÷
>Y >; >> > >
If the coefficient matrix A of the system is nonsingular, then it has an inverse A-1 and has a unique
solution. Pre multiplying both sides of (3.4) by the matrix A–1, we obtain
åMY A = åMY b
= åMY b ……….. (3.5)
The formula in eq. (3.5) yields a solution of eq. (3.4) and the solution is unique.
EXAMPLE 3.4: Solve using matrix inversion
x + y + z =1
x + 2 y + 3z = 6
x + 3y + 4z = 6
SOLUTION: The given equation can be put in the form


Ax= b
1 1 1 1
A=ö1 2 3÷, x= o and b=ö6÷
1 3 4 p 6
where

Prepared by Haileyesus T., UOG Page 70


|å| =-1≠ [Link], åMY exists.
−1 −1 −1 1 1 1
åMY = ö− 1 3 −2 ÷ ö 1 −3 2 ÷
?äõ(æ) Y
¢ (æ) MY
1 −2 1 −1 2 −1
= =

Then using the formula


x= åMY b
 1 1 1 1
 =ö 1 −3 2 ÷ ö6÷
o
p −1 2 −1 6
we obtain the solution as  = 1, o = −5, p = 5.

MAT LAB COD


>>A=[1 1 1;1 2 3;1 3 4];
>> b=[1;6;6];
>> x=inv(A)*b
x=
1.0000
-5.0000
5.0000

3.1.2 Cramer's rule


Consider the following system of linear simultaneous equations:
YY Y + Y; ; + Y> > = Y
;Y Y + ;; ; + ;> > = ;
>Y Y + >; ; + >> > = >

which can be written as

Ax=b

YY Y; Y> Y Y


Where


A=ö ;Y ;; ;> ÷ , x = ö; ÷ and b= ö; ÷
>Y >; >> > >
If the coefficient matrix of the system is nonsingular, then the system has a unique solution. And
the solution of the system is given as follows:

Prepared by Haileyesus T., UOG Page 71


ƻ
ª =
|å|
Where ƻ is the determinant of the matrix obtained by replacing the ith column of A by the vector
b.
EXAMPLE 3.5: Solve using Cramer's rule
x + 3x + 6 x = 2
3x − y + 4 z = 9
x − 4 y + 2z = 7

1 3 6 2
SOLUTION: The coefficient matrix A and the column vector b is given as

A= ö3 −1 4 ÷ 9÷
1 −4 2 7
and b=ö

|å|= 1L−1 4 3 4 3 −1
Then let us find the determinant of A and others

L-3L L+ 6L L= -58
−4 2 1 2 1 −4
2 3 6 1 2 6 1 3 2
∆= 9 −1 4 =-116, ∆o= 3 9 4 =58, ∆p= 3 −1 9 =-29
7 −4 2 1 7 2 1 −4 7
From this, the solution of the system is
∆8 ∆r ∆n
 = |æ| = 2, o = |æ| = −1 and p = |æ| = 0.5

Mat Labe program


>>xx=[2 3 6;9 -1 4;7 -4 2];
>>yy=[1 2 6 ;3 9 4 ;1 7 2];
>>zz=[1 3 2 ;3 -1 9 ;1 -4 7];
>> A=[1 3 6 ;3 -1 4 ;1 -4 2];
>> x=det(xx)/det(A)
x=
2
>> y=det(yy)/det(A)
y=
-1
>> z=det(zz)/det(A)
z=
0.500

Prepared by Haileyesus T., UOG Page 72


3.1.3 Gauss elimination method
Consider the following system of linear simultaneous equations:
YY Y + Y; ; + Y> > = Y
;Y Y + ;; ; + ;> > = ;
>Y Y + >; ; + >> > = >
Gauss elimination is a technique for solving simultaneous linear algebraic equations. It reduces the
coefficient matrix in to an equivalent upper triangular matrix through a sequence of elementary
operations carried out on the augmented matrix. The vector b is also modified in the process. The
solution vector {x} is obtained by a backward substitution procedure. It is assumed YY ≠0. The
method can be described by the following steps:
Step 1: To eliminate Y from the second and third equations using the first equation, following
operations are performed:
œª − ? Óe œY → œª for i=2,3
?
ee

Step 2: To eliminate x2 from the third equations using the second equation, following operations
are performed:
œª − œ; → œª for i=3
?Ó:
?::

After these two steps, we will get an equivalent system of linear equation given as:
YY Y + Y; ; + Y> > = Y .
;; ′; + ;> ′> = ; ′
>> ′′> = > ′′
Step 3: To findY , ; and > , we apply back substitution
EXAMPLE 3.6: Solve the system of equation by Gauss-Elimination method.
2x + 3 y − z = 5
4 x + 4 y − 3z = 3
2x − 3 y + 2z = 2

3 −1 x
SOLUTION: We can write the system as
2 5
ö4 4 −3÷   = ö3÷
y
2 −3 2 z 2
Now let us apply elementary row operations on the augmented matrix

Prepared by Haileyesus T., UOG Page 73


3 −1 ∶5
2
4 −3 ∶ 3÷
ö4
|: M;|e →|:

−3 2 ∶ 2
|= M|e →|=
2
2 3 −1 ∶5
œ> + 3œ; → œ> ö0 2 1 ∶ 7÷
0 −6 3 ∶ 3

2 3 −1 ∶ 5
ö0 2 1 ∶ 7÷
0 0 6 ∶ 18
Now the corresponding equivalent system of linear equation is
2x + 3y − z= 5
2y + z= 7
6 z = 18

Then solving these by back substitution, we have


p = 3, o = 2 „è  = 1
EXAMPLE 3.7: Solve the system of equations
3x + 3 y + 4 z = 20
2 x + y + 3z = 13
x + y + 3z = 6
Using the Gauss elimination method.

3 3 4 ∶ 20
SOLUTION: The augmented matrix is given b

ö2 1 3 ∶ 13÷
1 1 3 ∶6

3 3 4 ∶ 20
Now let us apply the an elementary row operation on to the augmented matrix

œ → œY ö2 1 3 ∶ 13÷
Y
> Y
1 1 3 ∶6

1 1 4/3 ∶20/3
ö2 1 3 ∶ 13 ÷
|: M;|e →|:

1 1 3 ∶ 6
|= M|e →|=

1 1 4/3 ∶ 20/3
ö0 −1 1/3 ∶ −1/3÷
0 0 5/3 ∶−2/3
Back substitution gives the solution as

Prepared by Haileyesus T., UOG Page 74


 = ( )( ) =
M; > M; Y
> C C C
,o= ,p= 7

EXAMPLE 3.8: Solve the system of equations using the Gauss elimination method
x + 10 y − z = 3
2 x + 3 y + 20 z = 7
9 x + 22 y + 79 = 45

1 10 −1 ∶ 3
SOLUTION: We have an augmented matrix

ö2 3 20 ∶ 7 ÷,
9 22 79 ∶45

10 −1 ∶ 3
Applying the elementary row operation on to the augmented matrix, we have
1
ö23 20 ∶ 7 ÷
|: M;|e →|:

22 79 ∶45
|= MU|e →|=
9
1 10 −1 ∶ 3
œ> − 4œ; → œ> ö0 −17 22 ∶ 1 ÷
0 −68 88 ∶18

1 10 −1 ∶ 3
ö0 −17 22 ∶ 1 ÷
0 0 0 ∶ 14
But we obtain that the third row elements in the coefficient matrix are all zero this leads us that
the rank of the coefficient matrix and augmented matrix have different value( i.e.
R(A)=2≠3=R(AG)), consequently the system is inconsistent and hence has no solution.
Mat lab Code 0f Gaussian elimination
function [x] = GaussianEliminate(A, b)
%work out the number of equations
N = length(b)
%Gaussian elimination
for column=1:(N-1)
%work on all the rows below the diagonal element
for row = (column+1):N
%work out the value of d
d = A(row,column)/A(column,column);
%do the row operation
A(row,:) = A(row,:)-d*A(column,:)
b(row) = b(row)-d*b(column)
end%loop through rows
end %loop through columns

Prepared by Haileyesus T., UOG Page 75


%back substitution
for row=N:-1:1
x(row) = b(row);
for i=(row+1):N
x(row) = x(row)-A(row,i)*x(i);
end
x(row) = x(row)/A(row,row);
end
%return the answer
x = x';
return
Output values
>>A=[3 3 4;2 1 3;1 1 3];
>> b=[20;13;6];
>> [x] = GaussianEliminate(A, b)
N=
3
A=
3.0000 3.0000 4.0000
0 -1.0000 0.3333
1.0000 1.0000 3.0000
b=
20.0000
-0.3333
6.0000
A=
3.0000 3.0000 4.0000
0 -1.0000 0.3333
0 0 1.6667
b=
20.0000
-0.3333
-0.6667
A=
3.0000 3.0000 4.0000
0 -1.0000 0.3333
0 0 1.6667
b=
20.0000
-0.3333
-0.6667
x=

Prepared by Haileyesus T., UOG Page 76


7.0000
0.2000
-0.4000
EXARCISE 3.1
Solve the system of equations using the Gauss elimination method
x + 4 y − z = −5 x − y + z =1
a) z + y − 4 z = −12 c) − 3 x + 2 y − 3z = −6
3x − y − z = 4 2x − 5 y + 4z = 5
5x + y + z + w = 4
x + 3 y + 6z = 2
x + 7 y + z + w = 12
b) x − 4 y + 2 z = 7 d)
x + y + 6 z + w = −5
3x − y + 4 z = 9
x + y + z + w = −6

REMARK: The elements YY ,;;



,>>
′′
which have been assumed to be non zero, are called Pivot
elements. Gauss elimination method fails if any one of the pivots in the above equations becomes
zero.
To overcome this difficulty, the equations are to be rewritten in a slightly different order such that
the pivot elements are not zero. The procedure is said to be pivoting. There are two types of
pivoting.
i) Partial pivoting method:
Select numerically largest coefficient of Y from all the equations ,and interchange the first
equation with the equation having largest coefficient of Y .In the second step select numerically
largest coefficient of ; is selected from („ − 1) equations, now we interchange the second
equation with the equation having largest coefficient of ; . We continue this process untill the last
equation .This procedure is called partial pivoting .These rearrangement is done if zero element is
found in diagonal position.
ii) Complete pivoting method: In this method, we select at each stage the numerically largest
coefficient of the entire matrix of coefficients. We may search the largest value not only in rows
but also in columns .After searching the largest value, we bring it at the diagonal position.
This method is called complete pivoting.
EXAMPLE 3.9: Solve the system of equations
x + 10 y − z = 3
2 x + 3 y + 20 z = 7
10 x − y + 2 z = 4

Prepared by Haileyesus T., UOG Page 77


Using the Gauss elimination with partial pivoting.

−1 ∶3
SOLUTION: We have the augmented matrix
1 10
ö2 3 20 ∶ 7÷
10 −1 2 ∶4
Since we must apply partial pivoting we perform the following elementary row transformations

10 −1 2 ∶ 4
and do the eliminations

œY ↔ œ> ö 2 3 20 ∶ 7÷
1 10 −1 ∶3
Then apply œ; − → œ; and œ> − → œ> ,we get
|e |e
C YT

10 −1 2 ∶ 4
ö0 3.2 19.6 ∶ 6.2÷
0 10.1 −1.2 ∶2.6

10 −1 2 ∶ 4
Since we must apply partial pivoting her also, we interchange R2 and R 3 Then we get

ö 0 10.1 −1.2 ∶ 2.6 ÷


0 3.2 19.6 ∶ 6.2

3.2œ;
Next we apply an elementary operation to eliminate y from the third row .Apply

œ> − → œ>
10.5

10 −1 2 ∶ 4
Then we get

ö0 10.1 −1.2 ∶ 2.6 ÷


0 0 19. 98020 ∶ 5 .37624
This means
10 − o + 2p = 4
10.1o − 1.2p = 2.6
19.98020p = 5.37624
Then by back substitution the solution is:
p=[Link];T = 0.26908,o = 0.28940,  = 0.37512
C .>XE;A

REMARK: Gauss elimination method is a direct method. Therefore, it is possible to count the
total number of operations, that is, additions, subtractions, divisions and multiplications. Without
going into details, in the „„ system of linear equations the total number of divisions and
multiplications (division and multiplication take the same amount of computer time) is n (n2+ 3n–

Prepared by Haileyesus T., UOG Page 78


1)/3. The total number of additions and subtractions (addition and subtraction take the same
amount of computer time) is n(n– 1)(2n+ 5)/6.
Mat lab Code to do Gaussian elimination with partial pivoting
function [x] = GaussianEliminatepar(A, b)
% Solves Ax = b by Gaussian elimination
%work out the number of equations
N = length(b);
%Gaussian elimination
for column=1:(N-1)
%swap rows so that the row we are using to eliminate
%the entries in the rows below is larger than the
%values to be eliminated.
[dummy,index] = max(abs(A(column:end,column)));
index=index+column-1;
temp = A(column,:);
A(column,:) = A(index,:);
A(index,:) = temp;
temp = b(column)
b(column)= b(index);
b(index) = temp;
%work on all the rows below the diagonal element
for row =(column+1):N
%work out the value of d
d = A(row,column)/A(column,column);
%do the row operation (result displayed on screen)
A(row,column:end) = A(row,column:end)-d*A(column,column:end) ;
b(row) = b(row)-d*b(column);
end%loop through rows
end %loop through columns
%back substitution
for row=N:-1:1
x(row) = b(row);

Prepared by Haileyesus T., UOG Page 79


for i=(row+1):N
x(row) = x(row)-A(row,i)*x(i);
end
x(row) = x(row)/A(row,row);
end
x = x'
return
output values
>> A=[1 10 -1;2 3 20;10 -1 2];
>> b=[3;7;4];
>> [x] = GaussianEliminatepar(A, b)
temp =
3
temp =
6.2000
x =
0.3751
0.2894
0.2691
x =
0.3751
0.2894
0.2691
EXERCISE 3.2
Solve the system of equations using the Gauss elimination method with partial pivoting.
2 x + 10 y + z = 13 2 x − 3 y + 2 z = 25
a) x + 2 y + z = 14 b) 3 x + y − z = −18
4 x + y + z = 12 x + y − 2 z = −17

x+ 2y − 3z =4 3x + 5 y + 2 z =4
c) − 3y + − 4 y + 7x = 5 d) 8 y + 2 z = −7
6 z + 8x − 9 y = 1 6 x + 2 y + 8 z = 26

Prepared by Haileyesus T., UOG Page 80


3.1.4 Gauss-Jordan method
Gauss-Jordan method is an extension of the Gauss elimination method. The set of equations Ax= b
is reduced to a diagonal set b 6= b', where b is a unit matrix. The solution vector is therefore
obtained directly from b'. The Gauss-Jordan method implements the same series of operations as
implemented by Gauss elimination process. The main difference is that it applies these operations
below as well as above the diagonal such that all off-diagonal elements of the matrix are reduced
to zero.
The Gauss-Jordan method is highly used due to its stability and direct procedure. The Gauss-
Jordan method requires more computational effort than Gauss elimination process. The series of
operations performed are quite similar to the Gauss elimination method. In the Gauss elimination
method, an upper triangular coefficient matrix is derived while in the Gauss-Jordan method an
identity coefficient matrix is derived. Hence, back substitutions are not required in Gauss –Jordan
method.
EXAMPLE 3.10: Solve the following system of equations
x + y + z =1
4x + 3 y − z = 6
3x + 5 y + 3 z = 4
using the Gauss-Jordan method.

1 1 1 ∶1
SOLUTION: We have the augmented matrix a

ö4 3 −1 ∶6÷
3 5 3 ∶4
Now let us apply an elementary operation on the augmented matrix

œ; − 4œY → œ; 1 1 1 ∶ 1
Apply

ö4 3 −1 ∶6÷
œ> − 3œY → œ>
3 5 3 ∶4

œ> + 2œ; → œ> 1 1 1 ∶1


Apply

ö0 −1 −5 ∶2÷
œY + œ; → œY
0 2 0 ∶1

1 0 −4 ∶ 3
Apply
−1
œ> → œ> ö0 −1 −5 ∶ 2÷
10
0 0 −10 ∶5

Prepared by Haileyesus T., UOG Page 81


1 0 −4 ∶ 3
Apply

5œ> → œ;
ö0 −1 −5 ∶ 2 ÷
œY + 4œ> → œY
0 0 1 ∶ −1/2

0 ∶ 1
Apply
1 0
−œ; → œ; ö0 −1 0 ∶ −1/2÷
0 0 1 ∶−1/2
1 0 0 ∶ 1
ö0 1 0 ∶ 1/2 ÷ , b 6=
0 0 1 ∶−1/2
[ w/h is linear system of the form b' ]

Hence directly the solution of the system is given by  = 1 ,o = 1/2 ,p = −1/2


EXAMPLE 3.12: Solve the following equations by Gauss-Jordan method.
x + 3 y + 2 z = 17
x + 2 y + 3 z = 16
2 x − y + 4 z = 13

1 3 2 ∶ 17
SOLUTION: We have the augmented matrix a

ö1 2 3 ∶ 16÷
2 −1 4 ∶13
Now let us apply an elementary operation on the augmented matrix

2 ∶ 17
Apply
œ; − œY → œ; 1 3
ö1 2 3 ∶ 16÷
œ> − 2œY → œ>
2 −1 4 ∶13

œ> − 7œ; → œ> 1 3 2 ∶ 17


Apply

ö0 −1 1 ∶ −1 ÷
œY + 3œ; → œY
0 −7 0 ∶−21

5 ∶ 14
Apply

−1 1 0
œ> → œ> ö0 −1 1 ∶ −1 ÷
7
0 0 −7 ∶ −14

5 ∶ 14
Apply

œ; − œ> → œ; 1 0
ö0 −1 1 ∶ −1÷
œY − 5œ> → œY
0 0 1 ∶2
Apply

Prepared by Haileyesus T., UOG Page 82


1 0 0 ∶ 4
−œ; → œ; ö0 −1 0 ∶ −3÷
0 0 1 ∶2
1 0 0 ∶4
ö0 1 0 ∶ 3÷ , b 6=
0 0 1 ∶2
[ w/h is a system linear of the form b' ]

Hence directly the solution of the system is given as = 4 ,o = 3,p = 2


REMARK: The Gauss-Jordan method looks very attractive as the solution is obtained directly.
However, it is computationally more expensive than Gauss elimination. For large n, the total
number of divisions and multiplications for Gauss-Jordan method is almost 1.5 times the total
number of divisions and multiplications required for Gauss elimination. The most important
application of this method is to find the inverse of a non-singular matrix. Partial pivoting can
also be done for Gauss –Jordan method using the augmented matrix.

1 2 2
EXAMPLE 3.13: Find the inverse of the matrix using the Gauss-Jordan method.

ö2 3 2 ÷
3 2 1

1 2 2 ∶ 1 0 0
SOLUTION: Consider the augmented matrix

ö2 3 2 ∶ 0 1 0 ÷
3 2 1 ∶ 0 0 1
We perform the following elementary row operations and do the eliminations

2 ∶ 1 0
Apply
œ; − 2œY → œ; 1 2 0
ö2 3 2 ∶ 0 1 0 ÷
œ> − 3œY → œ>
3 2 1 ∶ 0 0 1

œ> + 4œ; → œ> 1 2 2 ∶ 1 0 0


Apply

ö0 −1 −2 ∶ −2 1 0 ÷
œY + 2œ; → œY
0 −4 −5 ∶ −3 0 1

1 0 −2 ∶ −3 2 0
Apply
1
œ → œ> ö0 −1 −2 ∶−2 1 0 ÷
3 >
0 0 3 ∶ 5 −4 1

0 −2 ∶ −3 2 0
Apply
1
−œ; → œ; ö0 1 2 ∶ 2 −1 0 ÷
0 0 1 ∶ 5/3 −4/3 1/3

Prepared by Haileyesus T., UOG Page 83


1 0 −2 ∶ −3 2 0
Apply

ö0 1 2 ∶ 2 −1 0 ÷
|: M;|= →|:

0 0 1 ∶ 5/3 −4/3 1/3


|e _;|= →|e

1 0 0 ∶ 1/3 2/3 2/3


ö0 1 0 ∶ −4/3 5/3 −2/3 ÷
0 0 1 ∶ 5/3 −4/3 1/3
Therefore, the inverse of the matrix is given by
1/3 −2/3 2/3 1 −2 2
ö−4/3 5/3 −2/3 ÷ = ö−4 5 −2÷
Y
>
5/3 −4/3 1/3 5 −4 1

1 2 1
EXAMPLE 3.14: Find the inverse of the matrix using the Gauss-Jordan method.

ö2 3 −1 ÷
2 −1 3

1 2 1 ∶ 1 0 0
SOLUTION: Consider the augmented matrix

ö2 3 −1 ∶ 0 1 0 ÷
2 −1 3 ∶ 0 0 1
We perform the following elementary row operations and do the eliminations

œ; − 2œY → œ; 1 2 1 ∶ 1 0 0
Apply

ö2 3 −1 ∶ 0 1 0 ÷
œ> − 2œY → œ>
2 −1 3 ∶ 0 0 1

œ> − 5œ; → œ> 1 2 2 ∶ 1 0 0


Apply

ö0 −1 −3 ∶−2 1 0 ÷
œY + 2œ; → œY
0 −5 1 ∶ −2 0 1

1 0 −4 ∶ −3 2
Apply
1 0
œ> → œ> ö0 −1 −2 ∶−2 1 0 ÷
16
0 0 16 ∶ 8 −5 1

œ; + 2œ> → œ> 1 0 −4 ∶ −3 2 0
Apply

ö0 −1 −2 ∶ −2 1 0 ÷
œY + 2œ> → œY
0 0 1 ∶ 1/2 −5/16 1/16
Apply

Prepared by Haileyesus T., UOG Page 84


1 0 0 ∶ −1/2 7/16 5/16
−œ; → œ; ö0 −1 0 ∶ 2 −1/16 −3/16 ÷
0 0 1 ∶ 1/2 −5/16 1/16

1 0 0 ∶ −1/2 7/16 5/16


ö0 1 0 ∶ 2 −1/16 −3/16 ÷
0 0 1 ∶ 1/2 −5/16 1/16
Therefore, the inverse of the matrix is given by
−1/2 7/16 5/16 −8 7 5
ö 2 −1/16 −3/16 ÷ = ö 32 −1 −3÷
Y
YE
1/2 −5/16 1/16 8 −5 1
EXARCISE 3.3
1. Solve the system of equations using the Gauss elimination method.
4x − y + z = 8 2x + 3 y − z = 4
a) 2 x + 5 y + 2 z = 3 b) x − 2y + z = 6
x + 2 y + 4 z = 11 x − 12 y + 5 z = 10
2. Solve the system of equations using the Gauss-Jordan method.
x + 3 y + 6z = 2 x + 4 y − z = −5
a) 3x − y + 4 z = 9 b) x + y − 6 z = −12
x − 4 y + 2z = 7 3x − y − z = 4

1 1 1 1 2 3
3. Find the inverse of the matrix using the Gauss-Jordan method.

ö4 3 −1 ÷ b) ö 2 3 1 ÷
3 5 3 −1 0 2
a)

Prepared by Haileyesus T., UOG Page 85


3.1.5 LU -Decomposition
Consider the following system of linear simultaneous equations:
YY Y + Y; ; + Y> > = Y
;Y Y + ;; ; + ;> > = ; ………..(3.6)
>Y Y + >; ; + >> > = >

YY Y; Y>


LU -Decomposion method is applicable when

 Y;
|YY | ≠ 0 ,LYY  ;; ;> ≠ 0
;; L ≠ 0 , ;Y
;Y
>Y >; >>
It is possible to show that any square matrix A can be expressed as a product of a lower triangular
matrix L and an upper triangular matrix U.
A=LU

YY Y; Y> lYY lY; lY>


For instance
“YY 0 0
ö;Y ;; ;> ÷ =ö“;Y “;; 0 ÷ö 0 l;; l;> ÷
>Y >; >> “>Y “>; “>> 0 0 l>>
The process of computing Land U for a given A is known as LU Decomposition or LU
Factorization. LU decomposition is not unique (the combinations of Land U for a prescribed A are
endless), unless certain constraints are placed on L or U. These constraints distinguish one type of
decomposition from another.
When we choose “ªª =1 or lªª =1, we produce a unique solution. Two commonly used
decompositions are given below
a) If we choose lªª =1 , i= 1, 2, ..., n the method is Crout’s decomposition.
b) If we choose “ªª =1 , i= 1, 2, ..., n the method is Doolittle's decomposition.
After decomposing the matrix A, it is easier to solve the eq. (3.6) and we can rewrite it as
LUX= b ……… (3.7)
Denoting
UX= K …….. (3.8)
‡Y
Where K=ö‡; ÷.
‡>
Then eq. (3.6) can be written as
LK =b …….. (3.9)

Prepared by Haileyesus T., UOG Page 86


Solving eq. (3.9) we obtain the value of column matrix K. Then finally substitute these values in
eq. (3.8) and solving by back substitution we obtain the solution X.

EXAMPLE 3.15: Solve the following set of equations by LU-Decomposition:


2 x + y + 4 x = 12
8 x − 3 y + 2 z = 20
4 x + 11 y − z = 33

2 1 4  12
SOLUTION: We have

A = ö8 −3 2 ÷, X=o and b = ö20÷


4 11 −1 p 33
Let A = LU , where
“YY 0 0 1 lY; “Y>
L=ö“;Y “;; 0÷ U=ö0 1 “;> ÷
“>Y “>; “>> 0 0 1
Then,
2 1 4 “YY 0 0 1 lY; “Y>
ö8 −3 2 ÷ = ö“;Y “;; 0 ÷ ö0 1 “;> ÷
4 11 −1 “>Y “>; “>> 0 0 1
2 1 4 “YY “YY lY; “YY lY>
ö8 −3 2 ÷ = ö“;Y “;; lY; + “;; “;Y lY> + “;; l;> ÷
4 11 −1 “>Y “>Y lY; + “>; “>Y lY> + “>; l;> + “>>
“YY lY; =1 ⇒ lY; =
Y
;

“YY lY> =4 ⇒ lY> = =2


A
;

“YY + “;Y lY; =-3⇒ “;; =-3 - 8( ) = −7


Y
;

“>; + “;Y lY; =-3⇒ “>; = 11 − 4( ) = 9


Y
;

“;Y lY> + “;; l;> = 2 ⇒ l;> =


;MV(;)
MX
=2

“>Y lY> + “>; l;> + “>> = −1 ⇒ “>> = −1 − 4(2) − 9(2) = −27


Hence
2 0 0 1 1/2 2
 = ö8 −7 0 ÷ and  = ö0 1 2÷
4 9 −27 0 0 1
Now
LK=b

Prepared by Haileyesus T., UOG Page 87


2 0 0 ‡Y 12
ö8 −7 0 ÷ ö‡; ÷ =ö20÷
4 9 −27 ‡> 33
From this, by forward substitution, we get
‡Y = 6,‡; = 4,‡> = 1
And then, to get the solution we use

2 
UX=K
1 1/2 6
ö0 1 2 ÷  o  4÷
0 0 1 p 1

By backward substitution, the solution is given as:


 = 3, o = 2, p = 1
EXAMPLE 3.15: Solve the following set of equations by using the LU-Decomposition method.
2x + y + z = 7
x + 2y + z = 8
x + y + 2z = 9

2 1 1  7
SOLUTION: We have

A = ö1 2 1÷,X=o and b = ö8÷


1 1 2 p 9
Ax =b
Let A = LU , where
“YY 0 0 1 lY; “Y>
“
L=ö ;Y “;; 0÷ U=ö0 1 “;> ÷
“>Y “>; “>> 0 0 1
Then,
2 1 1 “YY 0 0 1 lY; “Y>
ö1 “
2 1÷ = ö ;Y “;; 0 ÷ ö0 1 “;> ÷
1 1 2 “>Y “>; “>> 0 0 1
2 1 1 “YY “YY lY; “YY lY>
ö1 2 1 ÷ ö “ ;Y “;; lY; + “;; “;Y lY> + “;; l;> ÷
1 1 2 “>Y “>Y lY; + “>; “>Y lY> + “>; l;> + “>>
=

From this we have


“YY = 2,“;Y = 1,“>Y = 1, lY; =; , lY> =;
Y Y

“;; + “;Y lY; =2⇒ “;; =2 - 1(;) =


Y >
;

Prepared by Haileyesus T., UOG Page 88


“>; + “;Y lY; =1⇒ “>; = 1 − 1( ) =
Y Y
; ;

“;Y lY> + “;; l;> = 1 ⇒ l;> =


Y
>

“>Y lY> + “>; l;> + “>> = −1 ⇒ “>> = >


A

Hence
2 0 0 1 1/2 1/2
=ö1 3/2 0 ÷ and  = ö0 1 1/3÷
1 1/3 4/3 0 0 1
Now
LK=b
2 0 0 ‡Y 7
ö1 3/2 0 ÷ ö‡; ÷= ö8÷
1 1/3 4/3 ‡> 9
From this, by forward substitution, we get
‡Y = 3.5,‡; = 3,‡> = 3
And then, to get the solution we use

1/2 
UX=K
1 1/2 3.5
ö0 1 1/3÷ o =ö 3 ÷
0 0 1 p 3
By backward substitution, the solution is given as:
 = 1, o = 2, p = 3
EXAMPLE 3.17: Solve the following set of equations by using the LU-Decomposition method
x+ y−z =2
2 x + 2 y + 5 z = −3
3x + 2 y − 3z = 6


SOLUTION: We have
1 1 −1 2
A = ö2 2 5 ÷, X=o and b = ö−3÷
3 2 −3 p 6
Let A = LU , where
“YY 0 0 1 lY; “Y>
L=ö“;Y “;; 0÷ U=ö0 1 “;> ÷
“>Y “>; “>> 0 0 1
Then,

Prepared by Haileyesus T., UOG Page 89


1 1 −1 “YY 0 0 1 lY; “Y>
ö2 2 5 ÷ = ö“;Y “;; 0 ÷ ö0 1 “;> ÷
3 2 −3 “>Y “>; “>> 0 0 1
1 1 −1 “YY “YY lY; “YY lY>
ö2 2 5 ÷ = ö“;Y “;Y lY; + “;; “;Y lY> + “;; l;> ÷
3 2 −3 “>Y “>Y lY; + “>; “>Y lY> + “>; l;> + “>>
From this we have
“YY = 1,“;Y = 2,“>Y = 3, lY; =1 , lY> =-1
“;; + “;Y lY; =2 ⇒ “;; =2 – 2(1) = 0
Therefore, the LU decomposition method fails as the pivot “;; = 0.
We note that the coefficient matrix is not positive definite and hence LU decomposition is not
guaranteed. However, if we interchange the equations as
3x + 2 y − 3 z = 6
2 x + 2 y + 5 z = −3
x+ y−z =2
Then the LU decomposition of A can be obtained. In this case, we obtain
3 2 −3 “YY 0 0 1 lY; “Y>
ö2 2 5 ÷ ö“ ;Y “;; 0 ÷ ö0 1 “;> ÷
1 1 −1 “>Y “>; “>> 0 0 1
=

3 2 −3 “YY “YY lY; “YY lY>


ö2 2 5 ÷ = ö“;Y “;Y lY; + “;; “;Y lY> + “;; l;> ÷
1 1 −1 “>Y “>Y lY; + “>; “>Y lY> + “>; l;> + “>>
From this we have
“YY = 3,“;Y = 2,“>Y = 1, lY; =2/3 , lY> =-1

“;; + “;Y lY; =2 ⇒ “;; =2 – 2(2/3) = >


;

“>; + “>Y lY; =1⇒ “>; = 1 −   1 =


; Y
> >

“;Y lY> + “;; l;> = 5 ⇒ l;> =


;Y
;

“>Y lY> + “>; l;> + “>> = −1 ⇒ “>> = −


X
>

3 0 0
Hence
1 2/3 −1
 = ö2 3/2 0 ÷ and  = ö0 1 21/2÷
1 1/3 −7/3 0 0 1
Now
LK=b

Prepared by Haileyesus T., UOG Page 90


3 0 0 ‡Y 6
ö2 3/2 0 ÷ ö‡; ÷= ö−3÷
1 1/3 −7/3 ‡> 2
From this, by forward substitution, we get
‡Y = 2,‡; = −14/3,‡> = 2/3
And then, to get the solution we use

2
UX=K
1 2/3 −1 
ö0 1 21/2÷ o =ö−14/3÷
0 0 1 p 2/3
By backward substitution, the solution is given as:
 = 82/9, o = −35/3, p = 2/3
EXERCIS 3.4
Solve the following set of equations by using the LU-Decomposition method

2x + 2 y + z = 1 2x + y + z + w = 2
a) 4 x + 3 y + 3z = 2 4 x + 0. y + 2 z + w = 3
x+ y+z =3 3x + 2 y + 2 z + 0 w = −1
b) x + 3 y + 2 z + 6w = 2

3.1.6 Cholesky’s Decomposition


Consider the system of linear equations:
YY Y + Y; ; + Y> > = Y
;Y Y + ;; ; + ;> > = ; ………..(3.10)
>Y Y + >; ; + >> > = >
This method is also known as the square-root method. If the coefficient matrix A is symmetric

A = 
and positive definite, then the matrix A can be decomposed as
………. (3.11)
“YY 0 0
Where  = ö“;Y “;; 0 ÷ is a lower triangular matrix ( i.e L = (lij), lij =0,i<j.
“>Y “>; “>>

A =  
Alternatively, A may be decomposed as

From eq. (3.11), the system in eq. (3.10) becomes

Prepared by Haileyesus T., UOG Page 91


 X=b ………(3.12)
This may be written as
LtX=k ……… (3.13)
Then eq. (3.12) becomes
Lk= b ……… (3.14)
Here first we find the lower triangular matrix and then solve the value of k from eq. (3.14) after
that substituting this in eq.(3.13) we obtain the value of the unknowns .
Cholesky’s decomposition method is faster than the LU decomposition. There is no need for
pivoting. If the decomposition fails, the matrix is not positive definite.
EXAMPLE 3.18: Solve the following set of equations by using the Cholesky's method.
x + 2 y + 3z = 5
2 x + 8 y + 22 z = 6
3x + 22 y + 82 z = −10


SOLUTION: We have
1 2 3 5
A = ö2 8 22÷, X=o and b = ö 6 ÷
3 22 82 p −10
Let A =  , where
“YY 0 0 “YY “Y; “Y>
L=ö“;Y “;; 0÷ and  =ö 0
 “;; “;> ÷
“>Y “>; “>> 0 0 “>>
Then
1 2 3 “YY 0 0 “YY “Y; “Y>
ö2 8 22÷= ö“;Y “;; 0 ÷ö 0 “;; “;> ÷
3 22 82 “>Y “>; “>> 0 0 “>>
“YY ; “YY “Y; “YY “Y>
= “;Y “YY “;Y ; + “;; ; “;Y “Y> + “;; “;> 
“>Y “YY “>Y “Y; + “>; “;; “>Y ; + “>; ; + “>> ;
“YY = 1, “;Y “YY = 2 → “;Y= 2, “>Y “YY= 3→ “>Y = 3
“Y; ; + “;; ; = 8 → “;; =8−4 = 2,
“>Y “Y; + “>; “;; =22→ “>; =8
“>Y ; + “>; ; + “>> ; =82 → “>> =3
Hence, we get

Prepared by Haileyesus T., UOG Page 92


1 0 0
 = ö2 2 0÷
3 8 3

‡ = 
Then using eq. (3.14)

1 0 0 ‡Y 5
ö2 2 0÷ ö‡; ÷ = ö 6 ÷
3 8 3 ‡> −10
From this, solving by forward substitution, we get ‡Y = 5, ‡; = -2 and ‡> = -3. Finally using
 6 = ‡
1 2 3  5
ö0 2 8÷   = ö−2÷
o
0 0 3 p −3
Solving this by backward substitution, we obtain the solution
 = 2, o = 3, p = −1
EXAMPLE 3.19: Solve the following set of equations by using the Cholesky's method.
2x + y + z = 7
x + 2y + z = 8
x + y + 2z = 9
SOLUTION: To make our work simple, let us rewriting the example as
x + 2y + z = 8
2x + 5 y + z = 7
x + y + 6z = 9


We have
1 2 1 8
A = ö2 5 1÷, o  ö 7÷
1 1 6 p 9
X= and b =

Let A =  , where


“YY 0 0 “YY “Y; “Y>
L= ö“;Y “;; 0÷ and  = ö 0
 “;; “;> ÷
“>Y “>; “>> 0 0 “>>
Then
1 2 1 “YY 0 0 “YY “Y; “Y>
ö2 5 1÷ = ö“;Y “;; 0 ÷ö 0 “;; “;> ÷
1 1 6 “>Y “>; “>> 0 0 “>>

Prepared by Haileyesus T., UOG Page 93


“YY ; “YY “Y; “YY “Y>
= “;Y “YY “;Y ; + “;; ; “;Y “Y> + “;; “;> 
“>Y “YY “>Y “Y; + “>; “;; “>Y ; + “>; ; + “>> ;
“YY = 1, “Y; “YY = 2 → “Y; = 2, “>Y “YY= → “>Y =1
“Y; ; + “;; ; = 1 → “;; =5−4 = 1,
“>Y “Y; + “>; “;; =1→ “>; =−1
“>Y ; + “>; ; + “>> ; =6 → “>> =2
Hence, we get
“YY 0 0
L = ö“;Y “;; 0 ÷ = ö2 0÷
1 0 0

“>Y “>; “>> −1


1
1 2
Then using
‡ = 
1 0 0 kY 8
ö2 1 0÷ ök ; ÷ = ö7÷
1 −1 2 k > 9
From this, solving by forward substitution, we get ‡1 = 8, ‡2 = -9 and ‡3 = -4. Finally using
LtX =k
1 2 1 x 8
ö0 1 −1÷   = ö−9÷
y
0 0 2 z −4
Solving this by backward substitution, we obtain the solution
 = 28, o = −9, p = −2
EXAMPLE 3.20: Solve the following set of equations by using the Cholesky's method.
4 x + 10 y − 2 z = 33
8 x + 26 y + z = 25
− 2 x + y + 41z = 29
SOLUTION: We have
SOLUTION:
4 10 −2  33
A = ö8 26 1 ÷, X=o and b = ö25÷
2 1 4 p 12
Let A =  , where
“YY 0 0 “YY “Y; “Y>
L= ö“;Y “;; 0÷ and  = ö 0
 “;; “;> ÷
“>Y “>; “>> 0 0 “>>
Then

Prepared by Haileyesus T., UOG Page 94


4 10 −2 “YY 0 0 “YY “Y; “Y>
ö8 26 1 ÷= ö“;Y “;; 0 ÷ö 0 “;; “;> ÷
−2 1 41 “>Y “>; “>> 0 0 “>>
“YY ; “YY “Y; “YY “Y>
= “;Y “YY “;Y ; + “;; ; “;Y “Y> + “;; “;> 
“>Y “YY “>Y “Y; + “>; “;; “>Y ; + “>; ; + “>> ;
“YY = 2, “Y; “YY = 10 → “Y;= 5, “>Y “YY =-2 → “>Y =-1
“Y; ; + “;; ; = 26 → “;; =26−25 = 1,
“>Y “Y; + “>; “;; =1 → “>; = 6
“>Y ; + “>; ; + “>> ; =41 → “>> =2
Hence, we get
“YY 0 0 2 0 0
L =ö“;Y “;; 0÷=ö 5 1 0÷
“>Y “>; “>> −1 6 2
Then using eq. (3.14)
‡ = 
2 0 0 ‡Y 33
ö 5 1 0÷ ö‡; ÷ = ö25÷
−1 6 2 ‡> 29
From this, solving by forward substitution, we get ‡Y = 11, ‡; = 30 and ‡> = 70. Finally using
 X=k
2 5 −1  11
ö0 1 6 ÷ o = ö30÷
0 0 2 p 70
Solving this by backward substitution, we obtain the solution
 = 473, o = −180, p = 35
EXERCISE 3.5
Solve the following set of equations by using the Cholesky's method.
10 x + y + z = 12 x + y + z =1
a) 2 x + 10 y + z = 13 c) 4x + 3 y − z = 6
x + y + 5z = 7 3x + 5 y + 3 z = 4
x + 3 y + 3 z = 16
b) x + 4 y + 3 z = 18
x + 3 y + 4 z = 19

Prepared by Haileyesus T., UOG Page 95


3.1.7 Partition Method
This method is usually used to find the inverse of a large nonsingular square matrix by
partitioning. Let A be partitioned as

where B, C, E, D, are of orders QQ, Q§, §Q and §§ respectively, with Q + § = „. Similarly,
we partition åMY as

where X, Y, Z and V are of the same orders as B, C, E and D respectively. Using the identity

We obtain
V= (D − EBMY C)MY , Y= −B MY CV,
Z=-VEB MY , X=−B MY −BMY CZ
where we have assumed that !M exists. If !M does not exist but "M exists then the equationscan
be modified suitably. This procedure requires finding the inverse of two lower order matrices,
!M and (# − $!M %)M .

1 1 1
EXAMPLE 3.21: Determine the inverse of the matrix

ö4 3 −1÷
3 5 3
using the partition method. Hence, find the solution of the system of equations
x + y + z =1
4x + 3 y − z = 6
3x + 5 y + 3 z = 4
SOLUTION: Let the matrix Abe partitioned as

Now,

Prepared by Haileyesus T., UOG Page 96


1 1 MY 3 −1
ø MY = ¼ ½ = −¼ ½
4 3 −4 1
3 −1 1
D − Eø MY C= 3+(3 5)   = -10
−4 1 −1
V= (D − Eø MY C)MY = − YT
Y

3 −1 MY 1 4
Y= −ø MY CV = −    (− ) = (− ) 
Y Y
−4 1 −1 YT YT −5

3 −1 MY
Z=-VEø MY = (− ) (3 5)   = − (-11 2)
Y Y
YT −4 1 YT

X =−ø MY −ø MY CZ
−3 1 −3 1 1
=  − (− )    (-11 2)
Y
4 −1 YT 4 −1 −1
1.4 0.2
= 
−1.5 0

1.4 0.2 −0.4


Hence

&M = ö−1.5 0 0.5 ÷


1.1 −0.2 −0.1


The solution of the given system of equations is
1.4 0.2 −0.4 1 1
X=o = ö−1.5 0 0.5 ÷ ö6÷= ö 0.5 ÷
p 1.1 −0.2 −0.1 4 −0.5

Prepared by Haileyesus T., UOG Page 97


3.2 ITERATIVE METHODS

So far, we have discussed only direct methods of solution. The common characteristic of these
methods is that they compute the solution with a finite number of operations. Moreover, if the
computer were capable of infinite precision (no round off errors), the solution would be exact.
Iterative, or indirect methods, start with an initial guess of the solution x and then repeatedly
improve the solution until the change in x becomes negligible. Since the required number of
iterations can be large, the indirect methods are, in general, slower than their direct counter parts.
However, iterative methods do have the following advantages that make them attractive for certain
problems:
a) Possible to deal with very large matrices that are sparse, but not necessarily
banded.
b) Iterative procedures are self-correcting, meaning that round off errors (or
even arithmetic mistakes) in one iterative cycle are corrected in subsequent
cycles.
Iterative methods are based on the idea of successive approximations. We start with an initial
approximation to the solution vector  =  (T) , to solve the system of equations Ax = b, and
obtain a sequence of approximate vectors  (Y) , (;) ,…,  (b) . We stop the iteration procedure when
the magnitudes of the differences between the two successive iterates is significantly small.
The sufficient condition for the use of these methods is that the diagonal elements of the
coefficient matrix must be dominant. That means if ªª , i=1,2,3,…n are diagonal elements then
|ªª | ≥ ∑bõ)1(ªõ ( i=1,2,…,n
ª*õ

Diagonal dominant condition is a sufficient condition for convergence but it is also a necessary
condition. Under the category of iterative method, we shall describe the following two methods:
i) Jacobi’s method
ii) Gauss-Seidel method.
REMARK: A serious drawback of iterative methods is that they do not always converge to the
solution and it can be shown that convergence is guaranteed only if the coefficient matrix is
diagonally dominant. In the absence of any better estimate we take the initial approximation
(T , oT , pT ) = (0,0,0) for the iterative methods

Prepared by Haileyesus T., UOG Page 98


3.2.1 Jacobi's iterative or Gauss-Jacobi's method
Let us consider the system of simultaneous equation
YY Y + Y; ; + ⋯ + Yb b = Y
;Y Y + ;; ; + ⋯ + ;b b = ;
⋮ ⋮ ⋯ ⋱ ⋮
…………. (3.15)
bY Y + b; ; + ⋯ + bb b = b
Such that YY , ;; , …, bb are the largest coefficients of Y , ; , …, b respectively. So that
convergence is assured. If it is not in a diagonally dominant form, it should be connected to a
diagonally dominant form by row exchanger, before starting the Gauss-Jacobi's iterative scheme.
Rearranging the above system of equations and rewriting in terms of Y , ; , …, b as:

Y = Y − Y; ; − Y> > − ⋯ − Yb b 


Y
?ee

; = ; − ;Y Y − ;> > − ⋯ − ;b b 


Y
?::

… … … … … … … … … … … … … … … … … … … … …. ……………..(3.16)
b = b − bY Y − b; ; − ⋯ − bbMY bMY 
Y
?ff

Let Y , ; , … , b be the initial approximations of the unknowns Y , ; , … , b . Then, the first


(T) (T) (T)

approximation are given by


Y = Y − Y; ; − Y> > − ⋯ − Yb b 
(Y) Y (T) (T) (T)
?ee

; = ; − ;Y Y − ;> > − ⋯ − ;b b 


(Y) Y (T) (T) (T)
?::

…………………………………………………
b = ? b − bY Y − b; ; − ⋯ − bbMY bMY 
(Y) Y (T) (T) (T)
ff

Similarly, the second approximations are given by


Y = ? Y − Y; ; − Y> > − ⋯ − Yb b 
(;) Y (Y) (Y) (Y)
ee

; = ; − ;Y Y − ;> > − ⋯ − ;b b 


(;) Y (Y) (Y) (Y)
?::

… … … … … … … … … … … … … … … … … … …,
b = b − bY Y − b; ; − ⋯ − bbMY bMY 
(;) Y (Y) (Y) (Y)
?ff

Proceeding in the same way, if Y , ; , … , b


(b) (b) (b)
are the (n)th iterates, then the (n+1)th iteration
can be obtained by using the following

Y = Y − Y; ; − Y> > − ⋯ − Yb b 


(b_Y) Y (b) (b) (b)
?ee

Prepared by Haileyesus T., UOG Page 99


; = ; − ;Y Y − ;> > − ⋯ − ;b b 
(b_Y) Y (b) (b) (b)
?::

… … … … … … … … … … … … … … … … … … …,

b =? ¼b − bY Y − b; ; − ⋯ − bbMY bMY ½


(b_Y) Y (b) (b) (b)
ff

EXAMPLE 3.22: Solve the following system of equation using Jacobi’s method
5 x − y + z = 10
2 x + 4 y = 12
x + y + 5 z = −1
Start with the solution (2, 3, 0).
SOLUTION: The coefficient matrix of the given system is diagonally dominant hence we can
write the system as:
 = C 10 +o − p
Y

o = A 12 − 2
Y

p = C −1 −  − o
Y

Now, if we assume,( (T) , o (T) , p (T) ) = (2, 3, 0) as initial approximation:


First approximation:
 (Y) = 10 +o (T) − p (T)  = 2.6
Y
C

o (Y) = 12 − 2 (T)  = 2.0


Y
A

p (Y) = −1 −  (T) − o (T)  = −1.2


Y
C

Second approximation:
 (;) = 10 +o (Y) − p (Y)  =2.64
Y
C

o (;) = 12 − 2 (Y)  =1.70


Y
A

p (;) = −1 −  (Y) − o (Y)  =-1.12


Y
C

Third approximation:
 (>) = C 10 +o (;) − p (;)  = 2.564
Y

o (>) = A 12 − 2 (;)  = 1.680


Y

p (>) = −1 −  (;) − o (;)  = -1.068


Y
C

Prepared by Haileyesus T., UOG Page 100


Fourth approximation:
 (A) = 10 +o (>) − p (>)  = 2.5496
Y
C

o (A) = 12 − 2 (>)  = 1.7180


Y
A

p (A) = −1 −  (>) − o (>)  = -1.0488


Y
C

Fifth approximation:
 (C) = C 10 +o (A) − p (A)  = 2.5534
Y

o (C) = 12 − 2 (A)  = 1.7252


Y
A

p (C) = −1 −  (A) − o (A)  = -1.05352


Y
C

Sixth approximation:
 (E) = C 10 +o (C) − p (C)  = 2.5557
Y

o (E) = A 12 − 2 (C)  = 1.7233


Y

p (E) = C −1 −  (C) − o (C)  = -1.05572


Y

Seventh approximation:
 (X) = 10 +o (E) − p (E)  = 2.5558
Y
C

o (X) = 12 − 2 (E)  = 1.72215


Y
A

p (X) = −1 −  (E) − o (E)  = -1.0558


Y
C

Hence, approximating solution after having some other approximations up to 3 decimal places is
 = 2.556, o = 1.722, p = – 1.055.
EXAMPLE 3.22: Solve the system
3 x + 4 y + 15 z = 54.8
x + 12 y + 3 z = 39.66
10 x + y − 2 z = 7.74
using Gauss-Jacobi's method.
SOLUTION: The coefficient matrix of the given system is not diagonally dominant. Hence, we
rearrange the equations such that the elements in the coefficient matrix are diagonally dominant .so
that the system can be written as:

Prepared by Haileyesus T., UOG Page 101


10 x + y − 2 z = 7.74
x + 12 y + 3 z = 39.66
3x + 4 y + 15 z = 54.8

1
Now to apply the Gauss-Jacobi's method let us write this system in the form:

= 7.74 − o + 2p
10
1
o= 39.66 −  − 3p
12
1
p= 54.8 − 3 − 4o
15
Now, since there is no initial approximation given, we start with initial the
approximation,( (T) , o (T) , p (T) ) = (0, 0, 0):
First approximation:
 (Y) = YT 7.74 − o (T) + 2p (T)  =0.774
Y

o (Y) = 39.66 −  (T) − 3p (T)  =3.305


Y
Y;

p (Y) = 54.8 − 3 (T) − 4o (T)  =3.6533


Y
YC

Second approximation:
 (;) = YT 7.74 − o (Y) + 2p (Y)  =1.1742
Y

o (;) = Y; 39.66 −  (Y) − 3p (Y)  =2.3272


Y

p (;) = YC 54.8 − 3 (Y) − 4o (Y)  =2.6172


Y

Third approximation:
 (>) = 7.74 − o (;) + 2p (;)  =1.0647
Y
YT

o (>) = 39.66 −  (;) − 3p (;)  =2.4568


Y
Y;

p (>) = 54.8 − 3 (;) − 4o (;)  =2.7979


Y
YC

Fourth approximation:
 (A) = 7.74 − o (>) + 2p (>)  =1.0879
Y
YT

o (A) = 39.66 −  (>) − 3p (>)  =2.5168


Y
Y;

p (A) = 54.8 − 3 (>) − 4o (>)  =2.7852


Y
YC

Prepared by Haileyesus T., UOG Page 102


Fifth approximation:
 (C) = 7.74 − o (A) + 2p (A)  =1.0792
Y
YT

o (C) = 39.66 −  (A) − 3p (A)  =2.5180


Y
Y;

p (C) = 54.8 − 3 (A) − 4o (A)  =2.7646


Y
YC

Sixth approximation:
 (E) = YT 7.74 − o (C) + 2p (C)  =1.0751
Y

o (E) = 39.66 −  (C) − 3p =2.5239


Y
Y;

p (E) = 54.8 − 3 (C) − 4o (C)  =2.7660


Y
YC

Seventh approximation:
 (X) = YT 7.74 − o (E) + 2p (E)  =1.0748
Y

o (X) = Y; 39.66 −  (E) − 3p (E)  =2.5239


Y

p (X) = YC 54.8 − 3 (E) − 4o (E)  =2.7653


Y

Therefore from the 6th and 7th approximation, the solution of the system is  = 1.075, o =
2.524, p = 2.765 approximated up to three decimal places.
EXAMPLE 3.23: solve the system
26 x + 2 y + 2 z = 12.6
3 x + 27 y + z = −14.3
2 x + 3 y + 17 z = 6
using Gauss-Jacobi's method.
SOLUTION: The coefficient matrix of the given system is diagonally dominant

1
Now to apply the Gauss-Jacobi's method let us write this system in the form:

= 12.6 − 2o − 2p
26
1
o= −14.3 − 3 − p
12
1
p= 6 − 2 − 3o
15
Now, since there is no initial approximation given, we start with initial the approximation
,( (T) , o (T) , p (T) ) = (0, 0, 0):

Prepared by Haileyesus T., UOG Page 103


First app
First approxima
roximation:
pproximation:
 (Y) = 12.6 − 2o (T) − 2p (T)  = 0.48462
Y
;E

o (Y) = −14.3 − 3 (T) −  (T)  =– 0.52963


Y
Y;

p (Y) = 6 − 2 (T) − 3o (T)  =0.35294


Y
YC

Second app
Second approxima
roximation:
pproximation:
 (;) = 12.6 − 2 (Y) − 2p (Y)  = 0.49821
Y
;E

o (;) = −14.3 − 3 (Y) − p (Y)  =– 0.59655


Y
Y;

p (;) = 6 − 2 (Y) − 3o (Y)  =0.38939


Y
YC

Third app
Third approxima
roximation:
pproximation:
 (>) = ;E 12.6 − 2o (;) − 2p (;)  = 0.50006
Y

o (>) = −14.3 − 3 (;) − p (;)  =– 0.59941


Y
Y;

p (>) = 6 − 2 (;) − 3o (;)  =0.39960


Y
YC

Fourth app
Fourt approxima
roximation:
pproximation:
 (A) = ;E 12.6 − 2o (>) − 2p (>)  = 0.50000
Y

o (A) = Y; −14.3 − 3 (>) − p (>)  =– 0.59999


Y

p (A) = YC 6 − 2 (>) − 3o (>)  =0.39989


Y

Fifth app
Fift approxima
roximation:
pproximation:
 (C) = ;E 12.6 − 2o (A) − 2p (A)  = 0.50001
Y

o (C) = Y; −14.3 − 3 (A) − p (A)  =– 0.60000


Y

p (C) = YC 6 − 2 (A) − 3o (A)  =0.40000


Y

We find that
( (C) −  (A) ( =0.00001, (o (C) − o (A) ( =0.00001, (p (C) − p (A) (= 0.00011
Since, all the errors in magnitude are less than 0.0005, the required solution is
x = 0.5, y = -0.6, z = 0.4
Remark: What is the disadvantage of the Gauss-Jacobi method?. At any iteration step, the value
of the first variable Y is obtained using the values of the previous iteration. The value of the

Prepared by Haileyesus T., UOG Page 104


second variable ; is also obtained using the values of the previous iteration, even though the
updated value of Y is available.
In general, at every stage in the iteration, values of the previous iteration are used even though the
updated values of the previous variables are available.
Mat lab cod for Jacobi iterative method
Iterative Solutions of lineareuations:(1) JocobiMethod
% Linear system: A x = b
% Coefficient matrix A, right-hand side vector b
A=[7 3 -1 2; 3 8 1 -4;-1 1 4 -1; 2 -4 -1 6];
b= [-1;0;-3;1];
x0=zeros(1,4);
% Set initial value of x to zero columnvector
% Set Maximum iteration number k_max
k_max=1000;
% Set the convergence control parameter erp
erp=0.0001;
% Show the q matrix
q=diag(diag(A))
% loop for iterations
for k=1:k_max
for i=1:4
s=0.0;
for j=1:4
if j==i
continue
else
s=s+A(i,j)*x0(j);
end
end
x1(i)=(b(i)-s)/A(i,i);
end
if norm(x1-x0)<erp
break
else
x0=x1;
end
end
% show the final solution
x=x1
% show the total iteration number
n_iteration=k
Output value
q=
5 0 0
0 4 0
0 0 5
x=
2.5555 1.7222 -1.0555

Prepared by Haileyesus T., UOG Page 105


n_iteration =
11
EXERCISE 3.6
Solve the following system of equations by Jacobi’s iterations method:
2 x + y − 2 z = 17 5 x + 2 y + z = 12
a) 3x + 20 y − z = −18 b) x + 4 y + 2 z = 15
2 x − 3 y + 20 = 25 x + 2 y + 5 z = 20

3.2.2 Gauss-Seidel Method


Let us consider the system of simultaneous linear equation
YY Y + Y; ; + ⋯ + Yb b = Y
;Y Y + ;; ; + ⋯ + ;b b = ;
⋮ ⋮ ⋯ ⋱ ⋮
……….(3.17)
bY Y + b; ; + ⋯ + bb b = b
This method is a modification of gauss-Jacobi's method. To apply this method the absolute value
of the diagonal element in each row is larger than the sum of the absolute values of the other
elements in that row of the coefficient matrix A must be preserved. In this method we use the
immediately obtained values of some unknowns are used in the current iteration for the
computation of the other unknowns. Hence the convergence of the Gauss-Seidal method is twice
as fast as in Jacobi’s method. The Gauss-Seidal and Jacobi’s methods converge for any choice of
the initial approximations, if diagonal dominancy and positive definite are preserved in the
coefficient matrix. Like that of Jacobi's iterative, if it is not in a diagonally dominant form, it
should be connected to a diagonally dominant form by row exchanger, before starting the Gauss-
Seidal iterative scheme. If this condition is not satisfied, then Gauss-Seidal method is not
applicable. We can rewrite Eq. (3.17) as
Y = ? Y − Y; ; − Y> > − ⋯ − Yb b 
Y
ee

; = ; − ;Y Y − ;> > − ⋯ − ;b b 


Y
?::

… … … … … … … … … … … … … … … … … … … … …. ……………..(3.18)
b = b − bY Y − b; ; − ⋯ − bbMY bMY 
Y
?ff

Let us start with the initial approximation Y , ; , … , b . Now substituting


(T) (T) (T)

; , > , … , b in the first equation of eq. (2.18), we get


(T) (T) (T)

Prepared by Haileyesus T., UOG Page 106


1
Y =  − Y; ; − Y> > − ⋯ − Yb b 
(Y) (T) (T) (T)
YY Y
Then substitutingY , > , … , b in the second equation of eq.(3.18) , we get
(Y) (T) (T)

; = ; − ;Y Y − ;> > − ⋯ − ;b b 


(Y) Y (Y) (T) (T)
?::

Then substituting Y , ; , … , bMY in the last equation of eq. (3.18) , we get


(Y) (Y) (Y)

1
b = ¼ − bY Y − b; ; − ⋯ − bbMY bMY ½
(Y) (Y) (Y) (Y)
bb b
In general, („ + 1)th iteration can be written as:
1
Y =  − Y; ; − Y> > − ⋯ − Yb b 
(b_Y) (b) (b) (b)
YY Y
; = ; − ;Y Y − ;> > − ⋯ − ;b b 
(b_Y) Y (b_Y) (b) (b)
?::

… … … … … … … … … … … … … … ………………………

b = ¼b − bY Y − b; ; − ⋯ − bbMY bMY ½


(b_Y) Y (b_Y) (b_Y) (b_Y)
?ff

This process is continued until the value of Y , ; , … , b are obtained to the desired degree of
accuracy. That is when the difference between („ + 1)th and („)th iterations is significantly small.
EXAMPLE 3.24: Solve the system of equations by Gauss-Seidel iteration method
8 x − 3 y + 2 z = 20
6 x + 3 y + 12 z = 35
4 x + 11y − z = 33
SOLUTION: The coefficient matrix of the given system is not diagonally dominant. Hence, we
rearrange the equations such that the elements in the coefficient matrix are diagonally dominant.
So that the system can be written as:
8 x − 3 y + 2 z = 20
4 x + 11y − z = 33
6 x + 3 y + 12 z = 35

1
Now to apply the Gauss-Jacobi's method let us write this system in the form:

= 20 + 3o − 2p
8
1
o= 33 − 4 + p
11
1
p= 35 − 6 − 3o
12

Prepared by Haileyesus T., UOG Page 107


Now, since there is no initial approximation given, we start with initial approximation
 (T) =o (T) =p (T) = 0.
First app
First approxima
roximation:
pproximation:
 (Y) = V 20 + 3o (T) − 2p (T)  =2.5
Y

o (Y) = YY 33 − 4 (Y) + p (T)  =2.0909091


Y

p (Y) = Y; 35 − 6 (Y) − 3o (Y)  =1.1439394


Y

Second app
Second approxima
roximation:
pproximation:
 (;) = 20 + 3o (Y) − 2p (Y)  =2.9981061
Y
V

o (;) = 33 − 4 (;) + p (Y)  =2.0137741


Y
YY

p (;) = 35 − 6 (;) − 3o (;)  =0.9141701


Y
Y;

Third app
Third approxima
roximation:
pproximation:
 (>) = 20 + 3o (;) − 2p (;)  =3.0266228
Y
V

o (>) = 33 − 4 (>) + p (;)  =1.9825163


Y
YY

p (>) = 35 − 6 (>) − 3o (>)  =0.9077262


Y
Y;

Fourth app
Fourt approxima
roximation:
pproximation:
 (A) = 20 + 3o (>) − 2p (>)  = 3.0165121
Y
V

o (A) = 33 − 4 (A) + p (>)  = 1.9856071


Y
YY

p (A) = 35 − 6 (A) − 3o (A)  = 0.9120088


Y
Y;

Fifth app
Fift approxima
roximation:
pproximation:
 (C) = 20 + 3o (A) − 2p (A)  = 3.0166005
Y
V

o (C) = 33 − 4 (C) + p (A)  = 1.9859643


Y
YY

p (C) = 35 −  (C) − 3o (C)  = 0.9118753


Y
Y;

Sixth app
Sixt approxima
roximation:
pproximation:
 (E) = V 20 + 3o (C) − 2p (C)  = 3.0167568
Y

o (E) = 33 − 4 (E) + p (C)  = 1.9858913


Y
YY

p (E) = 35 − 6 (E) − 3o (E)  = 0.9118099


Y
Y;

Prepared by Haileyesus T., UOG Page 108


Sevent
Seventh app
approxima
roximation:
pproximation:
 (X) = 20 + 3o (E) − 2p (E)  = 3.0167568
Y
V

o (X) = 33 − 4 (X) + p (E)  = 1.9858894


Y
YY

p (X) = 35 − 6 (X) − 3o (X)  = 0.9118159


Y
Y;

Since at the sixth and seventh approximations, the values of , o, p are the same, correct to four
decimal places, we can stop the iteration process and the solution is  = 3.0167, o = 1.9858, p =
0.9118.
EXAMPLE 3.25: Find the solution of the system of equations
45 x + 2 y + 3 z = 58
− 3x + 22 y + 2 z = 47
5 x + y + 20 z = 67
Correct to three decimal places, using the Gauss-Seidel iteration method.
SOLUTION: The given system of equations is strongly diagonally dominant. Hence, we can
expect fast convergence. Gauss-Seidel method gives the iteration
 = AC 58 − 2o − 3p
Y

o = ;; 47 + 3 − 2p
Y

p= 67 − 5 − o
Y
;T

Starting with initial the approximation  (T) =o (T) =p (T)= 0, we get the following results:
First app
First approxima
roximation:
pproximation:
 (Y) = 58 − 2o (T) − 3p (T)  =1.28889
Y
AC

o (Y) = ;; 47 + 3 (Y) − 2p (T)  = 2.31212


Y

p (Y) = ;T 67 − 5 (Y) − o (Y)  = 2.91217


Y

Second app
Second approxima
roximation:
pproximation:
 (;) = 58 − 2o (Y) − 3p (Y)  = 0.99198
Y
AC

o (;) = 47 + 3 (;) − 2p (Y)  = 2.00689


Y
;;

p (;) = 67 − 5 (;) − o (;)  = 3.00166


Y
;T

Third app
Third approxima
roximation:
pproximation:
 (>) = 58 − 2o (;) − 3p (;)  = 0.99958
Y
AC

Prepared by Haileyesus T., UOG Page 109


o (>) = 47 + 3 (>) − 2p (;)  = 1.99979
Y
;;

p (>) = 67 − 5 (>) − o (>)  = 3.00012


Y
;T

Fourth app
Fourt approxima
roximation:
pproximation:
 (A) = 58 − 2o (>) − 3p (>)  = 1.00000
Y
AC

o (A) = 47 + 3 (A) − 2p (>)  = 1.99999


Y
;;

p (A) = 67 − 5 (A) − o (A)  = 3.00000


Y
;T

Fifth app
Fift approxima
roximation:
pproximation:
C = 58 − 2oA − 3pA  = 1.00000
Y
AC

oC = 47 + 3C − 2pA  = 2.0000


Y
;;

pC = 67 − 5C − oC  = 3.00000


Y
;T

Since at the 4th and 5th approximations, the values of , o, p are the same, correct to four decimal
places, we can stop the iteration process and the solution is  = 1, o = 2, p = 3.
EXAMPLE 3.26: Solve the system of equations by Gauss-Seidel iteration method
3x − 6 y + 2 z = 23
− 4 x + y − z = −8
x − 3 y + 7 z = 17
SOLUTION: The coefficient matrix of the given system is not diagonally dominant. Hence, we
rearrange the equations such that the elements in the coefficient matrix are diagonally dominant.
So that the system can be written as:
4 x + y − z = −8
3x − 6 y + 2 z = 23
x − 3 y + 7 z = 17
Now to apply the Gauss − Jacobi′s method let us write this system in the form:
1
= −8 − o + p
4
1
o= 23 − 3 − 2p
−6
1
p = 17 −  + 3o
7
Now, since there is initial approximation given, we start with initial approximation
 (T) =o (T) =p (T) = 0.

Prepared by Haileyesus T., UOG Page 110


First app
First approxima
roximation:
pproximation:
 (Y) = −8 − o (T) + p (T)  = 1.0
Y
A

o (Y) = 23 − 3 (Y) − 2p (T)  = – 3.0333


Y
ME

p (Y) = 17 −  (Y) + 3o (Y)  = 0.9857


Y
X

Second app
Second approxima
roximation:
pproximation:
 (;) = −8 − o (Y) + p (Y)  = 0.9953
Y
A

o (;) = 23 − 3 (;) − 2p (Y) =–3.0071


Y
ME

p (;) = 17 −  (;) + 3o (;)  = 0.9976


Y
X

Third app
Third approxima
roximation:
pproximation:
 (>) = A −8 − o (;) + p (;) =0.9988
Y

o (>) = ME 23 − 3 (>) − 2p (;) =– 3.0014


Y

p (>) = 17 −  (>) + 3o (>)  = 0.9996.


Y
X

Fourth app
Fourt approxima
roximation:
pproximation:
 (A) = A −8 − o (>) + p (>) =0.9998
Y

o (A) = ME 23 − 3 (A) − 2p (>) =– 3.0002


Y

p (A) = X 17 −  (A) + 3o (A)  = 0.9999.


Y

We find that
( (A) −  (>) ( =0.0010, (o (A) − o (>) ( =0.0012,(p (A) − p (>) (= 0.0003.
Since, all the errors in magnitude are less than 0.005, the required solution is
 = 0.9998, o =– 3.0002, p = 0.9999
Rounding to two decimal places, we get  = 1. o = −3, p = 1
Mat lab cod of Gauss Seidel method
% A PROGRAM OF GAUSS SEIDEL METHOD
function x = GSsolve(A, b, tolerance)
n = size(A,1); % Get matrix size
x = zeros(n,1); % Result vector for iteration n
xn= zeros(n,1); % Result vector for iteration n+1
done = false; % Flag to exit iteration loop
ni = 0; % Number of iterations
while done==false
% Count the number of iterations
ni = ni+1;
% Do one iteration for each element of the unknown vector

Prepared by Haileyesus T., UOG Page 111


for i = 1:n
t1 = 0;
t2 = 0;
% First summation term
for j = 1:i-1
if j>0
t1 = t1 + A(i,j)*xn(j);
end
end
% Second summation term
for j = i+1:n
t2 = t2 + A(i,j)*x(j);
end
% Assemble the iteration equation and calculate unknowns
xn(i) = 1/A(i,i)*(b(i)-t1-t2);
end
% Calculate relative difference between results of
% this and last iteration
d = sum(abs(xn-x))/sum(abs(xn));
% Report iteration number and error
disp([num2str(ni) ' ' num2str(d)]);
% Update unknown vector with the recently-calculated values
x = xn;
% Check for convergence
if(d<tolerance)
done = true;
end
end
end
SAMPLE OUTPUT
A=[10 -7 0 ;-3 6 1 ;2 -1 5 ];
>> b=[7 ;4 ;6];
>>GSsolve(A, b, 0.001)
ans =
1.6485
1.3556
0.8117
EXERCISE 3.7
Using Gauss-Seidel method, solve the following system of equations:
2 x + 10 y + z = 13 2 x − 3 y + 20 z = 25
a) 2 x + 2 y + 10 z = 14 c) 3 x + 20 y − z = −18
10 x + y + z = 12 20 x + y − 2 z = −17
2x − y + z = 5
b) 2x + 3 y − 2z = 7
x + 2 y + 3z = 10

Prepared by Haileyesus T., UOG Page 112


3.3 ILL- CONDITIONED SYSTEM
Asystem of equations
Ax=b
is said to be ill-conditioned or unstable if it is highly sensitive to small changes in A and b. i.e
small change in A or b causes a large change in the solution of the system. On the other hand if
small changes in A and b give small change in the solution, the system is said to be stable or well
condition. Thus in an ill-conditioned system, even the small round off errors affect the solutions
very badly.
EXAMPLE 3.27: Is this system of equations well-conditioned?
1 2   x  4 
2 3.999  y  = 7.999
     
SOLUTION: The solution to the above set of equations is
 x  2 
 y  = 1 
   
Make a small change in the right hand side vector of the equations
1 2   x   4.001
2 3.999  y  = 7.998
    
Gives
 x  − 3.999
 y  =  4.000 
   
Make a small change in the coefficient matrix of the equations
1.001 2.001  x   4 
2.001 3.998  y  = 7.999
    
Gives
 x   3.994 
 y  = 0.001388
   
This last system of equation looks ill-condition because a small change in the coefficient matrix or
the right hand side resulted in a large change in the solution vector.
EXAMPLE 3.28: Is this system of equations well-conditioned?
1 2   x   4 
 2 3   y  = 7 
    

Prepared by Haileyesus T., UOG Page 113


SOLUTION: The solution to the above equations is
 x   2
 y  = 1 
   
Make a small change in the right hand side vector of the equations.
1 2  x  4.001
2 3  y  = 7.001
    
Gives
 x  1.999
 y  = 1.001
   
Make a small change in the coefficient matrix of the equations.
1.001 2.001  x  4
2.001 3.001  y  = 7 
    
Gives
 x   2.003
 y  = 0.997
   
This system of equation looks well conditioned because small changes in the coefficient matrix
or the right hand side resulted in small changes in the solution vector.

While solving simultaneous equations, we also come across two forms of instabilities
Inherent: Inherent instabtity of the system is the property of the given problem and occurs
due to the problem being ill-conditioned. It can be avoided by reformations of the problem
suitably.
Induced: Induced instability occurs because of the incorrect choice of the method.
How do we know the linear system is ill-conditioned?
There are several ways to check a matrix A for ill-conditioning. If the magnitude of the
determinant of the matrix is small, the matrix is ill-conditioned. However, this is not a foolproof
test. The inverse matrix åMY can be calculated, and AåMY can be computed and compared to I.
Similary, (åMY )MY can be computed and compared to A. A close comparison in either case
suggests that matrix A is well-conditioned. A poor comparison suggests that the matrix is ill-
conditioned. Some of the elements of A and/or b can be changed slightly, and the solution

Prepared by Haileyesus T., UOG Page 114


repeated. If a drastically different solution is obtained, the matrix is probably ill-conditioned. None
of these approaches is foolproof, and none give a quantitative measure of ill-conditioning. The
surest way to detect ill-conditioning is to evaluate the condition number of the matrix, as discussed
in the next subsection.

Norms and the Condition Number


In the following discussion, ill-conditioning is quantified by the condition number of a matrix,
which is defined in terms of the norms of the matrix and its inverse. Norms and the condition
number are discussed in this section.
NORMS
The measure of the magnitude of A, x, or b is called its norm and denoted by ||A||, ||x||,
and ||b||, respectively. Norms have the following properties:
a. ||A||>0 , for any square matrix A.
b. ||A||=0 only if A = 0 A
c. ||kA|| = |k|||A||
d. ||A+B|| ≤ ||A||+||B||
e. ||AB|| ≤ ||A||||B||
The norm of a scalar is its absolute value. Thus, ||k|| = |k|. There are several definitions of the norm
of a vector. Thus,
The norm of a matrix is a measure of how large its elements are. It is a way of determining the
“size” of a matrix that is not necessarily related to how many rows or columns the matrix has.
REMARK: The norm of a matrix is a real number which is a measure of the magnitude of the
matrix
In this section we will define three commonly used norms. We distinguish them with a subscript.
All three of them satisfy the 5 conditions listed above, but we will not concern ourselves with
verifying that fact.
n
The 1-Norm : A 1= max ∑ a ij
j i =1

The 1-norm of a square matrix is the maximum of the absolute column sums.
n
The Infinity-Norm : A = max (∑ aij )
∞ j i =1

The infinity-norm of a square matrix is the maximum of the absolute row sums.

Prepared by Haileyesus T., UOG Page 115


n n 2
The Euclidean Norm : A = ∑∑ (a ij)
i =1 j =1

The Euclidean norm of a square matrix is the square root of the sum of all the squares of the
elements.
EXAMPLE3.30: Calculate the norm of
5 −4 2
B = ö−1 2 3÷
−2 1 0
SOLUTION: Let us see the norm in three different norms

‖ø‖Y = max (5 + 1 + 2, 4+2+1, 2+3+0)


The 1-Norm: Summing down the columns of B we find that

= max (8, 7, 5)
=8

‖ø‖Ò = max (5+4+2,1+2+3,2+1+0)


The Infinity-Norm: Summing along the rows of B we find that

= max (11, 6, 3)
= 11

The Euclidean Norm:


‖ø‖= Ê5; + (−4); + 2; + (−1); + 2; + 3; + (−2); + 1; + 0;

= √25 + 16 + 4 + 1 + 4 + 9 + 4 + 1 + 0
=√64 =8
CONDITION NUMBER
Sometimes, one comes across a system of equations which are very sensitive to round off errors.
That is, one gets different solutions when the elements are rounded to different number of digits. In
such cases, the system is called an ill-conditioned system of equations. The measure of the ill-
conditionedness is given by the value of the condition number of the matrix A.
Definition: Condition number of a system is a measure of the sensitivity of the system to small
changes in any of its elements.
To investigate the condition number of a linear algebraic system, we perturb the equation and then
examine the size of resulting change in the solution. First, consider the effect of change in the

Prepared by Haileyesus T., UOG Page 116


right-hand side vector, say from - to - + .-. Let ± denote the solution to the original system, and
± + .± denote the solution to the perturbed system. Then
A( + c) =  + c
Which reduces to the
Ac= c [b/c A=b]
c= AMY c

‖c‖ = ‖AMY c‖ ≤ ‖AMY ‖‖c‖


Taking norm on each side
……….(3.19)

‖‖ = ‖å‖ ≤ ‖å‖‖‖


In addition
……….(3.20)

‖c‖‖‖ ≤ ‖å‖‖AMY ‖‖c‖‖‖


Multiplying the two inequalities

Or
‖s8‖ ‖s‖
‖8‖
≤ ‡(å) ‖‖

Where ‡ (å) = ‖å‖/A−1 / and k(A) is called condition number.


The condition number is defined as
Cond (A) = K(A) = || A || || A–1|| ………(3.21)
where ||. || is any suitable norm. This number is usually referred to as standard condition number.
If K(A) is large, then small changes in A or b produces large relative changes in x, and the system
of equations A = b is ill-conditioned. If K(A) ≈1, then the system is well conditioned.
REMARK:
I) If κ ≈ 1, or κ is small, the system is well-conditioned
II) If κ >> 1, the system is ill conditioned

1 = I = A −1A ≤ A −1 ⋅ A
III) = Cond(A)
EXAMPLE 3.31: show that the system is ill-condition.
1 2   x  2
2 3.999  y  = 4
    
SOLUTION: For

[A] = 
2 
1

2 3.999

Prepared by Haileyesus T., UOG Page 117


It can be shown
− 3999
[A]−1 = 
2000 
 2000 − 1000

A ∞ = 5.999

A −1 = 5999

Cond ( A) = A ∞ A−1

= 5.999 × 5999.4
= 35990
Which is so large, implies that the system is ill-conditioned.
EXAMPLE 3.32: Show that the system is ill-condition.
1 2   x   4 
 2 3   y  = 7 
    
SOLUTION: For

[A] = 
1 2

2 3
It can be shown
−3
[A]−1 = 
2
2 − 1

Then
A ∞ = 5,

A−1 = 5.

Cond (A) = A ∞ A −1

= 5× 5
= 25
Which is so large, implies that matrix A is ill-conditioned.

Prepared by Haileyesus T., UOG Page 118


3.4 Method to Improve Accuracy of an Ill-Conditioned System

One possible method of improving the accuracy of an ill-conditioned system is by means of


working all the calculations to more of the significant digits. But arithmetic is time consuming
and therefore uneconomical. One possible alternative is to improve upon the accuracy of
approximate solution by an iterative procedure are described below. Consider the system of
equations.
YY Y + Y; ; + Y> > = Y
;Y Y + ;; ; + ;> > = ; …………….(3.22)
>Y Y + >; ; + >> > = >
Let YÇ , ;Ç , >Ç be an initial approximation. Substituting this value on the left hand side, we get now
values of Y , ; , > as YÇ , ;Ç , >Ç .So the new system becomes:
YY YÇ + Y; ;Ç + Y> >Ç = YÇ
;Y YÇ + ;; ;Ç + ;> >Ç = ;Ç …………….(3.23)
>Y YÇ + >; ;Ç + >> >Ç = >Ç
Subtracting each linear equation in eq.(3.23) from corresponding equations in eq.(3.22), we can get
YY YÌ + Y; ;Ì + Y> >Ì = ‡Y
;Y YÌ + ;; ;Ì + ;> >Ì = ‡; …………….(3.24)
>Y YÌ + >; ;Ì + >> >Ì = ‡>
WhereYÌ = Y − YÇ , ;Ì = ; − ;Ç , >Ì = > − >Ç and ‡ª = ª − ªÇ .
We now solve the system in eq. (3.24) forYÌ , ;Ì ,>Ì giving
Y = YÇ − YÌ , ; = ;Ç − ;Ì , > = >Ç − >Ì
Which will be better approximations forY ,; , > . We can repeat the process for improving the
accuracy.
EXAMPLE 3.34: An approximate solution of the system
2x + 2 y − z = 6
x + y + 2z = 8
− x + 3y + 2z = 4 ………..(3.25)

is given by x=2.8, y= 1, z= 1.8. Using the iterative method, improve this solution.
SOLUTION: Substituting the approximate value, we get

Prepared by Haileyesus T., UOG Page 119


2 x(2.8) + 2(1) − 1.8 = 6
2.8 + 1 + 2(1.8) = 8
− 2.8 + 3(1) + 2(1.8) = 4 ……….(3.26)
Subtracting each equation in eq. (3.25) from corresponding eq. (3.26), we get
2Ì + 2oÌ − pÌ = 0.2
Ì + 2oÌ + pÌ = 0.6 …………….(3.27)
−Ì + 3oÌ − pÌ = 0.2
where Ì =  − 2.8, oÌ = o − 1, pÌ = p − 1.8
Solving eq. (3.27), we get Ì = 0.2, oÌ = 0, pÌ = 0.2. This gives a better solution  = 3, o = 1, p =
2, which incidentally is the exact solution.

Prepared by Haileyesus T., UOG Page 120


REVIEW EXERCISE
1. Solve the following set of simultaneous linear equations by the matrix inverse method and
Cramer's rule.
2x + 3y − z = 1
a) − x + 2y + z = 8
x − 3 y − 2 z = −13

2 x − y + 3z = 4
b) x + 9 y + 3 z = −8
4 x − 8 y + 11z = 15
2. Solve the following system of linear equations using the method of Gaussian elimination.
2x + y + z = 4
a) 0 x + 3 y − 3z = 0
0x − y − 2z = 1
x + 2 y + 3 z + 4w = 8
2 x − 2 y − z − w = −3
b)
x − 3 y + 4 z − 4w = 8
2 x + 3 y − 3z + 4w = −2
3. Solve the following set of simultaneous linear equations by the Gauss-Jordan method.
4 x − 3 y + 5 z = 34
a) 2x − y − z = 6
x + y + 4 z = 15
2 x − y + z = −1
b) 3x + 3 y + 9 z = 0
3x + 3 y + 5 z = 4
4. Solve the following set of simultaneous linear equations using the LU decomposition
3x + 2 y + 7 z = 4
a) 2x + 3y + z = 5
3x − 4 y + z = 7
x − 4 y + 7z = 9
b) 2 x − 3 y + 4 z = 13
3x + y + 5 z = 40

5. Solve the following set of simultaneous linear equations using the Cholesky's method.

Prepared by Haileyesus T., UOG Page 121


3 x + y + 0 z = −1
a) 2x + 4 y + z = 7
0 x + 2 y + 5z = 9
2x + y − z = 6
b) x − 3 y + 5 z = 11
− x + 5 y + 4 z = 13
6. Solve the following set of simultaneous linear equations using the Jacobi’s method.
2 x − y + 5 z = 15
a) 2x + y + z = 7
x + 3 y + z = 10
20 x + y − 2 z = 17
b) 3 x + 20 y − z = −18
2 x − 3 y + 20 z = 25

7. Solve the following system of simultaneous linear equations using the Gauss-Seidal method.
4 x − 3 y + 5 z = 34
a) 2x − y − z = 6
x + y + 4 z = 15
2 x − y + 5 z = 15
b) 2x + y + z = 7
x + 3 y + z = 10
8. An approximate solution of the system
x + 4 y + 7z = 5
2 x + 5 y + 8z = 7
3 x + 6 y + 9.1z = 9.1

is given by x=1.8, y= -1.2, z= 1.8. Using the iterative method, improve this solution

Prepared by Haileyesus T., UOG Page 122


CHAPTER 4: FINITE DIFFERENCES
Chapter objectives
At the end of this chapter you will be able to:

 Define finite differences.


 Identify different types of finite differences.
 Construct finite difference table.
 Identify different types of difference operators.
 Identify the relation between difference operators.
 Describe properties of finite difference operators.
 Find the missing term of the given set of values using finite differences.
 Estimate an error using finite differences.

INTRODUCTION
The calculus of finite differences deals with the changes that take place in the value of the function
(dependent variable) due to finite changes in the independent variable. The study of finite
difference calculus has become very important due to its wide variety of application in everyday
life. It has been originated by Sir Issac Newton. It has been of great use for Mathematicians as
well as Computer Scientists for solution of the Scientific, Business and Engineering problems.
There, it helps in reducing complex mathematical expressions like trigonometric functions in terms
of simple arithmetic operations.
Numerical methods are very important tools to provide practical methods for calculating the
solution of problems to applied mathematics for a desired degree of accuracy.
If o = () is a function for  ≤  ≤ , this means that one or more values of o = () exist
corresponding to every value of  in the given range. However if the function  is not known, the
value of o can be obtained, when a set of values of  is given. The method to find out such values
is based on principle of finite differences provided the function is continuous.
If a function o = () assumes the values (), ( + ℎ), ( + 2ℎ), . .. corresponding to the
values of  ( T = , Y =  + ℎ, ; =  + 2ℎ, … ) then each value of  is called Argument and
Entry.
its corresponding values of o is called Entry

Prepared by Haileyesus T., UOG Page 123


Let o = () be a function tabulated for the equally spaced values or arguments  = T , Y =
T + ℎ, ; = T + 2ℎ, … , b = T + „ℎ, where ℎ is the increment given to the independent
variable of function o = (). To determine the values of function o = () for given
intermediate or argument values of , three types of differences are useful:
1) Forward differences
2) Backward differences
3) Central differences
4) Divided differences ( For unequally spaced argument values )
Notations: At  = ª , o(ª ) = oª , (ª ) = ª , for ¬ = 0,1,2, …

FORWARD DIFFERENCE
4.1 FORW

The forward difference operator is denoted by ∆. Let us see some of the first order forward
differences

∆oT = oY – oT

∆oY = o; – oY

∆o; =o> –o; ……….. (4.1)

…………………..

∆ob = ob_Y – ob

Or writing in terms of o, at = ª , Eq. (4.1) becomes

∆(ª ) = (ª + ℎ) – (ª ) …………(4. 2)

or ∆oª = oª_Y – oª ¬ = 0, 1, 2, … . , „– 1

Therefore we can generalize the first forward differences as

∆() = ( + ℎ) – () ..……….. (4.3)

Where ℎ is the interval of differencing.

Similarly, let us see some of second order forward differences

∆; oT = ∆oY – ∆oT

Prepared by Haileyesus T., UOG Page 124


∆; oY = ∆o; – ∆oY

……………

∆; obMY = ∆ob – ∆obMY .

Therefore the second order forward differences are defined by

∆; oK =∆oK_Y – ∆oK for Q = 1,2, … , „ − 1

In general, the nth forward differences

∆b oK = ∆bMY oK_Y – ∆bMY oK

Table 4.1: Table for forward difference

x y ∆y ∆; o ∆> y ∆A o
T oT
∆oT
Y oY ∆; oT
∆oY ∆> oT
; o; ∆; oY ∆A oT
∆o; ∆> oY
> o> ∆; o;
∆o>
A oA

Where Y =T + h, ; =T + 2h, > =T + 3h, A = T + 4h

EXAMPLE 4.1: Construct a forward difference table for the following values

 0 5 10 15 20 25
() 7 11 14 18 24 32

SOLUTION: Forward difference table for given data is:

Prepared by Haileyesus T., UOG Page 125


 o ∆o ∆; o ∆> y ∆A o ∆C o
0 7
4
5 11 -1
3 2
10 14 1 -1
4 1
15 18 2 -1 0
6 0
20 24 2
8
25 32

EXAMPLE 4.2: If y =  > +  ; – 2 + 1, calculate values of o for  = 0, 1, 2, 3, 4, 5 and form


the difference table. Also find the value of y at  = 6 by extending the table and verify that the
same value is obtained by substitution.

SOLUTION: For  = 0, 1, 2, 3, 4, 5, we get the values of o are 1, 1, 9, 31, 73, 141. Therefore,
difference table for these data is as:

 o ∆y ∆; o ∆> y ∆A o
0 1
0
1 1 8
8 6
2 9 14 0
22 6
3 31 20 0
42 6
4 73 26 0
8 6
5 141 32
100
6 241

Because third differences are all the same constant therefore

Prepared by Haileyesus T., UOG Page 126


∆> o> =6,⇒ ∆; oA − ∆; o> =6
∆; oA − 26 = 6⇒ ∆; oA = 32

∆; oA = 32 ⇒ ∆oC − ∆oA =32


Now

⇒ ∆oC − 68=32 ⇒ ∆oC = 100

∆oC = 100 ⇒ oE − oC =100


Further,

⇒ oE − 141=100 ⇒ oE = 241
Let's confirm that for given function y =  > +  ; – 2 + 1, at  = 6, 63+ 62– 2(6) + 1= 241.

EXAMPLE 4.3: Find (6) given the table below and the third differences being constant.

 0 1 2 3
() -3 6 8 12

SOLUTION: For given data we construct the difference table:

 o ∆y ∆; o ∆> y
0 -3
9
1 6 -7
2 9
2 8 2
4
3 12

We have, (6) = (0 + 6) = J E (0) = (1+ ∆)6(0)

= (1+ 6∆ +15∆2 + 20∆3 ) (0)

= (0) +6∆ (0) +15∆2(0) +20∆3(0)

= –3 + 6 ×9 + 15 ×(–7) + 20 ×9

=–3 + 54 – 105 + 180 = 126.

Prepared by Haileyesus T., UOG Page 127


BACKWARD
KWARD DIFFERENCE
4.2 BACKW

The backward difference operator is denoted by the symbol ∇. Let us see some of the first order
backward differences

∇oY = oY – oT

∇o; = o; – oY

∇o> =o> –o; ……….. (4.4)

………………..

∇ob = ob – obMY

Or writing in terms of o, at = ª , Eq. (4.4) becomes

∇(ª ) = (ª ) – (ª − ℎ) …………(4. 5)

or ∇oª = oª – oªMY ¬ = „, „– 1, „ − 2, … , 1

Therefore we can generalize the first order backward differences as

∇() = ( ) – ( − ℎ) ..……….. (4.6)

Where ℎ is the interval of differencing.

Similarly, let us see some of the second order back differences

∇; o; = ∇o; – ∇oY

∇; o> = ∇o> – ∇o;

……………

∇; ob = ∇ob – ∇obMY .

Therefore the second order forward differences are defined by

∇; oK =∇oK – ∇oKMY for Q = „ − 1, „ − 2, … , 1

In general, the nth backward differences

∇b oK = ∇bMY oK – ∇bMY oKMY

The backward difference table is

Prepared by Haileyesus T., UOG Page 128


Table 4.2: Table for backward differences

x y ∇y ∇; o ∇> y
T oT
∇oY
Y oY ∇; o;
∇o; ∇> o>
; o; ∇; o>
∇o>
> o>

EXAMPLE 4.4: Given that

x 1 2 3 4 5 6 7 8
y 1 8 27 64 125 216 343 512

Construct backward difference table and obtain ∇2y5.


SOLUTION: Backward difference table for given data is as:

Hence, ∇2y5 =24.

Prepared by Haileyesus T., UOG Page 129


EXAMPLE 4.5: Construct the backward difference table from the data:

 25T 30T 35T 40T 45T


() 0.4225 0.500 0.5736 0.6428 0.7071
Assuming third difference to be constant, find the value of 250.
SOLUTION: Backward difference table for given data is as:

Since third differences are constant therefore

∇> oAT = −0.0005 ⇒ ∇; oAT − ∇; o>C = 0.0005

⇒ −0.0044 − ∇; o>C = 0.0005

⇒ ∇; o>C = – 0.0039

Again, ∇o>C -∇o>T = -0.0039

⇒ 0.0736 −∇o>T = −0.0039

⇒∇o>T = 0.0775

Again, o>T − o;C = 0.0775

⇒ 0.500−o;C = 0.0775

⇒ −o;C = 0.4225.

Therefore, sin (250) = 0.4225.

EXAMPLE 4.6: Construct the backward difference table for the data and find ∇2f(0)

 -1 0 1 2
() -8 3 1 12

Prepared by Haileyesus T., UOG Page 130


SOLUTION: We have the following difference table.

 o ∇o ∇; o ∇> y
-1 -8
11
0 3 -13
-2 26
1 1 13
11
2 12

Then, from the table ∇2(0) = 13.

Using Mat Lab the table can be constructed as

>>y =[35000 36000 36500 37000 37800 39000 ]


>>dy= diff(y)
dy =
1000 500 500 800 1200
y=
35000 36000 36500 37000 37800 39000
>>dy =diff(y)
>> d2y =diff(y,2)
d2y =
-500 0 300 400
>> d3y=diff(y,3)
d3y =
500 300 100
>> d4y=diff(y,4)
d4y =
-200 -200
>> d5y=diff(y,5)
d5y =
0

Prepared by Haileyesus T., UOG Page 131


4.3 CENTRAL DIFFERENCE
DIFFERENCES
CES

The central difference operator is denoted by the symbol δ. Let us see some of the first order
central differences

δoe = oY − oT
:

δo= = o; − oY ………………(4.7)
:

…………..

δobMe = ob − obMY
:

In terms of y, the first central difference is written as

δyi= oª_Š − oªMŠ ¬ = 0,1,2, „ − 1


: :

Therefore we can generalize the first order central difference as


{ {
δf(x) = f(x+ ;) – f(x– ; ) ……………….(4.8)

Where ℎ is the interval of differencing.

The second central differences are given by

δ; oª = δoª_Š − δoªMŠ
: :

= (oª_Y − oª ) − (oª − oªMY )

= oª_Y − 2oª + oªMY

Let us see some of the second central differences

δ; oY = δo= − δoe
: :

δ; o; = δoB − δo=
: :

…..……….

δ; ob = δob_e − δobMe
: :

In general, the nth central differences

Prepared by Haileyesus T., UOG Page 132


δb oK =δbMY oK_e − δbMY oKMe
: :

The central difference table

Table4.3: Table for Central differences

 o δy δ; o δ> y
T oT
δoY/;
Y oY δ; oY
δo>/; δ> o>/;
; o; δ; o;
δoC/;
> o>

EXAMPLE 4.7: Construct a central difference table and obtain from the following data.

x 1 2 3 4 5
y 2 5 10 17 26
Find δ; oY and δoC/; .

SOLUTION: The central difference table is:

x y δy δ; o δ> y δA o
1 2
3
2 5 2
5 0
3 10 2 0
7 0
4 17 2
9
5 26

Then from the table, δ; oY = 2 and δoC/; = 7

Prepared by Haileyesus T., UOG Page 133


4.4 DIVIDED DIFFERENCE

The divided difference operator is denoted by the symbol ϴ . Let (T ), (Y ), … , (b ) be
(„ + 1) entries of a function o = (), where () is a polynomial function of degree n
corresponding to the arguments T , Y , ; ,..., b (which need not be equally spaced) . Then the
first order divided differences of () for the arguments T , Y is defined as

ϴyT = ϴf(xT ) =
¸(8e )M¸(8¹ )
8e M8¹

Like wise

ϴyY = ϴf(xY ) = ϴy; = ϴf(x; ) =


¸(8: )M¸(8e ) ¸(8= )M¸(8: )
8: M8e 8= M8:
, and …….

The second order divided differences for the arguments T , Y , ; is defined as

⊖; oT = , ⊖; oY =
ϴme Mϴm¹ ϴm: Mϴme
8: M8¹ 8= M8e
and …………..

The third order divided differences for the arguments T , Y , ; , > is defined as

⊖> oT = ⊖> oY =
⊖: re M⊖: r¹ ⊖: r: M⊖: re
8= M8¹ 8@ M8e
, and ………..

The divided difference table is given as

Table 4.4: Table for divided differences

 o = () ϴy ⊖; o ⊖> o
T oT
re Mr¹
ϴyT =
8e M8¹
Y oY ⊖; oT =
ϴme Mϴm¹
8: M8¹

⊖> oT =
r: Mre ⊖: re M⊖: r¹
ϴyY = 8= M8¹
; o;
8: M8e

⊖; oY =
r= Mr: ϴm: Mϴme
ϴy; = 8= M8e
8= M8:
⊖> oY =
⊖: r: M⊖: re
> o> 8@ M8e

⊖; o; =
r@ Mr= ϴm= Mϴm:
ϴy> = 8@ M8:
8@ M8=
A oA

Prepared by Haileyesus T., UOG Page 134


EXAMPLE 4.8: Construct the divided difference table and find ⊖; o; if it is given

 1 6 10 11
() 3 31 1011 1343

SOLUTION: The divided difference table is given by:

 o ϴo ⊖; o ⊖> o
1 3
14
3 31 10
64
6 223 19 1
179
10 1011 27 1
332
11 1343

Hence from the table ⊖; o; = 27

EXAMPLE 4.9: Obtain the divided difference table for the data

 -1 0 2 3
() -8 3 1 12

SOLUTION: We have the following divided difference table for the data.

 o ϴo ⊖; o ⊖> o
-1 -8
11
0 3 −4
−1 2
2 1 4
11
3 12

Prepared by Haileyesus T., UOG Page 135


4.5 OTHER DIFFERENCE OPERATORS

I. Shift operator: The operator E is called shift operator or displacement or translation


operator. It shows the operation of increasing the argument value  by its interval of
differencing ℎ so that.
J() = ( + ℎ),
J ; () = JJ() = J( + ℎ) = ( + ℎ + ℎ) = ( + 2ℎ)

…………………………………………

J b () = ( + „ℎ)

In the same manner,

J MY () = ( − ℎ)

J M; () = ( − 2ℎ)

…………..

J Mb () = ( − „ℎ).

Where J MY is called inverse shift operator.

II. Differential operator: The differential operator for a function o = () is defined by:

D() = ä8 ()
ä

D2() = (), … , and so on.


ä:
ä8 :

III. Averaging operator: The operator µ is averaging operator and is defined by:

µ() = [(+ ) + ( − )]


Y { {
; ; ;

IV. Unit operator: The unit operator 1 has a property that 1. () = (). It is also called
identity operator.

Remark: 1 = J T = ∆T = ∇T = c T = μT = úT

1. The operators E, D, ∆, ∇, δ and µ are all linear operators.


PROPERTIES OF OPERATORS

∇ ( + ℎ) + «( + ℎ) =  ( + ℎ) + «( + ℎ) −  () + «()

= ( + ℎ) − () + «( + ℎ) − «()

Prepared by Haileyesus T., UOG Page 136


= ∇( + ℎ) + ∇«( + ℎ)

Hence, ∇ is a linear operator

2. The operator E is distributive over addition.


consider a function l() which is the sum of the functions (), «(), ℎ(),…..
i.e l( ) = ( ) + «() + ℎ( ) + ⋯
Then
El() = ( + ℎ) + «( + ℎ) + ℎ( + ℎ) + ⋯ [The interval of differencing is taken as ℎ]
= E( + ℎ) +E«( + ℎ) +Eℎ( + ℎ) + ⋯
i.e E is distributive

∆P ∆4 () = ∆P_4 () = ∆4 ∆P ()


3. All the operators follow the law of indices. i.e.,

Also, ∆() + «() = ∆«() + ()

4. E and ∆ are not commutative with respect to variables.


i.e if l() = ()«()
Jl() ≠ ()E«()
∆l() ≠ ()∆«()
then
and
5. If ∆() = 0, then it does not mean that either ∆= 0 or () = 0.
6. Operators E and ∆ cannot stand without operands.

BETWEEN OPERATORS
4.6 RELATION BETW

There are few relations defined between these operators. Some of them are:

1. ∇= 1 – E–1 or E= (1 – ∇)–1

E∇= ∇E= ∆
2. ∆= E– 1 or E= 1 + ∆
3.
4. E= ehD= 1 + ∆, where D is the differential operator.
5. δ= E1/2– E–1/2
Y
;
6. µ= (E1/2+ E–1/2)
1/2
7. δE =∆

PROOF:

1. ∇() = () – ( − ℎ) = () − J MY () = (1 − J MY )()

Prepared by Haileyesus T., UOG Page 137


Therefore, ∇= 1 – J MY or E= (1 – ∇)MY
2. ∆() = ( + ℎ) – () = J() − () = (J − 1)()
Therefore, ∆= E– 1 or E= 1 + ∆
3. J∇() = J() − ( − ℎ)
= J() – J( − ℎ)
=( + ℎ) − () = ∆()
Also, ∇J() = ∇( + ℎ)
………… (4.9)

= ( + ℎ) – () = ∆() ………… (4.10)

E∇= ∆and ∇E= ∆


From (4.9) and (4.10), we get

4. J() = ( + ℎ)

= () +h ′ (x) +  ′′ (x) +  ′′′ (x) +………..


{: {=
;! >!
[by Taylor's series theorem]

= () + ℎD() +
({5): ({5)=
;! >!
f(x) + f(x) + …………
({5): ({5)=
;! >!
= (1+ℎD + + +……………)()

= 7 {5 ()
J () = 7 {5  () or E = 7 {5
Since, E = 1 + ∆, therefore ∆= 7 {5 – 1.

5. c() = ( + ) − ( − )


{ {
; ;

=J Y/;
() –J MY/;
(x) = (JY/; – J MY/; ) ()

Therefore, δ= JY/; – J MY/;

6. µ () = ;[( + ; ) + ( − ; )


Y { {

= ; [JY/; () +J MY/; () = ; [(JY/; +J MY/; ]()


Y Y

Therefore, µ= (J Y/; + J MY/; )


Y
;

δJY/; () = c(+ ; ) = ( + ; + ; ) − (+; − ; ) = ( + ℎ) − () = ∆()


{ { { { {
7.

Therefore, δJY/; = ∆

Prepared by Haileyesus T., UOG Page 138


EXAMPLE 4.10: Prove the following
δ:
a. ∆ = µδ + ;
δ:
b. µ ; = 1 +
A

c. ∆; =δ; +µδ> +
δ@
A

d. ∆ oˆ = ∇ oˆ_b = δb oˆ_f
b b
:

PROOF:
δ: Y ( e/: – ›e/: ):
; ; ;
a. µδ + = (E1/2+ E–1/2) ( E1/2– E–1/2) +
OMO ›e OM;_ O›e
; ;
= +
;OM;
;
=

= E-1
=∆
δ: Y
b. 1 + A = 1+ A(E1/2- E–1/2)2

= 1 + A(E1/2− Oe/:)2
Y Y

e
A_( Y/;M e/: );
6
A
=
6›e
A_( e/: );
6
A
=
(7›e):
A_
7
A
=
AO_ : M; _Y
AO
=
: _; _Y
AO
=
_;_Y/
A
=
Y
A
= (E1/2+E–1/2)2

= µ;
δ:
c. Since µδ + ; = ∆, squaring both sides

∆; = (µδ + ); = µ ; δ; + µδ> +
δ: δ@
; A
:
δ@ δ:
= (1 + )δ; + µδ> + [b/c µ ; = 1 + ]
A A A
δ

Prepared by Haileyesus T., UOG Page 139


δ@ δ@
= δ; + + µδ> +
A A
@
= δ; +µδ> + ;
δ

d. ∇b oˆ_b =(1 − E MY )b oˆ_b

=( ) oˆ_b
MY b

= (J − 1)b J Mb oˆ_b [b/c J Mb oˆ_b = oˆ ]


= (J − 1)b oˆ
= ∆b oˆ [b/c E-1=∆ ]
Similarly,
δb oˆ_f = (EY/; − E MY/; )b oˆ_f
: :

=( ) oˆ_f
MY b
e/:
:

= (J − 1) J Mb/; oˆ_f
b
[b/c J Mb/; oˆ_f =oˆ_f ]
: : :

=(J − 1)b oˆ
= ∆b oˆ [b/c E-1=∆ ]
EXAMPLE 4.11: Prove that
a. ∆∇ = ∇∆ = ∆ − ∇ =δ;

b. ∆ + ∇ = −
∆ ∇
∇ ∆

a. ∆∇f(x) = ∆(∆E MY )() [ b/c ∇=∆E MY


PROOF:

= ∆; E MY ()
]
…………..(i)
∇∆() = (∆E MY )∆()
= ∆; E MY ()
(∆ − ∇)() = (∆ − ∆E MY )()
…………(ii)

= ∆(1 − E MY )()
=∆(E − 1)E MY () [b/c ∆= E − 1
= ∆; E MY ()
]
……………..(iii)
Also
δ; () = (∆E MY/; ); () [b/c δ =∆E MY/;
= ∆; E MY ()
]
……………..(iv)
Therefore,

Prepared by Haileyesus T., UOG Page 140


∆∇ = ∇∆ = ∆ − ∇ =δ;

b.  −  () = ( − )() [ b/c ∇=∆E MY


∆ ∇ ∆ ∆ ›e
∇ ∆ ∆ ›e ∆
]

= (E − E MY )()
O : MY
O
=( )()

[b/c ∆= E − 1 ]
O_Y
O
= (E-1) ( )()

= ∆(1+E MY )()
= ∆(1+E MY )()
= (∆+∆E MY )() [ b/c ∇=∆E MY ]
= (∆+∇)()
Therefore,

∆+∇=∇−∆
∆ ∇

EXAMPLE 4.12: Evaluate the following function with the interval of differencing being h.
1. ∆; (37 8 )
2. ∆; ( ; + )
3. ∆ (¤„ MY )
SOLUTION:
1. We have∆(3ex) = 3(7 8_{ − 7 8 )
= 3(7 8 7 { − 7 8 )
= 37 8 (7 { − 1)
Therefore,
∆; (37 8 ) =∆(∆(37 8 )) =∆(37 8 (7 { − 1))
= 3(7 { − 1)[7 8_{ − 7 8 ]
= 37 8 (7 { − 1);
2. ∆ ( ; + ) =( + ℎ); −  ;  +  + ℎ– ]
=  ; − 2ℎ + ℎ; −  ; +  + ℎ − 
= ℎ; − 2ℎ + ℎ

∆; (x2+x) = ∆ (∆ (x2+x))
Hence,

= ∆ (ℎ; − 2ℎ + ℎ)
= ℎ; − 2ℎ( + ℎ − ) + ℎ

Prepared by Haileyesus T., UOG Page 141


= ℎ; − 2ℎ − 2ℎ; + 2ℎ + ℎ
= ℎ − ℎ;
3. ∆ (¤„ MY ) =¤„ MY ( + ℎ) − ¤„ MY 

=¤„ MY Y_(8_{)8
(8_{)M8

= ¤„ MY  
{
Y_8{_8 :
∆:
EXAMPLE 4.13: Show that 7 8 =( ) 7 8 . ∆: ,with interval of differencing being h.
¢£

SOLUTION: Let () = 7 8 , then J() = ( + ℎ), therefore E7 8 = 7 8_{


Now, ∆ () = ( + ℎ) − ()
∆ei = ei_‚ − ei =ei (e‚ − 1)
∆; ei = ei (e‚ − 1);
Therefore,

  7 8 =∆; J MY ei = ∆; eiM‚
∆:

= ∆; ei eM‚ = eM‚ (∆; ei )


=eM‚ (eM‚ − 1); ei
Hence,

( )ex. = eM‚ (eM‚ − 1); ei


∆: ¢£ ¢£¥8
∆: Ì † ¢£ (¢8 MY):

= ei

EXAMPLE 4.14: Show that lT − lY + l; −……….. = lT − ∆lT + ∆; lT − ∆> lT +…….


Y Y Y Y
; A V YE

SOLUTION: On taking left hand side =lT − lY + l; − l> +………..


= lT − JlT + J ; lT − J > lT +………..
= (1 − J + J ; − J > + ⋯ )lT
Y
)lT
Y_O
=(
Y
= ( Y_Y_∆)lT
Y
= ( ;_∆)lT

= ; (1 + ;)MY lT
Y

= 1 − + − +………...]lT
Y ∆ ∆: ∆=
; ; A V

= lT − ∆lT + ∆; lT − ∆> lT +……


Y Y Y Y
; A V YE

Prepared by Haileyesus T., UOG Page 142


4.7 ESTIMATION OF ERROR BY DIFFERENCE TABLE

Let oT , oY , o; ,…, ob be the exact values of a function o = () corresponding to arguments T ,


Y , ; ,, ........., b . Now to determine error in such a case and to correct the functional values, let an
error δ is made in entering the value of o> in the table so that mistaken value of o> is o> + c.
Table: 4.5 the spread of Error

x y ∆y ∆; o
T oT
∆oT
Y oY ∆; oT
∆oY
; o; ∆; oY + c
∆o; + c
> o> +c ∆; o; − 2c
∆o> − c
A oA ∆; o> + c
∆oA
C oC ∆; oA
∆oC
E oE

From the above difference table we noted that:


1. The error in column y affects two entries in column ∆y, three entries in column ∆2y
and so on. i.e. the error spreads in triangular form.
2. The error increases with the order of differences.
3. The coefficients of δ’s are binomial coefficients with alternative signs +, –, ......
4. In various difference columns of the above table the algebraic sum of the errors is zero.
5. The errors in the column ∆ky are given by the coefficients of the binomial expansion (1 − c)ˆ .
6. In even differences columns of ∆2y, ∆4y, ..., the maximum error occurs in a horizontal line in
which incorrect value of y lies.
7. In odd difference columns of ∆1y, ∆3y,......, the maximum error lies in the two middle terms
and the incorrect value of y lies between these two middle terms.

Prepared by Haileyesus T., UOG Page 143


EXAMPLE 4.15: Find the error and correct the wrong figure in the following functional values

x 1 3 3 4 5 6 7
y 2 5 10 18 26 37 50

SOLUTION: The finite difference table:

x Y ∆y ∆; o ∆> o
1 2
3
2 5 2
5 1
3 10 3
8 -3
4 18 0
8 3
5 26 3
11 -1
6 37 2
13
7 50

From the seventh properties above the maximum error lies in the two middle terms -3 and 3 and the
incorrect value of y lies between these two middle terms as shown by the horizontal arrow. Here the
sum of all the third differences is zero and the adjacent values –3, 3 are equal in magnitude.
Hence horizontal line between –3 and 3 points out the incorrect functional value 18. Therefore
coefficient of first middle term on the expansion of (1 – p)3= –3
⇒ –3e = –3 ⇒ e= 1
Therefore, Correct functional value = 18 – 1 = 17.

EXAMPLE 4.16: One number in the following is misprint. Correct it.


1, 2 ,4 ,8 ,16, 26 ,42, 64 ,93.

Prepared by Haileyesus T., UOG Page 144


SOLUTION: Difference tables for given data it as follows:
 o ∆y ∆; o ∆> o ∆A o ∆C o
1 1
1
2 2 1
2 1
3 4 2 1
4 2 -5
4 8 4 -4
8 -2 10
5 16 2 6
10 4 -10
6 26 6 -4
16 0 5
7 42 6 1
22 1
8 64 7
29
9 93

In the above table, the fourth order differences column have algebraic sum of all the values equal to 0.
The middle term of this difference column is [Link],
6e= 6 or e= 1
Hence, correct value is given by 16 – 1 = 15.

EXAMPLE 4.17: Locate the error in following entries and correct it.
1.203, 1.424, 1.681, 1.992, 2.379, 2.848, 3.429, 4.136
SOLUTION: Difference table for given data is as follows:

Prepared by Haileyesus T., UOG Page 145


Sum of all values in column of fourth order difference is –0.004 which is very small as compared
to sum of values in other columns.
Therefore, ∆4y = 0
Errors in this column are e, –4e, 6e, –4e and e.
Term of Maximum value = 24 ⇒ 6e= 24 ⇒ e= 4.
Error lies in 2379.
Hence, required correct entry = 2379 – 4 = 2375.
Hence, correct value = 2.375.

Prepared by Haileyesus T., UOG Page 146


4.8 TECHNIQUE TO DETERMINE THE MISSING TERM

Given a set of equidistant values of arguments  = ,  + ℎ,  + 2ℎ, . . . . ,  + „ℎ, and its


corresponding value of o = () = (), ( + ℎ), ( + 2ℎ), . . . . . . , ( + „ℎ). i.e., (b ) are
given.
Let one of the value of () is missing. Say it (ª ). To determine this missing value of (),
assume that () can be represented by a polynomial of degree („– 1) since n values of () are

Hence, ∆bMY () =constant and ∆b () = 0


known.

Therefore, (E − 1)b  () = 0


E b −nC1E bMY + nC2E bM; −……..+(−1)b E] () = 0
E b () −nC1E bMY ()+ nC2E bM; () −……..+(−1)b E () = 0
For first tabulated value of , put  = T

E b (0) − „E bMY f(0) + E bM; (0) −………………+(−1)b (0) = 0


b(bMY)
;

(„) – „(„ − 1) + („ − 2)−…………..+(−1)b (0) = 0


b(bMY)
;
………..(4.11)

In eq. (4.11), except missing term, each term is known and hence from this way missing term can
be obtained. If two values of () are missing then in that case only („– 1) values of () can be
given by a polynomial of degree („– 2). That is
∆bMY () = 0 or (E − 1)bMY ( ) = 0
This gives for  = T , (the first tabulated value) and for  = Y , (second tabulated value) and by
solving these two we get the two missing values for given function (). Similarly method
proceeds to find three and more missing terms in given function ().
EXAMPLE 4.18: Estimate the missing term in the following table:

 0 1 2 3 4
o = () 1 3 9 - 81
oT oY o; o> oA

Explain why values differ from 33or 27.

∆A ( ) = 0 ,Ʉ
SOLUTION: Since we have given 4 values, therefore

Prepared by Haileyesus T., UOG Page 147


i.e (E − 1)A ( ) = 0 , Ʉ
i.e (E4-4E3+6E2-4E+1)() = 0 ,Ʉx
i.e E4 () −4E3 () +6E2 () −4E () + () = 0 , Ʉx
i.e ( + 4) − 4 ( + 3) + 6 ( + 2) − 4 ( + 1) + () = 0 , Ʉx
(On taking interval of differencing being 1)
On putting  = T , we get
(4) − 4(3) + 6(2) − 4(1) + (0) = 0
Substituting the value of (0), (1), (2), (4) in (1), we get
81 -4 (3) +6x 9 -4 x3 + 1 = 0
4(3) = 124
i.e., (3) = 31
(Function values are 3n type and this is not a polynomial)

∆A oT = 0 ,Ʉ
Or let's do in the following way. Since we have given four values of the arguments, we have

∆> oY − ∆> oT = 0
∆; o; − ∆; oY − (∆; oY − ∆; oT ) = 0
∆; o; − 2∆; oY + ∆; oT ) = 0
∆o> − ∆o; − 2(∆o; − ∆oY ) + ∆oY − ∆oT = 0
∆o> − 3∆o; + 3∆oY − ∆oT = 0
oA − o> − 3(o> − o; ) + 3(o; − oY ) − (oY − oT ) = 0
oA − 4o> + 6o; − 4oY + oT = 0
Now substituting the values from the table, we have
81 − 4o> + 6(9) − 4(3) + 1 = 0
81 − 4o> + 54 − 12 + 1 = 0
4o> = 124, hence o> = 31
EXAMPLE 4.19: Find the missing value of the data:

 1 2 3 4 5
() 7 - 13 21 37
oT oY o; o> oA

SOLUTION: Since 4 values are known, let us assume the fourth order differences being zero.
Also since one value is unknown, we assume

Prepared by Haileyesus T., UOG Page 148


∆A () = 0 ,Ʉ
i.e (E − 1)A () = 0 , Ʉ
i.e (E4-4E3+6E2-4E+1)f(x) =0 ,Ʉx
i.e E4 () -4E3 () +6E2 () -4E () + () =0 , Ʉx
i.e ( + 4) −4 ( + 3) + 6 ( + 2) − 4 ( + 1) + () =0 , Ʉx
(On taking interval of differencing being 1)
On putting  = T , we get
(4) − 4 (3) + 6(2) − 4(1) + (0) = 0
Substituting the value of f(0), f(1), f(2), f(4) in (1), we get
37 − 4 (21) + 6(13) − 4 (1) + 7 = 0
38 − 4 (1) = 0
(1) =9.5
Hence, the required missing value is 9.5.

∆A oT = 0 ,Ʉ
Or let's do in the following way. Since we have given four values of the arguments, we have

∆> oY − ∆> oT = 0
∆; o; − ∆; oY − (∆; oY − ∆; oT ) = 0
∆; o; − 2∆; oY + ∆; oT ) = 0
∆o> − ∆o; − 2(∆o; − ∆oY ) + ∆oY − ∆oT = 0
∆o> − 3∆o; + 3∆oY − ∆oT = 0
oA − o> − 3(o> − o; ) + 3(o; − oY ) − (oY − oT ) = 0
oA − 4o> + 6o; − 4oY + oT = 0
Now substituting the values from the table, we have
37 − 4(21) + 6(13) − 4oY + 7 = 0
37 − 84 + 78 − 4oY + 7 = 0,
4oY = 38,
oY = 9.5.
EXAMPLE 4.20: Find the missing values in the table:

 45 50 55 60 56
() 3 - 2 - -2.4

Prepared by Haileyesus T., UOG Page 149


SOLUTION: Difference table is as follows:

As only three entries y0, y2, y4 are given, the function y can be represented by a second degree

∆> oT = 0 and ∆> oY = 0 ,Ʉ


Polynomial.

3oY +o> =9 and oY +3o> =3.6


On solving these, we get
oY =2.925, o; =0.225

Prepared by Haileyesus T., UOG Page 150


REVIEW EXERCISE
1. Show that
(i) En= (1 + ∆)n
(ii) δ= ∆(1 +∆)–1/2
(iii)∇= 1 – (1 +∆)–1
(iv) ∆3o; = ∇3oC
2. Find the following with the given h value
a. ∆7 ?8 ,ℎ = 1
b. ∆§¬„ , ℎ = 2

c. ∆; ( 8), ℎ = 1
Y

d. ∆§¬„ ( + ), ℎ = ℎ


e. ∇∆( > ) ,ℎ = 1
3. Construct a backward difference table for o =  3+ 2 + 3 for  = 1, 2, 3, 4, 5.
4. Given lT = 1, lY = 5, l; = 10, l> = 30, lA = 30, find ∆4lT .
5. Construct a central difference table for the following data:
 0 1 2 3
o 1 4 17 46
6. Construct a divided difference table for the data given:
 1 3 5 6
o 71 115 295 466

7. Estimate the missing term in the following tables


a)
 1 2 3 4 5
o 5 14 ? 74 137
b)
 1 2 3 4 5
o 8 17 38 ? 140
c)
 0 1 2 3 4
o 1 ? 13 ? 81
8. Locate the error in the following: –1, 0, 7, 26, 65, 124, 215, 342, 511.

Prepared by Haileyesus T., UOG Page 151


CHAPTER – 5: INTERPOLATION
Chapter objectives
At the end of this chapter you will be able to:

 Define the concept of interpolation and extrapolation.


 Describe equally spaced and unequally spaced data points.
 Identify interpolation methods that we use for equally spaced and unequally
spaced data points.
 Differentiate the Newton's forward, backward and central difference
interpolation.
 Drive the methods for equally spaced data.
 Mention the advantage of methods of unequally spaced over methods for equally
spaced.
 Derive the formula for unequally spaced data.

INTRODUCTION
Interpolation is the technique of estimating the value of a function for any intermediate value of
the independent variable. The process of computing or finding the value of a function for any value
of the independent variable outside the given range is called extrapolation. Here, interpolation
denotes the method of computing the value of the function o = () for any given value of the
independent variable x when a set of values of o = () for certain values of  are known or
given. It is required to find a simpler function, sayÆ(), such that () and Æ() agree at the set
of tabulated points. If Æ() is a polynomial, then the process is called Polynomial interpolation
and Æ() is called the interpolating polynomial. Similarly, different types of interpolation arise
depending on whether Æ() is a finite trigonometric series, series of Bessel functions, etc. In this
chapter we shall be concerned with Polynomial interpolation only.

The study of interpolation is based on the assumption that there are no sudden jumps in the values
of the dependent variable for the period under consideration. It is also assumed that the rate of
change of figures from one period to another is uniform.

Numerical interpolation actually approximates the actual curve by numerical polynomials using
the discrete data. Interpolation is based on calculus of finite differences.

Prepared by Haileyesus T., UOG Page 152


If the discrete data is equally spaced, we use the following numerical interpolation methods

(i) Newton's forward difference interpolation


(ii) Newton's backward difference interpolation
(iii) Central difference interpolation

If the discrete data is unequally spaced, we use the following numerical interpolation methods

(i) Lagrange's interpolation method


(ii) Newton's divided difference interpolation method

5.1 INTERPOLATION WITH


ITH EQUAL INTERVALS

Newton
wton’
5.1.1 Newton’s forw
forward
ard difference Int
Interp
erpolat
olation

Statement: Let o = () be a function which takes the values (T , oT ) (Y , oY ) (; , o; ) ,…, (b ,
ob ) for („ + 1) equally spaced values of  such that ª = T + ¬ℎ for ¬ = 0,1,2, … , „. One form of
the unique nth-degree polynomial that passes through the n + 1 points is given by

() = oT +u∆oT +u(u-1)


∆: r¹ ∆= r¹ ∆@ r¹ ∆f r¹
;! >! A! b!
+ u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……+u(u-1)(u-2)…(u-n+1)

Where l =
8M8¹
{
…………….. (5.1)

Proof: Since we have („ + 1) data points there exist a function polynomial () of nth degree,
given by

() = T + Y ( – T ) + ; (– T )( –Y ) + > (– T )( –Y ) ( –; )+ …

+ b ( –T ) ( –Y )… ( –bMY ) …………(5.2)

Where T , Y ,…., b are constants to be determined .

Substituting  = T , Y , ; , …., b successively in Eq.(5.2), we get

T =oT …………….(5.3)

oY =T + Y (Y – T ) using eq.(5.3) 

Y = = …………….(5.4)
re Mr¹ ∆r¹
{ {

o; = T + Y (; – T ) + ; (; – T )(; –Y )

o; –oT – (2h) = ; (2ℎ)(ℎ)


∆r¹
{

Prepared by Haileyesus T., UOG Page 153


∆; oT = ; (2ℎ; )

∆: r¹
; = …………… (5.5)
;!{:

Similarly,

∆= r¹ ∆f r¹
> = ,…., b =
>!{= b!{f

Substituting the values of the constants in eq. (5.2) we get


∆: r¹ ∆= r¹ ∆f r¹
() =oT +( – T )∆oT +(– T )( –Y ) +(– T)( –Y )( –; ) +……+( –T ) ( –Y )… ( –bMY )
;! >! b!

Let  = T + lℎ or  − T = lℎ

 − Y =  − T + T − Y = lℎ − ℎ = (l − 1)ℎ

 − ; =  − T + T − ; = lℎ − 2ℎ = (l − 2)ℎ

……………………………………………………… ….………(5.6)

 − b =  − T + T − b =lℎ – „ℎ = (l − „)ℎ

Then substituting the values in eq. (5.6) in to in the above equation, we get

∆: r¹ ∆= r¹ ∆@ r¹ ∆f r¹
() = oT +u∆oT +u(u-1) ;!
+ u(u-1)(u-2) >!
+u(u-1)(u-2)(u-3) A!
+……+u(u-1)(u-2)…(u-n+1) b!

8M8¹
{
Where u=

Which is required Newton's forward difference interpolation formula. This formula is useful
for interpolating the values of () near the starting of the set of data values given.

EXAMPLE 5.1: The values of §¬„  are given below for different values of . Find the value of sin
32°.
 30T 35T 40T 45T 50T
o = §¬„ 0.500 0.5736 0.6428 0.7071 0.7660

SOLUTION:  = 32° is very near to the starting value T = 30°. We compute sin 32° by using
Newton’s forward interpolation formula.

The forward difference table is:

Prepared by Haileyesus T., UOG Page 154


x y ∆y ∆; o ∆> y ∆A o
30T 0.500
0.0736
35T 0.5736 -0.0044
0.0692 -0.005
40T 0.6428 -0.0049 0
0.0643 -0.005
45T 0.7071 -0.0054
0.0589
50T 0.7660

Here ℎ =5, T =30 and  =32.

Therefore,

l=
8M8¹
= 0.4
{

Hence using the forward difference interpolation formula

∆: r¹ ∆= r¹ ∆@ r¹ ∆f r¹
() = oT +u∆oT +u(u-1)
;! >! A! b!
+ u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……+u(u-1)(u-2)…(u-n+1)

(32) = 0.500 + 09.4(0.4-1)


[Link] [Link] [Link]
;! >! A!
+ 0.4(0.4-1)(0.4-2) +0.4(0.4-1)(0.4-2)(0.4-3)

= 0.5000 + 0.02944 + 0.000528 – 0.00032

= 0.529936

EXAMPLE 5.2: Find the number of students from the following data who secured marks

not more than 45.

Marks range 30-40 40-50 50-60 60-70 70-80


No. of students 35 48 70 40 22

SOLUTION: Let's first change the table according to our problem as

Marks less than 40 50 60 70 80


No. of students 35 83 153 193 215

Let us construct a forward difference table as

Prepared by Haileyesus T., UOG Page 155


 o ∆o ∆; o ∆> y ∆A o
40 35
48
50 83 22
70 -52
60 153 -30 64
40 12
70 193 -18
22
80 215

Here ℎ =10, T =40 and  = 45

Therefore,

l=
8M8¹ Y
=
{ ;

Hence using the Newton's forward difference interpolation formula

∆: r¹ ∆= r¹ ∆@ r¹ ∆f r¹
() = oT +u∆oT +u(u-1)
;! >! A! b!
+ u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……+u(u-1)(u-2)…(u-n+1)

Y Y Y ;; Y Y Y (MC;) Y Y Y Y EA
= 35 + ;(48) +;(; -1) ;! + ;(; -1)(; -2) >!
+;(; -1)(; -2)(; -3) A!

= 35 + 24 – 2.75 – 3.25 –2.5

= 59 – 8.5

= 50.5

≅51

Therefore the Number of students who secured not more than 45 marks are 51.

EXAMPLE 5.3: Find the cubic polynomial which takes the following data:

 0 1 2 3
() 1 0 1 10

SOLUTION: Let us first form the difference table:

Prepared by Haileyesus T., UOG Page 156


 o ∆y ∆; o ∆> o
0 1
-1
1 0 2
1 6
2 1 8
9
3 10

Therefore, using the Newton's forward difference interpolation formula

∆: r¹ ∆= r¹ ∆@ r¹ ∆f r¹
() = oT +u∆oT +u(u-1)
;! >! A! b!
+ u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……+u(u-1)(u-2)…(u-n+1)

Now  = T +uh which implies u= = , where ℎ = 1, T =0. Hence the formula becomes
8M8¹ 8
{ Y
=

∆: r¹ ∆= r¹
() = oT +u∆oT + u(u-1)
;! >!
+ u(u-1)(u-2)

= 1 + (−1) + ( − 1) +( − 1)( − 2)


(;) (E)
;! >!

= 1–  +  ; –  +  > – 2 ; – ; + 2 =  > –2 ; + 1

EXERCISE 5.1

(1) Use Newton's forward difference interpolation formula to find o at  = 23 given the
following table of Values:

 21 25 29 33 37
o 18.4708 17.8144 17.1070 16.3432 15.5154

(2) From the following table estimate the number of students who obtained marks in computer
programming between 45 and 50.

Marks 35-45 45-55 55-65 65-75 75-85


No. of students 20 40 60 60 20

Prepared by Haileyesus T., UOG Page 157


Newton
wton’
5.1.2 Newton’s backw
ackwar
ard difference in
kward interp
erpolat
olation

Statement: Let o = () be a function which takes the values (T , oT ), (Y , oY ), (; , o; ),…, (b ,
ob ) for („ + 1) equally spaced values of  such that ª = b + ¬ℎ for ¬ = 0,1,2, … , „. One form of
the unique nth-degree polynomial that passes through the n + 1 points is given by

() = ob +u∇ob + u(u+1)


∇: rf ∇= rf ∇@ rf ∇f rf
;! >! A! b!
+ u(u+1)(u+2) +u(u+1)(u+2)(u+3) +…+u(u+1)…(u+n-1)

8M8f
{
Where u= ……………..(5.7)

Proof: Since we have („ + 1) data points, there exists a polynomial function () of degree n,
given by

() = T + Y ( – b ) + ; (– b )( –bMY ) + > (– b )( –bMY ) ( –bM; )+ …

+b ( –b ) ( –bMY )… ( –Y ) …………(5.8)

Where T , Y ,…., b are constants to be determined .

Substituting  = b , bMY , … , T successively in eq. (5.8), we get

Put  = b T = ob ……….(5.9)

Put  = bMY obMY = T +Y (bMY − b ) [using eq. (5.9) ]

Y = =
rf›e Mrf ∇rf
{ {
……….(5.10)

Put  = bM; obM; = T + Y (bM; − b ) + ; (bM; − b )( bM; − bMY )

obM; − ob – (2ℎ) = ; (2ℎ)(ℎ)


∇rf
{

∇; oT = ; (2ℎ; )

∇: rf
;!{:
a2 = …… (5.11)

Similarly,

> = ,…., b =
∇= r¹ ∇f rf
>!{= b!{f

Substituting the values of the constants in eq. (5.8), we get

()=ob +( – b )∇ob +(– b )( –bMY ) +(– b )( –bMY )( –bM; ) +…+( –b )( –bMY )…( –Y )
∇: rf ∇= rf ∇f rf
;! >! b!

Prepared by Haileyesus T., UOG Page 158


Let  ! b 9 lz or  I b ! lz , then

 I bMY !  I b 9 b I bMY ! lz 9 z ! l 9 1 z

 I bM; !  I b 9 b I bM; ! lz 9 2z ! l 9 2 z

……………………………………………………………………….. …………(5.12)

 I T !  I b 9 b I T ! lz 9 „z ! l 9 „ z

Then substituting the values in eq. (5.12) in to the above equation, we get

 =ob +u∇ob +u(u+1)


∇: rf ∇= rf ∇@ rf ∇f rf
;! >! A! b!
+u(u+1)(u+2) +u(u+1)(u+2)(u+3) +…+ u(u-1)…(u+n-1)

Which is required Newton's backward difference interpolation formula. This formula is useful
for interpolating the values of  near the end of the set of data values given.

EXAMPLE 5.4: Using Newton’s backward difference formula's find the value of 7 MY.U from the
following table of value of 7 M8

SOLUTION: The backward difference table for the given data as follows

Prepared by Haileyesus T., UOG Page 159


Here ℎ = 0.25 ,b = 2 and  = 1.9 then l = = −0.4
8M8f
{

Therefore, using the forward difference interpolation formula

∇: rf ∇= rf ∇@ rf
() =ob +u∇ob +u(u+1)
;! >! A!
+u(u+1)(u+2) +u(u+1)(u+2)(u+3) +……….

[Link] [Link]>>
;! >!
=0.1353 +(-0.4)(-0.0385) +(-0.4)(-0.4 +1) +(-0.4)(-0.4+1)(-0.4+2)

= 0.1353+0.0154 – 0.001296 + 0.0002112 + 0.000024

= 0.149

EXAMPLE 5.5: The areas A of a circle of diameter d is given for the following values and fined A
for 105.

d 80 85 90 95 100
A 5026 5674 6362 7088 7854

SOLUTION: First of all we form the backward difference table as follows

d(x) å = () ∇y ∇; o ∇> o ∇A o


80 5026
648
85 5674 40
688 -2
90 6362 38 4
726 2
95 7088 40
766
100 7854

Here ℎ = 5,  = 105,b =100 then l =


8M8f
{
=1

Now on applying Newton’s backward difference formula, we have

∇: rf ∇= rf ∇@ rf
() =ob +u∇ob +u(u+1)
;! >! A!
+u(u+1)(u+2) +u(u+1)(u+2)(u+3) +……….

(105) = 7854 +(1) 766 +(1)(2) ;! +(1)( 2)(3)>! + (1)(2)(3)(4)A!


AT ; A

Prepared by Haileyesus T., UOG Page 160


=7854 + 766 + 46

= 8666

This is the required area for the given diameter of circle.

EXAMPLE 5.6: The following data gives the melting point of an alloy of lead and zinc, where ¤
is the temperature in degrees c and Í is the percentage of lead in the alloy.

Í 40 50 60 70 80 90
¤ 184 204 226 250 276 304

Find the melting point of the alloy containing 84 per cent lead.

SOLUTION: The value of 84 is near the end of the table, therefore we use the Newton’s backward
difference interpolation formula.

The difference table is

¤ Í ∆p ∆; Í ∆> Í ∆A Í
40 184
20
50 204 2
22 0
60 226 2 0
24 0
70 250 2 0
26 0
80 276 2
28
90 304

Here ℎ = 10, ¤ = 84, ¤b = 90 then l =


Mf
{
= -0.6

Now on applying Newton’s backward difference interpolation formula, we have

∇: Pf ∇= Pf ∇@ Pf
Í() =Íb +u∇Íb +u(u+1)
;! >! A!
+u(u+1)(u+2) +u(u+1)(u+2)(u+3) +……….

Prepared by Haileyesus T., UOG Page 161


;
;!
= 304 + (-0.6)(28) + (-0.6)(-0.6+1)

= 304- 16.8 - 0. 24

=286.96

EXERCISE 5.2

1. Using the Newton’s backward difference formula, find the polynomial () satisfying the
following data. Hence, find (2).

x 0 5 10 15
() 14 379 1444 3584

2. The profits of a company (in thousands of Birr) are given below: Calculate the total profits
between 1999–2002.

 1990 1993 1996 1999 2002


Profit o = () 120 100 111 108 99

5.1.4 Error in the Interpolation Formula

Let Æ() denote the interpolating polynomial. Also, let the function () be continuous and
possess continuous derivatives within the interval (T , b ). Now, defining the auxiliary function
;(¤) as
(t−x )(t−x )…(t−x )
;(¤) = (¤) − Æ(¤) − {( ) − Æ()} (x−x 0)(x−x1 )…(x−xn )
0 1 n
……………….. (5.13)

The expression(t − xT )(t − x; ) … (t − x^) is a polynomial of degree (n+ 1) in ¤ and the coefficient
of ¤ = 1. Hence, the (n + 1)th derivative  polynomial is (n+ 1)!. That is

; (b_Y) () =  (b_Y) () − < () − Æ()= Àx−x Àn+1Á!


=0
0 ÁÀx−x1 Á…(x−xn )
…………..(5.14)

() − Æ() = (x − x0 )(x − x1 ) … (x − xn )


(„+1) ( )
 
(n+1)!
Or …………..(5.15)

Let œ() denote the error in the formula. Then

œ() = () − Æ().

Prepared by Haileyesus T., UOG Page 162


œ() = (x − xT )(x − xY ) … (x − x^ )

(„+1) ()

(^_Y)!
Hence

Since  − T =lℎ or  − Y =(l − 1)ℎ, … ,  − b =(l − „)ℎ where ℎ is the interval of differencing,
we have

œ() = l(l − 1)(l − 2) … (l − „)


{f¥`e ¸(f¥e) (Ÿ)
(^_Y)!
Error

Now, employing the relation

ú = {∆
Y

We have

úb_Y = ∆b_Y
Y
{f¥e

 (b_Y) () =
∆f¥e ¸(8¹ )
b_Y
Or ………….(5.16)

The error in the forward interpolation formula is given by

∆f¥e r¹
œ() = l(l − 1)(l − 2) … (l − „)
(b_Y)!
……….(5.17)

In a similar manner, by taking the auxiliary function ;(¤) in the form

(t − x^ )(t − x^MY ) … (t − xT )
; (¤) = (¤) − Æ(¤) − {() − Æ()}
(x − x^ )(x − x^MY ) … (x − xT )

and proceeding as above, we obtain the error in the Newton’s backward interpolation formula as

∇f¥e r¹
œ() = (b_Y)!
l(l + 1)(l + 2) … (l + „)

Where l =
8M8f
{

EXAMPLE 5.7: Using Newton’s forward interpolation formula find the value of ¦R§ 52º from the
following data and estimate the error.

 45T 50T 55T 60T


o = ¦R§ 0.7071 0.6428 0.5736 0.5

SOLUTION: The difference table is given below:

Prepared by Haileyesus T., UOG Page 163


 o ∆ ∆] o ∆] o
45T 0.7071
−0.0643
50T 0.6428 −0.0049
−0.0692 0.0005
55T 0.5736 −0.0044
−0.0736
60 T
0.5

Here T = 45 ,  = 52and ℎ = 5 then

l= = = 1.4
8M8¹ C;MAC
{ C

From Newton’s forward interpolation formula

∆: r¹ ∆= r¹ ∆@ r¹ ∆f r¹
() = oT +u∆oT +u(u-1)
;! >! A! b!
+ u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……+u(u-1)(u-2)…(u-n+1)

−0.0049 0.0005
o = (52) = 0.7071 + 1.4(−0.0643) + 1.4(1.4 − 1) + 1.4(1.4 − 1)(1.4 − 2)
2! 3!

= 0.615680

∆f¥e r¹
Error = (b_Y)!
l(l − 1)(l − 2) … (l − „) when „ = 2

∆: r¹
= l(l − 1)(l − 2) >!

= 1.4(1.4 − 1)(1.4 − 2)
[Link]
E

= –0.000028

Prepared by Haileyesus T., UOG Page 164


5.1.3 Central Difference int
5.1.3 Cent interp
erpolat
olation Formula

In the previous sections we have seen interpolation formulas that are fundamental and are
applicable to nearly at the beginning and the end of set of data points. But they do not converge as
rapidly as desired if we use them to interpolate near the middle points. So we need methods which
will be used for interpolation at the central. The central difference interpolation formula answers
our question. These formulas are used for interpolation near the middle of an argument values.
Before looking the central difference methods, let's see basic formulas for the derivation of them.

[Link] Gauss's Forward Difference Formula

Statement: Suppose o = () is a function which takes the values …(M; , oM; ),
(MY , oMY ), (T , oT ), (Y , oY ) (; , o; ),…, for („ + 1) equally spaced values of  such that ª =
T + ¬ℎ for ¬ = 0,1,2, … , „. One form of the unique nth-degree polynomial that passes through the
n + 1 points is given by

oP =oT +u∆yT + ∆; yMY + ∆> yMY + ∆A yM; +……


q(qMY) (q_Y)q(qMY) (q_Y)q(qMY)(qM;)
;! >! A!

and  = T is the origin(which is the middle data point) .


8M8¹
{
where u =

Proof:

The Newton's forward difference interpolation formula is

∆: r¹ ∆= r¹ ∆@ r¹ ∆f r¹
() = oT +u∆oT +u(u-1)
;! >! A! b!
+u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……+u(u-1)(u-2)…(un+1)

and  = T is the origin.


8M8¹
{
where u = …………(5.18)

Let us assume a polynomial equation by using the arrow marks shown in the table below:
oP =oT +?Y ∆oT +?; ∆; yMY +?> ∆> yMY +?A ∆A yM; +……….. …….(5.19)
Where?Y , G; , … , ?b , are coefficients to be determined. From the Newton’s forward interpolation
formula eq.(5.18), we have
∆: r¹ ∆= r¹ ∆@ r¹
oP =oP_T = J @ oT = oT +u∆oT +u(u-1) ;!
+ u(u-1)(u-2) >!
+u(u-1)(u-2)(u-3) A!
+……… …….(5.20)

Now ∆; yMY = ∆; E MY yT = ∆; (1 + ∆)MY yT = (1-∆ + ∆; - ∆> +….)y0

= ∆; yT -∆> yT +∆A yT - ∆C yT +………

Similarly,

Prepared by Haileyesus T., UOG Page 165


∆> yMY = ∆> yT -∆A yT + ∆C yT -∆E yT + …………..

∆A yM; = ∆A yT -2∆C yT + 36yT -4∆X yT +…………..

and so on.

Table 5.1: Gauss's Forward Difference table

x y ∆ ∆] ∆ ∆A ∆B ∆C

x-3 y-3
∆yM>
x-2 y-2 ∆; yM>
∆yM; ∆> yM>
x-1 y-1 ∆; yM; ∆A yM>
∆yMY ∆> yM; ∆C yM>
x0 y0 ∆; yMY ∆A yM; ∆E yM>
∆yT ∆> yMY ∆C yM;
x1 y1 ∆; yT ∆A yMY
∆yY ∆> yT
x2 y2 ∆; yY
∆y;
x3 y3

Hence eq. (5.19) becomes

oP = oT +?Y ∆yT +?; (∆; yT -∆> yT +∆A yT - ∆C yT +… )+ ?> (∆> yT -∆A yT + ∆C yT -∆E yT + … )

+?A (∆A yT -2∆C yT + 36yT -4∆X yT +…)+……….. ………..(5.21)

Comparing corresponding coefficients in eq. (5.20) and eq.(5.21), we get

?Y = u

?; =
q(qMY)
;!

?> =
(q_Y)q(qMY)
>!

Prepared by Haileyesus T., UOG Page 166


?A =
(q_Y)q(qMY)(qM;)
A!
, etc.

Hence, the Gauss’s forward interpolation formula can be written as

oP =oT +u∆yT + ∆; yMY + ∆> yMY + ∆A yM; +……


q(qMY) (q_Y)q(qMY) (q_Y)q(qMY)(qM;)
;! >! A!

Remark: This formula is applicable when u lies between 0 and ½.

EXAMPLE 5.8: From the following table find o when  = 1.45.

SOLUTION: The forward difference table is

Here we haveT = 1.4,  =1.45 and ℎ=0.2. Then using the formula
8M8¹ [Link].A
{ T.;
u= = = 0.25

Now using the Gauss’s forward interpolation formula as

oP =oT +u∆yT + ∆; yMY + ∆> yMY + ∆A yM; +……


q(qMY) (q_Y)q(qMY) (q_Y)q(qMY)(qM;)
;! >! A!

(0.256) +
T.;C(T.;CMY) (T.;C_Y)T.;C(T.;CMY)
;! >!
= -0.016 +0.25(0.352)+ (0.048)+….

= 0.047875

Prepared by Haileyesus T., UOG Page 167


EXAMPLE 5.9: Use Gauss’s forward formula to find y at 30 for the following data.

SOLUTION: Let us take the origin at T = 29,  =30 and ℎ =4. Then using the formula
8M8¹ >TM;U
{ A
u= = = 0.25

Now, for the given data difference table is:

Putting these values in Gauss forward interpolation formula, we have

oP =oT +u∆yT + ∆; yMY + ∆> yMY + ∆A yM; +……


q(qMY) (q_Y)q(qMY) (q_Y)q(qMY)(qM;)
;! >! A!

(−0.0564 ) + ( −0.0054)+….
T.;C(T.;CMY) (T.;C_Y);C(T.;CMY)
;! >!
= 17.1070 + 0.25(-0.7638) +

= 17.1070 – 0.19095 + 0.0052875 + 0.00002968

= 16.9216

Prepared by Haileyesus T., UOG Page 168


[Link] Gauss's Backward Difference Formula
Statement: Suppose o = () is a function which takes the values …(M; , oM; ),
(MY , oMY ),( T , oT ), (Y , oY ) (; , o; ),…, for („ + 1) equally spaced values of  such that ª =
T + ¬ℎ for ¬ = 0,1,2, … , „. One form of the unique nth-degree polynomial that passes through the
n + 1 points is given by

oP =oT +u∆yMY + ∆; yMY + ∆> yM; + ∆A yM; +……


q(q_Y) (q_Y)q(qMY) (q_Y)(q_;)q(qMY)
;! >! A!

and  = T is the origin(which is the middle data point) .


8M8¹
{
where u =

Proof: This formula is also solved by using Newton’s forward difference formula.

Now, we know Newton’s formula for forward interpolation is

∆: r¹ ∆= r¹ ∆@ r¹
o = () =oT +u∆oT + u(u-1)
;! >! A!
+ u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……… ….(5.22)

and  = T is the origin.


8M8¹
{
where u =

Let us assume a polynomial equation by using the arrow marks shown in the table below:
oP = yo+?YÇ ∆yMY +?;Ç ∆; yMY +?>Ç ∆> yM; +?AÇ ∆A yM; +……….. …….(5.23)
Where ?YÇ , ?;Ç , ….,?bÇ are coefficients to be determined. From the Newton’s forward interpolation
formula eq. (5.22), we have
∆: r¹ ∆= r¹ ∆@ r¹
oP = J P oT = oT +u∆oT + u(u-1)
;! >! A!
+ u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……… …….(5.24)

Now ∆yMY =∆E MY yT =∆(1 + ∆)MY yT =∆(1-∆ + ∆; - ∆> +….)oT

= ∆yT - ∆; yT + ∆> yT - ∆A yT +….

∆; yMY = ∆; E MY yT = ∆; (1 + ∆)MY yT = (1-∆ + ∆; - ∆> +….)oT

= ∆; yT -∆> yT +∆A yT - ∆C yT +………

Similarly,

∆> yM; = ∆> yT -2∆A yT + ∆C yT -∆E yT + …………..

∆A yM; = ∆A yT -2∆C yT + 36yT -4∆X yT +…………..

and so on.

Prepared by Haileyesus T., UOG Page 169


Table 5.2: Gauss's Backward Difference table

x y ∆ ∆] ∆ ∆A ∆B ∆C

x-3 y-3
∆yM>
x-2 y-2 ∆; yM>
∆yM; ∆> yM>
x-1 y-1 ∆; yM; ∆A yM>
∆yMY ∆> yM; ∆C yM>
x0 y0 ∆; yMY ∆A yM; ∆E yM>
∆yT ∆> yMY ∆C yM;
x1 y1 ∆; yT ∆A yMY
∆yY ∆> yT
x2 y2 ∆; yY
∆y;
x3 y3

Hence eq. (5.23) becomes

oP =yT +?YÇ (∆yT − ∆; yT + ∆> yT − ∆A yT + ⋯ . )+?;Ç (∆; yT -∆> yT +∆A yT -∆C yT +…)

+?>Ç (∆> yT -2∆A yT + ∆C yT -∆E yT +… ) +

?AÇ (∆A yT -2∆C yT + 36yT -4∆X yT +…)+……….. ………..(5.25)

Comparing eq. (5.24) and eq. (5.25), we get

?YÇ = u

?;Ç =
q(q_Y)
;!

?>Ç =
(q_Y)q(qMY)
>!

?AÇ =
(q_Y)(q_;)q(qMY)
A!
, etc.

Hence, the Gauss’s backward interpolation formula can be written as

oP =oT +u∆yMY + ∆; yMY + ∆> yM; + ∆A yM; +……


q(q_Y) (q_Y)q(qMY) (q_Y)(q_;)q(qMY)
;! >! A!

Prepared by Haileyesus T., UOG Page 170


and  = T is the origin(which is the middle data point) .
8M8¹
{
where u =

Remark: This formula is applicable when u lies between −½ and 0.

EXAMPLE 5.10: Using Gauss backward interpolation formula, find the population for the year
[Link] that

Year() 1901 1911 1921 1931 1941 1951


Population(in thousands) 12 15 20 27 39 52

SOLUTION: Here ℎ= 10. Take origin at T =1941.

To evaluate population in =1936.


8M8¹ YU>EMYUAY
{ YT
u= = = -0.5

Difference table for given data is as:

Gauss backward formula is

oP =oT +u∆yMY + ∆; yMY + ∆> yM; + ∆A yM; +……


q(q_Y) (q_Y)q(qMY) (q_Y)(q_;)q(qMY)
;! >! A!

(1) + (−4)
MT.C(MT.C_Y) (MT.C_Y)MT.C([Link])
;! >!
= 39 +(-0.5)(12) +

= 39 – 6.0 – 0.125 – 0.25

= 32.625

Prepared by Haileyesus T., UOG Page 171


Hence, the population in 1936 is 32625 thousand.

EXAMPLE 5.11: If () is a polynomial of degree four find the value of (5.8) using Gauss’s
backward formula from the following data

(4) = 270, (5) = 648, ∆(5) = 682, ∆> (4) = 132

SOLUTION: Given (5) =682

(6) − (5) = 682 ⇒ (6) = 682 + (5)

⇒(6)=682+648

⇒(6)=1330

Also, ∆3 (4) = 132

⇒ (E−1)3(4) =132

⇒ (7) – 3(6) + 3(5) – (4) = 132

⇒(7) = 3 × 1330 – 3 × 648 + 270 + 132

⇒(7) = 2448

Now form difference table as:

Take T = 6, ℎ = 1,  = 5.8
8M8¹ [Link]
{ Y
u= = = -0.2

From Gauss backward formula

oP =oT +u∆yMY + ∆; yMY + ∆> yM; + ∆A yM; +……


q(q_Y) (q_Y)q(qMY) (q_Y)(q_;)q(qMY)
;! >! A!

Prepared by Haileyesus T., UOG Page 172


(436)+ (132)
MT.;(MT.;_Y) (MT.;_Y)MT.;(MT.;MY)
;! >!
f(5.8) = 1330+-0.2(682) +

= 330 – 136.4 – 34.88 + 4.224

= 1162.944

[Link] Stirling’s formula


Statement: Suppose o = () is a function which takes the values …(M; , oM; ),
(MY , oMY ), (T , oT ), (Y , oY ) (; , o; ),…, for („ + 1) equally spaced values of  such that ª =
T + ¬ℎ for ¬ = 0,1,2, … , „. One form of the unique nth-degree polynomial that passes through the
n + 1 points is given by

oP =oT + ; (∆yMY + ∆yT )+ ∆; yMY + ∆A yM; +……


(q_Y)q(qMY) ∆= m›: _∆= m›e
¼ ½+
q q: (q_Y)q: (qMY)
;! >! ; A!

Proof: Stirling’s Formula will be obtained by taking the average of Gauss forward difference
formula and Gauss Backward difference formula.

We have Gauss’s forward difference formula is

oP =oT +u∆yT + ∆; yMY + ∆> yMY + ∆A yM; +……


q(qMY) (q_Y)q(qMY) (q_Y)q(qMY)(qM;)
;! >! A!

and Gauss’s backward difference formula is

oP =oT +u∆yT + ∆; yMY + ∆> yM; + ∆A yM; +……


q(q_Y) (q_Y)q(qMY) (q_Y)(q_;)q(qMY)
;! >! A!

Now, Stirling's formula= (Gauss’s forward formula+Gauss’s backward formula)


Y
;

Therefore,

oP =oT + ; (∆yMY + ∆yT )+ ∆; yMY + ∆A yM; +……


(q_Y)q(qMY) ∆= m›: _∆= m›e
¼ ½+
q q: (q_Y)q: (qMY)
;! >! ; A!

Remark: The method is useful when |l| < ½ RQ − 1/2 < l < 1/2. It gives best estimation
when −1/4 < l < 1/4.

Prepared by Haileyesus T., UOG Page 173


EXAMPLE 5.12: Apply Stirling’s formula to find a polynomial of degree three which takes the
following values of  and o

 2 4 6 8 10
o -2 1 3 8 20

SOLUTION: Here T = 6, ℎ = 2 then using u =


8M8¹ 8ME
; ;
=

Now, we construct the following difference table:

u  o ∆y ∆; o ∆> y ∆A o
-2 2 -2
3
-1 4 1 -1
2 4
0 6 3 3 0
5 4
1 8 8 7
12
2 10 20

The Striling's formula is

oP =oT + (∆yMY + ∆yT )+ ∆; yMY + ∆A yM; +……


(q_Y)q(qMY) ∆= m›: _∆= m›e
¼ ½+
q q: (q_Y)q: (qMY)
; ;! >! ; A!

(3) + ¼ ½+0
;_C q: (q_Y)q(qMY) A_A
; ;! >! ;
= 3+u( )+

= 3+ u + l ; + (l > − l)
X > ;
; ; >

= 3 + l > + l ;+ l
; > YX
> ; E

l > + ; l ; + E l+3
; > YX
>
=

= ( ) + ( ) + ( )+3
; 8ME > > 8ME ; YX 8ME
> ; ; ; E ;

= 0.0833 3– 1.1252+ 8.9166– 19.

Prepared by Haileyesus T., UOG Page 174


EXAMPLE 5.13: Use Stirling’s formula to find (28) given, (20) = 49225,

(25) = 48316, (30) = 47236, (35) = 45926, (40) = 44306

SOLUTION: Let the origin be at T =30 and ℎ = 5,  = 28⇒ u= –0.4


8M8¹ ;VM>T
{ C
u= = = -0.4

The difference table is as follows:

u  o ∆y ∆; o ∆> y ∆A o
-2 20 49225
-909
-1 25 48316 -171
-1080 -59
0 30 47236 -230 -21
-1310 -80
1 35 845926 -310
-1620
2 40 44306

By Stirling’s formula,

oP =oT + (∆yMY + ∆yT )+ ∆; yMY + ∆A yM; +……


(q_Y)q(qMY) ∆= m›: _∆= m›e
¼ ½+
q q: (q_Y)q: (qMY)
; ;! >! ; A!

= 47236+(.4) ( (−230)+ ¼ ½+ (−21)+……


MYTVT Y>YT (MT.A): (T.E)(MT.A)(MY.A) MCUMVT (T.E)(MT.A): (MY.A)
; ;! >! ; A!
)+

= 47691.8256.

[Link] Bessel's Interpolation Formula


Statement: Suppose o = () is a function which takes the values …(M; , oM; ),
(MY , oMY ), (T , oT ), (Y , oY ) (; , o; ),…, for („ + 1) equally spaced values of  such that ª =
T + ¬ℎ for ¬ = 0,1,2, … , „. One form of the unique nth-degree polynomial that passes through the
n + 1 points is given by


∆ yMY +
E(EM) ∆] Fµ _∆] F› (EM )E(EM) ∆A F› M∆A F›]
oP = oT +u∆yT + ¼ ½+   +⋯
] (q_Y)q(qMY)(qM;)
]! ] ! A! ]

Prepared by Haileyesus T., UOG Page 175


Proof: The Gauss’s forward difference formula is

oP =oT +u∆yT + ∆; yMY + ∆> yMY + ∆A yM; +……


q(qMY) (q_Y)q(qMY) (q_Y)q(qMY)(qM;)
;! >! A!
….…(5.26)

We have ∆; yT − ∆; yMY = ∆> yMY

∆; yMY = ∆; yT − ∆> yMY ……….(5.27)

Similarly

∆A yM; = ∆A yMY − ∆C yM; …………(5.28)

Now Substituting eq. (5.27) and eq. (5.28) in to eq. (5.26), we get

∆> yMY +
q(qMY) ∆: m›e ∆: m›e ∆@ m›e ∆@ m›e
oP =oT +u∆yT+ + )+ ( + )+……
(q_Y)q(qMY) (q_Y)q(qMY)(qM;)
;! ; ; >! A! ; ;

= oT +u∆yT +; ∆; yMY + ; (∆; yT − ∆> yMY )+ ∆> yMY


Y q(qMY) Y q(qMY) (q_Y)q(qMY)
;! ;! >!

+ ∆A yMY + (∆A yMY − ∆C yM; )+……


Y (q_Y)q(qMY)(qM;) Y (q_Y)q(qMY)(qM;)
; A! ; A!

q(qMY) ∆: m¹ M∆: m›e q(qMY) G_Y


¼ ½+ ( − )∆> yMY
Y
=oT +u∆yT +
;! ; >! > ;

∆@ m›e M∆@ m›:


+   +……
(q_Y)q(qMY)(qM;)
A! ;


∆ yMY +
E(EM) ∆] Fµ _∆] F› (EM )E(EM) ∆A F› M∆A F›]
oP = oT +u∆yT + ¼ ½+   +⋯
] (q_Y)q(qMY)(qM;)
]! ] ! A! ]

Which is Bessel's interpolation formula.

Remark: This formula is very useful when l = 1/2 and gives best result when¼ < l < 3/4.

EXAMPLE 5.14: The pressure Í of wind corresponding to velocity I is given by following data.
Estimate pressure whenI = 25.

SOLUTION: The difference table for the given data is as:

Prepared by Haileyesus T., UOG Page 176


Let origin IT = 20, ℎ = 10, I = 25
JMJ¹ ;CM;T
{ YT
u= = = 0.5

Bessel’s formula for interpolation is:




Í(I)= pT +u∆pT + ∆ pMY +


(EM )E(EM)
¼ ½+   +⋯
E(EM) ∆] G¹ _∆] G›e ] (E_)E(EM)(EM]) ∆A K› M∆A K›]
]! ] ! A! ]


µ.BM µ.B(µ.BM)
¼ ½+ (−0.4)
T.C([Link]) [Link].Y ]
;! ; !
= 2+0.5(2.4) +

= ½(6.4)+0-0.16250+0

= 3.2-0.16250+0

= 3.0303750

EXAMPLE 5.15: Find the value of (25) from the following data using Bessel’s formula. Data
being (20) = 2854, (24) = 3162, (28) = 3544, (32) = 3992

SOLUTION: The difference table for the data is as:

Let origin T = 24, ℎ = 4,  = 25

Prepared by Haileyesus T., UOG Page 177


8M8¹ ;CM;A
{ A
u= = = 0.25

Bessel’s formula for interpolation is:


e

∆> yMY +
q(qMY) ∆: m¹ ∓m›e (qM )q(qMY) ∆@ m›e M∆@ m›:
oP = oT +u∆yT + ¼ ½+   +⋯
: (q_Y)q(qMY)(qM;)
;! ; >! A! ;


µ.BM µ.B(µ.BM)
¼ ½+ ( −8)
µ.]B(µ.]BM) MB_CC ]
]! ] !
= 3162 + 0.25(382) +

= 3250.875

[Link] Laplace-Everett's Formula


Statement: Suppose o = () is a function which takes the values …(M; , oM; ),
(MY , oMY ), (T , oT ), (Y , oY ) (; , o; ),…, for („ + 1) equally spaced values of  such that ª =
T + ¬ℎ for ¬ = 0,1,2, … , „. One form of the unique nth-degree polynomial that passes through the
n + 1 points is given by

∆; yMY + ∆A yM; +….+uyY + ∆; yT + ∆A yMY +……


JÀJ : MYÁ(J : MA)
oP =IoT +
J(J : MY) q(q: MY) qÀq: MYÁ(q: MA)
>! C! >! C!

Proof: Given a Gauss’s forward difference formula is

oP =oT +u∆yT + ∆; yMY + ∆> yMY


q(qMY) (q_Y)q(qMY)
;! >!

∆A yM; + ∆C yM; +……


(q_Y)q(qMY)(qM;) (q_;)(q_Y)q(qMY)(qM;)
A! C!
+ …. (5.29)

We eliminate the odd differences in eq. (5.29) by using the relations

∆yT =yY − yT , ∆> yMY = ∆; yT − ∆; yMY , ∆C yM; = ∆A yMY − ∆A yM;

Then eq. (5.29) becomes

oP =oT +u(yY − yT )+ ∆; yMY + (∆; yT − ∆; yMY )


q(qMY) (q_Y)q(qMY)
;! >!

∆A yM; + (∆A yMY − ∆A yM; ) +……


(q_Y)q(qMY)(qM;) (q_;)(q_Y)q(qMY)(qM;)
A! C!
+

oP =(1 − l)oT + uyY − ∆; yMY + ∆; yT


q(qMY)(qM;) (q_Y)q(qMY)
>! >!

∆A yM; + ∆A yMY −……


(q_Y)q(qMY)(qM;)(qM>) (q_;)(q_Y)q(qMY)(qM;)
A! C!
+

Change the terms with negative sign, putting l = 1 − I, we obtain

Prepared by Haileyesus T., UOG Page 178


∆; yMY + ∆A yM; +….
JÀJ : MYÁ(J : MA)
oP =IoT +
J(J : MY)
>! C!

+uyY + ∆; yT + ∆A yMY +……


q(q: MY) qÀq: MYÁ(q: MA)
>! C!

This is called Laplace-Everett’s formula.

Remark: Laplace-Everett’s formula gives better estimate value when u >1/2.

EXAMPLE 5.16: Using Laplace Everett’s formula, find (30), if (20) = 2854, (28) =
3162, (36) = 7088, (44) = 7984

SOLUTIOIN: Take origin at T = 28, ℎ = 8,  = 30

l=
8M8¹ >TM;V
{ V
= = 0.25

Also, I = 1 – l = 1 – .25 = 0.75

Difference table is:

By Everett’s formula,

∆; yMY + ∆A yM; +….


JÀJ : MYÁ(J : MA)
oP =IoT +
J(J : MY)
>! C!

+uyY + ∆; yT + ∆A yMY +……


q(q: MY) qÀq: MYÁ(q: MA)
>! C!

(3618)+…} +{ 0.25(7088) + (−3030)+…}


µ.MBÀ(µ.MB)] MÁ µ.]BÀ(µ.]B)] MÁ
! !
= { 0.75(3162) +

= 4064

Hence = 4064.

Prepared by Haileyesus T., UOG Page 179


EXAMPLE 5.17: Apply Laplace Everett’s formula to find the value of “R«;>XC from the data given
below:

SOLUTION: Take origin at T = 23, ℎ = 1, „è “7¤  = 23.75

l=
8M8¹ ;>.XCM;>
{ Y
= = 0.75

Also, I = 1 – l = 1 – 0.75 = 0.25

Difference table is:

By Everett’s formula,

∆; yMY + ∆A yM; +….


J(J : MY) JÀJ : MYÁ(J : MA)
oP =IoT + >! C!

+uyY + ∆; yT + ∆A yMY +……


q(q: MY) qÀq: MYÁ(q: MA)
>! C!

(−0.0008) + (−0.0001)+….}
µ.]BÀ(µ.]B)] MÁ µ.]BÀ(µ.]B)] MÁÀ(µ.]B)] MAÁ
! B!
={ 0.25(1.3617+

+ {0.75(1.3802) + (−0.0008)+ (0.0002) +…}


µ.MBÀ(µ.MB)] MÁ µ.MBÀ(µ.MB)] MÁÀ(µ.MB)] MAÁ
! B!

= 1.375874

Now

Prepared by Haileyesus T., UOG Page 180


“R«;>XC = “R«(;>.XC8YTT) = “R«;>.XC + “R«YTT

⇒“R«;>XC = 1.375872 + 2 = 3.375872

EXERCISE 5.3

1. Find (0.41) using Stirling’s formula if


 0.30 0.35 0.40 0.45 0.50
() 0.1179 0.1368 0.1554 0.1736 0.1915

2. Use Stirling’s formula to find (35), data being:


(20) = 512, (30) = 439, (40) = 346, „è (50) = 243,
3. Find (25) by using Bessel’s interpolation formula from the data:
 20 24 28 32
() 24 32 35 40

4. Apply Everett’s formula for the following data, to find the value of (31) and (32),if
(20) = 3010, (25) = 3979, (30) = 4771, (35) = 5441, (40) = 6021, (45) =
6532.

Prepared by Haileyesus T., UOG Page 181


INTERPOLATION WITH UNEQUAL INTERVALS

Forward difference interpolation, Backward difference interpolation and central difference


interpolation have the disadvantages of being applicable only to equally spaced argument values. So
it is required to develop interpolation formula for unequally spaced arguments (values of x).

5.2.1 Lagrange’s interpolation formula

Statement:

Let (T ), (Y ), … , (b ) be (n+ 1) entries of a function o = (), corresponding to the
arguments T , Y ,..., b which may not be equally spaced. One form of the unique nth-degree
polynomial that passes through the n + 1 points is given by

(iMie )(iMi: )…(iMik) (iMi¹ )(iMi: )…(iMik )


() = (0 ) + (Y )
(i¹ Mie )(i¹ Mi: )…(i¹ Mik ) (ie Mi¹ )(ie Mi: )…(ie Mik )

(iMi¹ )(iMie )…(iMik ) (iMi¹ )(iMie )…(iMik›e )


(Y )+…+ („ )
(i: Mi¹ )(i: MY)…(i: Mik ) (ik Mie )(ik Mi: )…(ik Mik›e )
+

is used for the interpolation at .

Proof: () is to be a polynomial of nth degree corresponding to the arguments T , Y ,..., b . So


that the polynomial () may be written as

() = T ( − Y )(  − ; )…(  − b ) + Y ( − T )(  − ; )…(  − b )

+> ( − T )(  − Y )(  − > )…(  − b ) + …+ b ( − T )(  − ; )…(  − b ) ----(5.30)

whereT , Y , … , b are constants to be determined .

Putting = T , Y , … , b successively, we get

¾(i¹)
For = T ,(T ) = T ( − Y )(  − ; )…(  − b )⇒ T =
(i¹ Mie )(i¹ Mi: )…(i¹ Mik )
..…(5.31)

¾(ie )
For = Y ,(Y ) = Y ( − T )(  − ; )…(  − b )⇒ Y =
(ie Mi¹ )(ie Mi:)…(ieMik )
……(5.32)

Similarly

For = b , (b ) = b ( − T )(  − ; )…(  − b ) ⇒ b =


¾(ik)
(ik Mi¹)(ik Mi: )…(ik Mik›e )
..…(5.33)

Substituting the values of T , Y ,.., b in eq. (5.30), we get

Prepared by Haileyesus T., UOG Page 182


(iMie )(iMi: )…(iMik) (iMi¹ )(iMi: )…(iMik )
() = (0 ) + (Y )
(i¹ Mie )(i¹ Mi: )…(i¹ Mik ) (ie Mi¹ )(ieMi: )…(ie Mik)

(iMi¹ )(iMie )…(iMik ) (iMi¹ )(iMie )…(iMik )


(; ) +…+ („ )
(i: Mi¹ )(i: MY)…(i: Mik ) (ik Mi¹ )(ik Mie )…(ik Mik›e )
+ ……(5.34)

This is called Lagrange’s interpolation formula. In eq. (5.34), dividing both sides by

( − T )( − Y )(  − ; )…(  − b ), Lagrange’s formula may also to written as

¾(i) ¾(i¹) Y ¾(ie) Y


=
(iMi¹ )(iMie )…(iMik (i¹ Mie )(i¹ Mi: )…(i¹ Mik ) (iMi¹ ) (ie Mi¹ )(ie Mi: )…(ie Mik ) (iMie )
+

¾(i: ) Y ¾(ik ) Y
(i: Mi¹ )(i: MY)…(i: Mik ) (iMi: ) (ik Mi¹ )(ik Mie )…(ik Mik›e ) (iMik )
+ +…+

Error of interpolation

We assume that () has continuous derivatives of order up to n + 1 for all  ∈(a, b). Since, ()
is approximated by oP (), the results contain errors. We define the error of interpolation or
truncation error as

J(, ) = () − oP () …………..(5.35)

Without giving the derivation, we write the expression for the error of interpolation as

J(, ) = () − oP ()

(x−x0 )(x−x1 )…(x−xn )


= (b_Y)!
 (b_Y) (∈) ………….(5.36)

where min (T , Y , … , b ) <∈< max (T , Y , … , b )

Since, ∈ is an unknown, it is difficult to find the value of the error. However, we can find a bound
of the error. The bound of the error is obtained a

|J(, )| = |(x − x0)(x − x1 ) … (x − xn )|( (b_Y) (∈)(


Y
(b_Y)!

≤( º max |(x − xT )(x − xY ) … (x − x^ )|» º max ((„+1) ()(» ……….(5.37)


1
„+1)! a ≤ x≤b a ≤ x≤b

Note that in eq. (5.37), we compute the maximum absolute value of (x − xT )(x − xY ) … (x − x^ ),
that is max |(x − xT )(x − xY ) … (x − x^ )|and not the maximum of (x − xT )(x − xY ) … (x − x^ ).

Prepared by Haileyesus T., UOG Page 183


Since the interpolating polynomial is unique, the error of interpolation is also unique, that is, the
error is same whichever form of the polynomial is used.

EXAMPLE 5.18: Using the data §¬„(0.1) = 0.09983 and §¬„ (0.2) = 0.19867, find an
approximate value of §¬„ (0.15) by Lagrange interpolation. Obtain a bound on the error at
 = 0.15.

SOLUTION: We have two data values. The Lagrange linear polynomial is given by

(iMie )(iMi: )…(iMik ) (iMi¹ )(iMi: )…(iMik )


() = (0 ) + (Y )
(i¹ Mie )(i¹ Mi: )…(i¹ Mik ) (ie Mi¹ )(ieMi:)…(ie Mik )

(iMi¹ )(iMie )…(iMik ) (iMie )(iMi: )…(iMik )


(; ) +…+ („ )
(i: Mi¹ )(i: MY)…(i: Mik ) (ik Mi¹ )(ik Mie )…(ik Mik›e )
+

() =
(iMie) (iMi¹ )
(0 ) + (1 )
(i¹ Mie ) (ie Mi¹)

(0.15−0.2) ([Link].Y)
= 0.09983+ 0.19867
(0.1−0.2) (T.;MT.Y)

= (0.5) (0.09983) + (0.5) (0.19867) = 0.14925

Hence () = 0.14925

The truncation error is given by

(x−x0 )(x−x1) (x−0.1)(x−0.2)


—. J =  ÇÇ (∈) = (−sin (∈)) Where 0.1 < ∈< 0.2
;! ;!

Since () = §¬„ . At  = 0.15, we obtain the bound as

(0.15−0.1)(0.15−0.2)
—. J = (−sin (∈)) = 0.00125 sin (∈)
;!

„è |—. J| = 0.00125 |sin(∈)| ≤ 0.00125 max |sin()|


0.1≤ x ≤ 0.2

= 0.00125 §¬„ (0.2) = 0.00125(0.19867) = 0.00025

EXAMPLE 5.19: Use Lagrange’s formula, to find (2) that takes the values

 0 1 3
o 0 1 0

Prepared by Haileyesus T., UOG Page 184


SOLUTION: using the Lagrange's formula

(iMie )(iMi: )…(iMik ) (iMi¹ )(iMi: )…(iMik )


() = (0 ) + (Y )
(i¹ Mie )(i¹ Mi: )…(i¹ Mik ) (ie Mi¹ )(ieMi:)…(ie Mik )

(iMi¹ )(iMie )…(iMik ) (iMie )(iMi: )…(iMik )


(; ) +…+ („ )
(i: Mi¹ )(i:MY)…(i: Mik ) (ik Mi¹ )(ikMie )…(ikMik›e )
+

(iMie )(iMi: ) (iMi¹ )(iMi: ) (iMi¹ )(iMie)


(0 ) + (1 ) + (2 )
(i¹ Mie )(i¹ Mi: ) (ie Mi¹ )(ie Mi: ) (i: Mi¹ )(i: MY)
=

(;MY)(;M>) (;MT)(;M>) (;MT)(;MY)


(2) =
(TMY)(TM;) (YMT)(YM>) (>MT)(>MY)
(0) + (1) + (0) = 1

EXAMPLE 5.20: Find the unique polynomial O() of degree 2 such that (1) = 1 , (3) =

27 , (4) = 64 .Use Lagrange’s method of interpolation

SOLUTION: Here T = 1, Y = 3, ; = 4 and f(T )= 1, f(Y )= 27, f(; )= 64

Using the Lagrange’s interpolation formula

(iMie )(iMi: )…(iMik) (iMi¹ )(iMi: )…(iMik )


() = (0 )+ (Y )
(i¹ Mie )(i¹ Mi: )…(i¹ Mik ) (ieMi¹ )(ie Mi: )…(ie Mik )

(iMi¹ )(iMie )…(iMik ) (iMie )(iMi:)…(iMik )


(; )+…+ („ )
(i: Mi¹ )(i:MY)…(i: Mik ) (ik Mi¹)(ik Mie )…(ik Mik›e)
+

(iMie )(iMi:) (iMi¹ )(iMi: ) (iMi¹ )(iMie )


(0 )+ (Y )+ (; )
(i¹ Mie )(i¹ Mi: )) (ie Mi¹ )(ie Mi: ) (i: Mi¹ )(i: MY)
=

(iM>)(iMA) (iMY)(iMA) (iMY)(iM>)


(YM>)(YMA) (>MY)(>MA) (AMY)(AM>)
= (1) + (27) + (64)

= (2– 7 + 12) − (2– 5 + 4) +


Y ;X EA
(2– 4 + 3) = 8 2– 19 + 12
E ; >

Hence the required polynomial is,

() = 8 2– 19 + 12

Prepared by Haileyesus T., UOG Page 185


EXAMPLE 5.21: Determine by Lagrange’s formula, the percentage number of criminals under 35.

Age under years 25 30 40 50


No. of criminals 52 67.3 84.1 94.4

SOLUTION: Here T = 25, Y = 30, ; = 40, > = 50

(T ) = 52, (Y ) = 67.3, (; ) = 84.1, (> ) = 94.4

Using the Lagrange’s interpolation formula

(iMie )(iMi: )…(iMik) (iMi¹ )(iMi: )…(iMik )


() = (0 )+ (1 )
(i¹ Mie )(i¹ Mi: )…(i¹ Mik ) (ieMi¹ )(ie Mi: )…(ie Mik )

(iMi¹ )(iMie )…(iMik ) (iMie )(iMi: )…(iMik )


(2 )+…+ („ )
(i: Mi¹ )(i:MY)…(i: Mik ) (ik Mi¹ )(ik Mi¹ )…(ik Mik›e )
+

(iMie)(iMi:)(iMi= ) (iMi¹ )(iMi: )(iMi= )


(0 )+ (1 )
(i¹ Mie )(i¹ Mi: )(i¹ Mi= ) (ie Mi¹ )(ie Mi: )(ie Mi= )
=

(iMi¹ )(iMie )(iMi= ) (iMie )(iMi:)(iMi= )


(2 )+…+ (3 )
(i: Mi¹ )(i:MY)(i: Mi= ) (i¹ Mie )(i¹ Mi: )(i¹ Mi= )
+

(>CM>T)(>CMAT)(>CMCT) (>CM;C)(>CMAT)(>CMCT)
(;CM>T)(;CMAT)(;CMCT) (>TM;C)(>TMAT)(>TMCT)
= (52) + (67.3)

(>CM;C)(>CM>T)(>CMCT) (>CM;C)(>CM>T)(>CMAT)
(ATM;C)(ATM>T)(ATMCT) (CTM;C)(CTM>T)(CTMAT)
+ (84.1) +…+ (94.4)

(35) = – 10.5 + 50.475 + 42.05 + 4.72 = 77.405

Prepared by Haileyesus T., UOG Page 186


5.2.2 Inverse Lagrange interpolation
We know different formulae for obtaining o corresponding to argument( value of )  (for equal
and unequal spaced argument). On the other hand the process of estimating the value of  for a
corresponding value of o (which is not in the table) is called inverse Lagrange interpolation.

The only difference of this formula from Lagrange’s method is that  is assumed to be expressible
as a polynomial in o. So on interchanging  and o in the Lagrange’s formula we have,

(mMm¹)(mMm:)…(mMmk )
 = (m T + 1
(mMme )(mMm: )…(mMmk)
¹ Mme )(m¹ Mm: )…(m¹ Mmk ) (me Mm¹ )(meMm: )…(meMmk )

(mMm¹ )(mMme )…(mMik ) (mMme)(mMm:)…(mMmk )


; +…+ „
(m: Mm¹)(m:Mme )…(m: Mmk) (mk Mm¹ )(mkMme)…(mkMmk›e )
+

Which is the inverse interpolation formula.

EXAMPLE 5.22: Find the value of  correct to one decimal place for which o = 7, given

 1 3 4
o 4 12 19

SOLUTION: Here we use Lagrange’s inverse interpolation formula i.e.,

(mMm¹)(mMm:)…(mMmk )
 = T + Y
(mMme )(mMm: )…(mMmk )
(m¹ Mme )(m¹ Mm: )…(m¹ Mmk ) (me Mm¹ )(me Mm: )…(me Mmk )

(mMm¹ )(mMme)…(mMik ) (mMme )(mMm: )…(mMmk )


; +…+ „
(m: Mm¹ )(m: Mme )…(m: Mmk) (mk Mm¹ )(mk Mme )…(mk Mmk›e)
+

(mMme)(mMm:) (mMm¹ )(mMm: ) (mMm¹ )(mMme )


0 + Y + ;
(m¹ Mme )(m¹ Mm:) (me Mm¹ )(meMm: ) (m: Mm¹ )(m: Mme )
=

(XMA)(XMYU) (XMA)(XMY;)
= (AMY;)(AMYU) (1) +
(XMY;)(XMYU)
(Y;MA)(Y;MYU) (YUMA)(YUMY;)
(3) + (4)

= 0.5 + 1.9286 – 0.5714 = 1.8572

EXAMPLE 5.23: Tabulate o =  3 for  = 2, 3, 4, 5 and calculate the cube root of 10 correct to
three decimal places.

SOLUTION: For  = 2, o = 8,  = 3, o = 27,  = 4, o = 64 respectively.

Here we use Lagrange’s inverse interpolation formula i.e.,

Prepared by Haileyesus T., UOG Page 187


(mMme )(mMm: )…(mMmk ) (mMm¹)(mMm:)…(mMmk )
 = 0 + Y
(m¹ Mme )(m¹ Mm:)…(m¹Mmk ) (me Mm¹ )(me Mm: )…(me Mmk )

(mMm¹ )(mMme)…(mMik ) (mMme )(mMm: )…(mMmk )


; +…+ „
(m: Mm¹ )(m: Mme )…(m: Mmk) (mk Mm¹ )(mk Mme )…(mk Mmk›e)
+

(mMme)(mMm:) (mMm¹ )(mMm: ) (mMm¹)(mMme)


0 +  >
(m¹ Mme )(m¹ Mm:) (me Mm¹ )(meMm: ) ; (m: Mm¹ )(m:Mme)
= +

(YTMV)(YTMEA) (YTMV)(YTM;X)
(2) +
(YTM;X)(YTMEA)
(VM;X)(VMEA) (;XMV)(;XMEA) (EAMV)(EAM;X)
= (3) + (4)

=0.863(2) + 0.167(3)− 0.01786(4)

=1.726+0.501−0.07144

= 2.15556

Remark: The main advantage of Lagrange's Interpolation formulas is, it can also be used in case
of equal intervals .

EXERCIS 5.4

1. Using Lagrange’s interpolation formula, find y(10) from the following table
x 5 6 9 11
y 12 13 14 16

2. If o(1) =– 3, o(3) = 9, o(4) = 30 and o(6) = 132, find the four point Lagrange’s

interpolation polynomial which takes the same values as the function y at the given points.
3. Given that (10) = 1754, (15) = 2648, (20) = 3564, find the value of  for () =
3000 by using, iterative method of inverse interpolation.

Prepared by Haileyesus T., UOG Page 188


5.2.3 Newton’s divided difference interpolation

Statement: Let oT , oY ,…, ob be the values of o = () corresponding to the arguments T , Y , ;


,…, b which are not necessarily equally spaced. One form of the unique nth-degree polynomial
that passes through the n + 1 points is given by

y = oT + ( − T )ϴoT + +( − T )( − Y )⊖; oT ( − T )( − Y )(  − ; )⊖> oT +

..…+( − T )( − Y ) …(  − b )⊖b oT

Proof: We drive the Newton's divided difference interpolation formula by induction. Let we have
the following data.

 T 
o = () oT o

Then
rMr¹
ϴoT =
8M8¹

So, that y = oT + ( − T )ϴoT ……………(5.38)

Again, we have the following data.

 Y T 
o = () oY oT o

Then
ϴyM ϴo0
⊖; oT =
8M8e

Which gives, ϴo=ϴoT + (  − Y )⊖; oT ……..(5.39)

Then from eq. (5.38) and eq. (5.39) we get

y = oT +( − T ) ϴoT + ( − T ) ( − Y )⊖; oT ……….(5.40)

⊖2 oM⊖2 o0
⊖> oT =
8M8:
Also

This gives

Prepared by Haileyesus T., UOG Page 189


⊖; o =⊖; oT + ( − ; )⊖> oT …….(5.41)

From eq. (5.40) and eq. (5.41) ,we obtain

o = oT +( − T )ϴoT +( − T )( − Y )⊖; oT +( − T )( − Y )(  − ; )⊖> oT …..(5.42)

Proceeding in this manner, for (n+1) data points, we get

y = oT + ( − T )ϴoT +( − T )( − Y )⊖; oT ( − T )( − Y )(  − ; )⊖> oT +

..…+( − T )( − Y ) …(  − b )⊖b oT

This is called Newton’s divided difference interpolation formula.

EXAMPLE 5.24: Apply Newton’s divided difference formula to find the value of  (8) if

(1) = 3, (3) = 31, (6) = 223, (10) = 1011, (11) = 1343,

SOLUTION: The divided difference table is given by

 o ⊖y ⊖; o ⊖> y ⊖A o
1 3
14
3 31 10
64 1
6 223 19 0
197 1
10 1011 17
332
11 1343

On, applying Newton’s divided difference formula, we have

y = oT + ( − T )ϴoT + +( − T )( − Y )⊖; oT ( − T )( − Y )(  − ; )⊖> oT +

..…+( − T )( − Y ) …(  − b )⊖b oT

() or o8 = 3 + (– 1) (14) + (– 1) (– 3) (10) + (– 1) ( – 3) (– 6) (1)

For (8), we put  = 8 in above equation, we get

Prepared by Haileyesus T., UOG Page 190


(8) = 3 + (7) (14) + (7) (5) (10) + (7) (5) (2)

= 3 + 98 + 350 + 70

= 521.

EXAMPLE 5.25: Calculate the value of (6) from the following data

 1 2 7 8
() 1 5 5 4

SOLUTION: The divided difference table is:

 o ⊖y ⊖; o ⊖> y
1 1
4
2 5 -2/3
0 1/14
7 5 -1/6
-1
8 4

Applying Newton’s divided difference formula

y = oT + ( − T )ϴoT + +( − T )( − Y )⊖; oT ( − T )( − Y )(  − ; )⊖> oT +

..…+( − T )( − Y ) …(  − b )⊖b oT


M; Y
> YA
= 1 + (x- 1) 4+ (x- 1) (x-2) +(x- 1) (x-2) (x-7)) +…

(6) = 1 + (6- 1) 4+ (6- 1) (6-2) > +(6- 1) (6-2) (6-7) YA+…


M; Y


MAT YT
> X
= 1+20+

= 6.2381

Prepared by Haileyesus T., UOG Page 191


EXAMPLE 5.26: Use the Lagrange and the Newton-divided difference formulas to calculate (3)
from the following table :

 0 1 2 4 5 6
() 1 14 15 5 6 19

SOLUTION: To use the Newton divided difference interpolation formula, we first construct the
divided difference table:

 o ⊖y ⊖; o ⊖> y ⊖A o ⊖C o
0 1
-13
1 14 -6
1 1
2 15 -2 0
0
-5 1
4 5 2 0
1 1
5 6 6
13
6 19

Applying Newton’s divided difference formula

o = () = oT + ( − T )ϴoT + +( − T )( − Y )⊖; oT ( − T )( − Y )(  − ; )⊖> oT +….

= 1 + () (-13)+ ( − 0) ( −1)(-6) +() ( − 1) ( − 2) (1) +…

(3) = 1 + (3) (-13)+ (3-) (3-1)(-6) +(3) (3-1) (3-2) (1)

=10

Remark: The main advantage of Newton's divided difference interpolation formulas is, it can
also be used in case of equal intervals.

Prepared by Haileyesus T., UOG Page 192


EXERCISE 5.5

1. Find  when () = 14 for the following data using Lagrange’s inverse interpolation formula

 0 5 10 15
() 16.35 14.88 13.59 12.46

2. By means of Newton’s divided difference formula, Find the value of (8) and (15) from the
following table:

 4 5 7 10 11 13

() 48 100 294 900 1210 2028

3. Evaluate (9) using Newton’s divided difference formula

 5 7 11 13 17
() 150 392 1452 2366 5202

Prepared by Haileyesus T., UOG Page 193


REVIEW EXERCISE
1. Using the Newton’s forward interpolation formula, find the cubic polynomial which
takes the following values
 0 1 2 3
o 1 2 1 10

2. The following table give the marks secured by 100 students in Mathematics:
Range of marks() 30-40 40-50 50-50 60-70 70-80
No. of students 25 35 22 11 7

Use Newton’s forward difference interpolation formula to find

(i) The number of students who got more than 55 marks.


(ii) The number of students who secured marks in the range from 36 to 45.
3. Using the Newton’s forward difference formula, find the polynomial () satisfying the
following data. Hence, evaluate y at  =5.

 4 6 8 10
o 1 3 8 10

4. Find the missing term in the table using Lagrange’s interpolation


 0 1 2 3 4
o 1 3 9 ? 81

5. From the given values, evaluate (3) using Lagrange’s formula.

 -1 2 4 5
() -5 13 255 625

6. Using Newton’s divided difference formula, determine f(3) for the data
 0 1 2 4 5
() 1 14 15 5 6

7. Using Newton’s divided difference interpolation, find o(10) given that


o(5) = 12, o(6) = 13, o(9) = 14, o(11) = 16.

Prepared by Haileyesus T., UOG Page 194


8. Use Gauss’s forward interpolation formula to find o for  = 10 given that

 0 4 8 12 16
o 15 25 34 37 42
9. Apply Gauss’s backward interpolation formula to find the population of a city in 1986 based
on the following data:

year 1951 1961 1971 1981 1991 2001


Population(in millions) 15 21 25 29 47 61

10. Apply Bessel’s interpolation formula to obtain (25), given that (20) = 515, (24) =
438, (28) = 348 „è (32) = 249.
11. Use Stirling’s formula to find (35), data being: (20) = 512, (30) = 439, (40) = 346,
and f(5) = 243.
12. Apply Everett’s formula to find the value of of (31), (32), if (20) = 3010, (25) =
3979, (30) = 4771, (35) = 5441, (40) = 6021, (45) = 6532.

Prepared by Haileyesus T., UOG Page 195


CHAPTER – 6: NUMERICAL DIFFERENTIATION
Chapter objectives

At the end of this chapter you will be able to:

 Define Numerical differentiation.


 Define equally spaced and unequally spaced data.
 Identify methods that we use for differentiation at the beginning, middle and
end of equally spaced data.
 Mention methods for equally spaced and the formula of each.
 Drive and point out the methods for unequally spaced data.
 Mention the advantage of methods of unequally spaced over methods for
equally spaced.
 Drive the formula for unequally spaced data.

INTRODUCTION
The method of obtaining the derivatives of a function using a numerical technique is known as
numerical differentiation.

Approximation to the derivatives can be obtained numerically using the following two
approaches

(i) Methods based on finite differences for equally spaced data.


(ii) Methods based on divided differences or Lagrange interpolation for unequally
spaced data.

The choice of the formula is the same as discussed for interpolation if the derivative at a point
near the beginning of a set of values given by a table is required then we use Newton forward
formula, and if the same is required at a point near the end of the set of given tabula values, then
we use Newton’s backward interpolation formula.

If the values of  are not equally spaced, we use Newton’s divided difference interpolation
formula or Lagrange’s interpolation formula to get the required value of the derivative.

Prepared by Haileyesus T., UOG Page 196


6.1 DERIVATIVES FOR EQUALLY SPACED DATA

6.1.1 Derivation Using Newton’s Forward difference Interpolation Formula


Given (n+1) equally spaced data points (T , oT ), (Y , oY ), … (b , ob ). The Newton’s forward
interpolation is given by

∆: r¹ ∆= r¹ ∆@ r¹ ∆f r¹
() = oT +u∆oT +u(u-1)
;! >! A! b!
+u(u-1)(u-2) +u(u-1)(u-2)(u-3) +……+u(u-1)(u-2)…(u-n+1)

Where l =
8M8¹
{
…….(6.1)

Differentiating eq. (6.1) with respect to u, we get

är ∆: r¹ ∆= r¹ ∆@ r¹
=∆oT +(2u-1)
äq ;! >! A!
+(3u2-6u+2) + (4u3-18u2+22u-6) +…… …...(6.2)

är är äq Y är äq Y
ä8 äq ä8 { äq ä8 {
Now = = where =

Therefore

∆: r¹ ∆= r¹ ∆@ r¹
= ∆yo+ (2u-1)
är Y
ä8 { ;! >! A!
+( 3u2-6u+2) +(4u3-18u2+22u-6) +…… ] …...(6.3)

For tabular values of , we can easily find the derivative by substituting  = T .i.e u=0 in eq.
(6.3), we get

∆: r¹ ∆= r¹ ∆@ r¹
= ∆yo− −
är Y
ä8 { ; > A!
+ +….]

Differentiating eq. (6.3) again w.r.t. ‘’, we get

= ( ) ( )
ä: r ä är äq Y ä är
ä8 : äq ä8 ä8 { äq ä8
=

∆; oT +(u-1)∆> oT + ( 6u2-18u+11) ∆A oT -….]


ä: r Y Y
ä8 : {: Y;
= ……..(6.4)

For tabular values we Put u= 0 in eq. (6.4), we get

= ∆; oT − ∆> oT + ∆A oT −….]


ä: r Y YY
ä8 : {: Y;
……….(6.5)

And we can drive the third and other derivative formulas.

Prepared by Haileyesus T., UOG Page 197


, at  = 1.2
är ä: r
ä8 ä8 :
EXAMPLE 6.1: Using the given table, find

 1 1.2 1.4 1.6 1.8 2 2.2


o 2.7183 3.3201 4.0552 4.9530 6.0496 7.3891 9.0250

SOLUTION: The difference table

 o ∆y ∆; o ∆> y ∆A o ∆C o
1 2.7183

1.2
0.6018
3.3201 0.1333

1.4
0.7351 0.0294
4.0552 0.1627 0.0067

1.6
0.8978 0.0361 0.0013
4.9530 0.1988 0.0080
1.0966 0.0441 0.0014
1.8 6.0496 0.2429 0.0094
1.3395 0.0535
2.0 7.3891 0.2964
1.6359
2.2 9.0250

The given point  = 1.2 is a tabular value and found at the beginning, we use the derivative of
Newton's forward interpolation formula, we have

∆: r¹ ∆= r¹ ∆@ r¹
= ∆yo− −
är Y
ä8 { ; > A
+ +….]

0.7351 − −
Y [Link];X T.T>EY [Link] [Link]
T.; ; > A C
= + + ….]

= 5 (0.7351 − 0.08135 + 0.0120 − 0.002 + 0.00028)

= 3.32015

The second derivative at  =1. 2

∆; oT − ∆> oT +Y; ∆A oT −….]


ä: r Y YY
ä8 : {:
=

0.1627 − 0.0361 +
Y YY
(T.;): Y;
= (0.0080 ) ]

0.1627 − 0.0361 + 0.00733]


Y
[Link]
=

= 3.34825

Prepared by Haileyesus T., UOG Page 198


at  =1.1 and  =1.2 from the following table:
är ä: r
ä8 ä8 :
EXAMPLE 6.2: Find and

 1 1.2 1.4 1.6 1.8 2.0


o 0 0.1280 0.5449 1.2960 2.4320 4.000

SOLUTION: The difference table is

 o ∆y ∆; o ∆> y ∆A o
1 0
0.1280
1.2 0.1280 0.288
0.4160 0.048
1.4 0.5449 0.336 0
0.7520 0.048
1.6 1.2960 0.384 0
1.1360 0.048
1.8 2.4320 0.432
1.5680
2.0 4.000

Here we have to find the derivatives at  = 1.1 which lies between given arguments 1.0 and 1.2.
So apply derivative of Newton’s forward formula, we have
8M8¹ 8MY
{
u= = u = T.; = 5(-1) = 5(1.1-1) = 0.5

Then we use the first forward difference formula

∆: r¹ ∆= r¹ ∆@ r¹
= ∆yo+ (2u-1)
är Y
ä8 { ;! >! A!
+( 3u2-6u+2) +(4u3-18u2+22u-6) +…… ]

(0.288) +(4(0.5); − 6(0.5) + 2)


Y ;(T.C)MY [Link]
T.; ;! >!
= [0.1280+ ] = 0.63

The second derivative at  = 1.1

∆; oT +(u-1)∆> oT +Y;( 6u2-18u+11) ∆A oT -….]


ä: r Y Y
ä8 : {:
=

0.288 +(0.5-1)0.048+ ]
Y
(T.;):
=

Prepared by Haileyesus T., UOG Page 199


0.288 − 0.024 ] = 6.6
Y
[Link]
=

Since  = 1.2 is a tabular value so that we use the formula

∆: r¹ ∆= r¹ ∆@ r¹
= ∆yo− −
är Y
ä8 { ; > A!
+ +….]

0.4160 −
Y T.>>E [Link]
T.; ; >
= + -….]

0.4160 − 0.168+0.016 -….] = 1.32


Y
T.;
=

The second derivative at  = 1. 2

∆; oT − ∆> oT +Y; ∆A oT −….]


ä: r Y YY
ä8 : {:
=

0.336 − 0.048 ]
Y
(T.;):
=

0.288] = 7.2
Y
[Link]
=

EXAMPLE 3: The table given below reveals the velocity v of a body during the time t. Find its,
acceleration at ¤ = 1.1.

¤ 1 1.1 1.2 1.3 1.4


I 43.1 47.7 52.1 56.4 60.8

SOLUTION: The difference table is

¤ I ∆v ∆; I ∆> v ∆A I
1 43.1
4.6
1.1 47.7 -0.2
4.4 0.1
1.2 52.1 -0.1 0.1
4.3 0.2
1.3 56.4 -0.1
4.4
1.4 60.8

The given point is a tabular value, we have, ¤T =1.1, IT =4.77 and ℎ = 0.1

Prepared by Haileyesus T., UOG Page 200


Then the acceleration at ¤ = 1.1 is obtained by using the derivative of Newton's forward
formula. Since ¤ =1.1 is a tabular value so that we use the formula

= ∆vo− −
äJ Y ∆: J¹ ∆= J¹ ∆@ J¹
ä { ; > A!
+ +….]

= T.; 4.4–
Y (MT.Y ) T.;
;
+>]

4.4 + 0.05+0.0667 ] = 45.167


Y
T.;
=

Therefore, the acceleration a= 45.167

EXERCISE 6.1

1. Use the following data to find f ′(1):

 0 1 2 3 4
o 6.9897 7.4036 7.7815 8.1291 8.4510

2. A particle is moving along a straight line. The displacement  at some time instance tare given
below. Find the velocity and acceleration of the particle at ¤ = 4.

¤ 1 3 5 7 9 11
 0.1405 0.7676 3.5135 9.9351 21.5892 40.0324

Prepared by Haileyesus T., UOG Page 201


6.1.2 Derivatives Using Newton’s Backward Difference Interpolation Formula

Given (n+1) equally spaced data points (T , oT ), (Y , oY ), … (b , ob ).The Newton’s backward
difference interpolation formula is given by

∇: rf ∇= rf ∇@ rf ∇f rf
() = ob +u∇ob + u(u+1) ;!
+ u(u+1)(u+2) >!
+u(u+1)(u+2)(u+3) A!
+…+u(u+1)…(u+n-1) b!

8M8f
{
Where u= ………..(6.6)

Differentiating both sides of eq. (6.6) with respect to , we get

= [ ∇yn + (2u+1)
är Y ∇: rf ∇= rf ∇@ rf
ä8 { ;! >! A!
+ (3u2+6u+2) +(4u3+18u2+22u+6) +……] ……...(6.7)

For tabular values of , we can easily find the derivative by substituting  = T .i.e. l = 0 in eq.
(6.7), we get

= [ ∇yn +
är Y ∇: rf ∇= rf ∇@ rf
ä8 { ; > A
+ + +……] ……….(6.8)

Again differentiating both sides of eq. (6.7) w.r.t. , we get

∇= rf ∇@ rf
[∇; ob + (6u+6)
ä: r Y
ä8 : {: >! ;A
= +(12u2+36u+22) +……]

[∇; ob + (u+1) ∇> ob +(6u2+18u+11)


Y ∇@ rf
{: Y;
= +……] ……….(6.9)

For tabular values of , we can easily find the derivative by substituting = b .i.e l = 0 in the
above formula, we get

[∇; ob + ∇> ob + 11
ä: r Y ∇@ rf
ä8 : {: Y;
= +……] ………..(6.10)

And we can drive the third and other derivative formulas.

EXAMPLE 6.4: Find the first and second derivative value at  = 2.03 and  = 2.02

SOLUTION: The backward difference table

Prepared by Haileyesus T., UOG Page 202


8M8f 8M;.TA ;.T>M;.TA
{ T.T; T.T;
Here u = = = =-0.5

Since  = 2.03 is not found in the table and the value is found at the end of the data. Sothat we
use the Newton's backward interpolation formula

= [ ∇yn + (2u+1)
är Y ∇: rf ∇= rf ∇@ rf
ä8 { ;! >! A!
+ (3u2+6u+2) +(4u3+18u2+22u+6) +……]

Y ([Link];) ([Link];)
T.T; ;! >!
= [−0.0090+ [2(-0.5) +1] + [3(-0.5)2+6(-0.5)+2]

([Link])
A!
+ (4(-0.5)3+18(-0.5)2+22(-0.5) + 6) ]

= -0.44875

Its second derivative

[∇; ob + (u+1) ∇> ob +(6u2+18u+11)


ä: r Y ∇@ rf
ä8 : {: Y;
= +……]

= (T.T;): { −0.0002+ [-0.5+1] (−0.0002)+[6(-0.5)2+18(-0.5)+11)]


Y ([Link])
Y;
}

=-1.0415

And since  = 2.02, b = 2.02 is in the table ,we use the formula

= [ ∇yn +
är Y ∇: rf ∇= rf ∇@ rf
ä8 { ; > A
+ + +……]

Y
T.T;
= [-0.0088 +0.5(0)+0.333(0.0002)]

= -0.43667

Prepared by Haileyesus T., UOG Page 203


Its second derivative

[∇; ob + ∇> ob + 11
ä: r Y ∇@ rf
ä8 : {: Y;
= +……]

= (T.T;): [0 + 0.0002+ ] = 0.5


Y

EXAMPLE 6.5: Find the values of o′(4) and o′′(4) from the following table:


o
0 1 2 3 4
5 8 12 17 26

SOLUTION: The backward difference table

 o ∆y ∆; o ∆> y ∆A o
0 5

1
3
8 1

2
4 0
12 1 3

3
5 3
17 4
9
4 26

Since  = 4 is found in the table and the value is found at the end of the data, so that we use the
derivative of Newton's backward formula

The first derivative at  = 4

= [ ∇yn +
är Y ∇: rf ∇= rf ∇@ rf
ä8 { ; > A
+ + +……]

= [9 +0.5(4)+0.333(3)+(0.25)(3)]

= 12.749

Its second derivative

: [∇ ob + ∇ ob + 11
ä: r Y ; > ∇@ rf
ä8 : = { Y;
+……]

= [4 + 3 + Y; (3)] = 9.75
YY

Prepared by Haileyesus T., UOG Page 204


EXAMPLE 6.6:The §¬„() values are given below for different values of .Find the value of cos 48°.

 30T 35T 40T 45T 50T

o = sin () 0.500 0.5736 0.6428 0.7071 0.7660

SOLUTION: The forward difference table

 o ∇y ∇; o ∇> y ∇A o
30T 0.500

35
0.0736
T 0.5736 -0.0044

40
0.0692 -0.005
T 0.6428 -0.0049 0

45
0.0643 -0.005
T 0.7071 -0.0054

50
0.0589
T 0.7660

Here  =48, b =50, ℎ =10, then


8M8f AVMCT
{ YT
u= = =- 0.2

Since  = 48 is not found in the table and the value is found at the end of the data and we use
the derivative of Newton's backward formula.

= [ ∇yn + (2u+1)
∇: rf ∇= rf ∇@ rf
¦R§ 48° =
är Y
ä8 { ;! >! A!
+ (3u2+6u+2) +(4u3+18u2+22u+6) +……]

Y ([Link] ) [Link]
= YT {0.0589+ [2(-0.2)+1] ;!
+ [3(-0.2)2+6(-0.2)+2] >!
}

Y
YT
= {0.0589+ 0.000162-0.0015994}

= 0.0060661

EXAMPLE 6.7: The following data gives the velocity of a particle for 10 seconds at an interval of
2 seconds. Find the acceleration when the time ¤=8sec.

¤(sec) 0 2 4 6 8 10
I(m/sec) 4 6 16 34 60 94

SOLUTION: If v is the velocity, then the acceleration at ¤ = 8 is given by (¤) =  ä 


äJ
)V

Prepared by Haileyesus T., UOG Page 205


We form the forward diference table :

¤ I ∇v ∇; I ∇> v
0 4

2
2
6 8

4
10 0
16 8

6
18 0
34 8
26 0
8 60 8
34
10 94

Since ¤ = 8 is found in the table, l = 0. And is found at the end of the data and we use the
derivative of Newton's backward difference interpolation formula . The first derivative at ¤ = 8

= { [ ∇Ib +
äJ Y ∇: Jf ∇= Jf ∇@ Jf
ä ; > A
+ + +…]

= [26 + (;)
Y V
;

= 15
EXERCISE 6.2
1. Find the values of o′(4) and o′′(4) from the following table:

x 0 1 2 3 4
5 8 12 17 26
y
2. The elevations above a datum line of seven points of roads 300 units apart are 135, 149, 157,
183, 201, 205, 193 unit. Find the gradient of the road at the end point.

Prepared by Haileyesus T., UOG Page 206


6.1.3 Derivative Using Stirling's difference formula

Given (n+1) equally spaced data points (T , oT ), (Y , oY ), … (b , ob ).If we want to determine the
values of the derivatives of the function near the middle of the given set of arguments. We may
apply any central difference formula. Therefore using Stirling’s formula,

oP =oT + (∆yMY + ∆yT )+ ∆; yMY + ∆A yM; +…


(q_Y)q(qMY) ∆= m›: _∆= m›e
¼ ½+
q q: (q_Y)q: (qMY)
; ;! >! ; A!

where u= ………….(6.11)
8M8¹
{

Now differentiating both sides of eq. (6.11) w.r.t. , we get

∆A yM; +………..
∆m›e _∆m¹ (>q: MY) ∆= m›: _∆= m›e
) + u∆; yMY + ¼ ½+
är (Aq= M;q)
äq ; >! ; A!
=(

Now

är är äq Y är äq Y
ä8 äq ä8 { äq ä8 {
= = where =

= [(
är Y
∆A yM; +…]
∆m›e _∆m¹ >q: MY ∆= m›: _∆= m›e
) + u∆; yMY + ¼ ½+
Aq= M;q
ä8 { ; >! ; A!
……..(6.12)

At the tabular values,  = T ,[Link]=0. Therefore, putting u= 0 in eq. (6.12), we get

= [(
är Y ∆m›e _∆m¹ Y ∆= m›: _∆= m›e
) − ¼ ½+…]
ä8 { ; E ;
…….(6.13)

Again differentiating eq. (6.12)with respect to , we get

∆A yM; +….
∆= m›: _∆= m›e
= {:[∆; yMY + u ¼ ½+
ä: r Y Y;q: M;
ä8 : ; A!
………(6.14)

At the tabular values,  = T , i.e u =0. Therefore, putting l = 0 in eq. (6.14), we get

[∆; yMY − ∆A yM;+….]


ä: r Y Y
ä8 : {: Y;
=

EXAMPLE 6.8: Find ′(0.6) „è ′′(0.6) from the following table:

x 0.4 0.5 0.6 0.7 0.8


f(x) 1.5836 1.7974 2.0442 2.3275 2.6510

SOLUTION: Here, the derivatives are required at the central point x= 0.6, so we use Stirling’s
SOLUTION:

formula. The difference table :

Prepared by Haileyesus T., UOG Page 207


Since  = 0.6 is found in the table and the value is found at the middle of the data, so that

we use the Striling's formula. Here ℎ = 0.1,  = 0.6

The first derivative at  = 0.6

= (
är Y ∆m›e _∆m¹ Y ∆= m›: _∆= m›e
) − ¼ ½+…]
ä8 { ; E ;

(
Y
= ) −E¼ ½+…]
T.;AEV_ T.;V>> Y [Link]>C_ [Link]>X
T.Y ; ;

= 10[0.26505- 0.0006]

’(0.6) = 2.6445

The second derivative at  = 0.6

= ∆; yMY − ∆A yM; +….


ä: r Y Y
ä8 : {: Y;

= 0.0365 − (0.0002)+….
Y Y
{: Y;

=1000.0365- 0.000016

= 3.6484

Prepared by Haileyesus T., UOG Page 208


6.9: Find ′ (93)from the following table:
EXAMPLE 6.9:

x 60 75 90 105 120
f(x) 28.2 38.2 43.2 40.9 37.7

SOLUTION: The difference table:


SOLUTION:

l  o ∇y ∇; o ∇> y
-2 60 28.2
10
-1 75 38.2 -5
5 -2.3

0 90 43.2 -7.3 8.7


-2.3 6.4

1 105 40.9 -0.9


-3.2
120 37.7
2

Here we have T =90,  =93, ℎ =15

u= = = =0.2
8M8¹ U>MUT Y
{ YC C

Since  =93 is not found in the table and the value is found at the middle of the data, so that we
use the Striling's formula. Here ℎ = 0.1,  = 0.6

= (
är Y
∆A yM; +…]
∆m›e _∆m¹ >q: MY ∆= m›: _∆= m›e
) + u∆; yMY + ¼ ½+
Aq= M;q
ä8 { ; >! ; A!

(
Y
= ) + (0.2)(−7.3 )+ ¼ ½+ (8.7)+…]
C_;.> >(T.;): MY M;.>_E.A A(T.;)= M;(T.;)
YC ; >! ; A!

Y [Link]>
YC ;
= [1.35- 1.46- -0.1334]

 1.35 − 1.46 − 0.30065 − 0.1334


Y
YC
=

=-0.03627

Prepared by Haileyesus T., UOG Page 209


EXERCISE 6.3

1. Compute the values of o′(3) and o′′(3) from the following table:

x 1 2 3 4 5
y 0 1.4 1.65 5.673 8.0978

2. Compute the values of o′(3) and o′′(3) from the following table:

 1 2 3 4 5

o 0.4 0.65 0.75 0.87 0.98

3. The table given below reveals the velocity ‘I’ of a body during the time ‘¤’ specified. Find the
acceleration at ¤ = 1.3.

¤ 1 1.1 1.2 1.3 1.4

I 43.1 47.7 52,1 56.4 60.8

Prepared by Haileyesus T., UOG Page 210


6.2 DERIVATIVE FOR UNEQUALLY SPACED
SPACED DATA

6.2.1 Derivative Using Newton’s Divided Difference Formula

Suppose we have (n+1) equally spaced data points (T , oT ), (Y , oY ), … (b , ob ).The Newton’s
divided difference formula is given by

y = oT + ( − T )ϴoT + +( − T )( − Y )⊖; oT ( − T )( − Y )(  − ; )⊖> oT +

..…+( − T )( − Y ) …(  − b )⊖b oT …………..(6.15)

Differentiating eq. (6.15) With respect to  we get

′() = ϴoT +( 2 − T − Y )⊖; oT

+[ ( − Y )(  − ; )+(  − T )(  − ; )+(  − T )(  − Y )]⊖> oT +…. ….

′() = ϴoT +( 2 − T − Y )⊖; oT

+[ (3 ; −2( T + Y + ; )+ (+; T + ; Y +Y T )]⊖> oT +…. …. (6.16)

Differentiating eq. (6.16) With respect to  we get

′′() = 2⊖; oT +[6 − 2(T + Y + ; ) ⊖> oT +………….. ………….(6.17)

EXAMPLE 6.10: Find ′(5) and ′′(5) from the following table:

 1 2 4 8 10
() 0 1 5 21 27

SOLUTION: Here the data are unequally spaced. So we use Newton’s divide difference formula.

 o ⊖y ⊖; o ⊖> y ⊖A y
1 0

2
1
1 1/3

4
2 0
5 1/3 -1/144

8
4 -1/16
21 -1/6
3
10 27

Using the the first derivative formula 0f Newton's divided difference, we have

Prepared by Haileyesus T., UOG Page 211


′() = ϴoT +( 2 − T − Y )⊖; oT +[ ( − Y )(  − ; )+(  − T )(  − ; )+(  − T )(  − Y )]⊖> oT +….

′(5) = 1 +(10- 1- 2) + [(5 -2)(5- 4) +((5- 1)(5 -4)+ (5 -1)(5 -2)](0)+[(5 -2)(5- 4)(5- 8)
Y
>

MY
+ (5 -1)(5- 4)(5- 8)- (5- 1)(5- 2)(5 -8)+ (5 -1)(5- 2)(5- 4)]YAA

−9 − 12 − 36 + 12] =1+ + =3.6458


Y Y X AC
> YAA > YAA
= 1 +7( ) -

′′(5) = 2⊖; oT +[6 − 2(T + Y + ; ) ⊖> oT +…………

= 2( ) + 6(5) − 2(1) − 2(2) − 2(4) (0) +…. = 0.6667


Y
>

at  = 5 from the data given below:


ä= r
ä8 =
EXAMPLE 6.11: Find

 2 4 9 13 16 21 29
() 57 1345 66340 492052 1118209 4287844 21242820

SOLUTION: Here, the arguments are not equally spaced and therefore we shall apply Newton’s
divided difference formula. The divided difference table:

 o = () ⊖y ⊖; o ⊖> o ⊖A o ⊖C o ⊖E o
2 57
644
4 1345 1765
12999 556
6 66340 7881 45
83928 1186 1
13 402052 22113 64 0
238719 2274 1
16 1118209 49401 89
633927 4054
21 4287844 114265
2119372
29 21242820

Prepared by Haileyesus T., UOG Page 212


Substituting values in the Newton's divided difference formula, we get

o = () = oT + ( − T )ϴoT + +( − T )( − Y )⊖; oT ( − T )( − Y )(  − ; )⊖> oT +

..…+( − T )( − Y ) …(  − b )⊖b oT

=57 +(  − 2)(644) + (  − 2)( − 4)(1765) + (  − 2)( − 4)( − 9)(556)

+( − 2)( − 4)( − 9)( − 13)(45) + ( − 2)( − 4)(  − 9)( − 13)( − 16)(1)

= 57+ 644( − 2) +1765( ; - 6x+ 8) +556(  > −15 ; + 62x-72)

+45( A -28 > + 257 ; − 878x + 936) +  C −44 A +705 > − 4990  ; −14984x-14976

Then,

= 644 +1765(2x- 6) 556(3 ; − 30x+ 62) +45(4 > − 84 ; + 514- 878)
är
ä8

+ 5 A − 176  > +2115  ; − 9980 + 14984

= 3530+ 556(6x- 30) +45(12 ; -168x+ 514) +20 > − 528 ; + 4230x- 9980
ä: r
ä8 :

= 3336 +45(24x- 168)+ 60 ; − 1056x + 4230


ä= r
ä8 =

= 60 ; + 24 + 6

When  = 5;

 (>) (5) =60(5); + 24(5) + 6

=1626

EXAMPLE 6.12: Find the first and second derivatives at  = 1.6, for the function represented by

the following tabular data:


o
1 1.5 2.0 3.0
0.000 0.40547 0.69315 1.09861

SOLUTION: The data is not equally paced. We use the divided difference formulas to find the

derivatives. We have the following divided difference table:

Prepared by Haileyesus T., UOG Page 213


 o ϴy ϴ; o ϴ> y

1 0.000
0.81094
1.5 0.40547 -0.23558
0.57536 0.061157
2.0 0.69315 -0.113267
0.40546
3 1.09861

The first derivative is obtained by substituting  = 1.6 in the formula

′() = ϴoT +(2 − T − Y )⊖; oT +[( − Y )(  − ; )+(  − T )(  − ; )+(  − T )(  − Y )]⊖> oT +….

′(1.6) = 0.81094 + [(1.6 – 1.0) + (1.6 – 1.5)] (– 0.23558) + [(1.6 – 1.5)(1.6 – 2.0)

+ (1.6 – 1.0)(1.6 – 2.0) + (1.6 – 1.0)(1.6 – 1.5)] (0.061157)

= 0.81094 + 0.7 (– 0.23558) – 0.22(0.061157) = 0.63258

The second derivative is also

′′() = ′′(5) = 2⊖; oT +[6 − 2(T + Y + ; ) ⊖> oT +…………..

′′(1.6) = 2(– 0.23558) + 2[(1.6 – 1.0) + (1.6 – 1.5) + (1.6 – 2.0)](0.061157)

= – 0.47116 + 0.03669 = – 0.43447

EXERCISE 6.4

1. Find  ′(5) and  ′′(5) from the following data:


X 2 4 9 13
Y 57 1345 66340 402052

2. Using Newton’s Divided Difference Formula, find  ′(10) from the following data

 3 5 11 27 34
o -13 23 99 17315 35606

Prepared by Haileyesus T., UOG Page 214


REVIEW EXERCISE
1. The following data gives the velocity of a particle for 20 seconds at an interval of 5
seconds. Find the initial acceleration using the entire data

Time(sec) 0 5 10 15 20
Velocity(m/sec) 0 3 14 69 228

2. Compute  ′(0) and  ″(4) from the data

 0 1 2 3 4
o = () 1 2.718 7.381 20.086 54.598

3. Find ′(6) from the following table:

 1 1.5 2 2.5 3
o = () 0 0.5 1.1 3.2 5.3

4. Use the following data to find  ′(5):

 2 4 9 10

o = () 4 56 711 980

5. The heat flux R is the quantity of heat following through a unit are of a material per unit time.
It can be computed with Fourier's law

R = −‡ äS
ä’

Where T = temperature, X= distance and J has unit S/¯2 .The following temperatures are
measured from the surface (6 = 0) into a stone wall:

6(¬„ ¯) 2 4 9 10

—(¬„ 0T ) 4 56 711 980

Prepared by Haileyesus T., UOG Page 215


CHAPTER – 7: NUMERICAL INTEGRATION
Chapter objectives

At the end of this chapter you will able to:

 Define the concept of numerical integration.


 Identify methods of numerical integration for equally spaced and unequally
spaced data.
 Know when we use methods for equally spaced data.
 Mention methods for equally spaced and the formula of each.
 Know the error formula of each method.
 Identify which method gives best solution.
 Derive and point out the methods for unequally spaced data.
 Know how we integrate double and triple integrals numerically.
 Mention the advantage of methods of unequally spaced over methods for equally
spaced.

INTRODUICTION
Analytical methods will not always give the solution of a definite integral when the function is
difficult to integrate. For instance the following integrals are impossible to integrate analytically

U 7 M8 è, U è and e.t.c


: ˪b8
8

Numerical integration is the approximate computation of integral using numerical techniques.

The basic problem considered by numerical integration is to compute an approximate value to a


definite integral

b
I = ∫ f (x )dx …………….. (7.1)
a

The definite integral of a function of a single variable, (), between two limits  and  can be
viewed as the area under the curve defined by the function.

Prepared by Haileyesus T., UOG Page 216


Throughout many engineering fields, there are (what sometimes seems like) countless
applications for integral calculus. Among the most common examples are finding the velocity of a
body from an acceleration function, and displacement of a body from a velocity function.

Sometimes, the function to be integrated is given at discrete data points, and the area under the
curve is needed to be approximated. Here, we will discuss the integration of the region S shaded on
the figure below.

Figure 7.1: Integration of a function


Therefore, numerical integration is the process of computing the value of a definite integral in eq.
(7.1) by means of tabular values of (), given in a certain interval [a, b].

Methods of numerical integration can be divided into two groups:

(I) Newton–Cotes quadrature formulas -equally spaced


(II) Gaussian quadrature -unequally spaced

7.1 GENERAL QUADRATURE FORMULA FOR EQUIDISTANT ORDINATES

Let o = () be a function, where o takes the values oT , oY , o; , …, ob for x=T , Y , ; ,….., b

We want to find the value of

I = U?  ()è


Let the interval of integration (, ) be divided into n equal subintervals of width

ℎ=(
M?
b
)

So that T =a, Y= T +h, ; T +2h, …, b = T + „ℎ = . Therefore

Prepared by Haileyesus T., UOG Page 217


I = U? ( )è = U8 ¹  ()è
 i _^‚
¹
………..(7.2)

Newton’s forward interpolation formula is given by

l(l − 1) ; l(l − 1)(l − 2) >


o = () = oT + l∆oT + ∆ oT + ∆ oT + ⋯
2! 3!

Where l = implies dl = dx
8M8¹ Y
{ {

Therefore eq. (7.2) become

I = ℎ UT oT + l∆oT + ∆; oT + ∆> oT + ⋯ du


b q(qMY) q(qMY)(qM;)
;! >!

= „ℎ [oT + ; ∆oT + ∆; oT + ∆> oT + ⋯ 


b b(;bM>) b(bM;):
Y; ;A

Therefore

U8 ( )è = „ℎ [oT + ; ∆oT + ∆; oT + ∆> oT + ⋯ 


8
f b b(;bM>) b(bM;):
¹ Y; ;A
…….(7.3)

This is called Newton-Cotes general quadrature formula. From the general formula eq. (7.3),
we can derive or deduce different integration formula by substituting „ =1, 2, 3, …, etc.

7.1.1 Trapezoidal Rule

The trapezoidal approximation of a definite integral is to say that on each subinterval you
approximate by a first-degree polynomial. Putting „ = 1 in eq. (7.3) and taking the curve
o = () through (T ,oT ) and (Y, oY )so that we have only one interval (T , Y). i.e „ = 1 with
the two values oT and oY . Consequently we can get only the first differences ∆o . So that
differences of order higher than one vanishs and we get

U8 ( )è = h[ oT + ∆oT 


8¹ _{ Y
¹ ;

= ; [ 2oT +(oY − oT )]
{

= [ oT +oY ]
{
;

Similarly, for the next sub interval (T + ℎ, T + 2ℎ) we get

U8 ()è= [ oY +o; ]
8¹ _;{ {
¹¥Š ;

Prepared by Haileyesus T., UOG Page 218


…………………………………….

U8 ( )è=; [ obMY +ob ]


8¹ _b{ {
¹¥(f›e)Š

Adding all these integral results, we get

U8 ()è = [ oT +ob + 2{oY +o; + o> +….+obMY }]


8¹ _b{ {
¹ ;

This is known as Trapezoidal rule.

ERROR IN TRAPIZOIDAL RULE

Let o = () be a continuous function with continuous derivatives in the interval [T , b ].
Expanding o in a Taylor’s series around  = T , we get
8e 8e
 − T ; ÇÇ
V oè = V  oT + ( − T )oT Ç +   oT + ⋯ è
8¹ 8¹ 2!

Ç ÇÇ ÇÇÇ
oT + oT + oT +……..
{: {= {@
= hoT +
;! E ;A
……..(7.4)

ÇÇ
Likewise, (oT + oY ) = (oT + o(T + ℎ))= (oT +y+ho Ç + oT +……
{ { { {:
; ; ; ;

Ç ÇÇ ÇÇÇ
o + oT + Y; oT +……..
{: {= {@
= hoT + ;! T A
……….(7.5)

Hence, error 7Y in (T , Y ) is obtained from eq. (7.4) and eq. (7.5) as

7Y = U8 e oè − (oT + oY ) = ℎ> oT ÇÇ + ……….


8 { MY
¹ ; Y;

In a similar way, we can write

7; = U8 : oè − (oY + o; ) = ℎ> oY ÇÇ + ………..


8 { MY
e ; Y;

7> = = ℎ> o; ÇÇ+………..


MY
Y;

7A = = ℎ> o> ÇÇ +……..


MY
Y;
…………….(7.6)

and so on.

In general, we can write

7b = = ℎ> ob_Y ÇÇ+…..


MY
Y;

Prepared by Haileyesus T., UOG Page 219


Hence, the total error œ in the interval (T , b ) can be written as

œ= ∑bb)Y 7b = ℎ> (oT ÇÇ +oY ÇÇ +…..+ob ÇÇ)


MY
Y;
………….(7.7)

The bound on the error is given by

ℎ>
|œ(, )| ≤ |o ÇÇ + oY ÇÇ + ⋯ . . +ob ÇÇ |
12 T

ℎ>
≤ |o ÇÇ | + |oY ÇÇ | + ⋯ + |ob ÇÇ |
12 T

„ℎ> ( − )ℎ;
≤ W = W;
12 ; 12

Where W; = max | ÇÇ ()| and „ℎ =  − .


a ≤ x≤b

Now, since ℎ = ( − )/„ , the total error in the evaluation of the integral of eq. (7.1) by the
trapezoidal rule is of the order of h2. Therefore, as we increase the number of intervals, the error
decreases.

EXAMPLE 7.1: Use Trapezoidal rule to evaluate UT


Y Y
Y_8 :
dx

SOLUTION: let us take h=1/4 .then the values of () = Y_8 : at =0, A,;,A,1 are given below
Y YY>

 0 1 3 1
4 4 2
1

o 1 0.94 0.8 0.64 0.5


oT oY o; o> oA

By trapezoidal rule

= [ oT +ob + 2{oY +o; + o> +….+obMY }]


Y Y {
I=UT
Y_8 : ;

= ;[oT +2(oY +o; +o> ) + oA ] =


{ T.;C
;
[1+2(0.94+ 0.8+ 0.64) + 0.5 ]

=0.825

The exact value is

¤„ MY YT =
‘
A
=0.785398

Prepared by Haileyesus T., UOG Page 220


Bounds for the errors

|error| ≤ W; , Where W; = max | ÇÇ ()|.


(M?){:
Y; a ≤ x ≤b

We have () = , ′() = and ′′() =


Y M;8 M;8 : _V8M;
Y_8 : (Y_8 : ): (Y_8 : )=
=

W; = max L L = 2.
;(>8 @ _;8 : MY)
0 ≤x ≤1 (Y_8 : )@

Y
1 1
ℎ= ; |error| ≤ YE
(2) = = 0.010417
4 12 96

EXAMPLE 7.2: Use Trapezoidal rule to evaluate UT √1 −  ; è


Y

SOLUTION: let us take h=1/4 .then the values of () = √1 −  ; at =0, , , ,1 are given
YY>
A;A

below

 0 1 3 1
4 4 2
1

o 1 0.0605 0.04133 0.2165 0


oT oY o; o> oA

By trapezoidal rule

I=UT √1 −  ; è= ; [ oT +ob + 2{oY +o; + o> +….+obMY }]


Y {

= [oT +2(oY +o; +o> ) + oA ]


{
;

T.;C
;
= [1+2(0.0605+ 0.04133+ 0.2165) + 0] = 0.144895625

Simple Command window on Mat lab to find the Area of f(x) = x2 on [0, 2] with h=0.5

>> x=[0, 0.5,1,1.5,2];

>> y=x.^2;

>> trapz(x,y)

ans =

2.7500

Prepared by Haileyesus T., UOG Page 221


Mat lab Cod for Trapezoidal rule

function I = trapzoid(f,a,b,n)
h=(b-a)/n;
x=linspace(a,b,n+1);
fx=feval(f,x);
I=(h/2)*(fx(1)+2*sum(fx(2:1:n))+fx(n+1));
Sample output
>>f = @(x) 1./(1+x.^2);
>> I = trapzoid(f,-5,5,2^4)
I=
2.7468
>> g = @(x) x.^2;
>> I = trapzoid(g,0,2,2^4)
I=
2.6667

7.1.2 Simpson’s / Rule

Putting „ = 2 in eq. (7.3) and taking the curve through (T , oT),(Y , oY ) and (; , o; ). Consequently
we can get only up to second order differences. So that differences of order higher than two
vanish, we get

U8 ()è = 2h[ oT + ∆oT + ∆; oT 


8¹ _;{ Y
¹ E

[ 6oT +6(oY − oT )+(o; − 2oY − oT )


;{
E
=

= [ oT +4oY +o; ]
{
>

Similarly,

U8 ( )è = [ o; +4o> +oA ]


8¹ _A{ {
¹ _;{ >

…………………………………………………..

U8 ( )è= [ obM; +4obMY +ob ]


8¹ _b{ {
¹ _(bM;){ >

Adding all these integral results, we get

Prepared by Haileyesus T., UOG Page 222


U8 ( )è = >[oT +ob +4{oY +o> + oC +… . + obMY }+ 2{o; +oA + oE +… . + obM; }]
8¹ _b{ {
¹

Which is known as Simpson’s 1/3 rule.

Remark: To Use Simpson’s 1/3 rule, the given interval of integration must be divided into an

even number of subintervals.

ERROR ESTIMATE IN SIMPSON’S 1/3 RULE

Expanding y= f(x) around  = T by Taylor’s series, we obtain

U8 oè =U8  oT + ( − T )oT ª + oT ªª + ⋯  è


: 8 ¹ 8 _;{ (8M8¹ ):
¹ ¹ ;!

= 2ℎoT + oT ª + oT ªª + oT ªªª + oT ªJ +….


A{: V{= YE{@ A>;
;! >! A! C!

= 2ℎoT +2ℎ; oT ª +> ℎ> oT ªª + ℎ> oT ªªª +YC ℎ> oT ªJ


A ;{@ A
>
…………..(7.8)

In addition, we have

[oT + 4oY + o; = [ oT + 4(oT + ℎoT ª + oT ªª + ⋯ )+(oT + ℎoT ª + oT ªª + oT ªªª … ) ]


{ { {: A{: A{:
> > ;! ;! ;!

=2ℎoT +2ℎ; oT ª +4 o ªª oT ªªª o ªJ


{= ;{@ C{B
> T > YV T
+ + +………. …………… (7.9)

Hence, from eq. (7.8) and eq. (7.9), the error in the subinterval (T , ; ) is given by

7Y = U8 : oè = >[ oT + 4oY + o; ] = ( YC − YV)ℎC oT ªJ +…. = UT oT ªJ +…….≅


8
oT ªJ
{ A C M{B M{B
¹ UT
………(7.10)

Likewise, the errors in the subsequent intervals are given by

7; = o; ªJ
M{B
UT

7> = o ªJ
M{B
UT A
…………….(7.11)

and so on.

Hence, the total error œ is given by

œ =∑ 7b = + o; ªJ + oA ªJ + ⋯ + o;bM; ªJ ]
M{B
[oT ªJ
UT

The bound for the error is given by

Prepared by Haileyesus T., UOG Page 223


ℎC
|œ(, )| ≤ (o ªJ + oY ªJ + ⋯ . . +ob ªJ (
90 T

ℎC
≤ (o ªJ ( + (oY ªJ ( + ⋯ + (ob ªJ (
90 T

≤ WA = WA
b{B (M?){@
UT YVT
……………(7.12)

Where WA = max ( ªJ ()( and „ℎ = ( − )/2.


a ≤ x≤b

The error in Simpson’s 1/3 rule can be written as

 ()
Mb{B ªJ
YVT
e=

Where  = T < < b =  (for n subintervals of length ℎ).

EXAMPLE 7.3: Use Simpson's 1/3 rule to evaluate UT


Y Y
Y_8 :
dx

Y YY>
SOLUTION: let us take h=1/4 , then the values of f(x) = Y_8 : at x=0,A,;,A, 1 are given below

 0 1/4 1/2 3/4 1


() 1 16/17 0.8 0.64 0.5
oT oY o; o> oA

By Simpsons'1/3 rule

= [oT +ob +4{oY +o> + oC +… . + obMY }+ 2{o; +oA + oE +… . + obM; }]


Y ä8 {
I=UT Y_8 : >

= [oT +oA +4{oY +o> }+ 2{o; }]=


{ T.;C
> >
[1+ 0.5+4(0.94 +0.64) +2(0.8]

=0.785

The exact value is =0.78539816331

Bounds for the errors

|error| ≤ WA
(M?){@
YVT

Where WA = max ( ªJ ()(


0 ≤x ≤1

We have () = , ′() = , ′′() = =,  () =


Y M;8 E8 : M; (>) M;A8 = _Y;8
Y_8 : (Y_8 : ): (Y_8 : ) (Y_8 : )@
and

Prepared by Haileyesus T., UOG Page 224


 (A) () =
Y;A8 @ MYCE8 : _Y;
(Y_8 : )B

WA = max L L = 12.
Y;A8 @ MYCE8: _Y;
0 ≤x ≤1 (Y_8 : )B

Y
1 1
ℎ= ; |error| ≤ ;CE
(12) = = 0.000427
4 180 2340

Remark: From the above example we can conclude that Simpson's 1/3 rule is rapidly

convergent than Trapezoidal rule.

EXAMPLE 7.4: consider U‘


>‘ YZ[ (8)
è with h= then the approximate area by using one of
‘
8 ;

Simpson's 1/3 rule.

SOLUTION: Let () =


YZ[ (8)
8
, the values of the function is below

 / 3//2 2/ 5//2 3/
() −1 1 −1
/ 2/ 3/
0 0
oY o>
oT o; oA

Since there are four sub intervals, which is a multiple of two, we can apply Simpson's 1/3 rule
>‘ YZ[ (8)
è => [oT +ob +4{oY +o> + oC +… . + obMY }+ 2{o; +oA + oE +… . + obM; }]
{
I=U‘ 8

= [oT +oA +4{oY +o> }+ 2{o; }]


{
>

‘ MY Y MY
= E [ ‘ +4( 0+0)+2(;‘)+ >‘ ]

≅0.05556
‘ MY Y MY Y
= E[ ‘
+ +
‘ >‘
]=
YV

EXAMPLE 7.5: The velocity of a particle which starts from rest is given by the following table

t(sec) 0 2 4 6 8 10 12 14 16 18 20
v(ft/sec 0 16 29 40 46 51 32 18 8 3 0

Evaluate using Simpson’s 1/3rule, the total distance travelled in 20 seconds

SOLUTION: From the definition, we have

Prepared by Haileyesus T., UOG Page 225


v = ä or s=U Iè¤
äË

Starting from rest, the distance travelled in 20 seconds is

S = UT I è¤
;T

The step length is ℎ = 2. Using the Simpson’s rule, we obtain

\ = > [(0) + 4{(2) + (6) + (10) + (14) + (18)} + 2{(4) + (8) + (12) + (16)} + (20)
{

;
>
= [0 + 4{16 + 40 + 51 + 18 + 3} + 2{29 + 46 + 32 + 8} + 0] = 494.667 feet.

EXAMPLE 7.6: Compute the error in the evaluation of UA “R« è by Simpson's 1/3 rule.
C.;

SOLUTION: Let () = “R«

 ªJ (x) =
ME
8@

Now / ªJ (4)/ = L L=0.0234 and / ªJ (5.2)/ = L L =0.0082


ME ME
(A)@ (C.;)@

Hence the maximum value of  ªJ ()=(A)@. Let the points be taken at width of 0.2.i.e ℎ = 0.2,
ME

then

 ªJ ()
M(M?){@
YVT
E=

(( )4 )
M(C.;MA)(T.;)@ −6
YVT 5.2
= = 0.00000025

Math cod for Simpson's 1/3 rule

function In = simpson(f,a,b,n)
% n must be a positive even integer
h=(b-a)/n; %step size
x=linspace(a,b,n+1); %(n+1) equally spaced points
fx=feval(f,x); %function evaluations
%Composite Simpson
In=(h/3)*(fx(1)+4*sum(fx(2:2:n))+2*sum(fx(3:2:n-1))+fx(n+1));
Sample output
>> f = @(x) 1./(1+x.^2);
>> In = simpson(f,-5,5,2^8)

Prepared by Haileyesus T., UOG Page 226


In =
2.7468
>> g = @(x) x.^2;
>> In = simpson(g,-5,5,2^14)
In =
2.6667

7.1.3 Simpson’s 3/8 Rule

Putting „ = 3 in eq. (7.3) and taking the curve through (T , oT ),(Y , oY ) ,(; , o;) and (> , o>).
Consequently we can get only up to third order differences. So that differences of order higher
than three vanish. Thus we get

U8 ()è = 3h [ oT + ∆oT + ∆; oT + ∆> oT 


8¹ _>{ > > Y
¹ ; A V

[ 8oT +12(oY − oT )+6(o; − 2oY − oT )+(o> − 3o; + 3oY − oT ) ]


>{
V
=

[ oT +3oY + 3o; + o> ]


>{
V
=

Similarly,

U8 ()è = [ o> +3oA + 3oC + oE ]


8¹ _E{ >{
¹¥=Š V

……………………………………………………………

U8 ()è= [ obM> +3obM; + 3obMY + ob ]


8¹ _b{ >{
¹¥(f›=)Š V

Adding all these integral results, we get

U8 ( )è = [oT +ob +3{oY + o; + oA + ⋯ + obMY } +2{o> + oE + ⋯ + obM> } ]


8¹ _b{ >{
¹ V

Which is known as Simpson’s 3/8 rule.

Remark:

(i) To Use Simpson’s 3/8 rule, the given interval of integration must be divided into sub-
intervals whose number n is a multiple of 3.

 (), where x0≤  ≤ xn (for n subintervals of


Mb{B ªJ
VT
(ii) The error in Simpson’s 3/8 rule is e =
length h).

Prepared by Haileyesus T., UOG Page 227


EXAMPLE 7.7: Use the above three methods to evaluate UT è
Y Y
Y_8 :

SOLUTION: let us take ℎ = 1/6 .then the values of () = at  = 0, , , , , , 1 are


Y Y ; > A C
Y_8 : E E E E E

given below

Here the number of sub interval with h=1/6 is six, which is even and a multiple of three, so that
we can use all the above methods.

By Trapezoidal rule

I = UT = [ oT +ob + 2{oY +o; + o> +….+obMY }]


Y Y {
Y_8 : ;

= [ oT +oE + 2{oY +o; + o> +oA +oC }]


{
;

= ; [ 1+0.5 + 2{0.9729 + 0.9 + 0.8 + 0.6923 + 0.5902}]


{

=
Y
Y;
[1.5+2{3.95543}]=0.784233

By Simpson's 1/3 rule

I = UT [oT +ob +4{oY +o> + oC +… . + obMY }+ 2{o; +oA + oE +… . + obM; }]


Y Y {
Y_8 : >
=

= [oT +oE +4{oY +o> + oC }+ 2{o; +oA }]


{
>

= [1+0.5 +4{0.9729 + 0.8 + 0.5902}+ 2{0.9+0.6923}]


Y
YV

=
Y
YV
[1.5+4{2.3631}+2{1.59}]= 0.785389

By Simpson's 3/8 rule

I = UT [oT +ob +3{oY + o; + oA + ⋯ + obMY } +2{o> + oE + ⋯ + obM> } ]


Y Y >{
Y_8 : V
=

[oT +oE +3{oY + o; + oA +oC } +2{o> } ]


>{
V
=

Prepared by Haileyesus T., UOG Page 228


>(T.;CT
V
= [1+ 0.5+3(0.9729+0.9+ 0.6923+ 0.5902) + 2(0.8)]

= 0.7853875

The exact value is =0.78539816331

Error of Trapezoidal rule=|0.78539816331 − 0.784233| =0.00116516331

Error of Simpson's 1/3 rule=|0.78539816331 − 0.785389| =0.00000916331

Error of Simpson's 3/8 rule=|0.78539816331 − 0.7853875| =0.00001066331

Remark: From the three rules of numerical integration, Simpson's 1/3 rule is more accurate and
it is preferable for numerical integration than the others.

= UY è , with 3and 6 subintervals.


; Y
C_>8
EXAMPLE 7.8: Using the Simpson’s 3/8 rule, evaluate

Compare with the exact solution.


M?
SOLUTION: Let () = C_>8, with „ = 3, ℎ =
Y Y
>
= >. The value of the function is below

 1 4/3 5/3 2

() 0.125 0.11111 0.10000 0.09091

Since the number of subinterval is a multiple of three, we can apply Simpson's 3/8 rule.

Now, we compute the value of the integral.

I = UY è = (1) + 3{ (4/3) + (5/3)} + (2.0)


; Y >{
C_>8 V

= 0.125[0.125 + 3{0.11111 + 0.10000} + 0.09091]= 0.10616


M?
and „ = 6, ℎ=
Y
E
= E . The value of the function is below

 1 7/6 8/6 9/6 10/6 11/6 2

() 0.125 0.11765 0.11111 0.10526 0.1000 0.09524 0.09091

Now

Prepared by Haileyesus T., UOG Page 229


I = UY è =
; Y >{
 (1) + (2.0) + 3{ (7/6) + (8/6) + (10/6) + (11/6) + 2  
U
C_>8 V E

Y
YE
= [0.125 + 3 {0.11765 + 0.11111 + 0.10000 + 0.09524} + 2(0.10526) + 0.09091]

= 0.10615.

The Analytical solution is

I = UY è = ln(5 ]+ 3 ) ;Y = ln(11) − ln(8) = ln   = 0.10615


; Y Y Y Y Y YY
C_>8 > > > > V

Therefore Simpson's 3/8 rule give solution is the same with the analytical solution up to five
decimal places

7.1.4 Boole's rule

Here we assume that within any four consecutive subintervals of width ℎ each, the interpolating
polynomial approximating () will be of degree 4. Substituting „ = 4 in the General quadrature
formula given by eq. (7.3) and neglecting all differences above, we get

U8 oè = 4ℎ oT + 2∆oT + > ∆; oT + > ∆> oT + UT ∆A oT ]


8
@ C ; X
¹

= AC [ 7oT + 32oY + 12o; +32o> +7oA ]


;{
………..(7.13)

Likewise

U8 oè = [7oA + 32oC + 12oE +32oX +7oV ]


ç 8 ;{
@ AC
……….(7.14)

and soon.

Adding all the above integrals from T to b , where n is a multiple of 4, we obtain

I = U8 f oè = [7oT + 32(oY + o> + oC + ⋯ )+ 12(o; + oE + oYT + ⋯ )


8 ;{
¹ AC

+14(oA + oV + oY; + ⋯ )+7ob ] ………(7.15)

Eq. (7.15) is known as Boole’s rule.

REMARK:

1. It should be noted here that the number of subintervals should be taken as a multiple of 4.
ℎX o Jª (Ẋ)
MV
UAC
2. The leading term in the error of formula can be shown as

Prepared by Haileyesus T., UOG Page 230


EXAMPLE 7.9: Evaluate the integral UT 7 8 èby using Boole’s rule using exactly five
Y.;

functional evaluations and correct to five significant figures

SOLUTION: Five functional evaluations mean using four sub intervals (i.e. n= 4).

The functional values of f(x) are shown below

x 0 0.3 0.6 0.9 1.2

y=f(x) 1 1.34986 1.82212 2.45960 3.32012

oT oY o; o> oA

Y.;MT YT
A >
h= = , and applying Boole’s rule, we have

UT 7 8 è = AC [ 7oT + 32oY + 12o; +32o> +7oA ]


Y.; ;{

= 0.01333 [7×1 + 32 × 1.34986 + 12 × 1.82212 + 32 × 2.45960 + 7 × 3.32012]

= 2.31954

EXAMPLE 7.10: Evaluate the integral UT


Y; Y
Y_8 :
dx, by using Boole’s rule using exactly five

functional evaluations and correct to five significant figures

SOLUTION: Since „ = 4 , ℎ = 3, then the values of () = at  =0,3 ,6,9, 12 are given
Y
Y_8 :

below

 0 3 6 9 12
() 1 0.1 0.02703 0.01220 0.00690

Then Using Boole’s rule

UT è = [ 7oT + 32oY + 12o; +32o> +7oA ]


Y; Y ;{
Y_8 : ;C
;8>
= AC [7×(1) + 32×(0.1) + 12×(0.02703) + 32×(0.01220) + 7×(0.00690)

=1.46174

Prepared by Haileyesus T., UOG Page 231


EXMPLE 7.11: A rocket is launched from the ground. Its acceleration is registered during the first
80 seconds and is given in the table below. Using Boole's rule, find the velocity of the rocket at
¤ = 80 seconds.
¤(sec) 0 10 20 30 40 50 60 70 80
(m/sec )
2
3 31.63 33.34 35.47 37.75 40.33 43.25 46.69 50.67
oT oY o; o> oA oC oE oX oV

SOLUTION: The given data is nine that is we have eight sub intervals which is a multiple of four.
Thus we can use the Boole's rule.

From the definition, we have

or I = U è¤
äJ
ä
a=

Starting from acceleration 30 m/sec2, the velocity of the rocket in 80 seconds is

I = UT I è¤
VT

The step length is ℎ = 10. Using the Boole's rule, we obtain

v= UT I è¤ = [7oT + 32(oY + o> + oC + o7 )+ 12(o; + oE ) +14(oA ) +7oV ]


VT ;{
AC

[7(30) + 32(31.63+35.47+40.33+46.69)+ 12(33.34+43.25)


;8YT
AC
=

+14(37.75) +7(50.67) ]
= 30.87 m/sec

7.1.5 Weddle’s rule

Here we assume that within any six consecutive subintervals of width ℎ each, the interpolating
polynomial approximating () will be of degree 6. Substituting „ = 6 in the General quadrature
formula given by eq. (7.3) and neglecting all differences above, we have

U8 oè = 6h [ oT +3∆oT +; ∆; oT +4∆> oT + ET ∆A oT +;T ∆C oT + YAT ∆E oT ]


D 8 U Y;> YY AY
¹

[oT +5oY +o; +6o> +oA + 5oC + oE ]


>{
YT
= …………(7.16)

∆E oT as ∆E oT , we have , similarly, we can write


AY >
YAT YT
Approximating

U8 oè = [oE +5oX +oV +6oU +oYT + 5oYY + oY; ]


8e: >{
D YT
………….(7.17)

Prepared by Haileyesus T., UOG Page 232


and so on.

Adding all the above integrals from T to b , where  is a multiple of 6, we obtain

I = U8 f oè = [oT + 5(oY + oC + oX + ⋯ )+ (o; + oA + oV + ⋯ )


8 >{
¹ YT

+6(o> + oU + oYC + ⋯ )+2((oE + oY; + oYV + ⋯ )+ob ] ……..(7.18)

Eq. (7.18) is known as Weddle’s rule. Weddle’s rule was found to be more accurate than most
of the other rules.

REMARK

o Jª (Ẋ).
M{_
YAT
i. The error estimate is given by

ii. In Weddle’s rule, the number of subintervals should be taken as multiple of 6.

EXAMPLE 7.12: Evaluate the integral UT è, by using Weddle’s rule


Y.C 8 =
Ì † MY

SOLUTION: Dividing the interval [0, 1.5] into 6 equal parts of each of width ℎ =
[Link]
E
=0.25

and the values ( ) = Ì † MY of at each points of sub-interval are given by


8=

 0 0.25 0.5 0.75 1 1.25 1.50


() 0 0.0549 0.1927 0.3777 0.5820 0.7843 0.9694
oT oY o; o> oA oC oE

Now by Weddle’s rule, we get

UT è = [oT + 5(oY + oC + oX + ⋯ )+ (o; + oA + oV + ⋯ )


YC 8 = >{
Ì † MY YT

+6(o> + oU + oYC + ⋯ )+2((oE + oY; + oYV + ⋯ )+ob ]

[oT +5oY +o; +6o> +oA + 5oC + oE ]


>{
YT
=

>(T.;C)
YT
= [0+5(0.0549) +0.1927+6(0.3777)+0.5820 + 5(0.7843)+ 0.9694]

= 0.075[1.7441 + 5(0.8392) +6(0.3777)]


= 0.075[11.7441 + 4.196 + 2.2662]
= 0.075(8.2063) = 0.6155

Prepared by Haileyesus T., UOG Page 233


EXAMPLE 7.13: Use the Weddle's rules to evaluate UT è
Y Y
Y_8 :

SOLUTION: let us take ℎ = 1/6 .then the values of () = at  = 0, , , , , , 1 are


Y Y ; > A C
Y_8 : E E E E E

given below

Here the number of sub interval with h=1/6 is six, which is a multiple of six, so that we can use
Widdle's rule.

UT è = [oT + 5(oY + oC + oX + ⋯ )+ (o; + oA + oV + ⋯ )


Y Y >{
8 : _Y YT

+6(o> + oU + oYC + ⋯ )+2((oE + oY; + oYV + ⋯ )+ob ]

[oT +5oY +o; +6o> +oA + 5oC + oE ]


>{
YT
=

[1 +5(0.9729) +0.9+6(0.8) +0.6923 + 5(0.5902)+ 0.5 ]


>{
YT
=

[1 +4.8645+0.9+4.8 +0.6923 + 2.951+ 0.5]= 0.74039


Y
;T
=

EXERCISE –7.1

1) Use Trapezoidal rule to evaluate UT  > è consisting five sub-intervals.


Y

2) Calculate an approximate value of integral UT: §¬„è by using trapezoidal and


™

Simpson's rule with four sub-intervals. .


3) Using Simpson’s 3/8rule, evaluate UT 7 8 è with h=2/3.
A

4) Evaluate UT è using Widdle's rule.


Y Y
√YM8 :

5) Use Boole's rule to evaluate UT  ; 7 M8 è .


Y

Prepared by Haileyesus T., UOG Page 234


ROMBERG'S METHOD
7.2 ROMBERG'

We modify the Trapezoidal rule to find a better approximation to the value of an integral. We
know that the truncation error in the trapezoidal rule is nearly proportional to ℎ2 an interval of
size ℎ. The error in the Trapezoidal rule

ℎ; o ÇÇ ()
(M?)
Y;
E=

where  <  < 

o ÇÇ ()
(M?)
Y;
If we put c=

then the error in the Trapezoidal rule = ¦ℎ; .


If o ÇÇ (), the second derivative, is reasonably constant ¦ may be taken to be constant. Consider
the evaluation of the integral

I =U? ( )è



……………(7.19)

By the Trapezoidal rule with two different intervals say ℎY ,ℎ; . Let Y and Y denote the
approximate values with the corresponding errors E1and E2 respectively.
Then
I= Y + ¦ℎY ; and I = ; + ¦ℎ; ;
Therefore, we get

Y + ¦ℎY ; = ; + ¦ℎ; ;
ae Ma:
)ℎY ;
{: : M{e :
Or c=(

Hence
ae Ma:
I= Y+({ : : )ℎY ;
: M{e

ae {: : Ma: {e :
{: : M{e :
Or I= …………….(7.20)

This will be a better approximation to than Y or Y . The above method is called Richardson's
method.

If we take ℎ = ℎY and ℎ; = ℎ in eq. (7.20).


Y
;

We get
Š: e
ae Ma:{: a Ma Aa: Mae
@ @ e :
Š: ›=
>
M{:
I= = =
@ @

Prepared by Haileyesus T., UOG Page 235


Therefore
a:Mae
+
Aa: Mae
I= ; >
=
>
……………(7.21)
If we apply the Trapezoidal rule several times successively halving h, every time the error is

reduced by a factor . Let åY , å; , å> … denote the results. Let the formula eq. (7.21) be applied
Y
A

to each pair of åª § Ç and denote the results by øY , ø; , ø> , …, etc.


Applying formula eq. (7.21) to each pair of øª § Ç we get the next results ùY , ù; , … in this process
the following array of results is obtained.

åY å; å> åA ……
øY ø; ø> ……
ùY ù; ……

The above computation is continued with two successive values which are very close to each
other. This refinement of Richardson’s method is known as Romberg integration. The values of
the integral, in Romberg integration can be tabulated as follows.

(ℎ)
(ℎ, ℎ/2).
(ℎ/2) (ℎ, ℎ/2, ℎ/4)
(ℎ/2, ℎ/4) (ℎ, ℎ/2, ℎ/4, ℎ/8)
(ℎ/4) (ℎ/2, ℎ/4, ℎ/8)
(ℎ/4, ℎ/8)
(ℎ/8)

Where

(ℎ, ℎ/2) = 4   − (ℎ)


Y {
> ;

(ℎ/2, ℎ/4) = 4 A  − ;


Y { {
>

(ℎ/4, ℎ/8) = 4   −  
Y { {
> V A

…………………………………………….

Prepared by Haileyesus T., UOG Page 236


(ℎ, ℎ/2, ℎ/4) = > 4 (; , A ) − ℎ, ;
Y { { {

(ℎ/2, ℎ/4, ℎ/8) = 4 ( , ) −  , 


Y { { { {
> A V ; A

(ℎ, ℎ/2, ℎ/4, ℎ/8) = 4 ( , , ) − ℎ, , 


Y { { { { {
> ; A V ; A

Y.; ä8
EXAMPLE 7.14: Using Romberg’s method compute I =UT Y_8
correct to 4 decimal places

() = Y_8
Y
SOLUTION: here

We can take ℎ = 0.6, 0.3, 0.15


i.e ℎ = 0.6, ℎ/2 = 0.3, ℎ/4 = 0.15
 0 0.15 0.30 0.45 0.60 0.75 0.90 1.05 1.20
o 1 0.8690 0.7692 0.6896 0.6250 0.5714 0.5263 0.48780 0.4545

Using Trapezoidal rule with ℎ = 0.6 we get

(ℎ) = (0.6) =
T.E
;
(1+2(0.6256) +0.4545)

=0.8113

With ℎ =
T.E
;
= 0.3, we get

I(ℎ/2) = (0.3) =
T.>
;
(1+2(0.7692+0.6250+0.5263) +0.4545)

= 0.7943

With ℎ=
T.E
A
=0.15, we get

(ℎ/4) = (0.15) =
T.>
A
(1+2(0.8695+0.7692+0.6896+0.6250+0.5714+0.5263+0.48780) +0.4545)

=0.7899
Now

(ℎ, ℎ/2) = (0.6, 0.3) = 4 (0.3) − (0.6)


Y
>

4(0.7940 − 0.8113 = 0.7886


Y
>
=

Similarly

(ℎ/2, ℎ/4) = (0.3,0.15) = 4 (0.15) − (0.3)


Y
>

= 4(0.7899 − 0.7943 = 0.7884


Y
>

Prepared by Haileyesus T., UOG Page 237


(ℎ, ℎ/2, ℎ/4) = (0.6, 0.3,0.15) = 4 (0.6, 0.3) − (0.3, 0.15)
Y
>

= 40.7886 − 0.7884= 0.7883


Y
>

The table of these values is

ℎ 0(ℎ; ) 0(ℎ> ) 0(ℎA )


ℎ 0.8113
0.7886
ℎ/2
0.7943
0.7883
0.7884
ℎ/4
0.7899

Therefore

I= UT
Y.; ä8
Y_8
=0.7883

EXAMPLE 7.15: Apply Romberg’s integration to find = UT §¬„è


‘

SOLUTION:
Here () = §¬„
We can take ℎ = //2, //4, //8,
i.e ℎ = //2, ℎ/2 = //4, ℎ/4 = //8
Using Trapezoidal rule with h= //2 , we get

 /b /
0 2
() 0 1 0

(ℎ) = ( ) =  (0) + 2(( )) + (/) = //2= 1.571


‘ ‘ ‘
; A ;

With ℎ =
‘
A
, we get

 /b /b 3/b /
0 4 2 4
() 0 0.707 1 0.707 0

Prepared by Haileyesus T., UOG Page 238


(ℎ/2) = (/ /4) =  (0) + 2 c   +    +   d + (/) = 1.896
‘ ‘ ‘ >‘
V A ; ;

With ℎ =
‘
V
, we get

 /b /b 3/b /b 5/b 3/b 7/b /


0 8 4 8 2 8 4 8
() 0 0.383 0.707 0.924 1 0.924 0.707 0.383 0

/ / 3/ / 5/ 3/ 7/
(ℎ/4) = (/ /8 = (0) + 2{   +  c d +    +  c d +  c d +  c d} + (/)
16 8 8 2 8 4 8
=1.9747
Now

I(ℎ, ℎ/2) = (; , A ) = > 4  A  −  ; 


‘ ‘ Y ‘ ‘

4(1.896) − 1.571
Y
>
=

= 2.004
Similarly

I(; , A ) = I( A , V ) => 4 V  −  A 
{ { ‘ ‘ Y ‘ ‘

= 4(1.9747) − 1.896
Y
>

=2.0009
And

(ℎ, ℎ/2, ℎ/4) = ( , , )= 4I  ,  − I( , )


‘ ‘ ‘ Y { { ‘ ‘
; A V > ; A ; A

= 4(2.0009) − 2.004
Y
>

= 1.999
Therefore, = UT §¬„è= [Link] exact value is 2.
‘

Y ä8
EXAMPLE 7.16: Apply Romberg’s integration method to findUT
Y_8 :
, correct to four decimal

places. Take ℎ = 0.5, 0.25 and 0.125.

SOLUTION: Let () = . Applying the trapezoidal rule, for ℎ = 0.5, we obtain
Y
Y_8 :

 0 0.5 1
() 1 0.8 0.5

Prepared by Haileyesus T., UOG Page 239


(ℎ) = UT
Y ä8 T.C
Y_8 : ;
Hence, = (1+2(0.8) +0.5) =0.775

For ℎ =0.25, we have

 0 0.25 0.5 0.75 1


() 1 0.9412 0.8 0.64 0.5

(ℎ/2) = UT
Y ä8 T.;C
Y_8 : ;
Hence, = [1+2(0.9412+0.8+0.64) +0.5] =0.7848

Similarly, when ℎ = 0.125, we find (ℎ/4) = 0.7848

The table of these values is

ℎ 0(ℎ; ) 0(ℎ> ) 0(ℎA )


ℎ 0.775
0.7856
ℎ/2
0.7828
0.7855
0.7855
ℎ/4
0.7848

Hence,

= UT
Y ä8
Y_8 :
= 0.7855 correct to four decimal places.

è, Use Romberg integration with step size ℎ =


Y/; 8 Y
EXAMPLE 7.17: CalculateUT
˪b(8) YE
.

SOLUTION: Using trapezoidal rule we have with a=0 and b=1/2

ℎ= ∶ =  () + ()  = [ 1+
Y { Y Y/;
e
; ; A [ß^ ( )
]= 0.51072
:

where we have used the fact that lim8→T


8
˪b8
=1
e e

)+(
Y
ℎ=
Y @ :
A V [ß^@
e
[ß^:
e
: I = [ 1+2( ]= 0.507988

e : = e

+ + )+(
Y
ℎ=
Y ç ç ç :
V YE [ß^ç
e
[ß^ç
:
[ß^ç
=
[ß^:
e
:I= [1+2( ] = 0.507298

Prepared by Haileyesus T., UOG Page 240


e : = @ B

+ + + +
Y
ℎ=
Y eD eD eD eD eD
YE >; e
[ß^eD
:
[ß^eD
=
[ß^eD
@
[ß^eD
B
[ß^eD
:I= [1+2(

D _ e

+ eD
D + eD
_ )+( :
e
[ß^eD [ß^eD [ß^:
] = 0.507126

Using extrapolation, we obtain the following Romberg table:

h 0(ℎ; ) 0(ℎA ) 0(ℎE ) 0(ℎV )


ℎ/2 0.51072
0.50774
ℎ/4 0.507988 0.507068
0.507069

ℎ/8
0.507068

0.507298 0.507069

ℎ/16
0.507069

0.507126

Hence,

= UT è = 0.507069 correct to six decimal places.


Y/; 8
˪b(8)

Mat lab cod of Romberg integral


function [I, md, T] = romberg(f,a,b,tol,q);
% Romberg’s method for computing the integral of f over [a,b]
% using at most q extrapolations. Stop when two adjacent values
% in the same column differ by less than tol or when q
% extrapolations have been performed. Output is an estimate
% I of the integral with error bound md and the active part
% of the Romberg table.
T = zeros(q+2,q+1);
h=b-a; m=1;P=1;
T(1,1) = h*(feval(f,a) + feval(f,b))/2;
for m = 2:q+1
h = h/2; m = 2*m;
M = 0; % Compute midpoint sum
for k = 1:2:m
M=M+feval(f, a+k*h);

Prepared by Haileyesus T., UOG Page 241


end
T(m,1) = T(m-1,1)/2 + h*M;
kmax = min(m-1,q);
for k = 1:kmax % Repeated Richardson extrapolation
T(m,k+1) = T(m,k) + (T(m,k) - T(m-1,k))/(2ˆ(2*k) - 1);
end
[md, kb] = min(abs(T(m,1:kmax) - T(m-1,1:kmax)));
I = T(m,kb);
if md <= tol % Check accuracy
T = T(1:m,1:kmax+1); % Active part of T
return
end
end

EXERCISE 7.2

1. Using Romberg’s method prove that UT


Y ä8
Y_8
=0.6931

2. Apply Romberg’s method to evaluate UT: §¬„dx =1.


™

3. Apply Romberg’s method to evaluate UT  ; 7 M8 dx .


Y

4. EvaluateUT 7 8 è, using Romberg's method.


;

Prepared by Haileyesus T., UOG Page 242


NON-UNIFORM MESH SPACING
7.3 INTEGRATION RULES BASED ON NON-

We have defined the general integration rule as

= U? S()()è = eT (T ) + eY (Y ) + λ; (; ) + ⋯ + λb  (b )




= ∑bb)T eb (b ) ………….(7.22)


Where ei and xi are called the weights and abscissa respectively.
When the abscissas are prescribed and are equally paced, that is, ª = T + ¬ℎ, ¬ = 1, 2, … , „,
we have derived the trapezium and Simpson’s rules (Newton-Cotes formulas). When the
abscissa are not prescribed in advance and they are also to be determined, then the formulas
using less number of abscissas can produce higher order methods compared to the Newton-
Cotes formulas. Such formulas are called Gaussian integration rules or formulas. Gaussian
integration rules can be obtained when the limits are finite or one of the limits is infinite or
both the limits are infinite.
We have the following Gaussian integration rules depending on the limits of integration and on
the expression for the weight function S().
Gauss-Legendre integration rules
Limits of integration = [– 1, 1]. Weight function = S() = 1.
Abscissas = Zeros of the corresponding Legendre polynomial
Gauss-Chebyshev integration rules

Limits of integration = [– 1, 1]. Weight function = S() = 1/ √1 −  ;


Abscissas = Zeros of the corresponding Chebyshev polynomial.
Gauss-Laguerre integration rules
Limits of integration = [0, ∞]. Weight funcion = S() = 7 M8
Abscissas = Zeros of the corresponding Laguerre polynomial.
Gauss-Hermite integration rules
Limits of integration = (– ∞, ∞). Weight function = S() = 7 M8 .
:

Abscissas = Zeros of the corresponding Hermite polynomial.

Prepared by Haileyesus T., UOG Page 243


7.3.1 Gauss-Legendre Integration Rules
Since the weight function is w(x) = 1, we shall write the integration rule as

I= U? ()è = eT (T ) + eY (Y ) + λ; (; ) + ⋯ + λb (b )



..……….(7.23)

As mentioned earlier, the limits of integration for Gauss-Legendre integration rules are [– 1, 1].
eq. (7.23) can have (2„ + 2) unknowns. Hence the Gaussian method can be made exact for
polynomials of degree less than or equal to 2„ + 1 and its maximum order is 2„ + 1.
Therefore, we transform the limits ,  to [– 1, 1], using a linear transformation.
Let the transformation be  = ͤ + g.
When  = , we have ¤ = – 1:  = – Í + g.
When  = , we have ¤ = 1:  = Í + g.
Solving, we get

Í= ,g =
M? _?
; ;

The required transformation is

 = ( − )¤ + ( + )


Y
;
…………….(7.24)

Then () = {; ( − )¤ + ( + )} and è = è¤


Y (M?)
;

The integral becomes

= U? ()è = UMY  ; (b − a)t + (b + a) dt


 Y Y (M?)
;
…………..(7.25)

«(¤) = { ( − )}{ ( − )¤ + ( + )}


Y Y
; ;
Where

Therefore, we shall derive formulas to evaluateUMY «(t)dt.


Y

Without loss of generality, let us write this integral asUMY  (x)dx.


Y

The required integration formula is of the form

UMY ()è = eT  (T ) + eY  (Y ) + λ;  (; ) + ⋯ + λb (b )


Y
……………..(7.26)
We shall follow the approach of method of undetermined coefficients to derive the formulas.
Before deriving the methods, let us remember the definition of the order of a method and the
expression for the error of the method. An integration method of the form eq. (7.26) is said to
be of order Í, if it produces exact results, that is error Rn = 0, for all polynomials of degree less
than or equal to Í. That is, it produces exact results for () = 1, ,  ; ,  > , …,  P . When
S() = 1, this implies that

Prepared by Haileyesus T., UOG Page 244


œb ( ° ) =UMY  ° è –∑bb)T eb  ° = 0 , for ¯ =0, 1, 2, …, Í where Í = 2„ + 1
Y

The error is obtained for () =  P_Y . We fined

c= UMY  P_Y è − ∑bb)T eb  P_Y


Y
………….(7.27)

Where c is called the error constant. Then, the error term is given by

œb () =UMY ()è –∑bb)T eb  (b )


Y

h
= (P_Y)!  (P_Y) (), a<<b ………….(7.28)

If œb ( P_Y )also becomes zero, then the error term is obtained for () = P_; .
Gauss one point rule (Gauss-Legendre one point rule)
The one point rule is given by

UMY ()è = eT  (T )


Y
…………...(7.29)
Where λ0≠0. The method has two unknowns eT , T . Making the formula exact for () = 1, ,
we get

() = 1: UMY è = 2 = eT
Y

() =  :UMY è =0= eT T


Y

Since,eT ≠0, we get T = 0.


Therefore, the one point Gauss formula is given by

UMY f(x)dx = 2f(0)


Y
………….(7.30)

Error of approximation
The error term is obtained when () =  ; . We obtain

c= UMY x ; dx − 0 = 2/3
Y

The error term is given by


œb () =  ÇÇ () =  ÇÇ (), , -1<<1
h h
(;)! >
…………..(7.31)

Remark :
Since the error term contains  ÇÇ (), Gauss one point rule integrates exactly polynomials of
degree less than or equal to 1. Therefore, the results obtained from this rule are comparable
with the results obtained from the trapezium rule. However, we require two function
evaluations in the trapezium rule where as we need only one function evaluation in the Gauss
one point rule. If better accuracy is required, then the original interval [a, b] can be subdivided

Prepared by Haileyesus T., UOG Page 245


and the limits of each subinterval can be transformed to [– 1, 1]. Gauss one point rule can then
be applied to each of the integrals.
Gauss two point rule (Gauss-Legendre two point rule)
The two point rule is given by

UMY  ()è = eT (T ) + eY (Y )


Y
……….(7.32)
where eT ≠0, eY ≠0, and T ≠ Y . The method has four unknowns eT , eY , T and Y .
Making the formula exact for () = 1, ,  ; ,  > , we get

() = 1: UMY è = 2 = eT +eY


Y
………….(7.33)

() =  :UMY è =0= eT T +eY Y


Y
…………..(7.34)

() =  ; : UMY  ; è = > = eT T ; +eY Y ;


Y ;
…………..(7.35)

() =  > : UMY  > è = 0 = eT T > +eY Y >


Y
…………(7.36)

Eliminating eT from eq. (7.34) and eq. (7.36), we get


eY Y > − eY Y T ; = 0 or eY Y (Y − T )(Y + T )= 0
Now, eY ≠0 and T ≠ Y . Hence, T =0, or T = −Y .
If Y = 0, eq. (7.34) gives T = 0, which is not possible. Therefore, T = −Y .Substituting in eq.
(7.34), we get eT − eY = 0, or eT = eY .Substituting in eq. (7.33), we get eT = eY = 1.
Substituting in eq. (7.35), we get

T ; = , 0r T = ±Ž = −Y
Y Y
> >

Therefore, the two point Gauss rule (Gauss-Legendre rule) is given by

UMY  ()è= (−Ž>) +(Ž>)


Y Y Y
……………(7.37)

Error of approximation
The error term is obtained when () =  4. We obtain

c= UMY x A dx − ¼U + U½ = C − U =AC
Y Y Y ; ; V

The error term is given by

œ() = (A)!  (A) () =  (A) (), , -1<<1


h Y
Y>C
……………(7.38)

Prepared by Haileyesus T., UOG Page 246


Remark :
Since the error term contains (A) (), Gauss two point rule integrates exactly polynomials of
degree less than or equal to 3. Therefore, the results obtained from this rule are comparable with
the results obtained from the Simpson’s rule. However, we require three function evaluations in
the Simpson’s rule whereas we need only two function evaluations in the Gauss two point rule.
If better accuracy is required, then the original interval [a, b] can be subdivided and the limits of
each subinterval can be transformed to [–1, 1]. Gauss two point rule can then be applied to each
of the integrals.
Gauss three point rule (Gauss-Legendre three point rule)
The three point rule is given by

UMY ()è = eT  (T ) + eY  (Y ) + λ;  (; )


Y

where eT ≠0, eY ≠0, e; ≠ 0 and T ≠ Y ≠ ; . The method has six unknowns eT , eY , e; ,T Y , ; .
Making the formula exact for () = 1, ,  ; ,  > ,  A ,  C , we get

() = 1: UMY è = 2 = eT +eY + e;


Y
…………..(7.39)

() =  : UMY è =0= eT T +eY Y +e; ;


Y
……….(7.40)

() =  ; : UMY  ; è = > = eT T ; +eY T ; +e; T ;


Y ;
………….(7.41)

() =  > : UMY  > è = 0 = eT T > +eY T > +e; T >


Y
……….(7.42)

() =  A : UMY  A è = 0 = eT T A +eY T A +e; T A


Y
…………(7.43)

() =  C : UMY  C è = 0 = eT T C +eY T C +e; T C


Y
…………..(7.44)
solving this system as in the two point rule, we obtain

T = ±ŽC , Y = 0, ; = ∓ŽC, eT =e; =U, eY =U


> > C V

Therefore, the three point Gauss rule (Gauss-Legendre rule) is given by

UMY  ()è = U[ 5(−ŽC ) +8 f(0) +5(ŽC )]


Y Y > >
…………..(7.45)

Error of approximation
The error term is obtained when () = 6. We obtain

c= UMY x E dx − U i5x(−ŽC)E + 0 + 5(ŽC)E j = X − ;C =YXC


Y Y > > ; E V

Prepared by Haileyesus T., UOG Page 247


The error term is given by

œ() = (E)!  (E) () = (E!)Y>C  (E) () =


h
 (E) (), -1<<1
Y Y
YCXCT
………..(7.46)

Remark:
Since the error term contains (6) () , Gauss three point rule integrates exactly polynomials of
degree less than or equal to 5. Further, the error coefficient is very small (1/15750≈0.00006349).
Therefore, the results obtained from this rule are very accurate. We have not derived any
Newton-Cotes rule, which can be compared with the Gauss three point rule. If better accuracy is
required, then the original interval [a, b] can be subdivided and the limits of each subinterval can
be transformed to [– 1, 1]. Gauss three point rule can then be applied to each of the integrals.
Table 7.1: Nodes and Weights for the Gauss-Legendre Integration Methods

n nodesˆ Weightseˆ
1 ± 0.5773502692 1.0000000000
2 0.0000000000 0.8888888889
± 0.7745966692 0.5555555556

3 ± 0.3399810436 0.6521451549
± 0.8611363116 0.3478548451

4 0.0000000000 0.5688888889
± 0.5384693101 0.4786286705
± 0.9061798459 0.2369268851

5 ± 0.2386191861 0.4679139346
± 0.6612093865 0.3607615730
± 0.9324695142 0.1713244924

REMARK: We consider the integration rule above in eq. (7.23)

I= UMY ( )è =∑bˆ)T eˆ (ˆ )


Y

The nodes ˆ ′s are the zeros of the Legendre polynomials

Prepared by Haileyesus T., UOG Page 248


1 èb_Y
Íb_Y () = b_Y ( ; − 1)b_Y 
2 ( )
„ + 1 ! è b_Y

The first few Legendre polynomials are given by


3 ; − 1 5 > − 3 35 A − 30 ; + 3
ÍT () = 1, ÍY () = , Í; () = , Í> () = , ÍA () =
2 2 8
= UY è, using Gauss one point, two point and three
; ;8
Y_8 @
EXAMPLE 7.18: Evaluate the integral

point rules. Compare with the exact solution = ¤„-1(4)−(//4)


SOLUTION: We transform the interval [1, 2] to [– 1, 1] to apply the Gauss rules
Writing  =  ¤ + , we get
1 = –  + , 2 =  + 

Solving, we get  = ,  = . Therefore,  = , è =


Y > _ > ä
; ; ; ;
.

The integral becomes

= UY è¤= UMY (¤)è¤


; V(_>) Y
YE_(_>)@

where (¤) =
V(_ >)
YE_(_>)@

Using the one point Gauss rule, we obtain

= 2 (0) = 2[YE_VY ]
;A

= UX= 0.494845
AV

Using the two point Gauss rule, we obtain

= (−Ž ) +(Ž ) = (– 0.577350) + (0.577350)


Y Y
> >

=0.384183 + 0.159193 = 0.543376


Using the three point Gauss rule, we obtain

= [ 5(−Ž ) +8 f(0) +5(Ž )] = [5 (– 0.774597) + 8 (0) + 5(0.774597)]


Y > > Y
U C C U

Y
= U [5(0.439299) + 8(0.247423) + 5(0.137889)

= 0.540592
The exact values is = 0.540420.
The magnitudes of the errors
In the one point, |0.540420 − 0.494845|=0.045575

Prepared by Haileyesus T., UOG Page 249


In the two point ,|0.540420 − 0.543376| = 0.002956
In the three point ,|0.540420 − 0.540592|=0.000172

è , using the Gauss three point formula.


; Y
EXAMPLE 7.19: Evaluate the integral =UY
Y_8

Comparewith the exact solution.


SOLUTION: We transform the interval [0, 1] to [– 1, 1] to apply the Gauss three point rule.
Writing  =  ¤ + , we get
0 = –  + , 1 =  + 

Solving, we get  = ,  = . Therefore,  = , è =


Y Y _ Y ä
; ; ; ;
.

The integral becomes

= UY = UMY  (¤)è¤
; ä Y
_>

where (¤) =
Y
_>

Using the three point Gauss rule, we obtain

= U[ 5(−ŽC ) +8 (0) +5(ŽC )] = U [5 (– 0.774597) + 8 (0) + 5(0.774597)]


Y > > Y

Y
= U [[5(0.449357) + 8(0.333333) + 5(0.264929)]

= 0.693122
The exact solution is = “„ (2) = 0.693147.
The absolute error in the three point Gauss rule is 0.000025.

è, using Gauss-Legendre two and


> hkË;8
EXAMPLE 7.20: Find the value of the integral =U;
Y_˪b8

three point integration rules.


SOLUTION:We reduce the interval [2, 3] to [– 1, 1] to apply the Gauss three point rule.
Writing  =  ¤ + , we get
2 = –  + , 3 =  + 

Solving, we get  = ,  = . Therefore,  =  = , è =


Y C (_ C) ä
; ; ; ;
.

The integral becomes

è = ; UMY Y_[ß^ ((_C)/;) è¤


> hkË;8 Y Y YZ[ (_C)
=U; Y_˪b8

Using the two point Gauss rule, we obtain

Prepared by Haileyesus T., UOG Page 250


= (−Ž>) +(Ž>) =(– 0.577350) + (0.577350)
Y Y

Y
=; [0.56558356 – 0.15856672]

= 0.20350842
Using the three point Gauss rule, we obtain

I= U[ 5(−ŽC ) +8 (0) +5(ŽC )] = U [5 (– 0.774597) + 8 (0) + 5(0.774597)]


Y > > Y

Y
= YV [– 1.26018516 + 1.41966658 + 3.48936887]

= 0.20271391
EXERCISE 7.3

Y ä8
1. Using three point Gauss formula, evaluateUT
Y_8 :
.
Y ä8
2. Apply Gauss two point formula to evaluateUMY
Y_8 :
.

3. Using three point Gauss formula, evaluate UT .


Y ä8
√`Y_8 @

7.3.2 Gauss-Chebyshev integration rules

Let the weight function S() =



ÊM±]
. Then the integral
I= UMY S( )( )è =∑bˆ)T eˆ (ˆ )
Y

Can be reduced to
UMY Ê = ∑bˆ)T eˆ Fl
Y ¸(8)ä8
−±]
……………(7.47)

The abscissa (nodes) ±m and weights nm are unknowns. The nodes ±m ′s are the zeros of the
Chebyshev polynomial
—b_Y () = ¦R§ ((„ + 1) ¦R§ MY ) ……………(7.48)
The first few Chebyshev polynomials are given by
—T () = 1, —Y ( ) = , —; () = 2 ; − 1
—> () = 4 > − 3, —A ( ) = 8 A − 8 ; − 1
The Chebyshev polynomials are orthogonal on [– 1, 1] with respect to the weight function

S() =

ÊM±]
. The methods of the form eq. (7.47) are called Gauss-Chebyshev integration

methods and are of order 2n + 1.

Prepared by Haileyesus T., UOG Page 251


We obtain from eq. (7.48)

ˆ =cos   where ‡ = 0,1,2, … , „


(;ˆ_Y)‘
;b_Y
………..(7.49)

The weights nm′s in eq. (7.47) are equal and are given by

eˆ = ^_Y
o
, where ‡ = 0,1,2, … , „ …………..(7.50)

For „ = 0, one point formula:


The formula is given by

I= UMY = eT yT
Y ¸(8)ä8
Ê M±]
…….……..(7.51)

It has two unknowns eT and xT


Making it exact for () = 1, , we get
Y
When () = 1: UMY Ê ] =§¬„  ]MY = ; + ; =
MY ( )
/= eT
Y ä8 ‘ ‘
M±

When () = : UMY by substitution let l = 1 − x ; èl = −2è


Y 8ä8
ÊM±]

 UMY + UT 
MY T äq Y äq
; √E √E
=
T Y
= -À√1 −  ; Á)]MY − À√1 −  ; Á]T
= 0 = /T ⇒ T = 0
Therefore

= UMY = eT f(0)= /(0)


Y ¸(8)ä8
Ê M±]

The error constant c = UMY - /(0) but (0) = 0


Y 8 : ä8
ÊM±]

= 2 UT
Y 8 : ä8 ‘
ÊM±] ;
=

The error term R2 =  ÇÇ ()=  ÇÇ () , -1<  < 1.


h ‘
;! A

For „ = 1, two point formula


The formula is given by

= UMY = eT yT + eY yY
Y ¸(8)ä8
Ê M±]
..….……..(7.52)

It has four unknowns eT , eY xT and Y


Making the formula exact for () = 1, ,  ; ,  > , we get

Prepared by Haileyesus T., UOG Page 252


= UMY = ;  (− )+ ( )]
Y ¸(8)ä8 ‘ Y Y
Ê M±] √; √;
‘
V
Error constant c=

 ªJ () , -1<  < 1.


‘
YU;
Error term R4=

For „ = 2, three point formula


The formula is given by

I = UMY = eT yT + eY yY + e; y;
Y ¸(8)ä8
Ê M±]
..………..(7.53)

The method has six unknowns eT , T , eY , Y , e; , ; .


Making the formula exact for () = 1, ,  ; ,  > ,  A ,  C , we get

I= UMY =  (− ( )]
Y ¸(8)ä8 ‘ √> √>
Ê M±] > ; ;
)+(0)+

EXAMPLE 7.21: Compute by Gauss-Chebyshev

I= UT è
Y p^ (8_Y
Ê8(YM8)

The error must not exceed 5 × 10–5.


SOLUTION: Using the transformation,  = (¤ + 1) / 2, we get
q¥=
Y p^  
UT Ê8(YM8) UMY √YM: : è¤
Y p^(8_Y)ä8
= =

Using Gauss-Chebyshev integration method

UMY √YM : è¤= ∑bˆ)T eˆ f(t r ) , where t r = cos


Y ¸() (;ˆ_Y)‘
;b_;

eˆ =b_Y , ‡ = 0,1, … . , „,
‘

we get for  (¤) = “„ {(¤ + 3) / 2}, and

„ = 1: = ;  (− ) +  ( ) ] = 1.184022,
‘ Y Y
√; √;

„ = 2: =  (− )+ (0) +  ( ) ]= 2.182688


‘ √> √>
> ; ;

EXERCISE 7.4

use Gauss-Chebyshev to find UT


Y hkË;8
√YM8 :
1. dx

use Gauss-Chebyshev to find UT √1 −  ; (¦R§ )dx


Y
2.

Prepared by Haileyesus T., UOG Page 253


7.4. NUMERICAL MULTIPLE INTEGRALS

7.4.1 Numerical Double Integral


In this section we obtain double integration formula by shifting the single integration formula.
We consider the evaluation of the double integral

Uh (U? (, o)è)èo


ä 
I = …………(7.54)
Over a rectangle  = ,  = , o = ¦, o = è.
[Link] Double Integrals Using Trapezoidal Rule
Evaluating the inner integral in eq. (7.54) by trapezoidal rule, we obtain

= ∫ [(, o) + (, o)]èo


− è
2 ¦
…………(7.55)

Using the trapezoidal rule again to evaluate the integrals in eq. (7.55), we obtain

= {(, ¦) + (, è) + (, ¦) + (, è)}


(−)(è−¦)
………….(7.56)

If discrete value are given we can use the Trapezoidal rule by dividing the interval [a, b] into „
4

equal subintervals each of length ℎ and the interval [c, d] into ¯ equal subintervals each of
length ‡. We have
¬ = 0 + ¬ℎ, 0 = and „ =
os = o0 + s‡, 0 =¦ and o¯ =è

Applying Trapezoidal rule in both the directions we get

{ (T , oT ) + 2{(T , oY ) + (T , o; ) + ⋯ + (0 , o¯−1 )}+ (T , o° )+2∑„−1


¬=1 [(¬ , o0 ) +
ℎ‡
I=

2{( ¬ , o1 ) +(¬ , o2 ) + ⋯ + (¬ , o¯−1 )} + (¬ , o¯ )] + (b , o0 )


4

+2{(b , o1 )+  (b , o2 )+…+ (b , o°M1 )} + (b , o° )} …………(7.57)


The computational molecule of the method eq. (7.57) for ¯ = „ = 1 and ¯ = „ = 2 can be
written as

Figure 7.2: Graphical representation of Trapezoidal rule for ¯ = „ = 1 and ¯ = „ = 2

Prepared by Haileyesus T., UOG Page 254


EXAMPLE 7.22: Evaluate the integral I=UY UY , using Trapezoidal rule with ℎ = ‡ = 0.5.
; ; ä8är
8_r

SOLUTION: Using Trapezoidal rule, with ℎ = ‡ = 1/2, the nodal point are (1, 1), (3/2, 1), (2, 1),
(1, 3/2), (3/2, 3/2), (3/2, 2), (1, 2), (3/2, 2), (2, 2).

The values of the integrand at the nodal points are obtained as the following.

y\ 1 1.5 2
1 0.5 0.4 0.33333
1.5 0.4 0.33333 0.285714
2 0.33333 0.285714 0.25

We have

I=UY UY { (T , oT ) + 2((T , oY ) + (T , o; ) +2{(Y , oT ) + 2 (Y , oY ) +  (Y , o; )}


; ; ä8är {ˆ
8_r A
=

+(; , oT )+2 (; , oY )+ (; , o; ) }

= { (T , oT ) +  (; , o; ) + f(T , o; ) + (; , oT ) +2{ (T , oY ) +(Y , oT )



A

+ (Y , o; ) + (; , oY ) } +4 (Y , oY ) }

[ (1,1) + (2,2) + (1, 2) + (2, 1) + 2{  (1,1.5) + (1.5, 1) + (1.5, 2)


Y
YE
=

+(2, 1.5) } +4(1.5, 1.5) ]


Y
YE
= [ 0.5 + 0.333333 + 0.333333 + 0.25+2{ 0.4 + 0.4 + 0.285714 + 0.285714}+4(0.33333)]

= 0.343303
With h = 0.25, we have the nodal points as shown below

Prepared by Haileyesus T., UOG Page 255


The values at the nodal points are as the following

y\ 1 1.25 1.5 1.75 2


1 0.5 0.444444 0.4 0.363636 0.333333
1.25 0.444444 0.4 0.363636 0.333333 0.307692
1.5 0.4 0.363636 0.333333 0.307692 0.285714
1.75 0.363636 0.333333 0.307692 0.285714 0.25
2 0.333333 0.307692 0.285714 0.25 0.25
Using the trapezoidal rule, we obtain

I=UY UY [{(1, 1) + (2, 1) + (1, 2) + (2, 2)} + 2{(1.25, 1) + (1.5, 1) +


; ; ä8är {ˆ
8_r A
=

(1.75, 1) + (1, 1.25) + (1, 1.5) + (1, 1.75) + (2, 1.25) +


(2, 1.5) + (2, 1.75) + (1.25, 2) + (1.5, 2) + (1.75, 2)} +
4{(1.25, 1.25) + (1.25, 1.5) + (1.25, 1.75) + (1.5, 1.25) +
(1.5, 1.5) + (1.5, 1.75) + (1.75, 1.25) + (1.75, 1.5) + (1.75, 1.75)}]
= (0.015625)[{0.5 + 2(0.333333) + 0.25} + 2{2(0.444444) + 2(0.4)
+ 2(0.363636) + 2(0.307692) + 2(0.285714) + 2(0.266667)}
+ 4{0.4 + 2(0.363636) + 3(0.333333) + 2(0.307692) + 0.285714}]
= 0.340668

Prepared by Haileyesus T., UOG Page 256


EXAMPLE 7.23: Evaluate the integral = UT UT (, o)èèo, using Trapezoidal rule for the
; ;

following data.

y\ 0 0.5 1 1.5 2


0 2 3 4 5 5
1 3 4 6 9 11
2 4 6 8 11 14

SOLUTION: We have the step lengths along -axis and o −axis as ℎ = 0.5 and ‡ = 1.0
respectively. Also, the number of intervals along x-axis and y-axis are ¯ = 4 and „ = 2. We
have the following grid.

Using the trapezoidal rule, we obtain

I=UT UT {(0, 0) + (2, 0) + (0, 2) + (2, 2)} + 2{(0.5, 0) + (1, 0) +


; ; ä8är {ˆ
8_r A
=

(1.5, 0) + (0, 1) + (2, 1) + (0.5, 2) + (1, 2) + (1.5, 2)} +


4{(0.5, 1) + (1, 1) + (1.5, 1)}
= (0.125) [{2 + 5 + 4 + 14} + 2{3 + 4 + 5 + 3 + 11 + 6 + 8 + 11}+ 4{4 + 6 + 9}]
=0.125[25 + 2(51) + 4(19)]
= 25.375

Prepared by Haileyesus T., UOG Page 257


EXERCISE 7.5
Evaluate the integral using trapezoidal rule

a. UY UY
Y.C ; ä8är
8_r
.

b. UT UT 7 8_r èèo.
Y Y

c. UY UY
C C ä8är
Ê8 : _r :
,with two and four subintervals

[Link] Double Integrals Using Simpson's 1/3 Rule

Divide the interval ,  into 2„ equal parts each of length ℎ = (– )/(2„). Divide the
interval [c, d] into 2¯ equal parts each of length ‡ = (è– ¦)/(2¯). We have odd number of
points on each mesh line and the total number of points, (2„ + 1) (2¯ + 1) is also odd.
For ¯ = „ = 4, the weights in the Simpson’s 1/3 rule are given in Figure.

Figure 7.3: Weights in the Simpson’s rule.


If discrete value are given we can use the Simpson's 1/3 rule by dividing the interval ,  into
„ equal subintervals each of length ℎ and the interval ¦, è into ¯ equal subintervals each of
length ‡. We have
¬ = 0 + ¬ℎ, 0 =a and „ =b
os = o0 + sℎ, 0 =c and o¯ =d

Applying Simpson's 1/3 rule in both the directions we get

 { (T , oT )+4∑bª)Y (;ªMY , T ) +2 ∑bMY


ª)Y ( ;ª , T )+ (;b , T )

U
I=

õ)Y{ fÀT , o;õMY Á + 4 ∑ª)Y (;ªMY , ;õMY )+2 ∑ª)Y (;ª , õMY )+ (;b , ;õMY )}
+ 4∑° b bMY

õ)Y{ fÀT , o;õ Á + 4 ∑ª)Y (;ªMY , ;õ )+2 ∑ª)Y (;ª , ;õ ) + (;b , ;õ )}
+2∑° b bMY

Prepared by Haileyesus T., UOG Page 258


+{ (T , o;° ) +4 ∑bª)Y (;ªMY , ;° ) + 2 ∑bMY
ª)Y (;ª , ;° ) + (;b , ;° )} …….(7.57)

The computational module for ¯ = „ = 2 and ¯ = „ = 4 can be written as

Figure7.4: Graphical representation of Simpson's rule for ¯ = „ = 2 and ¯ = „ = 4

EXAMPLE 7.24: Evaluate the integral I=UY UY , using Simpson's 1/3 rule with ℎ = ‡ = 0.5.
; ; ä8är
8_r

SOLUTION: Using Trapezoidal rule, with ℎ = ‡ = 1/2, the nodal point are(1, 1), (3/2, 1), (2, 1),
(1, 3/2), (3/2, 3/2), (3/2, 2), (1, 2), (3/2, 2), (2, 2).
The values of the integrand at the nodal points are obtained as the following.

y\ 1 1.5 2
1 0.5 0.4 0.33333
1.5 0.4 0.33333 0.285714
2 0.33333 0.285714 0.25

We have

I=UY UY { (T , oT )+ (T , o; )+ (; , oT )+ (; , o; )+4{ (T , oY )+ f(Y , oT )+(Y , o; ) +


; ; ä8är {ˆ
8_r U
=

 (; , oY )} + 16 (Y , oY )}


0.5 + 0.3333 + 0.3333 + 0.25 + 4{0.4 + 0.4 + 0.285714 + 0.285714} + 16(0.3333)
Y
>E
=

[ 1.4166 + 5.485712 + 5.3328 ]


Y
>E
=

= 0.33986

Prepared by Haileyesus T., UOG Page 259


EXAMPLE 7.25: Evaluate the integral
1.5 2
dxdy
I= ∫ ∫
x+ y
Using the Simpson’s rule with ℎ = 0.5 and ‡ = [Link] with the exact solution?
1 1

SOLUTION: Here (, o) =


Y
8_r
and let's compute the value of the function on each points

y\ 1 1.5 2
1 ½=0.5 2/5=0.4 1/3=0.333
1.25 4/9=0.444 4/11=0.3637 4/13=0.3077
1.5 2/5=0.4 1/3=0.3333 2/7=0.2857

Applying Simpson's 1/3 rule in both the directions we get

=  { f(T , oT )+4∑bª)Y (;ªMY , T ) +2 ∑bMY


ª)Y ( ;ª , T )+ f(;b , T )

U

õ)Y{ fÀT , o;õMY Á + 4 ∑ª)Y (;ªMY , ;õMY )+2 ∑ª)Y (;ª , õMY ) + f(;b , ;õMY )}
+ 4∑° b bMY

õ)Y{ fÀT , o;õ Á + 4 ∑ª)Y (;ªMY , ;õ )+2 ∑ª)Y (;ª , ;õ ) + f(;b , ;õ )}
+2∑° b bMY

+{ f(T , o;° ) +4 ∑bª)Y (;ªMY , ;° ) + 2 ∑bMY


ª)Y (;ª , ;° ) + + f(;b , ;° )}

Hence
0.125
I= [ f (1,1) + f (2,1) + f (1,1.5) + f (2,1.5) + 4{ f (1.5,1) + f (1,1.25) + f (1.5,1.5) + f (2,1.25)}
9
+ 16 f (1.5,1.25)]
0.5 + 0.333 + 0.440.2587 + 4{0.4 + 0.444 + 0.3637 + 0.3077} + 160.3637 
T.Y;C
U
=

=0.184432
The exact solution is = 3.5“„ (3.5) + “„4 − “„27 − 2.5“„2.5 = 0.184401
EXERCISE 7.6
Evaluate the integral using Simpson's rule

a. UT UT
Y Y ä8är
Y_8_r
.

b. UY UY èèo, with ℎ = 0.2 along  and ‡ = 0.25 in the o.


; ; Y
8 : _r :

c. UT UY ,taking ℎ = ‡ = 0.5
Y ; ;8rärä8
(Y_8 : )(Y_r : )

Prepared by Haileyesus T., UOG Page 260


7.4.2 Numerical Triple Integrals

In this section we obtain triple integration formula by shifting the single integration formula.
We consider the evaluation of the triple integral

UË Uh (U?  (, o, p)è)èoèp


 ä 
I = ……… (7.58)

Over a rectangular box  ,   ¦, è §, ¤

[Link] Triple Integrals Using Trapezoidal Rule


For ¯ = „ = “ = 2, Evaluating the inner integral in eq. (7.58) by trapezoidal rule, we obtain

UË Uh  (T , o, p) + (Y , , p, o)èoèp


M?  ä
;
I= ……… (7.59)

Using the trapezoidal rule again to evaluate the integrals in eq. (7.59), we obtain

UË {(T , oT , p) +  (T , oY , p) + (Y , oT , p) +  (Y , oY , p)} èp


(M?)(äMh) 
A
I= ……. (7.60)

Using the trapezoidal rule again to evaluate the integrals in eq. (7.60), we obtain

{(T , oT , pT ) +  (T , oT , pY ) + (T , oY , pT ) +  (T , oY , pY )


(M?)(äMh)(MË)
V
I=

+(Y , oT , pT ) + (Y , oT , pY ) + (Y , oY , pT ) + (Y , oY , pY )}

{(T , oT , pT ) + (T , oT , pY ) +  (T , oY , pT ) + (T , oY , pY )


{ˆ
V
I=

+(Y , oT , pT ) + (Y , oT , pY ) + (Y , oY , pT ) + (Y , oY , pY )} …… (7.61)

EXAMPLE 7.27: Evaluate the integral I=UMY UMY UMY (, o, p)èèoèp, using Trapezoidal rule if
Y Y Y

(, o, p) =  ; o ; p ;
SOLUTION: Here T = oT = pT = −1, Y = oY = pY = 1, with „ = ¯ = Í = 1, then
functional values are (−1, −1, −1) = 1, (−1, −1,1) = 1, (−1,1, −1) = 1, (−1,1,1) =
1, (1,1, −1) = 1 (−1, −1,1) = 1 (−1,1, −1) = 1.
Therefore, using Trapezoidal rule

{(T , oT , pT ) + (T , oT , pY ) +  (T , oY , pT ) + (T , oY , pY )


{ˆ
V
I=

+(Y , oT , pT ) +  (Y , oT , pY ) + (Y , oY , pT ) + (Y , oY , pY )}


=
;8;8;
V
[1+1+1+1+1+1+1+1]

= 0.296296

Prepared by Haileyesus T., UOG Page 261


[Link] Triple Integrals Using Simpson's 1/3 Rule
Evaluating the inner integral in eq. (5.58) by Simpson's 1/3 rule, we obtain

U U (T , o, p) + 4 (Y , o, p) + (; , o, p)èo èp


ˆ  ä
> Ë h
I= …………(7.62)

Where ‡ = ( − )/2
Using the Simpson's 1/3 rule again to evaluate the integrals in eq. (7.62), we obtain

UË (T , oT , p) + 4(T , oY , p) +  (T , o; , p) + 4{ (Y , oT , p) + 4 (Y , oY , p) +


{ˆ 
U
I=

 (Y , o; , p)} +  (; , oT , p) + 4 (; , oY , p) + (; , o; , p) èp

UË (T , oT , p) +  (T , o; , p) + (; , o; , p) +  (; , oT , p) + 4{ (Y , oT , p) +  (Y , o; , p) +


{ˆ 
U
I=

(; , oY , p) + (T , oY , p) } + 16(Y , oY , p)èp ……. (7.63)


Using the Simpson's 1/3 rule again to evaluate the integrals in eq. (7.63), we obtain

 (T , oT , pT ) + 4 (T , oT , pY ) + (T , oT , p; ) + (T , o; , pT )


{ˆ
;X
+ 4(T , o; , pY ) + (T , o; , p; ) + (; , o; , pT ) + 4(; , o; , pY )
I=

+(; , o; , p; ) +  (; , oT , pT ) + 4 (; , oT , pY ) + (; , oT , p; )


+4{(Y , oT , pT ) + 4(Y , oT , pY ) +  (Y , oT , p; ) + (Y , o; , pT )
+4 (Y , o; , pY ) + (Y , o; , p; ) + (; , oY , pT ) + 4(; , oY , pY )
+ ; , oY , p; ) + (T , oY , pT ) + 4(T , oY , pY ) +  (T , oY , p; ) }
(
+16{ (Y , oY , pT ) + 4(Y , oY , pY ) +  (Y , oY , p; )}
 (T , oT , pT ) + (T , oT , p; ) +  (T , o; , pT ) + (T , o; , p; ) + (; , o; , pT )
{ˆ
;X
+4{ (T , oT , pY ) + (T , o; , pY ) +  (; , o; , pY ) + (; , oT , pY )
I=

+ (Y , oT , pT ) + (Y , oT , p; ) +  (Y , o; , pT ) +  (Y , o; , p; )


+  (; , oY , pT ) + (; , oY , p; ) +  (T , oY , pT )
+  (T , oY , p; )}
+16{(Y , oT , pY ) +  (Y , o; , pY ) + (; , oY , pY )
+(T , oY , pY )(Y , oY , pT ) + (Y , oY , p; ) + 64(Y , oY , pY ) ……..(7.64)
This is the Simpson's 1/3 rule for triple integral

EXAMPLE 7.28: Evaluate the integral I=UMY UMY UMY (, o, p)èèoèp, using Simpson's 1/3 rule
Y Y Y

if (, o, p) =  ; o ; p ;
SOLUTION: Here T = −1, Y = 0, ; = 1 with „ = ¯ = Í = 2, then functional values are
(−1, −1, −1) = 1, (−1, −1,1) = 1, (−1,1, −1) = 1, (−1,1,1) = 1, (1,1, −1) = 1,
(1, 1,0) = 0, (1, −1,0) = 0, (0, −1, −1) = 0, (0, −1, 1) = 0 (0, −1,1) =
0, (0,1, −1) = 0, (0,1,1) = 0, (0,1, −1) = 0, (1,0,1) = 0, (−1, 0, −1) = 0, (−1, 0,1) =
0, (0, −1,0) = 0, (0,1,0) = 0, (1,0,0) = 0, (−1,0,0) = 0, (0,0, −1) = 0, (0,0,1) =
0, (0,0,0) = 0
Therefore, using Simpson's 1/3 rule

Prepared by Haileyesus T., UOG Page 262


 (T , oT , pT ) + (T , oT , p; ) +  (T , o; , pT ) + (T , o; , p; ) + (; , o; , pT )
{ˆ
;X
+4{ (T , oT , pY ) + (T , o; , pY ) +  (; , o; , pY ) + (; , oT , pY )
I=

+ (Y , oT , pT ) + (Y , oT , p; ) +  (Y , o; , pT ) +  (Y , o; , p; )


+  (; , oY , pT ) + (; , oY , p; ) +  (T , oY , pT )
+  (T , oY , p; )}
+16{(Y , oT , pY ) + (Y , o; , pY ) + (; , oY , pY )
+ (T , oY , pY )(Y , oY , pT ) +  (Y , oY , p; ) + 64(Y , oY , pY )
Y
;X
= [1+1+1+1+1+4{0+0+0+0+0+0+0+0+0+0+0+0}+16{0+0+0+0+0+0}+64(0)}

EXAMPLE 7.29: Evaluate I=UMY UMY UMY (, o, p)èèoèp, using Simpson's rule if (, o, p) =
Y Y Y
=0.1852

 + o + p.
SOLUTION: Here T = −1, Y = 0, ; = 1 with „ = ¯ = Í = 2, then functional values are
(−1, −1, −1) = −3, (−1, −1,1) = −1, (−1,1, −1) = −1, (−1,1,1) = 1, (1,1, −1
= 1, (1, 1,0) = 2, (1, −1,0) = 0, (0, −1, −1) = −2, (0, −1, 1)
= 0, (0, −1,1) = 0, (0,1, −1) = 0, (0,1,1) = 2, (0,1, −1) = 0, (1,0,1)
= 2, (−1, 0, −1) = −2, (−1, 0,1) = 0, (0, −1,0) = −1, (0,1,0)
= 1, (1,0,0) = 1, (−1,0 = −1, (0,0, −1) = −1, (0,0,1) = 1, (0,0,0) = 0
Therefore, using Simpson's 1/3 rule

 (T , oT , pT ) + (T , oT , p; ) +  (T , o; , pT ) + (T , o; , p; ) + (; , o; , pT )


{ˆ
;X
+4{ (T , oT , pY ) + (T , o; , pY ) +  (; , o; , pY ) + (; , oT , pY )
I=

+(Y , oT , pT ) + (Y , oT , p; ) + (Y , o; , pT ) + (Y , o; , p; )


+  (; , oY , pT ) + (; , oY , p; ) +  (T , oY , pT )
+  (T , oY , p; )}
+16{(Y , oT , pY ) +  (Y , o; , pY ) + (; , oY , pY )
+ (T , oY , pY ) +  (Y , oY , pT ) + (Y , oY , p; ) + 64 (Y , oY , pY )
Y
=;X[-3-1-1+1+1+4{-2+0+2+0-2+0+0+2+0+2-2+0}+16{-1+1+1-1-1+1}+64(0)]
Y
=;X[-3+4{0}+16{0}+64(0)]

= 0.111

Prepared by Haileyesus T., UOG Page 263


REVIEW EXERCISE
1. Evaluate the definite integral using Trapezoidal rule compare with the analytical solution.

a) I = UT §¬„ ; è, taking seven ordinates


X

b) I = UT §¬„dx
‘

c) I = UMY è
Y Y
Y_8 :

2. Determine the area bounded by the curve () = 7 ;8 and the -axis between  = 0 and
 = 1 using the trapezoidal rule with an interval size of (a) ℎ= 0.5, (b) ℎ= 0.1. Determine the
relative error in each case given that the exact value of the integral I= 2.09726.
3. Evaluate the definite integral using Simpson's 1/3 rule and compare the two results with
analytical solution.
‘b
a. I= UT ;
√¦R§ è, taking „= 6

b. I = UT 7 8 è, taking four intervals


Y

c. I = UM>  A è
>

4. Evaluate the definite integral using Simpson's 3/8 rule

(a) I = UT √§¬„ + ¦R§  è


Y

(b) I = UT è, with ℎ = 1/6


Y Y
Y_8
‘b
(c) I = UT ; 7 ˪b8 è
5. Evaluate the definite integral using Widdel's rule
Yb
a. I = UT è
; Y
√YM8 :

b. I = UT.A è, taking 12 sub-intervals


Y.E 8
˪b{8

c. I = UT è
C Y
A8_C

6. Evaluate the definite integral using Boole's rule


‘b
a) I = UT ;
√§¬„dx

b) I = 1 UT (1 + 7 M8 §¬„4 )è, with h= ¼


Y

c) I = UA “R« è, with seven grid points


C.;

Prepared by Haileyesus T., UOG Page 264


7. Evaluate the definite integral using Romberg's rule

a. I = UT 7 M8 è
Y

b. I = UT 2 ; ¦R§ ; è
√‘

c. I = UT ( C + 3 > − 2) è
;

8. Estimate I = UT ()è from the data


;.C

 0 0.5 1 1.5 2 2.5


() 1.5 2 2 1.6364 1.25 0.9565

9. Use two point and three point Gauss formula to evaluate I= UT è. Compare with the
; Y
>_A8

exact solution.

10. Use two point and three point Gauss formula to evaluate I = UT
; ä8
8 : _;8_YT

11. Evaluate

a) UY UY èèo d) UT UT  ; o ; èèo
C C Y ; >
8 : _r :

e) UMY UMY 7 M(8 èèo


Y Y
b) U; UY èoè
>.; >.E Y : _r : )

8_r

f) UT UT èèo
Y ; Y
UT UT( Y_8 : )(Y_r :)doè,
Y ; ;8r
c) with (Y_8r)

ℎ = ‡ = 0.25

12. Evaluate UT UT o(2 −  ; )(2 − o) èèo, over the region shown.
; >

13. Evaluate∬æ o(1 − )(o − ) èèo, over the triangle shown.

Prepared by Haileyesus T., UOG Page 265


Limit if a function: Let v be a function defined at each point of some open interval containingw,
8. APPENDICES

except possibly at w itself. Then a number x is the limit of v(±) as ± approaches w if for every
y > 0 there is a number . > 0 such that
0 < | I | < c ⟹ | I | < 
If such a number  can be found, we say that the limit of  at  exists.
In other words lim8⟶? () = lim8→?¥ () = lim8→?› () = 
(i.e the left and the right hand limits exist and are each equal to L). Otherwise, the limit does not
exist.
Continuity: A function  is continuous at a point  in its domain if
 () = lim¥ () = lim› ().
8→? 8→?

Intermediate value Theorem: Suppose  is continuous on a closed interval, . Let ‡ be any
number between () and (), so that () ≤ ‡ ≤ () or () ≤ ‡ ≤ (). Then there exists
a number ¦ in ,  such that  (¦) = ‡.
Rolle's Theorem: If () is continues in the closed interval , , if ′() exists at each value of  in
the open interval (, ) and () = (), then there is at least one value ¦ of  in (a, b) such that
′(¦) = 0.
Mean value theorem: If f(x) is continuous in the closed interval [a, b] and f'(x) exists in the open
interval (a, b), then there is at least one value c of x in (a, b), such that
() − ()
=  Ç (¦)
−
Taylor's series for a function of one variable: If f(x) is continuous and possesses continuous
derivatives of n order in an interval that includes x=a, then in that interval
( − ); ÇÇ ( − )b (b)
() =  () + ( − ) Ç () +  () + ⋯ +  () + œb ()
2! („)!
Where is the reminder term, can be expressed in the form

œb ( ) =  (b_Y) (è),  < è < .


(8M?)f¥e
(b_Y)!

Maclaurin's Expansion:( ) =  (0) +  Ç (0) + 8 :  ÇÇ (0) + ⋯ + 8 f  (b) (0)


;! b!

Prepared by Haileyesus T., UOG Page 266


Taylor's Series for a function of two Variables:
(Y + ∆Y , ; + ∆; )
| |
= (Y , ; ) + ∆Y + ∆
|Y |; ;
1 |; |; |;
+ i ; (∆Y ); + ; (∆; ); + 2 ∆ ∆ j + ⋯
2 |Y |; |Y |; Y ;

Taylor's Series for a function of } Variables:


(Y + ∆Y , ; + ∆; , … , b + ∆b )
| | |
= (Y , ; , … , b ) + ∆Y + ∆; + ⋯ + ∆
|Y |; |b b
1 |; |; |; |;
+ i ; (∆Y ); + ; (∆; ); + ⋯ + ; (∆b ); + 2 ∆ ∆ + ⋯
2 |Y |; |b |Y |; Y ;
|;
+2 ∆ ∆ j + ⋯
|bMY |b bMY b

Derivative and integral of some functions:

(§¬„)= ¦R§ U ¦R§ è = −§¬„ + ¦


ä
ä8

(¦R§)= −§¬„ U §¬„ è = ¦R§ + ¦


ä
ä8

(¤„)= §7¦ ;  U §7¦ ;  è = ¤„ + ¦


ä
ä8

(¦R¤)= −¦§¦ ;  U ¦§¦ ;  è = −¦R¤ + ¦


ä
ä8

(¦§¦)= −¦§¦¦R¤ U ¦§¦¦R¤ è = −¦§¦ + ¦


ä
ä8

(§7¦)= §7¦¤„ U §7¦¤„ è = §7¦ + ¦


ä
ä8

78= 78 U 7 8 è = 7 8 + ¦
ä
ä8

 8 =  8 “„ U  8 è = b? + ¦
ä ?†
ä8

“R«? 8 = 8b? U 8b? è = “R«? + ¦


ä Y Y 8
ä8

Prepared by Haileyesus T., UOG Page 267


Series for some Functions
78 = 1 +  + + + +⋯  −∞ <  < +∞
8: 8= 8@
;! >! A!

ln(1 + ) =  − + − +⋯  −1 <  < +1


8: 8= 8@
; > A!
8_
§¬„ =  − + − +⋯  −∞ <  < +∞
8= 8B
>! C! X!

¦R§ = 1 − + − +⋯  −∞ <  < +∞


8: 8@ 8D
;! A! E!
YX8 _
¤„ =  − + − +⋯ − < <+ 
8= ;8 B ‘ ‘
> YC >YC ; ;
8_
§¬„ℎ =  + + + +⋯  −∞ <  < +∞
8= 8B
>! C! X!

¦R§ℎ = 1 + + + +⋯  −∞ <  < +∞


8: 8@ 8D
;! A! E!
Cr _
§¬„ℎMY o = o − + − +⋯  −1 <  < +1
r= >r B
E AT YY;
r_
¤„ℎMY o = o + + + +⋯  −1 <  < +1
r= rB
> C X

Matrix and Determinant


DEFINITION: A matrix can be defined as a rectangular array of numbers arranged in horizontal
rows and vertical columns.
When there are 'm' rows and 'n' columns, the matrix is called ¯ × „ matrix. The elements of a
matrix are called the entries. The expression ¯ × „ denotes the size (order) of the matrix.

YY Y; ⋯ Yb


;Y ;; ⋯ ;b
å = Àªõ Á°×b = ⋮ ⋮ €
⋱ ⋮
°Y °; ⋯ °b
Where ªõ represent the entry in the above ¯ × „ matrix. ªõ refers to an element which is in
the ¬ { row and s { column.
Types of Matrix
1. Row matrix: if a matrix A has only one row and any number of columns. i.e A=ÀYõ Á
where s = 1, 2, 3, … , ¯.
2. Column matrix: if a matrix A has only one column and any number of rows. i.e. A=(ªY )
where ¬ = 1, 2, 3, … , „.

Prepared by Haileyesus T., UOG Page 268


3. Null matrix: An ¯ × „ matrix å = Àªõ Á is called the Null matrix if and only if ªõ = 0 for
all ¬ and s. It is also called zero matrix.

4. square matrix : If a matrix has equal number of rows and columns we call the matrix as
square matrix.(i.e. An ¯ × „ matrix å = Àªõ Á is called a square matrix if and only if
¯ = „. We represent it as Main diagonal

YY Y; ⋯ Yb


;Y ;; ⋯ ;b
å = Àªõ Á°×b = €
⋮ ⋮ ⋱ ⋮
bY b; ⋯ bb
 Elements in the main diagonal are called diagonal elements. The sum of the diagonal
elements of any square matrix is called the trace of a matrix and denoted by trac (A).
5. Diagonal matrix: A matrix whose all elements except the main diagonal are all zero. i.e An
„ × „ matrix å = Àªõ Á is called diagonal matrix if and only if ªõ = 0 whenever ¬ ≠ s.

6. A diagonal matrix whose diagonal elements are equal is called scalar matrix.

7. An „ × „ matrix å = Àªõ Á is called an identity matrix if and only if ªõ = 1 when ¬ = s


and ªõ = 0 if ¬ ≠ s. An „ × „ identity matrix is denoted by, b.

8. Let A be „ × „ matrix.
 If all elements of A below the main diagonal are zero. Then A is called upper triangular
matrix. i.e if ªõ = 0 for ¬ > s.
 If all elements of A above the main diagonal are zero. Then A is called lower triangular
matrix if and only if ªõ = 0 for ¬ < s.

Matrix Operations
Addition and scalar multiplication of matrices
DEFINITION: Let å = Àªõ Á and ø = Àªõ Á be two ¯ × „ matrices . Then
å + ø = (ªõ + ªõ ) for all ¬ and s.
­å = ( ­ªõ ) for all ¬ and s and ­ ∈ ;.

Prepared by Haileyesus T., UOG Page 269


REMARK: (1) Addition of matrices is possible only if the number of rows and columns of both
matrices are the same.
(2) −1å = −å and å − ø = å + (−ø)
Multiplication of Matrices
DEFINITION: Let å = Àªõ Á be a ¯ × „ matrix and let ø = Àõˆ Á be a „ × “ matrix . Then the
product åø is the ¯ × “ matrix ù = (¦ªˆ ), where¦ªˆ = ∑bõ)Y ªõ õˆ .
REMARK: The product åø to be possible if the number of columns of matrix å must be the same
as the number of rows of matrix ø.
NOTE: 1. Addition of matrices is commutative and associative.
2. Multiplication of matrices is associative but not commutative.
Transpose of Matrices
DEFINITION: If å = Àªõ Á is an ¯ × „ matrix, then the transpose of å is „ × ¯ matrix ø = Àªõ Á
with ªõ = õª and the transpose of å is usually denoted by å’ .
Determinant of a matrix
If A is a any square matrix, then the determinant of A is denoted by è7¤(å) or |A|,
1. Determinant of ] × ] Matrices

YY Y;
Letå =  ;; . Thenè7¤(å) =
;Y

YY ;; − ;Y Y; .


2. Determinant of  ×  Matrices

The minor of an element is the determinant obtained from given determinant by deleting the
row and column that contains the element and the minor of an element ªõ is denoted by Wªõ
YY Y; Y>
 ;> ;Y ;>
 ;; ;> ÷.Then WYY = L ;;
Let å = ö ;Y >; >> L, WY; = L>Y >> L, …………
>Y >; >>
The cofactor of an element ªõ which is the product of the minor of ªõ and (−1)ª_õ and denoted
by ùªõ
i.e ùªõ = (−1)ª_õ Wªõ
YY Y; Y>
 ;>

Let å = ö ;Y ;; ;> ÷. Then ùYY = (−1)Y_Y WYY = L ;;
>; >> L,
>Y >; >>
Prepared by Haileyesus T., UOG Page 270
;Y ;>
ùY; = (−1)Y_; WY; = − L >> L, ……….
>Y

REMARK: The cofactor and minor of an element ªõ differ only in sign i.e ùªõ = ±Wªõ .Hence foe
each element ªõ the sign of the cofactor is given as

+ − +
− .... 
...

+ − + .... 
+ −
.

... ... .... ....


THEOREM: The value of a determinant of order 3 is the sum of three products obtained by

;; ;> ;Y ;> ;Y ;;


multiplying each element of any row by its cofactor. Thus

è7¤ (å) = (−1)Y_Y YY L L + (−1) Y_;


 L L + (−1)Y_>
 L >; L
>; >> >Y >> >Y
Y; Y>

= YY (;; >> − ;> >; ) − Y; (;Y >> − ;> >Y ) + Y> (;Y >; − ;; >Y )
=YY ;; >> +Y; ;> >Y +Y> ;Y >; − (YY ;> >; +Y; ;Y >> +Y> ;; >Y )
DEFINITION: (Adjoin of a Matrix) Let A be an „„ matrix and B be a cofactor matrix of A. Then the
adjoint matrix of A written as Adj (A) is the transpose of B. i.e. åès (å) = B
Properties of Adjoint of a matrix
1. If A is a square matrix of order n, then
å (åès (å) = è7¤ (A) b = (adjA)A
2. If A and B are two squre matrices of the same order then
åès (åø) = ( åès ø)(åès å)

3. è7¤(å) ≠ 0, then åMY = ès(å).


Y
äÌ(æ)

Definition: ( inverse of a matrix) If A is a non singular matrix of order


„, then

åMY = ¢ (æ)


æäõ(æ)

Prepared by Haileyesus T., UOG Page 271


9. ANSWER TO PROBLEMS
Solutions of chapter 1
Review exercise
1. „ = 6, Trun. error = 0.020
2. 0.539 sq. cm
3. 0.25
4. δb =0.055cm, δc =0.049cm, δA =0.006 radians
5. a) 38.46 b) 0.7003 c) 0.002222 d) 19.24
6. i) 48.21 ii) 2.39 iii) 52.28 iv) 81.26
7. a) Ea=0.009, Er= 0.0999,Ep=9.9 b) Ea= 0.004, Er= 0.008,,Ep=0.8
c) Ea= 0.009, Er= 0.01,,Ep=1
8. do yourself
9. 0.0035, 0.0089
10. 0.006
11. n=12

Solutions of chapter 2
Exercise 2.1
1. 2.6875 2) 0.370 3) 2.88
Exercise 2.2
1. -1.92 2) 2.71 3) 1.571
Exercise 2.3
1. 0.5177573637 2) 4.5616 3) 1.114
Exercise 2.4
1) −0.682327803 2) 5.477225575 3) –0.420365
Exercise 2.5
1) 2.279 2) 0.5885 3) 1.442 4)1.973
Exercise 2.6
1) 2.15466 2) 1.4879

Prepared by Haileyesus T., UOG Page 272


Review exercise
1) 4.4932 2) 2.43066 3) 1.51092 4) 1.30
5) 0.96433 6) 0.424031 7) 0.73909 8) 2.7119
9) 2.798 10) 0.5177 11) 2.7065 12) 7.068583
13) 1.1347241 14) 1.94332; accurate to within 0.01 15) 0.671
16) 0.7346 17) 2.1163 18) 1.13472 19) 4.73004
Solutions of chapter 3
Exercise 3.1

a)  = XY ,o = XY ,p = XY b)  = 2, o = −1, p = ; c)  = 2, o = 3, p = 6
YYX MVY YAV Y

d)  = 1, o = 2, p = −1, S = −2

Exercise 3.2

= − ,o = − ,p = b)  = −2.3077, o = −7.4615, p = 3.6154


YX Y >EU
;C ;C ;C
a)

c)  − 10.8, o = 10.7, p = 2.2 d)  = 2.333, o = −1,333, p = 1.8333


Exercise 3.3
1. a)  = 1, o = −1, p = 3 b)  = 0, o = 10, p = 26

 = 2, o = −1, p = ;  = 1.6479, o = −1.1408 , p = 2.0845


Y
2. a) b)
−2.8 0.2 1 1.2 − 0.8 − 1.4
ö 3 0 −1 ÷ b) ö−1 1 1÷
−2.2 − 0.2 1 0.6 − 0.4 − 0.2
3. a)

Exercise 3.4
)  = 1, o = – 5, p = 1 b)  = 1, o = – 1, p = – 1, S = 1

Exercise 3.5
a)  = 1, o = 1, p = 1, b)  = 1, o = 2, p = 3, c)  = 1, o = 1/2, p = – 1/2
Exercise 3.6
a)  = 1, o = −1, p = 1 b)  = 1.08, o = 1.95, p = 3.16
Exercise 3.7
a)  = 1, o = 1, p = 1 b)  = 3, o = 2, p = 1 c)  = 1, o = −1 , p = 1
Review exercise
1. a)  = −1 y = 2, z = 3 b)  = 1.5205, o = – 1.0658, p = – 0.0356

Prepared by Haileyesus T., UOG Page 273


 = = 1, o = 1, p = 1 b)  = 2.7869, o = 4.4918, p = 2.1311, S = – 2.5410
 = 4, o = – 1, p = 3 b)  = 1, o = 2, p = – 1
2. a)

 = 1, o = 2, p = – 1 b)  = 2, o = 2, p = 3
3. a)

 = 2, o = 0, p = – 3 b)  = 0, o = 1.5, p = 1
4. a)

 = 1, o = 2, p = 3 b)  = 1, o = – 1, p = 1
5. a)

 = 4, o = – 1, p = 3 b)  = 1, o = 2, p = 3
6. a)
7. a)
Solutions of chapter 4
Review exercise
2. a)7 ?8 (7 ? − 1) b) §¬„(¦R§1 − 1) − §¬„1¦R§ c) 8(8_Y)(8_;)
MA8_;
d)

 o ⊖; o ⊖> o
3.
ϴo
1 6
9
2 15 12
21 6
3 36 18
39 6
24
63
4 75

5 138

4. ∆AoT = −49
5.

 o δo δ; o δ> o
0 1
3
1 4 10
13 6
2 17 16
29
3 46

Prepared by Haileyesus T., UOG Page 274


 o δo δ; o δ> o
6.

1 71
22
3 115 17
90 -14/5
5 295 3
117
6 466

7. a) 77 b) 35 c) 3 and 37
8. correct value 63, error 7 =2
Solutions of chapter 5
Exercise 5.1
1) 18.149188 2) 16.25≈ 16
Exercise 5.2
1) ( 3+13 2+ 56 + 28)/2; 100 2) 193.83336
Exercise 5.3
1) 0.15907168 2) 394.6875 3) 32.9453125 4) (31) = 4913, (32) = 5052
Exercise 5.4

1) 14.666667 2)  3−32+5 − 6 3) 16.935

Exercise 5.5

1) 8.337 2) 448, 3150 3) 810

Review exercise
1) 23– 7 2+ 6 + 1 2) (i) 28 (ii) 36 3) 1.25 4) 31
5) 103– 272+ 3 + 35; 71 6) 10 7) 44/3 8) 36.05469
9) 36.625 10) 478.375 11) 394.6875 12) 4913, 5052

Prepared by Haileyesus T., UOG Page 275


Solutions of chapter 6
Exercise 6.1
1) 0.3915 2) velocity = 0.86345 and acceleration = 0.33509
Exercise 6.2
1) y′(4) =12.75; y′′(4) =9.75
Exercise 6.3
1) y'(3)= 1.27865 and y''(3)= 3.73565 2) y'(3)= 0.09333 and y''(3)= 0.03667
3) 44.92
Exercise 6.4
1) f'(5) =-2860 and f''(5)=20210 2) 56.95434
Review exercise
1) 1 2)−0.2225, 52.170833 3) 2.4667, 6.9667 4) 2097.69

Solutions of chapter 7
Exercise 7.1
1) 0.2600 2) 0.9871 by trapezoidal , and 1.001 by simpson's rule
3) 53.6540 4) 0.8814 5) 0.1577

Exercise 7.2
3) 0.1577 4) 6.3658
Exercise 7.3
1) with h= π/6, I=1.954097, Exact : 2.0 2) with h= 2, I=360 3) with h= 1, I=35.65

Exercise 7.4
1) for n=1, 0.244956, n=2, 0.355464, n=3, 0.351617
Exercise 7.5
d. 0.178432 b) 3.07627 c) With h= k= 2, I= 4.1345With h= k= 1, I= 3.9975
Exercise 7.6
a) 0.524074 b) 0.232316 c)0.312330
b)

Prepared by Haileyesus T., UOG Page 276


Review exercise
1) (a) –1.81285 (b) 1.7505 (c) h= 0.25, 1.565588. Exact: 2tan–11 = 570796]
2) (a) I =2.5268, rel error =0.2 (b) I =2.1122, rel error =0.0086
3) (a) 1.187 (b) 1.000169. Exact: 1 (c) 98
4) (a) 0.52359895 (b) 1.0101996 (c) 0.4023
5) (a) 1.14 (b) 0.69319 ( c) 0.091111
6) (a) 1.187 (b)1.30859 (c) 1.82784745
7) (a) 0.264241 (b) –0.8948314 (c)18.6667
8) 4.1036
9)  = ¤ + 1, (¤) = 1/(4¤ + 7), I (2-point) = 0.320610, I(3-point) = [Link]: 0.324821.
10)  = ¤ + 1, (¤) = 1/[9 + (¤ + 2); ]. I(Two point) = 0.154639. I(Three point) = 0.154548]

11) (a) when n= 2, I= 4.134 and n= 4, I= 3.997 (b) 0.31233 (c) 0.48997

(d) h=k=1, I=28.5 (f) 0.822467

Prepared by Haileyesus T., UOG Page 277


10. REFERENCES
1. A.K. Jaiswal and Anju Khandelwal, A textbook of computer based numerical and statistical
techniques, 1sted, New Delhi, New Age, 2009.
2. Jaan Kiusalaas, Numerical methods in engineering with Python, 1sted, Cambridge, New
York, 2005.
3. Arnold Neumaier, Introduction to Numerical Analysis ,1sted, United Kingdom, Cambridge
2001.
4. C.B [Link], Advanced Mathematics ,1sted, New Delhi, New Age, 2009.
5. Rao [Link], Numerical Methods, 1sted, New Delhi, New Age, ,2010.
6. Steven C. [Link] P. Canale, Numerical methods for engineers, 6thed, McGraw-
Hill, New York, 2010.
7. Chapra, S. C.,Applied Numerical Methods with MATLAB,2nded, 2007.
8. Rao V. Dukkipati, Matlab an Introduction with applications,1sted, New Delhi, New Age,
2010.
9. [Link] Rao, Numerical Analysis, 3rded, New Delhi ,New Age , 2006
10. Faires and Burde, Numerical methods(problems and solutions), 3rd ed,2000.
11. M.K. Jain, S.R.K. Iyengar, R.K. Jain, Numerical methods(problem and solution) , New
Delhi, New Age, 2005.
12. A.K. Jaiswal , A. Khandelwal, Computer Based Numerical and Statistical Techniques , New
Delhi ,New Age, 2009
13. [Link], Å.Björck , Numerical Methods in Scientific Computing Volume I, USA, Orchard
, 2008.
14. E.S¨uli, D.F. Mayers, An Introduction to Numerical Analysis, New York ,Cambridge,2003
15. Steven C. Chapra, Applied numerical methods with mat lab for engineers and scientists, 3rd
ed. , McGraw-Hill, New York,2012.
16. Steven T. Karris, Numerical Analysis Using MATLAB and Spreadsheets, 2nd ed, USA ,
Orchard,2004
17. L. Ridgway Scott, Numerical Analysis, United States of America, Princeton, 2011.
18. S.R.K. Iyengar,R.K. Jain, Numerical Methods, New Delhi, New Age, 2009
19. [Link] Zalizniak, Essentials of scientific computing Numerical Methods in Science and
Engineering, England, Horwood, 2008.

Prepared by Haileyesus T., UOG Page 278


20. Faires, Burden, Numerical Methods, 3rd ed., England, Books Cole, 2002
21. Richard L. Burden, J. Douglas Faires, Numerical Analysis, 9th ed. , USA, Brooks/Cole, 2011.
22. Todd Young and Martin J. Mohlenkamp, Itroduction to Numerical Methods and Matlab
Programming for Engineers, Athens, Ohio, 2012.
23. Joe D. Hoffman, Numerical methods for engineers and scientists, 2nd , McGraw-Hill, New
York, 2001.
24. [Link], Numerical methods in 'c', Laxmi, New Delhi.
25. Sastry S.S., Introductory Methods to Numerical Analysis, Prentice-Hall, New Delhi.
26. [Link], Numerical Methods In Engineering ans Science with programs in Fortran 77, C
and C++,Khanna,New Delhi.

Prepared by Haileyesus T., UOG Page 279

You might also like