Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
74 views149 pages

Final Version of Numerical Methods Workbook

Uploaded by

periyasamyt083
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)
74 views149 pages

Final Version of Numerical Methods Workbook

Uploaded by

periyasamyt083
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
You are on page 1/ 149

WORK BOOK ON

NUMERICAL METHODS
2025 REGULATION

DEPARTMENT OF
MATHEMATICS
KARPAGAM ACADEMY OF HIGHER EDUCATION
COIMBATORE - 641021, TAMIL NADU

PUBLISHER DETAILS
KARPAGAM ACADEMY OF HIGHER EDUCATION
WORK BOOK ON
NUMERICAL METHODS
(2025 Regulation)

DEPARTMENT OF MATHEMATICS
KARPAGAM ACADEMY OF HIGHER EDUCATION
Coimbatore - 641021, Tamil Nadu

Publisher Details
Karpagam Academy of Higher Education
Copytight @ 2025 by

Print 2025

All rights reserved. No part of this publication may be reproduced,


transmitted in any form or by any menas including photography, or stored in
a retrieval system or by any menas, electronic, mechanical, recording or
otherwise, without the prior written permission from the publisher.

ISBN:

Published by
Karpagam Academy of Higher Education, Coimbatore
SYLLABUS
NUMERICAL METHODS (25MAU101G)

Bachelor of Computer Science/ Artificial Intelligence and Data


Structures/ Computer Applications/ Cyber Security/ Cognitive
Systems/ Computer Technology/ Information Technology

LTPC
4003
COURSE OBJECTIVES (CO):

• To learn the fundamental methods for solving numerical algebraic and


transcendental equations.

• To understand various techniques for solving simultaneous linear algebraic


equations.

• To gain knowledge of interpolation, numerical differentiation, numerical


integration, and numerical solutions of ordinary differential equations.

COURSE OUTCOMES (COs):


Upon completion of this course, the student will be able to:

COs Course Outcomes Blooms Level

CO1 Apply numerical analysis which has enormous Analyze


application in the field of science.
CO2 Implement numerical methods to solve systems of Analyze
simultaneous linear algebraic equations.
CO3 Summarize the principles of Gregory-Newton forward Analyze
and backward and Lagrange’s Interpolation formulas.
CO4 Explain numerical differentiation and numerical Analyze
integration formulas.
CO5 Implement numerical methods to solve ordinary Analyze
differential equations.

UNIT I SOLUTIONS OF NUMERICAL ALGEBRAIC AND TRANSCENDENTAL


EQUATIONS (9 HOURS)

Bisection method - Iteration method - False Position method - Newton’s method.


UNIT II SOLUTION OF SIMULTANEOUS LINEAR ALGEBRAIC EQUATION(9 HOURS)
Gauss elimination method - Gauss Jordon method - Gauss Jacobi method - Gauss
Seidel methods.
UNIT III INTERPOLATION (10 HOURS)
Gregory-Newton forward and backward interpolation formula – Equidistant terms
with one or more missing values - Lagrange and Inverse Lagrange Interpolation
formula.
UNIT IV NUMERICAL DIFFERENTIATION AND INTEGRATION (9 HOURS)
Numerical Differentiation: Newton’s forward difference and Newton’s backward difference
formula. Numerical Integration: Trapezoidal Rule and Simpson ‘s Rule.
UNIT V NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS (9 HOURS)
Taylor’s series - Euler’s method – Modified Euler’s method - Runge-Kutta methods (fourth
order Runge - Kutta method only). TOTAL: 48 HOURS
TEXT BOOKS:
1. Kandasamy P., Thilagavathi K., and Gunavathi K., (2015). Numerical Methods, Published
by Chand & Company Pvt. Ltd., New Delhi.
2. Jain M.K., Iyengar S.R.K., and Jain R.K. (2012). Numerical Methods for Scientific and
Engineering Computation, New Age International Publishers, New Delhi.

REFERENCE BOOKS:
1. Bradie B., (2007). A Friendly Introduction to Numerical Analysis, Pearson Education,
India.
2. Veera Rajan T., and Ramachandran T., (2008). Numerical Methods with Programs in C,
Tata McGraw-Hill Publishing company limited, New Delhi.

WEB SITES:
1. https://youtu.be/vUMGvpsb8dc
2. https://youtu.be/ItOuvM2KmD4
Table of Contents

1 Solutions of Numerical Algebraic and Transcendental Equations ......................... 1


1.1 Bisection Method ................................................................................................... 2
1.2 Iterative method .................................................................................................. 10
1.3 Regula-Falsi Method ........................................................................................... 18
1.4 Newton Raphson Method .................................................................................... 26
2 Solution of Simultaneous Linear Algebraic Equation ....................................... 34
2.1 Linear System of Algebraic Equations ................................................................. 34
2.2 Elementary Row transformation.......................................................................... 34
2.3 Direct methods .................................................................................................... 35
2.3.1 Gauss Elimination Method .......................................................................... 35
2.3.2 Gauss Jordan Method .................................................................................. 35
2.4 Iterative Methods ................................................................................................. 44
2.4.1 Gauss Jacobi Iteration Method .................................................................... 44
2.4.2 Gauss Seidel Method of iteration ................................................................ 46
3 Interpolation .............................................................................................................. 58
3.1 Introduction.......................................................................................................... 58
3.2 Interpolation for equal intervals: Gregory-Newton’s interpolation formula ....... 58
3.2.1 Gregory-Newton’s forward interpolation formula ...................................... 58
3.2.2 Gregory-Newton’s backward interpolation formula ................................... 59
3.3 Equidistant terms with one or more missing values ............................................ 71
3.4 Interpolation for unequal intervals ...................................................................... 75

3.4.1 Lagrange’s interpolation formula ................................................................. 75


3.4.2 Inverse Lagrange’s interpolation formula ................................................... 75
4 NUMERICAL DIFFERENTIATION AND INTEGRATION .............................. 85
4.1 Numerical Differentiation .................................................................................... 85
4.1.1 Newtons forward difference formula ........................................................... 86
4.1.2 Newtons Backward difference formula ...................................................... 87
4.2 Numerical Integration ......................................................................................... 98
4.2.1 Trapezoidal Rule ......................................................................................... 98
4.2.2 Simpsons Rule .......................................................................................... 101
5 NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS…110
5.1 Taylor Series Method ......................................................................................... 111
5.2 Euler’s Method and Modified Euler’s Method ........................................... 117
5.3 Runge - Kutta 4th order Method ....................................................................... 122
Possible Questions ................................................................................................... 130
Numerical Methods

Numerical methods allow us to solve mathematical problems that do not have exact
analytical solutions, such as nonlinear equations, complex integrals, and differential
equations. They are widely used in engineering, physics, finance, and other fields to model
and solve real-world problems where exact methods are impractical. Numerical methods are
methods for solving problems on computers by numerical calculations, often giving a table
of numbers and/or graphical representations or figures. Numerical methods tend to
emphasize the implementation of algorithms. The aim of numerical methods is therefore to
provide systematic methods for solving problems in a numerical form. The process of
solving problems generally involves starting from an initial data, using high precision digital
computers, following the steps in the algorithms, and finally obtaining the results. Often the
numerical data and the methods used are approximate ones. Hence, the error in a computed
result may be caused by the errors in the data, or the errors in the method or both.
This workbook serves as a practical guide for the Numerical Methods course,
helping students connect theoretical knowledge with real-world problem-solving. Aligned
with the course objectives, it covers essential topics such as solving algebraic and
transcendental equations, systems of linear equations, numerical differentiation and
integration, and initial value problems in ordinary differential equations (ODEs).
Each unit in this workbook adopts a systematic approach—beginning with
fundamental concepts, progressing through model formulation and step-by-step procedures,
and concluding with worked-out examples inspired by real-life applications. The goal is to
equip students with a deep understanding of the mathematical principles behind numerical
techniques while fostering the ability to model and solve practical problems encountered in
real-world scenarios.
By the end of this course, students will be able to:
• Understand and formulate linear programming models for resource
optimization.
• Implement numerical methods to solve systems of simultaneous linear algebraic
equations.
• Summarize the fundamental concepts of Gregory-Newton forward and backward
interpolation and Lagrange’s interpolation methods.
• Describe the formulas and concepts involved in numerical differentiation and
numerical integration.
• Apply numerical techniques to obtain solutions for ordinary differential equations.
This workbook serves both as a guide and a practice manual, fostering analytical
thinking and promoting the application of Numerical methods in diverse fields. Students are
encouraged to actively engage with the exercises, reflect on the solutions, and apply these
techniques to real-world challenges.
Work Book on Numerical Methods

UNIT I

SOLUTIONS OF NUMERICAL ALGEBRAIC AND TRANSCENDENTAL


EQUATIONS
Bisection method - Iteration method - False Position method - Newton’s method.

1. The Solution of Numerical Algebraic and Transcendental Equations


Algebraic Equation:
A polynomial equation of the form
𝑓(𝑥) = 𝑝𝑛 (𝑥) = 𝑎0 𝑥 𝑛 + 𝑎1 𝑥 𝑛−1 + 𝑎2 𝑥 𝑛−2 + ⋯ + 𝑎𝑛−1 𝑥 + 𝑎0 = 0
is called an Algebraic equation.
For example, 𝑥 4 − 4𝑥 2 + 5 = 0 and 5𝑥 3 − 12𝑥 − 8 = 0 are algebraic equations.
Transcendental equation:
A polynomial which contains trigonometric, logarithmic, exponential functions etc., is called a
transcendental equation.
For example, tan 𝑥 − 𝑒 𝑥 = 0 and 𝑠𝑖𝑛𝑥 − 𝑥𝑒 𝑥 = 0.
Root:
A root of an equation 𝑓 (𝑥) = 0 is the value of 𝑥, say 𝑥 =  for which 𝑓 () = 0.
Simple root:
A number 𝛼 is a simple root of 𝑓(𝑥) = 0 if 𝑓(𝛼) = 0 and 𝑓 ′ (𝛼) ≠ 0. Then we can write 𝑓(𝑥) as,
𝑓(𝑥) = (𝑥 − 𝛼)𝑔(𝑥), 𝑔(𝛼) ≠ 0
Multiple root:
A number 𝛼 is a multiple root with multiplicity 𝑚 of 𝑓(𝑥) = 0 if 𝑓(𝛼) = 𝑓 ′ (𝛼) = ⋯ = 𝑓 𝑚−1 (𝛼) =
0. Then we can write 𝑓(𝑥) as,
𝑓(𝑥) = (𝑥 − 𝛼)𝑚 𝑔(𝑥), 𝑔(𝛼) ≠ 0
A polynomial equation of degree 𝑛 will have exactly 𝑛 roots which are real or complex, simple or
multiple. A transcendental equation may have one root or no root or infinite number of roots
depending on the form of 𝑓 (𝑥). The methods of finding the roots of 𝑓 (𝑥) = 0 are classified as,
1. Direct Methods
2. Indirect Methods.
Direct methods give the exact values of all the roots in a finite number of steps. Numerical methods
are based on the idea of successive approximations. In these methods, we start with one or two initial

1
Work Book on Numerical Methods

approximations to the root and obtain a sequence of approximations 𝑥0 , 𝑥1 , … , 𝑥𝑘 which in the limit
as 𝑘 → ∞ converge to the exact root 𝑥 = 𝑎.
Note: There are no direct methods for solving higher degree algebraic equations or transcendental
equations. Such equations can be solved by Numerical methods.
1.1. Bisection Method:
Identify two points 𝑥 = 𝑎 and 𝑥 = 𝑏 such that 𝑓 (𝑎) and 𝑓 (𝑏) are having opposite signs. Let 𝑓 (𝑎)
be negative and 𝑓 (𝑏) be positive. Then there will be a root of 𝑓 (𝑥) = 0 in between 𝑎 and 𝑏. Let
the first approximation be the mid-point of the interval (𝑎, 𝑏). That is,
𝑎+𝑏
𝑥0 =
2
If 𝑓(𝑥0 ) = 0, then 𝑥0 is a root, otherwise root lies between 𝑎 and 𝑥0 or 𝑥0 and 𝑏 according as 𝑓(𝑥0 )is
positive or negative. Then again, we bisect the interval and continue the process until the root is found
to desired accuracy.
Let 𝑓(𝑥0 ) is positive, then root lies in between 𝑎 and 𝑥0 . The second approximation to the root is
given by,
𝑎 + 𝑥0
𝑥1 =
2
If 𝑓(𝑥2 ) is negative, then next approximation is given by
𝑥1 + 𝑥0
𝑥2 =
2
Similarly, we can other approximations. This method is also called Bolzano method.
Formula
𝑎+𝑏
𝑥=
2
Formula:
𝑎+𝑏
𝑥=
2
Problems:
1. Find a real root of the equation 𝑓(𝑥) = 𝑥 3 − 𝑥 − 1 = 0, using bisection method.
Solution:
First the interval in which the root lies, by trial-and-error method.
𝑓(0) = 03 − 0 − 1 = −1, which is negative (-ve)
𝑓(1) = 13 − 1 − 1 = −1, which is negative (-ve)
𝑓(2) = 23 − 2 − 1 = 5, which is positive (+ ve)

2
Work Book on Numerical Methods

Therefore, a root of 𝑓(𝑥) = 𝑥 3 − 𝑥 − 1 = 0 lies in between 1 and 2. Take 𝑎 = 1 and 𝑏 = 2


1+2 3
𝑥1 = = = 1.5.
2 2
𝑓(𝑥1 ) = 𝑓(1.5) = 1.53 − 1.5 − 1 = 0.875, which is positive.
Hence, the root lies in between 1 and 1.5.
1 + 1.5
𝑥2 = = 1.25.
2
𝑓(𝑥2 ) = 𝑓(1.25) = 1.253 − 1.25 − 1 = −0.2968, which is negative.
Hence, the root lies between 1.25 and 1.5.
1.25+1.5
Therefore, 𝑥3 = = 1.375.
2

Similarly, we get 𝑥4 = 1.3125, 𝑥5 = 1.34375, 𝑥6 = 1.328125 , 𝑥7 = 1.3204, 𝑥8 = 1.3243 etc.


Alter method:
First the interval in which the root lies, by trial-and-error method.
𝑓(0) = 03 − 0 − 1 = −1, which is negative
𝑓(1) = 13 − 1 − 1 = −1, which is negative
𝑓(2) = 23 − 2 − 1 = 5, which is positive
Therefore, a root of 𝑓(𝑥) = 𝑥 3 − 𝑥 − 1 = 0 lies in between 1 and 2.
𝑎 𝑏 𝑥 𝑓(𝑎) 𝑓(𝑏) 𝑓(𝑥) Choose 𝑎 or 𝑏
𝑎+𝑏
=
2
1 2 1.5 −1 5 0.875 𝑏 = 1.5
1 1.5 1.25 −1 0.875 −0.29 𝑎 = 1.25
1.25000 1.50000 1.37500 0.87500 1.375 0.224609 1.25000
1.25000 1.37500 1.31250 0.22461 1.3125 −0.051514 1.25000
1.31250 1.37500 1.34375 0.22461 1.34375 0.082611 1.31250
1.31250 1.34375 1.32813 0.08261 1.328125 0.014576 1.31250
1.31250 1.32813 1.32031 0.01458 1.320313 −0.018711 1.31250
1.32031 1.32813 1.32422 0.01458 1.324219 −0.002128 1.32031
1.32422 1.32813 1.32617 0.01458 1.326172 0.006209 1.32422
1.32422 1.32617 1.32520 0.00621 1.325195 0.002037 1.32422
1.32422 1.32520 1.32471 0.00204 1.324707 −0.000047 1.32422
1.32471 1.32520 1.32495 0.00204 1.324951 0.000995 1.32471
1.32471 1.32495 1.32483 0.00099 1.324829 0.000474 1.32471
1.32471 1.32483 1.32477 0.00047 1.324768 0.000214 1.32471
1.32471 1.32477 1.32474 0.00021 1.324738 0.000084 1.32471
1.32471 1.32474 1.324725 0.00008 1.324722 0.000018 1.32471

Therefore, the approximation root is 1.3247.


3
Work Book on Numerical Methods

2. Find the positive root of 𝑥 − cos 𝑥 = 0 by bisection method.


Solution:
Let 𝑓(𝑥) = 𝑥 − cos 𝑥
𝑓(0) = 0 − cos(0) = 0 − 1 = −1, which is negative
𝑓(0.5) = 0.5 − cos(0.5) = 0.5 − 0.8775 = −0.37758, which is negative
𝑓(1) = 1 − cos(1) = 0.45970, which is positive
Hence, the root lies between 0.5 and 1.
0.5 + 1 1.5
𝑥0 = = = 0.75.
2 2
𝑓(0.75) = 0.75 − cos(0.75) = 0.018311, which is positive
Therefore, the root lies between 0.5 and 0.75
0.5 + 0.75
𝑥1 = = 0.625
2
𝑓(0.625) = 0.625 − cos(0.625) = −0.18596, which is negative
The root lies between 0.625 and 0.75.
0.625 + 0.75
𝑥2 = = 0.6875
2
𝑓(0.6875) = 0.6875 − cos(0.6875) = −0.085335, which is negative
The root lies between 0.6875 and 0.75
0.6875 + 0.75
𝑥3 = = 0.71875
2
𝑓(0.71875) = 0.71875 − cos(0.71875) = −0.0387, which is negative
Similarly, we get𝑥4 = 0.73438, 𝑥5 = 0.742190, 𝑥6 = 0.73829,𝑥7 = 0.7402, 𝑥8 = 0.73925, 𝑥9 =
0.7388
Hence the root is 0.7388.

Exercise:
1. Find the positive root of 𝑥 3 − 𝑥 = −1 correct to four decimal places by bisection method.
2. Assuming that a root of 𝑥 3 − 9𝑥 + 1 = 0 lies in the interval (2, 4), find that root by bisection
method.
3. Find the positive root of 𝑥 4 − 𝑥 3 − 2𝑥 2 − 6𝑥 − 4 = 0 by bisection method.
4. Using bisection method, find the negative root of 𝑥 3 − 4𝑥 + 9 = 0 by bisection method.

4
Work Book on Numerical Methods

5
Work Book on Numerical Methods

6
Work Book on Numerical Methods

7
Work Book on Numerical Methods

8
Work Book on Numerical Methods

9
Work Book on Numerical Methods

1.2. Iterative method (method of successive approximation)


Suppose we want the approximate roots of the equation
𝑓(𝑥) = 0 ………….. (1)
Now, write the equation (1) in the form
𝑥 = 𝜙(𝑥) …………. (2)
Check whether the condition for convergence is satisfied or not.i.e.,|𝜙 ′ (𝑥)| < 1. If the condition
is satisfied then assume that 𝑥0 to be the starting approximate value to the actual root 𝛼 of 𝑥 =
𝜙(𝑥). Setting 𝑥 = 𝑥0 in the right-hand side of (2), we get the first approximation
𝑥1 = 𝜙(𝑥0 )
Again setting 𝑥 = 𝑥1 on the R.H.S of (2), we get successive approximations.
𝑥2 = 𝜙(𝑥1 )
𝑥3 = 𝜙(𝑥2 )
……………..
……………..
……………..
𝑥𝑛 = 𝜙(𝑥𝑛−1 )
The sequence of approximate roots 𝑥1 , 𝑥2 , … , 𝑥𝑛 , if it converges to 𝛼 is taken as the root of the
equation 𝑓(𝑥) = 0.
Note:
• The sufficient condition for convergence of iteration method is |𝜙 ′ (𝑥)| < 1.
• The convergence of the sequence is not guaranteed always unless the choice of 𝑥0 is
properly chosen.
Convergence of Iterative Method:
If 𝑝 ≥ 1 can be found out such that |𝑒𝑖+1 | ≤ |𝑒𝑖 |𝑝 . 𝑘 where 𝑘 is a positive constant for every 𝑖,
then 𝑝 is called the order of convergence.
If 𝑝 = 1 then the convergence is linear and if 𝑝 = 2, it is quadratic.
Problems:
1. Solve 𝑒 𝑥 − 3𝑥 = 0 by the method of iteration.
Solution:
Let 𝑓(𝑥) = 𝑒 𝑥 − 3𝑥 = 0.
𝑓(0) = 1(+𝑣𝑒)
𝑓(1) = 𝑒 − 3 = (−𝑣𝑒)
Therefore, a root lies between 0 and 1.
10
Work Book on Numerical Methods

1
Let 𝑥 = 3 𝑒 𝑥 = 𝜙(𝑥).
1
𝜙 ′ (𝑥) = 3 𝑒 𝑥 and 𝜙 ′ (𝑥) < 1
In the interval (0, 1), |𝜙 ′ (𝑥)| < 1.
1 1
Choose 𝑥0 = 0.6, 𝑥1 = 3 𝑒 𝑥0 = 3 𝑒 0.6 = 0.60737.
1
𝑥2 = 𝑒 0.60737 = 0.61187,
3
1
𝑥3 = 𝑒 0.61187 = 0.61452,
3
1
𝑥4 = 𝑒 0.61452 = 0.61626,
3
1
𝑥5 = 𝑒 0.61626 = 0.61733,
3
1
𝑥6 = 𝑒 0.61733 = 0.61799,
3
1
𝑥7 = 𝑒 0.61799 = 0.61840,
3
1 0.61840
𝑥8 = 𝑒 = 0.61865,
3
1
𝑥9 = 𝑒 0.61865 = 0.61881,
3
1
𝑥10 = 𝑒 0.61881 = 0.61891,
3
1
𝑥11 = 𝑒 0.61891 = 0.61897,
3
1
𝑥12 = 𝑒 0.61897 = 0.61900,
3
1
𝑥13 = 𝑒 0.61900 = 0.61902,
3
We take 0.6190 as the correct value of the root of the equation.

2. Find a positive root of 3𝑥 − √1 + sin 𝑥 = 0 by iteration method.


Solution:

Let 𝑓(𝑥) = 3𝑥 − √1 + sin 𝑥 = 0


𝑓(0) = −1(−𝑣𝑒)
𝑓(1) = 2 = (+𝑣𝑒)
Therefore, a root lies between 0 and 1.
1
Let 𝑥 = 3 √1 + sin 𝑥 = 𝜙(𝑥).
cos 𝑥
𝜙 ′ (𝑥) = and 𝜙 ′ (𝑥) < 1
6 √1+sin 𝑥

In the interval (0, 1), |𝜙 ′ (𝑥)| < 1 for all x.


So, we can use iteration method.
11
Work Book on Numerical Methods

1
Choose 𝑥0 = 0.4, 𝑥1 = 3 √1 + sin(0.4) = 0.39291

1
𝑥2 = √1 + sin(0.39291) = 0.39199
3
1
𝑥3 = √1 + sin(0.39199) = 0.39187
3
1
𝑥4 = √1 + sin(0.39187) = 0.39185
3
1
𝑥5 = √1 + sin(0.39185) = 0.39185
3
The root is 0.39185.
Exercise:
1. Find a real root of the equation cos 𝑥 = 3𝑥 − 1 correct to 4 decimal places by iteration
method.
2. Solve the equation 𝑥 3 + 𝑥 2 − 1 = 0 for the positive root by iteration method.
3. Solve for 𝑥 from cos 𝑥 − 𝑥𝑒 𝑥 = 0 by iteration method.
4. Solve 𝑥 3 = 2𝑥 + 5 for the positive root by iteration method.

12
Work Book on Numerical Methods

13
Work Book on Numerical Methods

14
Work Book on Numerical Methods

15
Work Book on Numerical Methods

16
Work Book on Numerical Methods

17
Work Book on Numerical Methods

1.3. Regula-Falsi Method or Method of False Position:

Consider the equation 𝑓(𝑥) = 0 and let 𝑓(𝑎),𝑓(𝑏) be of opposite signs. Also, let 𝑎 < 𝑏. The
curve 𝑦 = 𝑓(𝑥) will meet the 𝑥- axis at some point between 𝐴(𝑎, 𝑓(𝑎)) and 𝐵(𝑏, 𝑓(𝑏)). The equation
𝑦−𝑓(𝑎) 𝑓(𝑎)−𝑓(𝑏)
of the chord joining the two points 𝐴(𝑎, 𝑓(𝑎))and 𝐵(𝑏, 𝑓(𝑏)) is = .
𝑥−𝑎 𝑎−𝑏
𝑎𝑓(𝑏)−𝑏𝑓(𝑎)
This implies 𝑥1 = .This sequence 𝑥1 , 𝑥2 , 𝑥3 , … will converge to the required root. In
𝑓(𝑏)−𝑓(𝑎)

practice, we get 𝑥𝑖 and 𝑥𝑖+1 such that |𝑥𝑖 − 𝑥𝑖+1 | < 𝜖, the required accuracy.
Formula:
𝑎𝑓(𝑏) − 𝑏𝑓(𝑎)
𝑥=
𝑓(𝑏) − 𝑓(𝑎)
Note: The order of convergence of Regula-Falsi method is 1.618.

Problems:
1. Solve for a positive root of 𝑥 3 − 4𝑥 + 1 = 0 by Regula Falsi method.
Solution:
Let 𝑓(𝑥) = 𝑥 3 − 4𝑥 + 1 = 0
𝑓(0) = 03 − 4(0) + 1 = 1 (+𝑣𝑒)
𝑓(1) = 13 − 4(1) + 1 = −2 (−𝑣𝑒)
Therefore, a root lies between 0 and 1.
We shall find the root that lies between 0 and 1.
Here 𝑎 = 0, 𝑏 = 1
𝑎𝑓(𝑏) − 𝑏𝑓(𝑎) 0 × 𝑓(1) − 1 × 𝑓(0) (−1)
𝑥1 = = = = 0.333333.
𝑓(𝑏) − 𝑓(𝑎) 𝑓(1) − 𝑓(0) −2 − 1
1 1 4
𝑓(𝑥1 ) = 𝑓 (3) = 27 − 3 + 1 = −0.2963. (−𝑣𝑒).
1
Now 𝑓(0) and 𝑓 (3) are opposite sign.
1
Hence the root lies between 0 and 3.
1 1 1
0 𝑓( )− 𝑓(0) −
3 3 3
Hence 𝑥2 = 1 = −1.2963 = 0.25714.
𝑓( )−𝑓(0)
3

Now 𝑓(𝑥2 ) = 𝑓(0.25714) = −0.011558 (−𝑣𝑒)


Therefore, the root lies between 0 and 0.25714.
0 𝑓(0.25714) − 0.25714𝑓(0) −0.25714
𝑥3 = = = 0.25420.
𝑓(0.25714) − 𝑓(0) −1.011558

18
Work Book on Numerical Methods

𝑓(𝑥3 ) = 𝑓(0.25420) = −0.0003742 (−𝑣𝑒)


Therefore, the root lies between 0 and 0.25420.
0 × 𝑓(0.25420) − 0.25420 × 𝑓(0) −0.25420
𝑥4 = = = 0.25410.
𝑓(0.25420) − 𝑓(0) −1.0003742
𝑓(𝑥4 ) = 𝑓(0.25410) = −0.000012936 (−𝑣𝑒)
Therefore, the root lies between 0 and 0.25410.
0 × 𝑓(0.25410) − 0.25410 × 𝑓(0) −0.25410
𝑥5 = = = 0.25410.
𝑓(0.25410) − 𝑓(0) −1.000012936
Hence the root is 0.25410.
2. Find an approximate root of 𝑥𝑙𝑜𝑔10 𝑥 − 1.2 = 0 by False position method.
Solution:
Let 𝑓(𝑥) = 𝑥𝑙𝑜𝑔10 𝑥 − 1.2 = 0
𝑓(1) = −1.2 (−𝑣𝑒)
𝑓(2) = 2 log 2 − 1.2 = − 0.597940 (−𝑣𝑒)
𝑓(3)= 3 log 3 − 1.2 = 0.231364 (+ve)
Hence, a root lies between 2 and 3

Here𝑎 = 2, 𝑏 = 3

𝑎𝑓(𝑏) − 𝑏𝑓(𝑎) 2 × 𝑓(3) − 3 × 𝑓(2) 2 × 0.23136 − 3 × (−0.59794)


𝑥1 = = =
𝑓(𝑏) − 𝑓(𝑎) 𝑓(3) − 𝑓(2) 0.23136 + 0.59794
= 2.721014.
𝑓(𝑥1 ) = 𝑓(2.7210) = −0.017104

The root lies between 2.721014 and 3.

𝑎𝑓(𝑏) − 𝑏𝑓(𝑎) 2.721014 × 0.231364 − 3 × (−0.017104)


𝑥2 = = = 2.740211.
𝑓(𝑏) − 𝑓(𝑎) 0.231364 + 0.017104
𝑓(𝑥2 ) = 𝑓(2.7402) = 2.7402 × log(2.7402) − 1.2
= -0.00038905
The root lies between 2.740211 and 3.
𝑎𝑓(𝑏) − 𝑏𝑓(𝑎) 2.740211 × 0.231364 − 3 × 0.00038905
𝑥3 = = = 2.740627.
𝑓(𝑏) − 𝑓(𝑎) 0.231364 + 0.00038905
𝑓(2.7406) = 0.00011998.
Therefore, the root lies between 2.740211 and 2.740627.

19
Work Book on Numerical Methods

2.7402 × 𝑓(2.7406) − 2.7406 × 𝑓(2.7402)


𝑥4 =
𝑓(2.7406) − 𝑓(2.7402)

2.7402 × 0.00011998 − 2.7406 × 0.00038905


=
0.00011998 + 0.00038905

0.0013950
= = 2.7405
0.00050903

Hence the root is 2.7405.


Exercise:
1. Find the positive root of 𝑥 3 = 2𝑥 + 5 by False position method.
2. Solve for a positive root of 𝑥 − cos 𝑥 = 0 by Regula Falsi method.
3. Solve the equation 𝑥𝑡𝑎𝑛 𝑥 = −1 by Regula Falsi method starting with 𝑎 = 2.5 and 𝑏 = 3
correct to 3 decimal places.
4. Find a positive root of 𝑥𝑒 𝑥 = 2 by the method of False position.

20
Work Book on Numerical Methods

21
Work Book on Numerical Methods

22
Work Book on Numerical Methods

23
Work Book on Numerical Methods

24
Work Book on Numerical Methods

25
Work Book on Numerical Methods

1.4. Newton-Raphson method / Newton’s Method:


This method is also called Newton’s method. This method is also a chord method in which we
approximate the curve near a root, by a straight line.
Let 𝑥0 be an initial approximation to the root of 𝑓(𝑥) = 0. Then, 𝑃(𝑥0 , 𝑓0 ), where 𝑓0 =
𝑓(𝑥0 ), is a point on the curve. Draw the tangent to the curve at 𝑃. We approximate the curve in the
neighbourhood of the root by the tangent to the curve at the point 𝑃. The point of intersection of the
tangent with the 𝑥-axis is taken as the next approximation to the root. The process is repeated until
the required accuracy is obtained. The equation of the tangent to the curve 𝑦 = 𝑓(𝑥) at the point
𝑃(𝑥0 , 𝑓0 ) is given by
𝑦 − 𝑓(𝑥0 ) = (𝑥 − 𝑥0 )𝑓 ′ (𝑥0 )
where 𝑓 ′ (𝑥0 ) is the slope of the tangent to the curve at 𝑃. Setting 𝑦 = 0 and solving for 𝑥, we get
𝑓(𝑥0 ) ′
𝑥 = 𝑥0 − , 𝑓 (𝑥0 ) ≠ 0.
𝑓 ′ (𝑥0 )
The next approximation to the root is given by
𝑓(𝑥0 ) ′
𝑥1 = 𝑥0 − , 𝑓 (𝑥0 ) ≠ 0.
𝑓 ′ (𝑥0 )
We repeat the procedure. The iteration method is defined as
𝑓(𝑥𝑘 ) ′
𝑥𝑘+1 = 𝑥𝑘 − , 𝑓 (𝑥𝑘 ) ≠ 0, 𝑘 = 0,1,2, … .
𝑓 ′ (𝑥𝑘 )
This method is called the Newton-Raphson or simply the Newton’s method. The method is also called
method of tangents.
Note:
1. Convergence of the Newton’s method depends on the initial approximation to the root. If the
approximation is far away from the exact root, the method diverges.
2. The convergence is quadratic and is of order 2.
3. When 𝑓 ′ (𝑥) is very large, the correct value s of root can be found out with minimum number
of iterations.
4. If 𝑓(𝑎) and 𝑓(𝑏) are of opposite signs, a root of 𝑓(𝑥) = 0 lies between 𝑎 and 𝑏. This idea
can be used to fix an approximate root.
5. The error at any stage is proportional to the square of the error in the previous stage.
Problems:
1. Find the positive root of 𝑓(𝑥) = 2𝑥 3 − 3𝑥 − 6 = 0 by Newton-Raphson method correct to
five decimal places.
Solution:
Let 𝑓(𝑥) = 2𝑥 3 − 3𝑥 − 6,
𝑓 ′ (𝑥) = 6𝑥 2 − 3.
26
Work Book on Numerical Methods

𝑓(1) = 2 − 3 − 6 = −7 (−𝑣𝑒)
𝑓(2) = 16 − 6 − 6 = 4 (+𝑣𝑒).
Therefore, a root lies between 1 and 2.
By Descartes’s rule of sign, we can prove that there is only one positive root.
Take 𝑥0 = 2
𝑓(𝑥 )
Therefore, 𝑥1 = 𝑥0 − 𝑓′ (𝑥0 ).
0

𝑘 𝑥𝑘 𝑓(𝑥𝑘 ) 𝑓 ′ (𝑥0 )
𝑥𝑘+1

0 𝑥0 = 2 𝑓(𝑥0 ) = 4 𝑓 ′ (𝑥0 ) = 21 𝑥1 = 1.809524


1 𝑥1 = 1.809524 𝑓(𝑥1 ) = 0.421553 𝑓 ′ (𝑥1 ) = 16.64626 𝑥2 = 1.7842
2 𝑥2 = 1.7842 𝑓(𝑥2 ) = 0.006930 𝑓 ′ (𝑥2 ) = 16.10021 𝑥3 = 1.783769
3 𝑥3 = 1.783769 𝑓(𝑥3 ) = 0.000002 𝑓 ′ (𝑥3 ) = 16.091 𝑥4 = 1.783769
4 𝑥4 = 1.783769 𝑓(𝑥4 ) = 0 𝑓 ′ (𝑥4 ) = 16.09099 𝑥5 = 1.783769
Therefore, the approximate root is 1.783769.
2. Find an iterative formula to find the reciprocal of a given number N and hence the value of
1
.
19

Solution:
1 1
Let𝑥 = 𝑁
𝑁= 𝑥
1 1
𝑓(𝑥) = − 𝑁 = 0; 𝑓′(𝑥) = − 𝑥2
𝑥
1
𝑓(𝑥𝑖 ) −𝑁
𝑥𝑖
𝑥𝑖+1 = 𝑥𝑖 − ′ = 𝑥𝑖 −
𝑓 (𝑥𝑖 ) 1
(− 𝑥 2)
𝑖

1
𝑥𝑖 + 𝑥𝑖2 ( − 𝑁) = 2𝑥𝑖 − 𝑁𝑥𝑖2 = 𝑥𝑖 (2 − 𝑁𝑥𝑖 )
𝑥𝑖
Therefore, 𝑥𝑖+1 = 𝑥𝑖 (2 − 𝑁𝑥𝑖 )is the iterative formula.
1
To find 19 , Take N=19
1
Further = 0.05; Therefore, 𝛼0 = 0.05
20

𝑥1 = 0.05(2 − 19 × 0.05) = 0.0525


𝑥2 = 0.0525(2 − 19 × 0.0525) = 0.05263125
27
Work Book on Numerical Methods

𝑥3 = 0.05263125(2 − 19 × 0.05263125) = 0.0526315789


Similarly, 𝑥4 = 0.0526315789
1
Hence the value of 19 is 0.526315789

Exercise:
1. Using Newton’s method, find the root between 0 and 1 of 𝑥 3 = 6𝑥 − 4 correct to 5 decimal
places.
2. Find the real positive root of 3𝑥 − cos 𝑥 − 1 = 0 by Newton’s method correct to 6 decimal
places.
3. Find the positive root of 𝑥 = cos 𝑥 using Newton’s method.
4. Find the root of 4𝑥 − 𝑒 𝑥 = 0 that lies between 2 and 3.

28
Work Book on Numerical Methods

29
Work Book on Numerical Methods

30
Work Book on Numerical Methods

31
Work Book on Numerical Methods

32
Work Book on Numerical Methods

33
Work Book on Numerical Methods

UNIT II

SOLUTION OF SIMULTANEOUS LINEAR ALGEBRAIC EQUATIONS


Gauss Elimination method –Gauss Jordon method - Gauss Jacobi method - Gauss Seidel methods.

2. SOLUTION OF SIMULTANEOUS LINEAR ALGEBRAIC EQUATIONS


2.1. Linear system of Algebraic Equations:
Consider a system of 𝑛 linear algebraic equations in 𝑛 unknowns, i.e.,
𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2
… … … …
𝑎𝑛1 𝑥1 + 𝑎𝑛2 𝑥2 + ⋯ + 𝑎𝑛𝑛 𝑥𝑛 = 𝑏𝑛
where the coefficients 𝑎𝑖𝑗 and 𝑏𝑖 , 𝑖 = 1, 2, 3, … , 𝑛, 𝑗 = 1, 2, 3, … , 𝑛, are known constants and 𝑥𝑖 , 𝑖 =
1, 2, 3, … , 𝑛 are the unknowns to be determined.
In matrix notation, we write the system as
𝐴𝑋 = 𝐵
𝑎11 𝑎12 … 𝑎1𝑛 𝑥1 𝑏1
… 𝑎2𝑛 𝑥
where 𝐴 = [𝑎…
21 𝑎22
… …
𝑏
… ] , 𝑋 = [ …2 ], and 𝐵 = [ …2 ]
𝑎𝑛1 𝑎𝑛2 … 𝑎_𝑛𝑛 𝑥𝑛 𝑏𝑛
The matrix [𝐴|𝐵], obtained by appending the column 𝑏 to the matrix 𝐴 is called the augmented
matrix. That is
𝑎11 𝑎12 … 𝑎1𝑛 𝑏1
[𝐴|𝐵] = [𝑎…
21 𝑎22 … 𝑎2𝑛 𝑏2 ]
… … … …
𝑎𝑛1 𝑎𝑛2 … 𝑎𝑛𝑛 𝑏𝑛
2.2. Elementary row transformations (operations):
The following operations on the rows of a matrix 𝐴 are called the elementary row transformations
(operations).
(i) Interchange of any two rows. If we interchange the 𝑖 𝑡ℎ row with the 𝑗 𝑡ℎ row, then we
usually denote the operation as 𝑅𝑖 ↔ 𝑅𝑗 .
(ii) Division/multiplication of any row by a non-zero number 𝑝. If the 𝑖 𝑡ℎ row is multiplied
by 𝑝, then we usually denote this operation as 𝑝𝑅𝑖 .
(iii) Adding/subtracting a scalar multiple of any row to any other row. If all the elements of
𝑗 𝑡ℎ row are multiplied by a scalar 𝑝 and added to the corresponding elements of the 𝑖 𝑡ℎ row,
then, we usually denote this operation as 𝑅𝑖 → 𝑅𝑖 + 𝑝𝑅𝑗 . Note the order in which the

34
Work Book on Numerical Methods

operation 𝑅𝑖 + 𝑝𝑅𝑗 is written. The elements of the 𝑗 𝑡ℎ row remain unchanged and the
elements of the 𝑖 𝑡ℎ row get changed.
These row operations change the form of 𝐴, but do not change the row-rank of 𝐴. The matrix 𝐵
obtained after the elementary row operations is said to be row equivalent with 𝐴. In the context of
the solution of the system of algebraic equations, the solution of the new system is identical with the
solution of the original system.
The above elementary operations performed on the columns of 𝐴 (column 𝐶 in place of row 𝑅)
are called elementary column transformations (operations). However, we shall be using only the
elementary row operations.
In this section, we derive two direct methods for the solution of the given system of equations,
namely, Gauss Elimination method and Gauss-Jordan method.
2.3. DIRECT METHODS
In this section, we derive two direct methods for the solution of the given system of equations,
namely, Gauss elimination method and Gauss-Jordan method.
2.3.1. GAUSS ELIMINATION METHOD:
The method is based on the idea of reducing the given system of equations 𝐴𝑋 = 𝐵, to an
upper triangular system of equations 𝑈𝑋 = 𝑉, where 𝑈 is the upper triangular matrix, using
elementary row operations. We know that these two systems are equivalent. That is, the solutions of
both the systems are identical. This reduced system 𝑈𝑋 = 𝑉, is then solved by the back substitution
method (Gauss Elimination) to obtain the solution vector 𝑋.
2.3.2. GAUSS-JORDAN METHOD:
The method is based on the idea of reducing the given system of equations 𝐴𝑋 = 𝐵, to a
diagonal system of equations 𝐼𝑋 = 𝐷, where 𝐼 is the identity matrix, using elementary row
operations. We know that the solutions of both the systems are identical. This reduced system gives
the solution vector 𝑋. This reduction is equivalent to finding the solution as 𝑋 = 𝐴–1 𝑏.
Problems:
1. Solve the system of equations by
i. Gauss Elimination method
ii. Gauss Jordan method
𝑥 + 2𝑦 + 𝑧 = 3, 2𝑥 + 3𝑦 + 3𝑧 = 10, 3𝑥 − 𝑦 + 2𝑧 = 13.
Solution:
i. Gauss Elimination method:
The given system is equivalent to
1 2 1 𝑥 3
(2 3 3) (𝑦) = (10)
3 −1 2 𝑧 13
𝐴𝑋 = 𝐵
35
Work Book on Numerical Methods

1 2 1 3
(𝐴, 𝐵) = (2 3 3 10)
3 −1 2 13
Now, we will make the matrix 𝐴 upper triangular.
1 2 1 3
(𝐴, 𝐵) = (2 3 3 10)
3 −1 2 13
1 2 1 3 𝑅 ⇔ 𝑅 + (−2)𝑅
~ (0 −1 1 4 ) 2 2 1
𝑅3 ⇔ 𝑅3 + (−3)𝑅1
0 −7 −1 4
Now take 𝑏22 = −1 as the pivot and make 𝑏32 as zero.
1 2 1 3
(𝐴, 𝐵)~ (0 −1 1 4 ) 𝑅3 ⟺ 𝑅3 + (−7)𝑅2
0 0 −8 −24
From this, we get
𝑥 + 2𝑦 + 𝑧 = 3
−𝑦 + 𝑧 = 4
−8𝑧 = −24
Therefore, 𝑧 = 3, 𝑦 = −1, 𝑥 = 2 by using back substitution.
Hence, 𝑥 = 2, 𝑦 = −1, 𝑧 = 3.
ii. Gauss Jordan method:
1 2 1 𝑥 3
(2 3 3) (𝑦) = (10)
3 −1 2 𝑧 13
𝐴𝑋 = 𝐵
1 2 1 3
(𝐴, 𝐵) = (2 3 3 10)
3 −1 2 13
Now, we will make the matrix 𝐴as upper triangular.
1 2 1 3
(𝐴, 𝐵) = (2 3 3 10)
3 −1 2 13
1 2 1 3 𝑅 ⟺ 𝑅 + (−2)𝑅
~ (0 −1 1 4 ) 2 2 1
𝑅3 ⟺ 𝑅3 + (−3)𝑅1
0 −7 −1 4
Now take 𝑏22 = −1 as the pivot and make 𝑏32 as zero.

36
Work Book on Numerical Methods

1 2 1 3
(𝐴, 𝐵)~ (0 −1 1 4 ) 𝑅3 ⟺ 𝑅3 + (−7)𝑅2
0 0 −8 −24
1 0 3 11
𝑅 ⟺ 𝑅1 + 2𝑅2
~ (0 −1 1 4 ) 1
0 0 −8 −24
1 0 3 11
1
~ (0 −1 1 4 ) 𝑅3 ⟺ (8) 𝑅3
0 0 −1 −3
1 0 0 2 𝑅1 ⟺ 𝑅1 + 3𝑅3
~ (0 −1 0 1 ) 𝑅 ⟺ 𝑅 +𝑅
2 2 3
0 0 −1 −3
This implies, 𝑥 = 2, −𝑦 = 1, −𝑧 = −3.
Therefore, the solution is 𝒙 = 𝟐, 𝒚 = −𝟏 𝒂𝒏𝒅 𝒛 = 𝟑.
Exercise:
1. Solve the system by Gauss Elimination method:
2𝑥 + 3𝑦 − 𝑧 = 5; 4𝑥 + 4𝑦 − 3𝑧 = 3 and 2𝑥 − 3𝑦 + 2𝑧 = 2.
2. Solve the system of equations by Gauss-Jordan method:
𝑥+𝑦+𝑧+𝑤 =2
2𝑥 − 𝑦 + 2𝑧 − 𝑤 = −5
3𝑥 + 2𝑦 + 3𝑧 + 4𝑤 = 7
𝑥 − 2𝑦 − 3𝑧 + 2𝑤 = 5
3. Apply Gauss – Jordan method to find the solution of the following system:
10𝑥 + 𝑦 + 𝑧 = 12
2𝑥 + 10𝑦 + 𝑧 = 13
𝑥 + 𝑦 + 5𝑧 = 7
4. Using Gauss – Elimination’s method, solve the system:
3.15𝑥 − 1.96𝑦 + 3.85𝑧 = 12.95
2.13𝑥 + 5.12𝑦 − 2.89𝑧 = −8.61
5.92𝑥 + 3.05𝑦 + 2.15𝑧 = 6.88
5. Solve the following system by Gauss – Elimination method:
3𝑥 + 4𝑦 + 5𝑧 = 18,
2𝑥 − 𝑦 + 8𝑧 = 13,
5𝑥 − 2𝑦 + 7𝑧 = 20.

37
Work Book on Numerical Methods

38
Work Book on Numerical Methods

39
Work Book on Numerical Methods

40
Work Book on Numerical Methods

41
Work Book on Numerical Methods

42
Work Book on Numerical Methods

43
Work Book on Numerical Methods

2.4. ITERATIVE METHODS:


As discussed earlier, iterative methods are based on the idea of successive approximations.
We start with an initial approximation to the solution vector 𝑥 = 𝑥0 , to solve the system of equations
𝐴𝑋 = 𝐵, and obtain a sequence of approximate vectors 𝑥0 , 𝑥1 , … , 𝑥𝑘 , …, which in the limit as 𝑘 →
∞, converges to the exact solution vector 𝑋 = 𝐴–1 𝐵. A general linear iterative method for the
solution of the system of equations𝐴𝑋 = 𝐵, can be written in matrix form as
𝑥 (𝑘+1) = 𝐻𝑥 (𝑘) + 𝑐, 𝑘 = 0, 1, 2, …,

where 𝑥 (𝑘+1) and 𝑥 (𝑘) are the approximations for 𝑥 at the (𝑘 + 1)th and 𝑘th iterations
respectively. 𝐻 is called the iteration matrix which depends on 𝐴, and 𝑐 is a column vector, which
depends on 𝐴 and 𝑏.
We stop the iteration procedure when the magnitudes of the differences between the two
successive iterates of all the variables are smaller than a given accuracy or error tolerance or an error
bound 𝜀, that is,
(𝑘+1) (𝑘)
|𝑥𝑖 − 𝑥𝑖 | ≤ 𝜖, for all 𝑖.

Note:
This iterative method is not always successful to all systems of equations. If this method is
succeed, each equation of the system must possess one large coefficient and the large coefficient must
be attached to a different unknown in that equations. This condition will be satisfied if the large
coefficients are along the leading diagonal of the coefficient matrix. When this condition is satisfied,
the system will be solvable by the iterative method. The system,
𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 = 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 = 𝑏2
𝑎31 𝑥1 + 𝑎32 𝑥2 + 𝑎33 𝑥3 = 𝑏3
will be solvable by this method if
|𝑎11 | > |𝑎12 | + |𝑎13 |
|𝑎22 | > |𝑎21 | + |𝑎23 |
|𝑎33 | > |𝑎31 | + |𝑎32 |
In other words, the solution will exist (iteration will converge) if the absolute values of the leading
diagonal elements of the coefficient matrix 𝑨 of the system 𝑨𝑿 = 𝑩 are greater than the sum of
absolute values of the other coefficients of that row. The condition is sufficient but not
necessary.
2.4.1 Gauss-Jacobi Iteration Method:
Let us explain this method in the case of three equations in the three unknowns.
Consider the system of equations,
𝑎1 𝑥 + 𝑏1 𝑦 + 𝑐1 𝑧 = 𝑑1
44
Work Book on Numerical Methods

𝑎2 𝑥 + 𝑏2 𝑦 + 𝑐2 𝑧 = 𝑑2
𝑎3 𝑥 + 𝑏3 𝑦 + 𝑐3 𝑧 = 𝑑3
Let us verify the condition (diagonally dominant),
|𝑎1 | > |𝑏1 | + |𝑐1 |
|𝑏2 | > |𝑎2 | + |𝑐2 |
|𝑐3 | > |𝑎3 | + |𝑏3 |
Then, iterative method can be used for the system. Solve for 𝑥, y, z (whose coefficients are the
large values) in terms of the other variables. That is,
1
𝑥= (𝑑 − 𝑏1 𝑦 − 𝑐1 𝑧)
𝑎1 1
1
𝑦= (𝑑 − 𝑎2 𝑥 − 𝑐2 𝑧)
𝑏2 2
1
𝑧= (𝑑 − 𝑎3 𝑥 − 𝑏3 𝑦)
𝑐3 3
If 𝑥 (0) , 𝑦 (0) , 𝑧 (0) are the initial values of 𝑥, 𝑦, 𝑧 respectively, then

1
𝑥 (1) = (𝑑 − 𝑏1 𝑦 (0) − 𝑐1 𝑧 (0) )
𝑎1 1
1
𝑦 (1) = (𝑑 − 𝑎2 𝑥 (0) − 𝑐2 𝑧 (0) )
𝑏2 2
1
𝑧 (1) = (𝑑 − 𝑎3 𝑥 (0) − 𝑏3 𝑦 (0) )
𝑐3 3
Again, using these values 𝑥 (1) , 𝑦 (1) , 𝑧 (1) , we get
1
𝑥 (2) = (𝑑 − 𝑏1 𝑦 (1) − 𝑐1 𝑧 (1) )
𝑎1 1
1
𝑦 (2) = (𝑑 − 𝑎2 𝑥 (1) − 𝑐2 𝑧 (1) )
𝑏2 2
1
𝑧 (2) = (𝑑 − 𝑎3 𝑥 (1) − 𝑏3 𝑦 (1) )
𝑐3 3
Proceeding in the same way, if the 𝑟th iterates are 𝑥 (𝑟) , 𝑦 (𝑟) , 𝑧 (𝑟) , the iteration scheme reduces to
1
𝑥 (𝑟+1) = (𝑑 − 𝑏1 𝑦 (𝑟) − 𝑐1 𝑧 (𝑟) )
𝑎1 1
1
𝑦 (𝑟+1) = (𝑑2 − 𝑎2 𝑥 (𝑟) − 𝑐2 𝑧 (𝑟) )
𝑏2
45
Work Book on Numerical Methods

1
𝑧 (𝑟+1) = (𝑑 − 𝑎3 𝑥 (𝑟) − 𝑏3 𝑦 (𝑟) )
𝑐3 3
The procedure is continued till the convergence is assured (correct to required decimals).
2.4.2 GAUSS-SEIDEL METHOD OF ITERATION:
This is only a refinement of Gauss-Jacobi method. As before,
1
𝑥= (𝑑 − 𝑏1 𝑦 − 𝑐1 𝑧)
𝑎1 1
1
𝑦= (𝑑 − 𝑎2 𝑥 − 𝑐2 𝑧)
𝑏2 2
1
𝑧= (𝑑 − 𝑎3 𝑥 − 𝑏3 𝑦)
𝑐3 3

We start with the initial values 𝑦 (0) , 𝑧 (0) for 𝑦 and 𝑧 and get 𝑥 (1) from the first equation. That is,
1
𝑥 (1) = (𝑑 − 𝑏1 𝑦 (0) − 𝑐1 𝑧 (0) )
𝑎1 1
While using the second equation, we use 𝑧 (0) for 𝑧 and 𝑥 (1) for 𝑥 instead of 𝑥 (0) as in the Jacobi’s
method, we get
1
𝑦 (1) = (𝑑 − 𝑎2 𝑥 (1) − 𝑐2 𝑧 (0) )
𝑏2 2
Now, having known 𝑥 (1) and 𝑦 (1) , use 𝑥 (1) for 𝑥 and 𝑦 (1) for 𝑦 in the third equation, we get
1
𝑧 (1) = (𝑑 − 𝑎3 𝑥 (1) − 𝑏3 𝑦 (1) )
𝑐3 3
In finding the values of the unknowns, we use the latest available values on the right-hand side. If
𝑥 (𝑟) , 𝑦 (𝑟) , 𝑧 (𝑟) are the 𝑟th iterates, then the iteration scheme will be
1
𝑥 (𝑟+1) = (𝑑 − 𝑏1 𝑦 (𝑟) − 𝑐1 𝑧 (𝑟) )
𝑎1 1
1
𝑦 (𝑟+1) = (𝑑 − 𝑎2 𝑥 (𝑟+1) − 𝑐2 𝑧 (𝑟) )
𝑏2 2
1
𝑧 (𝑟+1) = (𝑑 − 𝑎3 𝑥 (𝑟+1) − 𝑏3 𝑦 (𝑟+1) )
𝑐3 3
This process of iteration is continued until the convergence is assured.

Note:

1. The convergence in Gauss-Seidel method is very fast when compared to Gauss-Jacobi


method.

46
Work Book on Numerical Methods

2. The rate of convergence in Gauss-Seidel method is roughly two times than that of Gauss-
Jacobi method.
3. The method of iteration will converge if in each equation of the given system, the absolute
value of the largest coefficient is greater than the sum of the absolute values of all the
remaining coefficients.
4. For all systems of equations, this method will not work (since converge is not assured). It
converges only for special systems of equations.
5. Iteration method is self-correcting method. That is any error made in computation, is corrected
in the subsequent iterations.
6. The iteration is stopped when the values of x, y, z start repeating with the required degree of
accuracy.

Problems:
1. Solve the following system by Gauss – Jacobi and Gauss – Seidel methods:
10𝑥 − 5𝑦 − 2𝑧 = 3; 4𝑥 − 10𝑦 + 3𝑧 = −3; 𝑥 + 6𝑦 + 10𝑧 = −3.
Solution:
Here, we see that the diagonal elements are dominant. Hence, the iteration process can be applied.
−10 −5 −2
That is, the co-efficient matrix ( 4 −10 3 )is diagonally dominant, since
1 6 10
|10| > |−5| + |−2|,
|−10| > |4| + |3|
and |10| > |1| + |6|.
Gauss – Jacobi method:
Solving for 𝑥, 𝑦, 𝑧, we have
1
𝑥 = 10 (3 + 5𝑦 + 2𝑧) ---------------------(1)
1
𝑦 = 10 (3 + 4𝑥 + 3𝑧)---------------------(2)
1
𝑧 = 10 (−3 − 𝑥 − 6𝑦)---------------------(3)

First iteration:
Let the initial values be (0, 0, 0).i.e., 𝑥 = 0, 𝑦 = 0, 𝑧 = 0
Using these initial values in above system of equation (1), (2) and (3), we get,

47
Work Book on Numerical Methods

1
𝑥 (1) = [3 + 5(0) + 2(0)] = 0.3
10
1
𝑦 (1) = [3 + 4(0) + 3(0)] = 0.3
10
1
𝑧 (1) = [−3 − (0) − 6(0)] = −0.3
10
Second iteration:
1
𝑥 (2) = [3 + 5(0.3) + 2(−0.3)] = 0.39
10
1
𝑦 (2) = [3 + 4(0.3) + 3(−0.3)] = 0.33
10
1
𝑧 (2) = [−3 − (0.3) − 6(0.3)] = −0.51
10
Third iteration:
1
𝑥 (3) = [3 + 5(0.33) + 2(−0.51)] = 0.363
10
1
𝑦 (3) = [3 + 4(0.39) + 3(−0.51)] = 0.303
10
1
𝑧 (3) = [−3 − (0.39) − 6(0.33)] = −0.537
10
Fourth iteration:
1
𝑥 (4) = [3 + 5(0.303) + 2(−0.537)] = 0.3441
10
1
𝑦 (4) = [3 + 4(0.363) + 3(−0.537)] = 0.2841
10
1
𝑧 (4) = [−3 − (0.363) − 6(0.303)] = −0.5181
10
Fifth iteration:
1
𝑥 (5) = [3 + 5(0.2841) + 2(−0.5181)] = 0.33843
10
1
𝑦 (5) = [3 + 4(0.3441) + 3(−0.5181)] = 0.2822
10
1
𝑧 (5) = [−3 − (0.3441) − 6(0.2841)] = −0.50487
10
Sixth iteration:
1
𝑥 (6) = [3 + 5(0.2822) + 2(−0.50487)] = 0.340126
10
48
Work Book on Numerical Methods

1
𝑦 (6) = [3 + 4(0.33843) + 3(−0.50487)] = 0.283911
10
1
𝑧 (6) = [−3 − (0.33843) − 6(0.2822)] = −0.503163
10
Seventh iteration:
1
𝑥 (7) = [3 + 5(0.283911) + 2(−0.503163)] = 0.3413229
10
1
𝑦 (7) = [3 + 4(0.340126) + 3(−0.503163)] = 0.2851015
10
1
𝑧 (7) = [−3 − (0.340126) − 6(0.283911)] = −0.5043592
10
Eighth iteration:
1
𝑥 (8) = [3 + 5(0.2851015) + 2(−0.5043592)] = 0.34167891
10
1
𝑦 (8) = [3 + 4(0.3413229) + 3(−0.5043592)] = 0.2852214
10
1
𝑧 (8) = [−3 − (0.3413229) − 6(0.2851015)] = −0.50519319
10
Nineth iteration:
1
𝑥 (9) = [3 + 5(0.2852214) + 2(−0.50519319)] = 0.341572062
10
1
𝑦 (9) = [3 + 4(0.34167891) + 3(−0.50519319)] = 0.285113607
10
1
𝑧 (9) = [−3 − (0.34167891) − 6(0.2852214)] = −0.505300731
10
Tenth iteration:
1
𝑥 (10) = [3 + 5(0.341572062) + 2(−0.505300731)] = 0.342
10
1
𝑦 (10) = [3 + 4(0.285113607) + 3(−0.505300731)] = 0.285
10
1
𝑧 (10) = [−3 − (0.285113607) − 6(0.341572062)] = −0.505
10
Hence, correct to 3 decimal places, the values are
𝑥 = 0.342, 𝑦 = 0.285, 𝑧 = −0.505.
Gauss Seidel method:
Solving for 𝑥, 𝑦, 𝑧, we have
49
Work Book on Numerical Methods

1
𝑥= (3 + 5𝑦 + 2𝑧)
10
1
𝑦= (3 + 4𝑥 + 3𝑧)
10
1
𝑧= (−3 − 𝑥 − 6𝑦)
10
First iteration:
Let the initial values be 𝑦 = 0 and 𝑧 = 0.
Using these initial values in above system, we get,
1
𝑥 (1) = [3 + 5(0) + 2(0)] = 0.3
10
1
𝑦 (1) = [3 + 4(0.3) + 3(0)] = 0.42
10
1
𝑧 (1) = [−3 − (0.3) − 6(0.42)] = −0.582
10
Second iteration:
1
𝑥 (2) = [3 + 5(0.42) + 2(−0.582)] = 0.3936
10
1
𝑦 (2) = [3 + 4(0.3936) + 3(−0.582)] = 0.28284
10
1
𝑧 (2) = [−3 − (0.3936) − 6(0.28284)] = −0.509064
10
Third iteration:
1
𝑥 (3) = [3 + 5(0.28284) + 2(−0.509064)] = 0.3396072
10
1
𝑦 (3) = [3 + 4(0.3396072) + 3(−0.509064)] = 0.28312368
10
1
𝑧 (3) = [−3 − (0.3396072) − 6(0.28312368)] = −0.503834928
10
Fourth iteration:
1
𝑥 (4) = [3 + 5(0.28312368) + 2(−0.503834928)] = 0.34079485
10
1
𝑦 (4) = [3 + 4(0.34079485) + 3(−0.50383492)] = 0.285167464
10
1
𝑧 (4) = [−3 − (0.34079485) − 6(0.285167464)] = −0.50517996
10

50
Work Book on Numerical Methods

Fifth iteration:
1
𝑥 (5) = [3 + 5(0.28516746) + 2(−0.50517996)] = 0.34155477
10
1
𝑦 (5) = [3 + 4(0.34155477) + 3(−0.50517996)] = 0.28506792
10
1
𝑧 (5) = [−3 − (0.34155477) − 6(0.28506792)] = −0.505196229
10
Sixth iteration:
1
𝑥 (6) = [3 + 5(0.28506792) + 2(−0.505196229)] = 0.341494714
10
1
𝑦 (6) = [3 + 4(0.341494714) + 3(−0.505196229)] = 0.285039017
10
1
𝑧 (6) = [−3 − (0.341494714) − 6(0.285039017)] = −0.5051728
10
Seventh iteration:
1
𝑥 (7) = [3 + 5(0.285039017) + 2(−0.5051728)] = 0.3414849
10
1
𝑦 (7) = [3 + 4(0.3414849) + 3(−0.5051728)] = 0.28504212
10
1
𝑧 (7) = [−3 − (0.3414849) − 6(0.28504212)] = −0.5051737.
10
The values correct to 3 decimal places are
𝑥 = 0.342, 𝑦 = 0.285, 𝑧 = −0.505.

Exercise:
1. Solve the following system of equations by using Gauss – Jacobi and gauss – Seidel
methods (correct to 3 decimal places):
8𝑥 − 3𝑦 + 2𝑧 = 20
4𝑥 + 11𝑦 − 𝑧 = 33
6𝑥 + 3𝑦 + 12𝑧 = 35.
2. Solve the following system of equations by Gauss – Jacobi and Gauss – Seidel method
correct to three decimal places:
𝑥 + 𝑦 + 54𝑧 = 110
27𝑥 + 6𝑦 − 𝑧 = 85
6𝑥 + 15𝑦 + 2𝑧 = 72
51
Work Book on Numerical Methods

3. Solve by Gauss – Seidel method for the following system:


28𝑥 + 4𝑦 − 𝑧 = 32
𝑥 + 3𝑦 + 10𝑧 = 24
2𝑥 + 17𝑦 + 4𝑧 = 35.

52
Work Book on Numerical Methods

53
Work Book on Numerical Methods

54
Work Book on Numerical Methods

55
Work Book on Numerical Methods

56
Work Book on Numerical Methods

57
Work Book on Numerical Methods

UNIT III
INTERPOLATION
Gregory-Newton forward and backward interpolation formula – Equidistant terms with
one or more missing values - Lagrange and Inverse Lagrange Interpolation formula.
. INTERPOLATION
3.

3.1. Introduction
Interpolation has been described as the art of reading between the line of a table and in
elementary mathematics it means the process of computing intermediate values of a
function from a given set of tabular values of the function.

3.2. Interpolation for equal intervals: Gregory-Newton’s interpolation method:


Let 𝑦 = 𝑓(𝑥) be a function of 𝑥 and 𝑦0 , 𝑦1 , 𝑦2 , 𝑦3 … 𝑦𝑛 be the values of 𝑦
corresponding to 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 … 𝑥𝑛 values of 𝑥. Independent variable 𝑥 is called
argument & dependent variable 𝑦 is called entry.
1. Gregory Newton forward interpolation formula.
2. Gregory Newton backward interpolation formula.
3.2.1. Gregory Newton’s forward interpolation formula:

𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝑦(𝑥) = 𝑦0 + 𝑢 Δ𝑦0 + Δ2 𝑦0 + ∆3 𝑦0 +…,
2! 3!

where 𝑢 = 𝑥−𝑥

0
.

Note:
• Error in Newton’s forward interpolation formula
𝑢(𝑢−1)(𝑢−2)…(𝑢−𝑛) 𝑥−𝑥0
Error= 𝑓(𝑥) − 𝑝𝑛 (𝑥) = (𝑛+1)!
∆𝑛+1 𝑓(𝑐) 𝑤ℎ𝑒𝑟𝑒 𝑢 =

Algorithm:
Step 1: The data will be enter as specified in the question.

Step 2: Create the difference table.


𝑥−𝑥0
Step 3: Compute 𝑢 = .

Step 4: Apply the interpolation formula. Estimate the value of 𝑓(𝑥).

58
Work Book on Numerical Methods

3.2.2. Gregory Newton’s backward interpolation formula:


𝑣(𝑣+1) 𝑣(𝑣+1)(𝑣+2)
𝑦(𝑥) = 𝑦𝑛 + 𝑣 ∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 +…,
2! 3!
𝑥 − 𝑥𝑛
where 𝑣 = ℎ
.

Note:
• Error in Newton’s backward interpolation formula
Error= 𝑦(𝑥) − 𝑝𝑛 (𝑥)
𝑣(𝑣 − 1)(𝑣 − 2) … (𝑣 − 𝑛) 𝑛+1 𝑛+1
= 𝑓(𝑥) − 𝑝𝑛 (𝑥) ℎ 𝑦 (𝑐)
(𝑛 + 1)!
𝑥−𝑥𝑛
where 𝑣 =

Algorithm:
Step 1: The data will be enter as specified in the question.

Step 2: Create the difference table


𝑥−𝑥𝑛
Step 3: Compute 𝑣 = .

Step 4: Apply the interpolation formula. Estimate the value of 𝑓(𝑥)


Problems:
1. Find the values of y at x=21 and x=28 from the following data

X 20 23 26 29

F(X) 0.342 0.3907 0.4384 0.4848

Solution:
Step 1: Given
X 20 23 26 29

Y 0.342 0.3907 0.4384 0.4848

Since 𝑥 = 21 is nearer to the beginning of the table & 𝑥 = 28 is nearer to the end of
the table. So, we will use both formulas. Also, we have h = constant = 3.
59
Work Book on Numerical Methods

Step 2:
We form the difference table.

𝑥 𝑦 ∆𝑦 ∆𝟐 𝒚 ∆𝟑 𝒚

20 0.342

0.0487

23 0.3907 -0.001

0.0477 -0.0003

26 0.4384 -0.0013

0.0464

29 0.4848

We want to find the value of 𝑓(𝑥) at 𝑥 = 21


Step 3:
ℎ = 𝑥1 -𝑥0 = 23-20 = 3
𝑥−𝑥0
𝑢= ℎ
= 21−20
3
= 0.3333

Step 4:
Newton's forward interpolation formula
𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝑦(𝑥) = 𝑦0 + 𝑢 Δ𝑦0 + Δ2 𝑦0 + ∆3 𝑦0 +…,
2! 3!

y (21) = 0.342 + (0.3333 × 0.0487) +0.3333 (0.3333-1) 2 × (-0.001) + (0.33333)

(0.3333-1) (0.33332) 6 × (-0.0003)


y (21) = 0.342 + 0.01623 + 0.0001 - 0.000018
y (21) = 0.358325.

The value of 𝑦 at 𝑥 = 21 is 0.358325.


60
Work Book on Numerical Methods

Gregory Newton backward difference interpolation formula:


Since 𝑥 = 28 is nearer to the end value of the table. We use Newton’s backward
formula.
Step 1:
𝑥 − 𝑥𝑛 28 − 29
𝑣= ℎ
= 3
= -0.0003

Step 2:
Newton's backward interpolation formula
𝑣(𝑣+1) 𝑣(𝑣+1)(𝑣+2)
𝑦(𝑥) = 𝑦𝑛 + 𝑣 ∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 +…,
2! 3!
1 2 1 2 5
−1 (−3)(3) (−3)(3)(3)
𝑦(28) = 0.4848 + ( ) (0.0464) + (-0.0013) + (-0.0003)
3 2 6

𝑦(28) = 0.4848 - 0.015465 + 0.0001444 - 0.0000185 = 0.4695.


The value of 𝑦 at 𝑥 = 28 is 0.4695.
2. The population of a town is as follows

Year X 1941 1951 1961 1971 1981 1991

Population in lakhs Y 20 24 29 36 46 51

Estimate the population increase during the period 1946 to 1976.


Solution:
Step 1:
X 1941 1951 1961 1971 1981 1991

Y 20 24 29 36 46 51

Let us find the population at x=1946 and x=1976


Step 2:
We form the difference table.

61
Work Book on Numerical Methods

𝑥 𝑦 ∆𝑦 ∆𝟐 𝒚 ∆𝟑 𝒚 ∆𝟒 𝒚 ∆𝟓 𝒚

1941 20

1951 24 1

5 1

1961 29 2 0

7 1 -9

1971 36 3 -9

10 -8

1981 46 -5

1991 51

We want to find the value of 𝑓(𝑥) at 𝑥 = 1946


Step 3:
ℎ = 𝑥1 -𝑥0 = 1951-1941 = 10
𝑥−𝑥0
𝑢= ℎ
= 1946−1941
10
5
= 10 = 0.5

Step 4:
Newton's forward interpolation formula
𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝑦(𝑥) = 𝑦0 + 𝑢 Δ𝑦0 + Δ2 𝑦0 + ∆3 𝑦0 +…,
2! 3!

62
Work Book on Numerical Methods

0.5(0.5 − 1) 0.5(0.5 − 1)(0.5 − 2)


𝑦(1946) = 20 + (0.5 × 4) + ( × 1) + ( × 1)
2 6
0.5(0.5 − 1)(0.5 − 2)(0.5 − 3)
+( × 0)
24
0.5(0.5 − 1)(0.5 − 2)(0.5 − 3)(0.5 − 4)
+( × −9)
120
𝑦(1946) = 20 + 2+( -0.125) + 0.0625 + 0+(-0.24609)
𝑦(1946) = 21.69
The value of 𝑦 at 𝑥 = 1946 is 21.69.
Gregory Newton backward difference interpolation formula:
Since 𝑥 = 1976 is nearer to the end value of the table. We use Newton’s backward
formula.
Step 1:
1976− 1991
𝑣 = 𝑥−ℎ𝑥𝑛 = = −1.5
10

Step 2:
Newton's backward interpolation formula is
𝑣(𝑣+1) 𝑣(𝑣+1)(𝑣+2)
𝑦(𝑥) = 𝑦𝑛 + 𝑣 ∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 +…,
2! 3!
1.5(−1.5+1)
𝑦(1976) = 51 + [(-1.5) ×5] + [− × −5] +
2

1.5(−1.5+1)(−1.5+2) 1.5(−1.5+1)(−1.5+2)(−1.5+3)
[− × −8] + [− × −9] +
6 24
1.5(−1.5+1)(−1.5+2)(−1.5+3)(−1.5+4)
[− × −9]
120

𝑦(1976) = 51+( - 7.5) +(- 1.875) +(- 0.5) +(- 0.2109375) + (- 0.10546875)

y (1976) = 40.80859
The value of 𝑦 at 𝑥 = 1976 is 40.80859.
Increase in population during the period 1946 to 1976 is
40.80859-21.69 = 19.1185 lakhs.

63
Work Book on Numerical Methods

Exercise Problems:
1) Using Newton’s forward formula, find the value of 𝑓(1), if

X 1 1.4 1.8 2.2

F(X) 3.49 4.82 5.96 6.5

2) Find 𝑓(40) from the following data using Newton’s backward formula

X 20 25 30 35 40 45

F(X) 354 332 291 260 231 204

3) Utilize the given table to determine the value of tan 450 15′

X 45 46 47 48 49 50

F(X) 1 1.03553 1.07237 1.11061 1.15037 1.19175


4) From the following table of half-yearly premium for policies maturing at
different ages, estimate the premium for policies maturing at age 46 and 63
Age x 45 50 55 60 65
Premium y 114.84 96.16 83.32 74.48 68.48
5) From the following data find 𝜃 at 𝑥 = 43 𝑎𝑛𝑑 𝑥 = 84
X 40 50 60 70 80 90
𝜃 184 204 226 250 276 304
Also express 𝜃 in terms of x.
6) The following data are taken from the steam table:
Temp. ˚C 140 150 160 170 180
Pressure 3.685 4.854 6.302 8.076 10.225
kgf/cm2
Evaluate the pressure at temperature 𝑡 = 142° and t = 175˚.

64
Work Book on Numerical Methods

65
Work Book on Numerical Methods

66
Work Book on Numerical Methods

67
Work Book on Numerical Methods

68
Work Book on Numerical Methods

69
Work Book on Numerical Methods

70
Work Book on Numerical Methods

3.3. Equidistant terms with one or more missing values:


When one or more of the values of the function 𝑦 = 𝑓(𝑥) corresponding to the
equidistant values of 𝑥 are missing, we can find the missing values by the use of
operators ∆ and 𝐸.
Relation between ∆ and 𝑬:
∆= 𝐸−1
𝐸 = 1+∆
Relation between E and 𝛁:
∇= 1 − 𝐸 −1
𝐸 = (1 − ∇)−1
Algorithm:
Step 1: Identify known values and their positions
Step 2: Determine the common difference using known positions and substitute all
the terms in the formula and evaluate the value of 𝑓(𝑥).
Problems:
1. Find the missing value of the table given below what assumption have you
made to find it?

Year X 1917 1918 1919 1920 1921

Export (in tons) F(X) 443 384 - 397 467

Solution:
Step 1:
Here we are given 5 values of y. So, we assume that y is polynomial of degree 4.
𝑢0 = 443, 𝑢1 = 384, 𝑢2 = ?, 𝑢3 = 397, 𝑢4 = 467. Hence, ∆4 𝑢0 = 0.
Step 2:
∆4 𝑢0 = 0
(𝐸 − 1)4 𝑢0 = 0
71
Work Book on Numerical Methods

(𝐸 4 - 4𝐸 3 + 6𝐸 2 - 4E + 1) 𝑢0 = 0
𝑢4 - 4𝑢3 + 6𝑢2 - 4𝑢1 + 𝑢0 = 0
467 - 4(397) + 6𝑢2 - 4(384) + 443=0
6𝑢2 = 2214
𝑢2 = 369
Therefore, the value of 𝑓(𝑥) at 𝑥 = 1919 is 369.
2. Find the missing value of the following table

X 0 1 2 3 4

F(X) 1 2 4 - 16

Solution:
Step 1:
Here we are given 5 values of y. So, we assume that y is polynomial of degree 4.
𝑦0 =1, 𝑦1 =2, 𝑦2 =4, 𝑦3 =?, 𝑦4 =16. Hence, ∆4 𝑢0 = 0.
Step 2:
∆4 𝑦0 =0.
(𝐸 − 1)4 𝑦0 = 0
(𝐸 4 -4𝐸 3 +6𝐸 2 -4E+1) 𝑦0 = 0
𝑦4 - 4𝑦3 + 6𝑦2 - 4𝑦1 + 𝑦0 = 0
16 - 4𝑦3 + 6(4) - 4(2) + 1 = 0
4𝑦3 = 33
𝑦3 = 8.25.
Therefore, the value of 𝑓(𝑥) at 𝑥 = 3 is 8.25.

72
Work Book on Numerical Methods

Exercise problems
1) Find Missing terms in interpolation table
X 2 3 4 5 6
F(X) 45 49.2 54.1 - 67.4

2) Find Missing terms in interpolation table

x 1 2 3 4 5 6 7
y 2 4 8 ? 32 64 128

73
Work Book on Numerical Methods

74
Work Book on Numerical Methods

3.4. Interpolation for unequal intervals:


3.4.1. Lagrange’s interpolation formula:
Consider the values of 𝑥 are 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 … corresponding to 𝑦 values are 𝑦0 , 𝑦1 , 𝑦2 ,
𝑦3 …
i.e., 𝑦(𝑥𝑖 ) = 𝑦𝑖 = 𝑓(𝑥𝑖 ), 𝑖 = 0,1,2,3, … , 𝑛. Then,
(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 )
𝑦 = 𝑓 (𝑥 ) = 𝑦0 + 𝑦 +⋯
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) … (𝑥0 − 𝑥𝑛 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … (𝑥1 − 𝑥𝑛 ) 1
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑛−1 )
+ 𝑦
(𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥1 ) … (𝑥𝑛 − 𝑥𝑛−1 ) 𝑛

Algorithm:
Step 1: construct the interpolating polynomial.
Step 2: Calculate the interpolate value 𝑓(𝑥).
3.4.2. Inverse Lagrange’s interpolation formula
In this case we will take 𝑦 as independent variable and 𝑥 as dependent variable
(𝑦 − 𝑦1 )(𝑦 − 𝑦2 ) … (𝑦 − 𝑦𝑛 ) (𝑦 − 𝑦0 )(𝑦 − 𝑦2 ) … (𝑦 − 𝑦𝑛 )
𝑥= 𝑥0 + 𝑥 +⋯
(𝑦0 − 𝑦1 )(𝑦0 − 𝑦2 ) … (𝑦0 − 𝑦𝑛 ) (𝑦1 − 𝑦0 )(𝑦1 − 𝑦2 ) … (𝑦1 − 𝑦𝑛 ) 1
(𝑦 − 𝑦0 )(𝑦 − 𝑦1 ) … (𝑦 − 𝑦𝑛−1 )
+ 𝑥 .
(𝑦𝑛 − 𝑦0 )(𝑦𝑛 − 𝑦1 ) … (𝑦𝑛 − 𝑦𝑛−1 ) 𝑛

Algorithm:
Step 1: Construct the Inverse Lagrange interpolation polynomials
Step 2: Calculate the interpolate value 𝑥(𝑦).
Problems
1. Using Lagrange’s interpolation formula find 𝒚(𝟏𝟎) from the following table

X 5 6 9 11

F(X) 12 13 14 16

75
Work Book on Numerical Methods

Solution:
Step 1:
Let us consider
𝑥 =10, 𝑥0 = 5, 𝑥1 = 6, 𝑥2 = 9, 𝑥3 = 11; 𝑦0 = 12, 𝑦1 = 13, 𝑦2 = 14, 𝑦3 = 16
By using Lagrange's Interpolation formula
(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 )
𝑦 = 𝑓(𝑥) = 𝑦0 + 𝑦
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) … (𝑥0 − 𝑥𝑛 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … (𝑥1 − 𝑥𝑛 ) 1
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑛−1 )
+ ⋯+ 𝑦
(𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥1 ) … (𝑥𝑛 − 𝑥𝑛−1 ) 𝑛
Step 2:
(10−6)(10−9)(10−11) (10−5)(10−9)(10−11)
𝑦 = 𝑓(10) =
(5−6)(5−9)(5−11)
× 12 +(6−5)(6−9)(6−11)
× 13 +
(10−5)(10−6)(10−11) (10−5)(10−6)(10−9)
(9−5)(9−6)(9−11)
× 14 + (11−5)(11−6)(11−9) × 16
(4)(1)(−1) (5)(1)(−1) (5)(4)(−1) (5)(4)(1)
𝑦(10) =
(−1)(−4)(−6)
× 12 + (1)(−3)(−5) × 13 + (4)(3)(−2) × 14 + (6)(5)(2) × 16

= 0.16666 ×12 + (-0.33333) ×13 + 0.83333×14 + 0.33333×16


y (10) = 14.6666666667.
Solution of the polynomial at the point 10 is 𝑦(10) = 14.6667.

2. From the data given below find the value of x by using Inverse Lagrange’s
formula when y=13.5

x 93 96.2 100 104.2 108.7


F(x) 11.38 12.8 14.7 17.07 19.91
Solution:
Step 1:
Let us consider
y =13.5, 𝑦1 =11.38, 𝑦2 =12.8, 𝑦3 =14.7, 𝑦4 =17.07, 𝑦5 =19.91
By using Inverse Lagrange's Interpolation formula
76
Work Book on Numerical Methods

(𝑦 − 𝑦1 )(𝑦 − 𝑦2 ) … (𝑦 − 𝑦𝑛 ) (𝑦 − 𝑦0 )(𝑦 − 𝑦2 ) … (𝑦 − 𝑦𝑛 )
𝑥= 𝑥0 + 𝑥 +⋯
(𝑦0 − 𝑦1 )(𝑦0 − 𝑦2 ) … (𝑦0 − 𝑦𝑛 ) (𝑦1 − 𝑦0 )(𝑦1 − 𝑦2 ) … (𝑦1 − 𝑦𝑛 ) 1
(𝑦 − 𝑦0 )(𝑦 − 𝑦1 ) … (𝑦 − 𝑦𝑛−1 )
+ 𝑥 .
(𝑦𝑛 − 𝑦0 )(𝑦𝑛 − 𝑦1 ) … (𝑦𝑛 − 𝑦𝑛−1 ) 𝑛
Step 2:
(13.5−12.8) (13.5−14.7) (13.5−17.07) (13.5−19.91)
𝑥(13.5) =
(11.38−12.8) (11.38−14.7) (11.38−17.07) (11.38−19.91)
×9

(13.5−11.38) (13.5−14.7) (13.5−17.07) (13.5−19.91)


+
(12.8−11.38) (12.8−14.7) (12.8−17.07) (12.8−19.91)
× 96.2

(13.5−11.38) (13.5−12.8) (13.5−17.07) (13.5−19.91)


+
(14.7−11.38) (14.7−12.8) (14.7−17.07) (14.7−19.91)
× 100

(13.5−11.38) (13.5−12.8) (13.5−14.7) (13.5−19.91)


+
(17.07−11.38) (17.07−12.8) (17.07−14.7) (17.07−19.91)
× 104.2

(13.5−11.38) (13.5−12.8) (13.5−14.7) (13.5−17.07)


+
(19.91−11.38) (19.91−12.8) (19.91−14.7) (19.91−17.07)
× 108.7

(0.7)(−1.2)(−3.57)(−6.41)
𝑥(13.5) = ×9
(−1.42)(−3.32)(−5.69)(−8.53)
(2.12)(−1.2)(−3.57)(−6.41)
+ × 96.2
(1.42)(−1.9)(−4.27)(−7.11)
(2.12)(0.7)(−3.57)(−6.41)
+ × 100
(3.32)(1.9)(−2.37)(−5.21)
(2.12)(0.7)(−1.2)(−6.41)
+ × 104.2
(5.69)(4.27)(2.37)(−2.84)
(2.12)(0.7)(−1.2)(−3.57)
+ × 108.7
(8.53)(7.11)(5.21)(2.84)

𝑥(13.5) = [(-0.0840074508) × 93] + [0.7107288284× 96.2] + [0.4359958873×100]


+ [(-0.0698017561) ×104.2] + [0.0070844912×108.7]

𝑥(13.5) = 97.6557503056.
Therefore, the solution of the polynomial at the point 13.5 is 𝑥 (13.5) = 97.6557.

77
Work Book on Numerical Methods

Exercise Problems
1) Using Lagrange’s formula of interpolation find 𝑦 (9.5) from the following table

x 7 8 9 10

F(X) 3 1 1 9

2) Apply the data to determine the age corresponding to the annuity value 13.6

Age x 30 35 40 45 50
Annuity value y 15.9 14.9 14.1 13.3 12.5
3) Apply Lagrange’s formula to determine the value of 𝑦 at 𝑥 = 1

x -1 0 2 3
y -8 3 1 12
4) Find the parabola of the form 𝑦 = 𝑎𝑥 2 + 𝑏𝑥 + 𝑐 passing through the points (0,
0), (1, 1), and (2, 20)
5) Determine the value of θ given f(θ) = 0.3887 from the following table.
θ 21˚ 23˚ 25˚
f(θ) 0.3706 0.4068 0.4433

78
Work Book on Numerical Methods

79
Work Book on Numerical Methods

80
Work Book on Numerical Methods

81
Work Book on Numerical Methods

82
Work Book on Numerical Methods

83
Work Book on Numerical Methods

84
Work Book on Numerical Methods

UNIT IV

NUMERICAL DIFFERENTIATION AND INTEGRATION


Numerical Differentiation: Newton’s forward difference and Newton‘s backward
difference formula. Numerical Integration: Trapezoidal Rule and Simpson ‘s Rule.

4. NUMERICAL DIFFERENTIATION AND INTEGRATION


Several methods are available to find the derivative of a function 𝑓(𝑥) or to evaluate
𝑏
the definite integral ∫𝑎 𝑓(𝑥)𝑑𝑥, 𝑎, 𝑏 are real finite constants, in the closed form.
However, when 𝑓(𝑥) is a complicated function or when it is given in tabular form, we
use numerical methods. In this chapter, we discuss the numerical methods for
approximating the derivative 𝑓 𝑟 (𝑥), 𝑟 ≥ 1 of a given function 𝑓(𝑥) and for the
𝑏
evaluation of the integrals ∫𝑎 𝑓(𝑥)𝑑𝑥 where 𝑎, 𝑏 may be finite or infinite.

4.1. Numerical differentiation:


➢ Numerical differentiation is a technique used to estimate the derivative of a
function using discrete data points rather than an explicit formula. It is
commonly applied when the function is known only at specific points or is too
complex for symbolic differentiation.
➢ Numerical differentiation approximates the derivative of a function 𝑓(𝑥) using
finite difference. The most common forms are:
➢ Forward difference:
𝑓(𝑥 + ℎ) − 𝑓(𝑥)
𝑓 ′ (𝑥) =

➢ Backward difference:
𝑓(𝑥)−𝑓(𝑥−ℎ)
𝑓 ′ (𝑥) = , where ℎ is small step size.

85
Work Book on Numerical Methods

4.1.1. Newton’s forward difference formula:


We are given (𝑛 + 1) ordered pairs (𝑥𝑖 , 𝑦𝑖 ) 𝑖 = 0,1, … … … 𝑛. We want to find the
derivative of 𝑦 = 𝑓(𝑥) passing through the (n+1) points, at a point nearer to the staring
value 𝑥 = 𝑥0 .

𝑑𝑦 1 2𝑢 − 1 2 3𝑢2 − 6𝑢 + 2 3 4𝑢3 − 18𝑢2 + 22𝑢 − 6 4


= [∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ∆ 𝑦0
𝑑𝑥 ℎ 2 6 24
+ ⋯]

𝑑2𝑦 1 2 3
6𝑢2 − 18𝑢 + 11 4
= [∆ 𝑦0 + (𝑢 − 1)∆ 𝑦0 + ∆ 𝑦0 + ⋯ ]
𝑑𝑥 2 ℎ2 12

𝑑3𝑦 1 3 12𝑢 − 18 4
= [∆ 𝑦0 + ∆ 𝑦0 + ⋯ ]
𝑑𝑥 3 ℎ3 12
𝑥−𝑥0
𝑢= setting 𝑥 = 𝑥0

When 𝑢 = 0, the above formulas become


𝑑𝑦 1 1 1 1
( )𝑢=0 = [∆𝑦0 − ∆2 𝑦0 + ∆3 𝑦0 − ∆4 𝑦0 +..]
𝑑𝑥 ℎ 2 3 4

𝑑2𝑦 1 11
( ) = [∆2 𝑦0 − ∆3 𝑦0 + ∆4 𝑦0 +..]
𝑑𝑥 2 𝑢=0 ℎ2 12

𝑑3𝑦 1 3 3 4
( ) 𝑢=0 = [∆ 𝑦0 − ∆ 𝑦0 + ⋯ ]
𝑑𝑥 3 ℎ3 2

Algorithm:

Step 1: The data will be enter as specified in the question

Step 2: Create the difference table.

Step 3: Compute the forward difference. Calculate the interpolation value.

86
Work Book on Numerical Methods

4.1.2. Newton’s backward difference formula:


We are given (𝑛 + 1) ordered pairs (𝑥𝑖 , 𝑦𝑖 ) 𝑖 = 0,1, … … … 𝑛. We want to find the
derivative of 𝑦 = 𝑓(𝑥) passing through the (𝑛 + 1) points, at a point nearer to the
ending value 𝑥 = 𝑥𝑛 .

𝑑𝑦 1 2𝑣+1 3𝑣 2 +6𝑣+2 4𝑣 3 +18𝑣 2 +22𝑣+6


= [∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇4 𝑦𝑛 +..]
𝑑𝑥 ℎ 2 6 24

𝑑2𝑦 1 2 3
6𝑣 2 + 18𝑣 + 11 4
= [∇ 𝑦𝑛 + (𝑣 + 1)∇ 𝑦𝑛 + ∇ 𝑦𝑛 + ⋯ ]
𝑑𝑥 2 ℎ2 12

𝑑3𝑦 1 3 12𝑣 + 18 4
= [∇ 𝑦𝑛 + ∇ 𝑦𝑛 + ⋯ ]
𝑑𝑥 3 ℎ3 12
𝑥−𝑥𝑛
𝑣= setting 𝑥 = 𝑥𝑛

When 𝑣 = 0, the above formulas become


𝑑𝑦 1 1 1 1
( )𝑣=0 = [∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇4 𝑦𝑛 +..]
𝑑𝑥 ℎ 2 3 4

𝑑2𝑦 1 11
( )
2 𝑣=0
= 2
[∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇4 𝑦𝑛 +..]
𝑑𝑥 ℎ 12

𝑑3𝑦 1 3
( 3 )𝑣=0 = 3 [∇3 𝑦𝑛 + ∇4 𝑦𝑛 + ⋯ ]
𝑑𝑥 ℎ 2

Algorithm:

Step 1: The data will be enter as specified in the question.

Step 2: Create the difference table.

Step 3: Compute the corresponding backward difference. Calculate the interpolation


value.

87
Work Book on Numerical Methods

Problems:
𝟏
1. Find the first two derivatives of 𝒙 at 𝒙 = 𝟓𝟎 & 𝒙 = 𝟓𝟔 given the table below
𝟑

𝒙 50 51 52 53 54 55 56

𝑭(𝒙) 3.684 3.7084 3.7325 3.7563 3.7798 3.803 3.8259


Solution:
Step 1: Given,

𝑥 50 51 52 53 54 55 56

𝑦 3.684 3.7084 3.7325 3.7563 3.7798 3.803 3.8259


Since 𝑥=50 is nearer to the beginning of the table & 𝑥 = 56 is nearer to the end of
the table. So, we will use both formulas.
Step 2:
Create the difference table

x y Δy ∆2 y ∆3 y
50 3.684
0.0244
51 3.7084 -0.0003
0.0241 0
52 3.7325 -0.0003
0.0238 0
53 3.7563 -0.0003
0.0235 0
54 3.7798 -0.0003
0.0232 0
55 3.803 -0.0003
0.0229
56 3.8259

88
Work Book on Numerical Methods

We want to find the value of 𝑓(𝑥) at 𝑥 = 50 and the value is nearer to the beginning
of the table. So, we use Newton's forward differentiation.

Step 3:

Newton's forward differentiation formula

𝑥−𝑥0 50−50
𝑢= = = 0, Where ℎ = 1
ℎ 1

𝑑𝑦 1 1 1 1
( )𝑢=0 = [∆𝑦0 − ∆2 𝑦0 + ∆3 𝑦0 − ∆4 𝑦0 + ⋯]
𝑑𝑥 ℎ 2 3 4

𝑑𝑦 1 1 1
( )𝑥=50 = [0.0244 − (−0.0003) + (0) = 0.02455
𝑑𝑥 1 2 3

𝑑2𝑦 1 11
( )𝑢=0 = [∆2 𝑦0 − ∆3 𝑦0 + ∆4 𝑦0 + . ..]
𝑑𝑥 2 ℎ2 12

𝑑2𝑦 1
( ) = [−0.0003 − 0] = −0.0003
𝑑𝑥 2 𝑥=50 1

Now, we want to find the value of 𝑓(𝑥) at 𝑥 = 56 and this value is nearer to the end
of the table. So, we can use Newton's backward differentiation.

Newton's backward differentiation formula:

Here, we follow Step 1 and Step 2 as mentioned in the forward difference.

Step 3:

We use Newton's backward differentiation formula

𝑥−𝑥𝑛 56−56
𝑣= = =0
ℎ 1

𝑑𝑦 1 1 1 1
( )𝑣=0 = [∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇4 𝑦𝑛 +. ..]
𝑑𝑥 ℎ 2 3 4

𝑑𝑦 1 1
( )𝑥=56 = [0.0229 + (−0.0003) + 0] = 0.02275
𝑑𝑥 1 2

𝑑2𝑦 1 11
( )
2 𝑣=0
= 2
[∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇4 𝑦𝑛 +. ..]
𝑑𝑥 ℎ 12

89
Work Book on Numerical Methods

𝑑2𝑦 1
( )𝑥=56 = [−0.0003 + 0] = −0.0003.
𝑑𝑥 2 1

2. The population of a certain town is given below find the rate of growth of the
population in 1931,1941,1961,1971

x 1931 1941 1951 1961 1971

F(x) 40.62 60.8 79.95 103.56 132.65

Solution:
Step 1: Given,
x 1931 1941 1951 1961 1971

y 40.62 60.8 79.95 103.56 132.65


Since 𝑥=1931 & 𝑥 = 1941 is nearer to the beginning of the table &
𝑥 = 1961 & 𝑥 = 1971 is nearer to the end of the table. So, we will use both formulas.
Step 2:
Create the difference table

X Y Δy ∆2 𝑦 ∆3 𝑦 ∆4 𝑦

1931 40.62

20.18

1941 60.8 -1.03

19.15 5.49

1951 79.95 4.46 -4.47

23.61 1.02

1961 103.56 5.48

29.09

1971 132.65

90
Work Book on Numerical Methods

i) We want to find the value of 𝑓(𝑥) at 𝑥 = 1931 and this value is nearer to the
beginning of the table. So, we use Newton's forward differentiation.

Step 3:

Newton's forward differentiation formula


𝑑𝑦 1 1 1 1
( )𝑢=0 = [∆𝑦0 − ∆2 𝑦0 + ∆3 𝑦0 − ∆4 𝑦0 +. ..]
𝑑𝑥 ℎ 2 3 4

𝑥−𝑥0 1931−1931
where, 𝑢 = = =0
ℎ 10

𝑑𝑦 1 1 1 1
( ) = [20.18 − ( ) (1.03) + ( ) (5.49) − ( ) (−4.47)]
𝑑𝑥 𝑥=1931 10 2 3 4
1
= [20.18 + 0.515 + 1.83 + 1.1175] = 2.36425
10

ii) We want to find the value of 𝑓(𝑥) at 𝑥 = 1941. We use Newton's forward
differentiation.

Step 4:

Newton's forward differentiation formula

𝑑𝑦 1 2𝑢−1 3𝑢2 −6𝑢+2 4𝑢3 −18𝑢2 +22𝑢−6


( )𝑢=1 = [∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ∆4 𝑦0 +. ..]
𝑑𝑥 ℎ 2 6 24

𝑥−𝑥0 1941−1931 10
where, 𝑢 = = = =1
ℎ 10 10

𝑑𝑦 1 1 1 1
( ) = [20.18 + ( ) (−1.03) − ( ) (5.49) + ( ) (−4.47)]
𝑑𝑥 𝑥 =1941 10 2 6 12
1
= [20.18 − 0.515 − 0.915 − 0.3725] = 1.83775
10

iii) We want to find the value of 𝑓(𝑥) at 𝑥 = 1961 and this value is nearer to the end
of the table. So, we use Newton's backward differentiation.

91
Work Book on Numerical Methods

Step 5:

We use Newton's backward differentiation formula


𝑥−𝑥𝑛 1971−1961 10
𝑣= = = =1
ℎ 10 10

𝑑𝑦 1 2𝑣+1 3𝑣 2 +6𝑣+2 4𝑣 3 +18𝑣 2 +22𝑣+6


( )𝑣=1 = [∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇4 𝑦𝑛 +. ..]
𝑑𝑥 ℎ 2 6 24

𝑑𝑦 1 1 1 1
( )𝑥 = 1961 = [29.09 − ( ) (5.48) − ( ) (1.02) − ( ) (−4.47)]
𝑑𝑥 10 2 6 12
1
= [29.09 − 2.74 − 0.17 + 0.3725] = 2.65525
10

iv) We want to find the value of 𝑓(𝑥) at 𝑥 = 1971 and this value is nearer to the end
of the table. So, we use Newton's backward differentiation.

Step 6:

Newton's backward differentiation formula


𝑥−𝑥𝑛 1971−1971 0
𝑣= = = =0
ℎ 10 10

𝑑𝑦 1 1 1 1
( )𝑣 =0 = [∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇4 𝑦𝑛 +. ..]
𝑑𝑥 ℎ 2 3 4

𝑑𝑦 1 1 1 1
(𝑑𝑥 ) = [29.09 + ( ) (5.48) + ( ) (1.02) + ( ) (−4.47)]
𝑥= 1971 10 2 3 4

𝑑𝑦 1
( ) = [31.0525]
𝑑𝑥 𝑥= 1971 10

𝑑𝑦
( ) = 3.10525.
𝑑𝑥 𝑥= 1971

92
Work Book on Numerical Methods

Exercise Problems
1) The table below gives the results of an observations. Find the approximate rate at
t=3.

t 1 3 5 7 9

F(t) 85.3 74.5 67.0 60.5 54.3

2) Evaluate the first and second derivative of the function tabulated below
at 𝑥 = 3.
X 3.0 3.2 3.4 3.6 3.8 4.0
f(x) -14 -10.032 -5.296 -0.256 6.672 14

3) Obtain the second derivative of y at x=0.96 from the data


X 0.96 0.98 1.00 1.02 1.04
Y 0.7825 0.7739 0.7651 0.7563 0.7473

4) Develop a strategy to estimate the first and second derivatives of the function
at x=0.4 based on the provided table.
x 0.4 0.5 0.6 0.7 0.8
y 1.5836 1.7974 2.0442 2.3275 2.6511

5) Utilize the provided velocity data to determine the acceleration of the body at
t=1.1.
t 1.0 1.1 1.2 1.3 1.4
v 43.1 47.7 52.1 56.4 60.8

6) Analyze the given function data to evaluate the first and second derivatives
at x = 0.8.
x 0.4 0.5 0.6 0.7 0.8
y 1.5836 1.7974 2.0442 2.3275 2.6511

93
Work Book on Numerical Methods

94
Work Book on Numerical Methods

95
Work Book on Numerical Methods

96
Work Book on Numerical Methods

97
Work Book on Numerical Methods

4.2. Numerical Integration:


Numerical integration is a method used to approximate the value of a definite integral
when it is difficult or impossible to solve exactly. Instead of finding the exact area
under a curve, it estimates the area using techniques like rectangles (e.g., trapezoidal
rule) or parabolas (e.g., Simpson’s rule)

4.2.1. Trapezoidal rule:


Let us consider the quadrature formula,
𝑥𝑛
𝑛2 1 𝑛3 𝑛2 2 1 𝑛4
∫ 𝑓 (𝑥)𝑑𝑥 = ℎ[𝑛𝑦0 + ∆𝑦0 + ( − ) ∆ 𝑦0 + ( − 𝑛3 + 𝑛2 ) ∆3 𝑦0 + ⋯]
𝑥0 2 2 3 2 6 4

The above equation called Newton-Cote’s quadrature formula is a general quadrature


formula. Giving various values for n, we get a number of special formulae.

By putting n=1 in the quadrature formula (i.e., there are only two paired values and
interpolating polynomial is linear).

Since 𝑥𝑛 = 𝑥0 + ℎ
𝑥0+ℎ 1
∫𝑥 𝑓(𝑥)𝑑𝑥 = ℎ [1. 𝑦0 + ∆𝑦0 ] , since other differences do not exist if 𝑛 = 1
0 2

1 ℎ
= ℎ [𝑦0 + (𝑦1 − 𝑦0 )] = (𝑦0 + 𝑦1 )
2 2

𝑥𝑛 0+𝑛ℎ 𝑥
∫𝑥 𝑓(𝑥) 𝑑𝑥 =∫𝑥 𝑓(𝑥) 𝑑𝑥
0 0

𝑥 𝑥 𝑥
= ∫𝑥 0+ℎ 𝑓(𝑥) 𝑑𝑥 + ∫𝑥 0+2ℎ
+ℎ
𝑓(𝑥) 𝑑𝑥 +...+ ∫
0+ℎ
𝑥 +(𝑛−1)𝑛
𝑓(𝑥) 𝑑𝑥
0 0 0

ℎ ℎ ℎ
= (𝑦0 +𝑦1 ) + (𝑦1 + 𝑦2 ) + ⋯ + (𝑦𝑛−1 + 𝑦𝑛 )
2 2 2

Formula:
𝑏

∴, ∫ 𝑓(𝑥) 𝑑𝑥 = [(𝑦0 + 𝑦𝑛 ) + 2(𝑦1 + 𝑦2 + ⋯ + 𝑦𝑛−1 )]
𝑎 2

98
Work Book on Numerical Methods

𝑏 ℎ
i.e.,∫𝑎 𝑓(𝑥)𝑑𝑥 = [(Sum of the first and the last ordinates)
2
+ 2 (Sum of the remaining ordinates)].
Note:
1
• The error of the trapezoidal rule in the 𝑖 𝑡ℎ interval = − ℎ3 𝑦 " 𝑖−1
12

• The error of the trapezoidal rule is of the order ℎ2 .

Algorithm:
Step 1: Form the table for given integration.
Step 2: Apply the Trapezoidal rule formula. Calculate the value of the given
integration.

Problems:
𝟑
1. Evaluate ∫−𝟑 𝒙𝟒 𝒅𝒙 by using Trapezoidal rule

Solution:
Step 1: Here 𝑦(𝑥) = 𝑥 4 . Interval length (𝑏 − 𝑎) = 6. So, we divide 6 equal
6
intervals with ℎ = = 1.We form below the table
6

x -3 -2 -1 0 1 2 3

y 81 16 1 0 1 16 81
Step 2:

Here 𝑎 = −3, 𝑏 = 3, ℎ = 1

Let us consider 𝑦0 = 81, 𝑦1 = 16, 𝑦2 = 1, 𝑦3 = 0, 𝑦4 = 1, 𝑦5 = 16, 𝑦6 = 81


Apply the Trapezoidal rule formula
𝑏 ℎ
∫𝑎 𝑓(𝑥)𝑑𝑥 = 2 [(𝑦0 + 𝑦6 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 )]

3 1
∫−3 𝑥 4 𝑑𝑥 = 2 [(81 + 81) + 2 (16 + 1 + 0 + 1 + 16)] = 115

∴, The solution by Trapezoidal Rule is 115.

99
Work Book on Numerical Methods

𝟏 𝒅𝒙
2. Evaluate ∫𝟎 using Trapezoidal rule with 𝒉 = 𝟎. 𝟐 hence obtain an
𝟏+𝒙𝟐

approximate value of 𝝅

Solution:
1
Step 1: Let 𝑦(𝑥) =
1+𝑥 2

Interval is (1 − 0) = 1.That is the value of y are calculated as points taking

ℎ = 0.2 and we form the table

x 0 0.2 0.4 0.6 0.8 1

y 1 0.96154 0.86207 0.73529 0.60976 0.5


Step 2:

Here, 𝑎 = 0, 𝑏 = 1

Given ℎ = 0.2

Let us consider 𝑦0 = 1, 𝑦1 = 0.96154, 𝑦2 = 0.86207, 𝑦3 = 0.73529,

𝑦4 = 0.60976, 𝑦5 = 0.5
Apply the Trapezoidal rule formula
𝑏

∫ 𝑓(𝑥) 𝑑𝑥 = [(𝑦0 + 𝑦5 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 )]
𝑎 2

1 𝑑𝑥 0.2
∫0 = [(1 + 0.5) + 2(0.96154 + 0.86207 + 0.73529 + 0.60976)]
1+𝑥 2 2

= (0.1) [1.5 + 6.33732] = 0.783732 ----------- (1)

By actual integration
1 𝑑𝑥 𝜋 𝜋
∫0 = [𝑡𝑎𝑛−1 x] 10 = 𝑡𝑎𝑛−1 (1) - 𝑡𝑎𝑛−1 (0) = − 0 =
1+𝑥 2 4 4

1 𝑑𝑥 𝜋
∫0 1+𝑥 2
=
4
-------------- (2)

100
Work Book on Numerical Methods

From equations (1) and (2), we have


𝜋
= 0.7853981634 , (𝑖. 𝑒) 𝜋 = 3.1415926536.
4

Simpson’s one third rule:


𝑏

∫ 𝑓(𝑥) 𝑑𝑥 = [(𝑦 + 𝑦𝑛 ) + 2 (𝑦2 + 𝑦4 + ⋯ ) + ⋯ + 4 (𝑦1 + 𝑦3 + ⋯ )]
𝑎 3 0


= [(sum of the first and last ordinates)
3

+ 2 (sum of remaining odd ordinates)


+ 4 (sum of even ordinates)]

Simpson’s three eight rule:

𝑏 3ℎ
𝑓(𝑥) 𝑑𝑥 = [(𝑦0 + 𝑦𝑛 ) + 3(𝑦1 + 𝑦2 + 𝑦3 + 𝑦5 + ⋯ + 𝑦𝑛−1 )
∫ 8
𝑎 +2(𝑦3 + 𝑦6 + 𝑦9 + ⋯ + 𝑦𝑛 )]

Note:

• In Simpson’s formula the total error in all the intervals is given by


−ℎ5
𝐸= (𝑦0 ′′′′ + 𝑦2 ′′′′ + ⋯ )
90
• The error in Simpson’s one -third rule is of the order ℎ4

Algorithm:

Step 1: Form the table for given integration.

Step 2: Apply the Simpson’s rule formula.

Step 3: Calculate the integration value.

101
Work Book on Numerical Methods

Problems:
3
1) Evaluate ∫−3 𝑥 4 𝑑𝑥 by using Simpson’s rule verify your results by actual
integration

Solution:
Step 1: Here 𝑦(𝑥) = 𝑥 4 . Interval length (𝑏 − 𝑎) = 6. So, we divide 6 equal intervals
6
with ℎ = = 1.We form below the table
6

x -3 -2 -1 0 1 2 3

y 81 16 1 0 1 16 81

Simpson’s one third rule:


Step 2:

Here 𝑎 = −3, 𝑏 = 3, ℎ = 1

Let us consider 𝑦0 = 81, 𝑦1 = 16, 𝑦2 = 1, 𝑦3 = 0, 𝑦4 = 1, 𝑦5 = 16, 𝑦6 = 81.


1
Apply the Simpson’s rule formula
3
𝑏

∫ 𝑓(𝑥)𝑑𝑥 = [(𝑦 + 𝑦𝑛 ) + 2(𝑦2 + 𝑦4 + ⋯ ) + ⋯ + 4 (𝑦1 + 𝑦3 + ⋯ )]
𝑎 3 0
3
1
∫ 𝑥 4 𝑑𝑥 = [(81 + 81) + 2 (1 + 1) + 4 (16 + 0 + 16)]
−3 3
3
∫ 𝑥 4 𝑑𝑥 = 98
−3
1
∴, The solution by Simpson's Rule is 98.
3

Simpson’s three eight rule


Step 1:
3
Apply the Simpson’s rule formula
8

102
Work Book on Numerical Methods

𝑏 3ℎ
𝑓(𝑥)𝑑𝑥 = [(𝑦0 + 𝑦𝑛 ) + 3(𝑦1 + 𝑦2 + 𝑦3 + 𝑦5 + ⋯ + 𝑦𝑛−1 )
∫ 8
𝑎 +2(𝑦3 + 𝑦6 + 𝑦9 + ⋯ + 𝑦4 )]
3
3(1)
∫ 𝑥 4 𝑑𝑥 = [(81 + 81) + 3 (16 + 1 + 1 + 16) + 2 (0)]
−3 8
3
∫ 𝑥 4 𝑑𝑥 = 99
−3
3
∴, The solution by Simpson's Rule is 99.
8

Exercise Problems:
6 𝑑𝑥
1) Evaluate I=∫0 using Trapezoidal rule & Simpson’s rule. Also check by
1+𝑥
actual integration.
5.2
2) Evaluate the integral I=∫4 log 𝑒 𝑥 dx using Trapezoidal & Simpson’s rule.
𝜋
3) By dividing the range into ten equal parts. Evaluate ∫0 sin 𝑥 𝑑𝑥 by Trapezoidal
and Simpson’s rule. Verify your answer with integration.
6 𝑑𝑥
4) Evaluate I=∫0 by (i) Trapezoidal rule (ii) Simpson’s rule
1+𝑥 2
2 𝑑𝑥
5) Evaluate ∫1 1+𝑥 2 taking h=0.2 using Trapezoidal rule.
2 𝑑𝑥
6) Compute the value of ∫1 using Simpson’s rule and Trapezoidal rule. Take
𝑥
h=0.25.
𝜋
7) Calculate ∫02 sin 𝑥 𝑑𝑥 by dividing the interval into ten equal parts, using
Trapezoidal rule and Simpson’s rule.
1 𝑑𝑥
8) Evaluate ∫0 by (i) Trapezoidal rule (ii) Simpson’s rule
1+𝑥
1 𝑥
9) Evaluate ∫0 𝑒 𝑑𝑥 taking ℎ = 0.05, using Trapezoidal rule.

103
Work Book on Numerical Methods

104
Work Book on Numerical Methods

105
Work Book on Numerical Methods

106
Work Book on Numerical Methods

107
Work Book on Numerical Methods

108
Work Book on Numerical Methods

109
Work Book on Numerical Methods

UNIT V

NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS


Taylor’s series - Euler’s method – Modified Euler’s method - Runge-Kutta methods (fourth order
Runge - Kutta method only).

5. NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS


A number of problems in science and technology can be formulated into differential equations.
The analytical methods of solving differential equations are applicable only to a limited class of
equations. Quite often differential equations appearing in physical problems do not belong to any of
these familiar types and one is obliged to resort to numerical methods. These methods are of even
greater importance when we realize that computing machines are now readily available which reduce
numerical work considerably.
Solution of a differential equation: The solution of an ordinary differential equation means
finding an explicit expression for y in terms of a finite number of elementary functions of x. Such a
solution of a differential equation is known as the closed or finite form of solution. In the absence of
such a solution, we have recourse to numerical methods of solution.
Let us consider the first order differential equation
𝐝𝐲
= 𝐟(𝐱, 𝐲), given the initial condition 𝐲(𝐱 𝟎 ) = 𝐲𝟎 (1)
𝐝𝐱

to study the various numerical methods of solving such equations. In most of these methods, we replace
the differential equation by a difference equation and then solve it. These methods yield solutions either
as a power series in x from which the values of y can be found by direct substitution, or a set of values
of x and y.
In this chapter we shall study the solution of equation (1) i.e., Initial value problems of first order
ordinary differential equations only using Single step methods.
Single step method:

A general single step method can be written as 𝑦𝑖+1 = 𝑦𝑖 + ℎ𝜙(𝑥𝑖 , 𝑦𝑖 , ℎ). i.e., the solution at
any point 𝑥𝑖+1 is obtained using at any pervious point 𝑥𝑖 only in single step method. The function
𝜙 is called the increment function. i.e., Single-step methods in numerical analysis, particularly
for solving differential equations, calculate the next value in a sequence using only the current
value.
Among the single step methods available we shall study only the following methods:
1. Taylor’s series method
2. Euler’s method
3. Modified Euler’s method
4. Runge - Kutta method.

110
Work Book on Numerical Methods

5.1. Taylor Series Method:

Aim: To find the numerical solution of equation (1).


𝑑𝑦
i.e., To solve 𝑑𝑥 = 𝑓(𝑥, 𝑦) with initial condition 𝑦(𝑥0 ) = 𝑦0 .
Let us take the points 𝑥 = 𝑥0 , 𝑥1 , 𝑥2 , … where 𝑥𝑖 − 𝑥𝑖−1 = ℎ,
i.e., 𝑥𝑖 = 𝑥0 + 𝑖ℎ, 𝑖 = 0,1,2, …
𝑑𝑦
Consider the first order equation 𝑑𝑥 = 𝑓(𝑥, 𝑦) (1)

𝑑2 𝑦 𝜕𝑓 𝜕𝑓 𝑑𝑦
Differentiating (1), we have 𝑑𝑥 2 = 𝜕𝑥 + 𝜕𝑦 𝑑𝑥 i.e., 𝑦 ′′ = 𝑓𝑥 + 𝑓𝑦 𝑓′ (2)

Differentiating this successively, we can get 𝑦 ′′′, 𝑦 𝑖𝑣 etc. Putting 𝑥 = 𝑥0 and 𝑦 = 0, the Values of
𝑦0,, 𝑦0′′ , 𝑦0′′′ can be obtained. Hence the Taylor’s series

(𝒙 − 𝒙𝟎 )𝟐 ′′ (𝒙 − 𝒙𝟎 )𝟑 ′′′
𝒚𝟏 = 𝒚𝟎 + (𝒙 − 𝒙𝟎 )𝒚′𝟎 + 𝒚𝟎 + 𝒚𝟎 + ⋯ (3)
𝟐! 𝟑!
gives the values of 𝑦 for every value of 𝑥 for which (3) converges.

On finding the value 𝑦1 for 𝑥 = 𝑥1 from (3), 𝑦 , 𝑦 etc. can be evaluated at 𝑥 = 𝑥1 by means of (1),
(2) etc. Then 𝑦 can be expanded about 𝑥 = 𝑥1 . In this way, the solution can be extended beyond the
range of convergence of series (3).
Alter: Equation (3) can be rewritten as

𝒉𝟐 ′′ 𝒉𝟑 ′′′
𝒚𝟏 = 𝒚𝟎 + 𝒉𝒚′𝟎 + 𝒚 + 𝒚 +⋯ (4)
𝟐! 𝟎 𝟑! 𝟎
where ℎ = 𝑥𝑖 − 𝑥𝑖−1 for 𝑖 = 1,2,3, … or 𝑥1 = 𝑥0 + ℎ

Note: This is a single step method and works well so long as the successive derivatives can be
calculated easily. If (𝑥, 𝑦) is somewhat complicated and the calculation of higher order derivatives
becomes tedious, then Taylor’s method cannot be used gainfully. This is the main drawback of this
method and therefore, has little application for computer programs. However, it is useful for finding
starting values for the application of powerful methods like Runge-Kutta, Milne and Adams-
Bashforth which will be described in the subsequent sections.
EXAMPLE 1.1
Solve y = x + y, 𝑦(0) = 1 by Taylor’s series method. Hence find the values of 𝑦 at x = 0.1 and
x = 0.2.
Solution:
Differentiating successively, we get
y = x + y y(0) = 1 [∵ y (0) = 1]

y = 1 + y y(0) = 2

111
Work Book on Numerical Methods

y = y y(0) = 2
y = y y(0) = 2, etc.
Taylor’s series is
(𝑥 − 𝑥0 )2 ′′ (𝑥 − 𝑥0 )3 ′′′
𝑦1 = 𝑦0 + (𝑥 − 𝑥0 )𝑦0′ + 𝑦0 + 𝑦0 + ⋯
2! 3!
Here 𝑥0 = 0, 𝑦0 = 1
𝑥2 𝑥3 𝑥4
∴ 𝑦 = 1 + 𝑥. 1 + . 2 + .2 + .4 + ⋯
2 3! 4!
(0.1)2 (0.1)3 (0.1)4
Thus 𝑦 (0.1) = 1 + 0.1 + .2 + .2 + .4+⋯
2 3! 4!

= 1.1103.
(𝑥 − 𝑥1 )2 ′′ (𝑥 − 𝑥1 )3 ′′′
𝑦2 = 𝑦1 + (𝑥 − 𝑥1 )𝑦1′ + 𝑦1 + 𝑦1 + ⋯
2! 3!
(−0.9103)2 (−0.9103)3
𝑦 (0.2) = 1.1103+(−0.9103)(1.3103) + (2.3103) + . (2.3103)
2! 3!

(−0.9103)4
+ . (2.3103) + ⋯
4!
= 0.9809.
EXAMPLE 1.2
Find by Taylor’s series method, the values of y at x = 0.1 and x = 0.2 to five places of
𝑑𝑦
decimals from 𝑑𝑥 = 𝑥2𝑦 – 1, 𝑦(0) = 1.
Solution:
Differentiating successively, we get
y = x2y – 1, (y)0 = – 1 [∵ y (0) = 1]

y = 2xy + x2y, (y)0 = 0

y = 2y + 4xy + x2y, (y)0 = 2

yiv = 6y + 6xy + x2y, (yiv)0 = – 6, etc.

Putting these values in the Taylor’s series, we have


𝑥2 𝑥3 𝑥4
𝑦 = 1 + 𝑥(−1) + (0) + (2) + (−6) + ⋯
2 3! 4!
𝑥3 𝑥4
= 1 − 𝑥 + 3! − 4! + ⋯
Hence, 𝑦(0.1) = 0.90033 and 𝑦(0.2) = 0.80227.

112
Work Book on Numerical Methods

Exercise Problems:
1. Using Taylor series method, find the value of 𝑦(1.1), 𝑦(1.2) correct to four decimal places
𝑑𝑦
given 𝑑𝑥 = 𝑥 + 𝑦, 𝑦(1) = 0.
2. Using Taylor series method, find the value of 𝑦(0.1) correct to four decimal places given
𝑑𝑦
= 𝑥 2 + 𝑦 2 and 𝑦(0) = 1.
𝑑𝑥
3. Using Taylor series method, find the value of 𝑦(0.2) and 𝑦(0.4) correct to four decimal
𝑑𝑦
places given 𝑑𝑥 = 1 − 2𝑥𝑦 and 𝑦(0) = 0.
4. Using Taylor series method, find the value of 𝑦 at 𝑥 = 0.1(0.1)0.4 correct to four decimal
𝑑𝑦
places given 𝑑𝑥 = 𝑥 2 − 𝑦, 𝑦(0) = 1.
5. By means of Taylor series method, find 𝑦 at 𝑥 = 0.1, 0.2 correct to three significant digits
𝑑𝑦
given 𝑑𝑥 − 2𝑦 = 3𝑒 𝑥 , 𝑦(0) = 0.

113
Work Book on Numerical Methods

114
Work Book on Numerical Methods

115
Work Book on Numerical Methods

116
Work Book on Numerical Methods

5.2. Euler’s Method and Modified Euler’s Method:

𝑑𝑦
AIM: To solve 𝑑𝑥 = 𝑓(𝑥, 𝑦) with initial condition 𝑦(𝑥0 ) = 𝑦0 .
Let us take the points 𝑥 = 𝑥0 , 𝑥1 , 𝑥2 , … where 𝑥𝑖 − 𝑥𝑖−1 = ℎ,
i.e., 𝑥𝑖 = 𝑥0 + 𝑖ℎ, 𝑖 = 0,1,2, …

Formulas:

𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥𝑛 , 𝑦𝑛 ); 𝑛 = 0,1,2, …

This formula is called Euler’s formula or Euler’s algorithm.

1 1
𝑦𝑛+1 = 𝑦𝑛 + ℎ . [𝑓 (𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ𝑓(𝑥𝑛 , 𝑦𝑛 ))] ; 𝑛 = 0,1,2, …
2 2

The above formula is known as modified Euler’s formula.

𝑀ℎ2
Note: The truncation error of Euler’s method is |𝑇𝑖 | ≤ , 1 ≤ 𝑖 ≤ 𝑛 and is of order ℎ2 .
2
Examples:
2.1.Given 𝑦 ′ = −𝑦 and 𝑦(0) = 1, determine the values of 𝑦 at 𝑥 = (0.01)(0.01)(0.04) by Euler
method.
Solution:
Given 𝑦 ′ = −𝑦 and 𝑦(0) = 1; 𝑓(𝑥, 𝑦) = −𝑦.
Here, 𝑥0 = 0, 𝑦0 = 1, 𝑥1 = 0.01, 𝑥2 = 0.02, 𝑥3 = 0.03, 𝑥4 = 0.04.
We have to find 𝑦1 , 𝑦2 , 𝑦3 , 𝑦4 . Take ℎ = 0.01.
By Euler algorithm,
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑦𝑛′ = 𝑦𝑛 + ℎ𝑓(𝑥𝑛 , 𝑦𝑛 )
𝑦1 = 𝑦0 + ℎ𝑓(𝑥0 , 𝑦0 )
= 1 + (0.01)(−1)
= 0.99.
𝑦2 = 𝑦1 + ℎ𝑓(𝑥1 , 𝑦1 )
= 0.99 + (0.01)(−0.99)
= 0.9801.
𝑦3 = 𝑦2 + ℎ𝑓(𝑥2 , 𝑦2 )
= 0.9801 + (0.01)(−0.9801)
= 0.9703.
𝑦4 = 𝑦3 + ℎ𝑓(𝑥3 , 𝑦3 )
= 0.9703 + (0.01)(−0.9703)
= 0.9606.
117
Work Book on Numerical Methods

2.2. Compute 𝑦 at 𝑥 = 0.25 by Modified Euler method given 𝑦 ′ = 2𝑥𝑦, 𝑦(0) = 1.


Solution:
Here, 𝑓(𝑥, 𝑦) = 2𝑥𝑦; 𝑥0 = 0, 𝑦0 = 1.
Take ℎ = 0.25, 𝑥1 = 0.25.
By Modified Euler method,
1 1
𝑦𝑛+1 = 𝑦𝑛 + ℎ [𝑓 (𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ𝑓(𝑥𝑛 , 𝑦𝑛 ))]
2 2
1 1
∴, 𝑦1 = 𝑦0 + ℎ [𝑓 (𝑥0 + ℎ, 𝑦0 + ℎ𝑓(𝑥0 , 𝑦0 ))]
2 2
and 𝑓(𝑥0 , 𝑦0 ) = 𝑓(0,1) = 2(0)(1) = 0.
𝑦1 = 1 + (0.25) . 𝑓(0.125, 1)
= 1 + (0.25). [2 × 0.125 × 1]
𝑦1 = 1.0625.
Therefore, the value of 𝑦(0.25) = 1.0645.

Exercise Problems:
1. Using Eulers Method, solve numerically the equation, y′ = x + y, y(0) = 1 for 𝑥 =
0.0(0.2)(1.0) and check your answer with the exact solution.
𝑑𝑦
2. Solve the equation 𝑑𝑥 = 1 − 𝑦, given 𝑦(0) = 0 using Modified Euler’s method and tabulate
the solutions at 𝑥 = 0.1, 0.2, and 0.3. Compare your solutions with exact solutions.
𝑑𝑦
3. Using Modified Euler method, find 𝑦(0.1), 𝑦(0.2) given 𝑑𝑥 = 𝑥 2 + 𝑦 2 , 𝑦(0) = 1.

118
Work Book on Numerical Methods

119
Work Book on Numerical Methods

120
Work Book on Numerical Methods

121
Work Book on Numerical Methods

5.3. Runge - Kutta 4th order Method:


𝑑𝑦
AIM: To solve 𝑑𝑥 = 𝑓(𝑥, 𝑦) with initial condition 𝑦(𝑥0 ) = 𝑦0 .

Formula:
𝑘1 = ℎ𝑓(𝑥, 𝑦)
1 1
𝑘2 = ℎ𝑓(𝑥 + ℎ, 𝑦 + 𝑘1 )
2 2
1 1
𝑘3 = ℎ𝑓(𝑥 + ℎ, 𝑦 + 𝑘2 )
2 2
𝑘4 = ℎ𝑓(𝑥 + ℎ, 𝑦 + 𝑘3 )
and
1
Δ𝑦 = (𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 )
6
𝑦(𝑥 + ℎ) = 𝑦(𝑥) + Δ𝑦

Note: The truncation error of 4𝑡ℎ order R-K method is of order 5. i.e., 𝑂(ℎ5 ).
Example: 4.1.
Apply the fourth order Runge-Kutta method to find 𝑦(0.2) given that 𝑦 ′ = 𝑥 + 𝑦, 𝑦(0) = 1.
Solution:
Since ℎ is not given in the question, we take ℎ = 0.1.
Given, 𝑦 ′ = 𝑥 + 𝑦 ; 𝑦(0) = 1. ∴ 𝑓(𝑥, 𝑦) = 𝑥 + 𝑦, 𝑥0 = 0, 𝑦0 = 1, 𝑥0 = 0.1, 𝑥1 = 0.2.
By Fourth order Runge-Kutta method, for the interval,
𝑘1 = ℎ𝑓(𝑥0 , 𝑦0 ) = 0.1(𝑥0 + 𝑦0 )
= 0.1(0 + 1) = 0.1.
1 1
𝑘2 = ℎ𝑓(𝑥0 + ℎ, 𝑦0 + 𝑘1 )
2 2
= 0.1 × 𝑓(0.05, 1.05)
= 0.1 × (0.05 + 1.05) = 0.11.
1 1
𝑘3 = ℎ𝑓(𝑥0 + ℎ, 𝑦0 + 𝑘2 )
2 2
= 0.1 × 𝑓(0.05, 1.055)
= 0.1 × (0.05 + 1.055) = 0.1105.

122
Work Book on Numerical Methods

𝑘4 = ℎ𝑓(𝑥0 + ℎ, 𝑦0 + 𝑘3 )
= 0.1 × 𝑓(0.1, 1.1105)
= 0.1 × (0.1 + 1.1105) = 0.12105.
1
Δ𝑦 = (𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 )
6
1
= 6 × (0.1 + 0.22 + 0.2210 + 0.12105)

= 0.1103.
𝑦1 = 𝑦(𝑥0 + ℎ) = 𝑦0 (𝑥) + Δ𝑦
= 1 + 0.1103 = 1.1103.
Now starting from (𝑥1 , 𝑦1 ) we get (𝑥2 , 𝑦2 ). Again apply Runge-Kutte method algorithm replacing
(𝑥0 , 𝑦0 ) by (𝑥1 , 𝑦1 ).
𝑘1 = ℎ𝑓(𝑥1 , 𝑦1 ) = 0.1(𝑥1 + 𝑦1 )
= 0.1(0.1 + 1.1103) = 0.1210.
1 1
𝑘2 = ℎ𝑓(𝑥1 + ℎ, 𝑦1 + 𝑘1 )
2 2
= 0.1 × 𝑓(0.15, 1.17085)
= 0.1 × (0.15 + 1.17085) = 0.13208.
1 1
𝑘3 = ℎ𝑓(𝑥1 + ℎ, 𝑦1 + 𝑘2 )
2 2
= 0.1 × 𝑓(0.15, 1.17638)
= 0.1 × (0.15 + 1.17638) = 0.13263.
𝑘4 = ℎ𝑓(𝑥1 + ℎ, 𝑦1 + 𝑘3 )
= 0.1 × 𝑓(0.2, 1.24298)
= 0.1 × (0.2 + 1.24298) = 0.14429.
1
Δ𝑦 = (𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 )
6
1
= 6 × (0.1210 + 0.13208 + 0.13263 + 0.14429)

= 0.79478.
𝑦2 = 𝑦(𝑥1 + ℎ) = 𝑦1 (𝑥) + Δ𝑦
= 1.2428.

123
Work Book on Numerical Methods

Exercise Problems:
1. Obtain the values of 𝑦 at 𝑥 = 0.1, 0.2 using R-K method of fourth order for the differential
equation 𝑦 ′ = −𝑦 given 𝑦(0) = 1.
2. Using R-K method of fourth order, find 𝑦(0.8) correct to 4 decimal places if 𝑦 ′ = 𝑦 −
𝑥 2 , 𝑦(0.6) = 1.7379.
𝑑𝑦
3. Compute 𝑦(0.3) given 𝑑𝑥 + 𝑦 + 𝑥𝑦 2 = 0, 𝑦(0) = 1 by taking ℎ = 0.1 using R-K method of
fourth order.
𝑑𝑦 𝑦 2 −𝑥 2
4. Using R-K method of fourth order, solve 𝑑𝑥 = 𝑦 2+𝑥 2 given 𝑦(0) = 1 at 𝑥 = 0.2, 0.4.

124
Work Book on Numerical Methods

125
Work Book on Numerical Methods

126
Work Book on Numerical Methods

127
Work Book on Numerical Methods

128
Work Book on Numerical Methods

Some important formulas:


1. Derivative formula:
If 𝑦 = 𝑥 𝑛 then the derivative of 𝑦 with respect to 𝑥 is
𝒅𝒚
= 𝒏𝒙𝒏−𝟏 .
𝒅𝒙

2. Integration formula:
If 𝑦 = 𝑥 𝑛 then the integration of 𝑦 with respect to 𝑥 over the interval [𝑎, 𝑏] is
𝒃 𝒙𝒏+𝟏
∫𝒂 𝒙𝒏 𝒅𝒙 = 𝒏+𝟏
.

3. Trigonometric Table:
𝜽 𝟎𝒐 𝟑𝟎𝒐 𝟒𝟓𝒐 𝟔𝟎𝒐 𝟗𝟎𝒐
𝒔𝒊𝒏 𝟎 𝟏 𝟏 √𝟑 𝟏
𝟐 √𝟐 𝟐
𝒄𝒐𝒔 𝟏 √𝟑 𝟏 𝟏 𝟎
𝟐 √𝟐 𝟐
𝒕𝒂𝒏 𝟎 𝟏 𝟏 √𝟑 ∞
√𝟑

129
Differentiation Formulas Integration Formulas

Z
d
k=0 (1) dx = x + C (1)
dx
d
[f (x) ± g(x)] = f 0 (x) ± g 0 (x) xn+1
Z
(2)
dx xn dx = +C (2)
n+1
d
[k · f (x)] = k · f 0 (x) (3) Z
dx
dx = ln |x| + C (3)
d x
[f (x)g(x)] = f (x)g 0 (x) + g(x)f 0 (x) (4)
dx Z

d f (x)

g(x)f 0 (x) − f (x)g 0 (x) ex dx = ex + C (4)
= 2 (5)
dx g(x) [g(x)] Z
1 x
d ax dx = a +C (5)
f (g(x)) = f 0 (g(x)) · g 0 (x) (6) ln a
dx Z
d n ln x dx = x ln x − x + C (6)
x = nxn−1 (7)
dx
d
Z
sin x = cos x (8) sin x dx = − cos x + C (7)
dx
d Z
cos x = − sin x (9)
dx cos x dx = sin x + C (8)
d
tan x = sec2 x (10) Z
dx tan x dx = − ln | cos x| + C (9)
d
cot x = − csc2 x (11)
dx Z
d cot x dx = ln | sin x| + C (10)
sec x = sec x tan x (12)
dx Z
d sec x dx = ln | sec x + tan x| + C (11)
csc x = − csc x cot x (13)
dx
d x
Z
e = ex (14) csc x dx = − ln | csc x + cot x| + C (12)
dx
d x
a = ax ln a
Z
(15)
dx sec2 x dx = tan x + C (13)
d 1
ln |x| = (16) Z
dx x csc2 x dx = − cot x + C (14)
d 1
sin−1 x = √ (17)
dx 1 − x2 Z
sec x tan x dx = sec x + C (15)
d −1
cos−1 x = √ (18)
dx 1 − x2 Z
d 1 csc x cot x dx = − csc x + C (16)
tan−1 x = 2 (19)
dx x +1 Z
dx x
d −1 √ = sin−1 + C (17)
cot−1 x = 2 (20) a2 − x2 a
dx x +1
Z
d 1 dx 1 x
sec−1 x = √ (21) = tan−1 + C (18)
dx |x| x2 − 1 a2 + x2 a a
d −1 Z
dx 1 |x|
csc−1 x = √ (22) √ = sec−1 +C (19)
dx |x| x2 − 1 2
x x −a2 a a
Work Book on Numerical Methods

POSSIBLE QUESTIONS
PART-A (2 Mark questions)

Unit I

1. State Bisection method.


2. Write the sufficient condition for the convergence in bisection method?
3. Define order of convergence of iteration method
4. Write the order of convergence of iteration method.
5. Find the range of root of x − cosx = 0
6. Write the formula of the bisection method
7. Define Newton’s method.
8. Write the formula of the Newton Raphson method.
9. Define the condition for the convergence of iteration method.
10. Define criterion for the convergence in Newton Raphson method.
11. Define generalized Newton’s method.
12. Define geometrical meaning of Newton’s method
13. Define the method of false position.
14. Write the formula of the Regula falsi method.
15. Define iteration method.
16. Find the range of root of x 3 − x − 1 = 0
17. Define Bolzano’s method.
18. Define Regula falsi method.
19. Write the order of convergence of Newton’s method.
20. Define interval having method

Unit II
1. What is the major difference between direct and iterative methods?
2. Find Gauss Jacobi iterative formula to solve the system of equations a1 x + b1 y + c1 z = d1,
a2 x + b2 y + c2 z = d2, a3 x + b3 y + c3 z = d3 .
3. Compare Gauss elimination and Gauss-Jordan methods in solving the system of linear equations.
4. Explain the steps involved in determining whether the following system of equations satisfy the
condition of convergence. 2x – 3y + 10z = 3; −x + 4y + 2z = 20;
5x + 2y + z = −12
5. Name the two types of methods involved in solving simultaneous linear algebraic equations
6. List the conditions required for convergence of iterative methods when solving a system of
simultaneous linear equations with three variables.
7. Which method uses the process of back substitution in solving simultaneous linear algebraic
equations?
8. What is the sufficient condition for the convergence of Gauss-Seidel method?
9. Explain the principle behind the Gauss-Jordan method for solving linear systems of equations.
130
Work Book on Numerical Methods

10. Is the following statement, correct? if not list the reasons: The convergence in the Gauss – Seidel
method is slow as Gauss Jacobi’s method.
11. Write augmented matrix for the system of n linear equations with n unknowns
12. Define iterative method
13. Difference between Jacobi and Jordan method.
14. Write the difference between the direct method and iterative method.
15. Give one difference between Gauss-Seidel method and Gauss Jacobi method.
16. Write a sufficient condition for Gauss Seidel method to converge?
17. What do you mean by diagonally dominant?
18. Write the procedure involved in Gauss Jordan elimination method.
19. Using gauss elimination method to solve 5x+4y=15,3x+7y=12.
20. Compare the Direct and Indirect (Iterative) Method?

Unit III

1. Explain the conditions under which Newton’s backward interpolation formula is applied.
2. Identify and write the inverse of Lagrange’s interpolation formula.
3. Recall and Write the Newton’s backward interpolation formula at x = xn .
4. What is the inverse interpolation?
5. When is Newton’s forward interpolation formula used?
6. Recall the Lagrange’s interpolation formula.
7. What do you mean by interpolation?
8. Identify the following statement is true or not, if not give reason: Newton’s interpolation
formulae are suited to estimate the value of a function near the middle of a table.
9. What is extrapolation?
10. Recall and write the Newton’s forward interpolation formula at x = x0 .
11. Define the smoothing function.
12. Define method of proportional parts.
13. Write down the uses of backward interpolation formulae.
14. Write down the formula for first divided difference of f(x).
15. Define Inverse Lagrange’s interpolation.
16. Given sin 45° = 0.7071, sin 50° = 0.7660, sin 55° = 0.8192, sin 60° = 0.8660, find sin 52° using
Newton’s forward formula.
17. Given u1 = 40, u3 = 45, u5 = 54, find u2 and u4.
18. Using Newton ’s forward formula, fin d the value of f(1.6), if
x 1 1.4 1.8 2.2
f(x) 3.49 4.82 5.96 6.5
19. From the following table:
x 0.1 0.2 0.3 0.4 0.5 0.6
f(x) 2.68 3.04 3.38 3.68 3.96 4.21
20. Find f (22) from the following data using Newton’s backward formulae.
x 20 25 30 35 40 45
f(x) 354 332 291 260 231 204
131
Work Book on Numerical Methods

Unit IV

1. Recall the formula for the second order derivatives at the end values x = xn using Newton’s
backward difference formula up to the fourth order difference term
2. What is the formula for Trapezoidal rule in numerical integration?
3. Using Newton’s forward difference formula, recall the formula for the second order derivatives at
the end values x = x0 up to the fourth order difference term.
4. How the accuracy can be increased in trapezoidal rule of evaluating a given definite integral?
5. Using Newton’s forward difference formula, illustrate the formulae for the first order derivatives
at the end values x = x0 up to the fourth order difference term
6. In Numerical integration, what should be the number of intervals to apply Simpson’s one-
third rule and Simpson’s three-eight rule.
7. Recall and write Newton’s formula to find f′′(x) at the point x = xn , using backward difference.
8. Explain Simpson’s one-third rule.
9. Identify and write the Newton’s formula to find f′(x) at the point x = xn , using backward
difference.
10. What is the order of error in Trapezoidal and Simpson’s rule?
11. Write the formulae for Newton forward difference formula for derivatives.
12. Write the formula for Newton backward difference formula for derivatives.
13. Write the Simpson’s 3/8th rule formula.
14. Write Trapezoidal rule formula.
15. Write the Simpson’s 1/8th rule formula.
16. Uses of Numerical differentiation
17. Newton- Gregory’s Backward Interpolation Formula.
18. Rom the following table Find the value of x for which y is
maximum and find this value of y.
X 1.2 1.3 1.4 15 1.6
F(x) 0.9320 0.9636 0.9855 0.9975 0.9996
19. Derivatives using Newton’s Backward Difference Formula
20. Given the following data find f (6)
0 2 3 4 7 9
4 26 58 112 466 922

Unit V

1. State Taylor’s series formula to solve a differential equation.


2. Compare Taylor’s series and R.K method.
3. List the steps involved in using Euler’s formula to solve a differential equation.
4. Which is better Taylor’s method or Runge-Kutta method? Give reason.
5. Using Euler’s method find y(0.2), from y ′ = x + y, y (0) = 1, h = 0.2.
6. What is the Error in modified Euler’s method?
7. List the merits and demerits of the Taylor method of solution?

132
Work Book on Numerical Methods

8. Explain the Modified Euler algorithm to solve y ′ = f(x, y), y(x0 ) = y0 at x = x0 + h


9. List the disadvantage of Taylor series methods.
10. Write down the Runge-Kutta formula of fourth order to solve y ′ = f(x, y), y(x0 ) = y0 at
x = x0 + h .
11. Apply Euler’s method to find y (0.4) given y ′ = xy, y(0) = 1.
12. Apply the fourth order Runge – Kutta method to find y(0.2) given that y ′ = x + y, y(0) = 1, h =
0.2.
dy
13. Evaluate the solution of the differential equation = y 2 + 1 by taking four terms of its
dx
Maclaurin series for x = 0.2 given y(0) =0.
14. Determine y at x = 0.25 by applying modified Euler method given y ′ = 2xy, y(0) = 1.
15. Applying Taylor series expansion, determine y at x = 0.1 correct to three significant digits given
dy
− 2y = 3ex , y(0) = 0.
dx
dy y2 −x2
16. Using Runge – Kutta of fourth order, solve dx = y2+x2, y(0) = 1 at x = 0.2, h = 0.2.
17. Utilize the Taylor series method to determine the value of y at x = 0.1, given that
dy
= x 2 − y, y(0) = 1 (Correct to 4 decimal places).
dx
dy
18. Apply the modified Euler method to evaluate y(0.2) given = log(x + y) , y(0) = 1, h = 0.2.
dx
19. Solve numerically y ′ = y + ex , y(0) = 0 for x = 0.2 by Euler method.
20. Apply R.K method of fourth order, determine y(0.8) correct to 4 decimal places if y ′ = y −
x 2 , y(0.6) = 1.7379, h = 0.2.

133
Reg. No... 8. Gauss - Seidal method is method.
a. direct b. iterative c. interpolation d. difference
[20CAU103/20CSU103/201TU103/20CTU103]
KARPAGAM ACADEMY OF HIGHER EDUCATION 9. Backward difference operator is denoted by the symbol
a. A b. V c. E d. I|
(Deemed to be University)
(Established Under Section 3 of UGC Act, 1956)
Pollachi Main Road, Eachanari Post, Coimbatore -641 021 10. The difference value Vy- Vyo in a Newton backward difference table is denoted
(For the candidates admitted from 2020 onwards) by- d. V y1
a.V yo b. v'y c. V yo
BCA & B.Sc., DEGREE EXAMINATION, NOV/DEC2021
First Semester
11.The process of computingthe value of afunction outside the range is called
COMPUTER APPLICATIONS/COMPUTER SCIENCEIINFORMATION a. interpolation b. extrapolation c. triangularisation d. integration
TECHNOLOGY/COMPUTER TECHNOLOGY
12. - formula can be uscd for unequal intervals.
NUMERICAL METHODS a. Newton's forward b. Newton's backward c. Lagrange d. Stirling
Time: 3hours Maximum :60 marks
13. The Newton Cote's formula is also known as formula.
PART-A (20 x 1 = 20 Marks) a. Simpson's 1/3 b. Simpson's 3/8 c. Trapezoidal d. Quadrature
Answer ALL the Questions
14. By putting n = 3 in Newton cote's formula we get rule.
1. Newton-Raphson method is convergent in a. Simpson's 1/3 b. Simpson's 3/8 c. Trapczoidal d. quadrature
a. Linearly b. Quadratically c. C'ubically d. Biquadratically
15. In Simpson's 1/3, the number of intervals must be
2. If fla) and f(b) are of opposite signs, a root of f(x) =0 lies between ----- a. zero b. odd C. even d. equal
a. 0& b b. a & b C. a & 0 d.0 & I
16. While evaluating the definite integral by Trapczoidal rule, the accuracy can be
3. The convergence of bisection method is increased by taking
a. linear b. quadratic C. slow d. fast a. large number of sub-intervals b. small number of sub-intervals
c. multiple of 3 of sub-intervals d. multiples of6 sub-intervals
4. In Iteration method if the convergence is ---then the convergence is of order one.
a. cubic b. quadratic c. linear d. zero 17. ----- is nothing but the modified Euler method.
a. Runge kutta method of second order b. Runge kutta method of third order
5. When Gauss Elimination method is used to solve AX B, A is transformed into c. Runge kutta method of fourth order d. Taylor series method
a. scalar matrix b. diagonal matrix
C. upper triangular matrix d. lower triangular matrix 18. The use of Runge-Kutta method gives solutions of the differential
cquation than Taylor's series method.
6. The augment matrix is the combination of a. Slow convergence b. quick convergence c. oscillation d. divergence
a. Coefficient matrix and constant matrix
b. Unknown matrix and constant matrix 19. In Runge kutta method the value x is taken as
c. Coefficient matrix and Unknown matrix a. x= xo +h b. x = XÍ -h C. X Xo + 2h d. x = Xo -3h
d. Coefficient matrix, constant matrix and Unknown matrix
7. The direct method fails if any one of the pivot elements become 20. In all the three methods of Runge Kutta methods, the values of ----- are same.
a. zero b. one c. two d. negative a. ks & ky b. ky & k c. k, & k d. k, kz k, & ke

2
PART -B (5 X 2= 10 Marks) 30. a. Solvey'= -y &y(0) = 1determine the values of yat x(0.01X0.01Y004%
Answer ALL the Questions Euler method.
Or

21. Mention the two methods to solve the equation which is either algebraic or b. Apply fourth order Runge-Kutta method to find y(0.2) given that
transcendental. y'=x+ y, y(0) = 1.
22. Give two indirect methods to solve a system of linear equations.
23. Define interpolation.
24. What is the order of error in Trapezoidal rule and Simpson's rule?
25. Define Modified Euler method.
PART - C(5X6= 30Marks)
Answer ALL the Questions

26. a. Find an approximate root of x log 1oX =1.2by Faise position method.
Or
b. Find the real root of the equation cos x= 3X 1correct to 4 decimal places by
iteration method.

27. a. Solve the following system by Gauss Jordan method


10x +y + z = 12
x + 10y +z = 12
x +y+ 10z = 12
Or
hat
. Ja
b. Solve the following system of equations by Gauss Seidal method.
2x + 3y + z =-1 hicl
5x +y t z =9
3x +2y t4z =1
jav
hoos
28. a. Find the polynomial of least degree passing the points
(0, -1). (1, ), (2, 1), (3, -2).
Or abel 1
b. Find the values of y at X-21 and X-28 from the following data. Brea
X: 20 23 26 29
|Y: 0.34200.39070.43840.4848 hich
Priv
29. a Findthe first two derivatives of (x)" at x=50 and x=56 given
the table below. abel tt
X: 50 52 53 54 55 56
overl
Y-((x)5)3.6840 3.7084| 3.70863.7563 77983.80303.8259
Or lentify
String
b. Evaluate dx /(1+x') using Trapezoidal rule with h =0.2. Hence obtain the
lecall th
approximate value of . class

3
28. a. Find the first term of the series whose second and subsequent terms are
Reg. No.... 8,3,0,-1,0...,
Or
|20MMU401] b. Find y% if yo 9, y=18, y-22,y,-24 given that the third differences are
constants.
KARPAGAM ACADEMY OF HIGHER EDUCATION
(Deemed to be University)
(Established Under Section 3 ofUGC Act, 1956) 29. a. Derive Newton's Backward interpolation formula.
Or
(Aceredited with A+ Grade by NAAC in the Second Cycle)
Pollachi Main Road, Eachanari Post, Coimbatore - 641 021 b. Apply Gauss's forward central difference formula and estimate f(32) from the
(For the candidates admitted from 2020 onwards) following table.
X 25 30 35 40
B.Sc., DEGREE EXAMINATION, APRIL 2022 f() 0.2707 0.3027 0.3386 0.3794
Fourth Semester
MATHEMATICS 30. a. Derive Newton's divided difference formula.
Or

Time:3 Hours
NUMERICAL METHODS
Maximum : 60 Marks
b. Using Lagrange'sinterpolation formula, find y(10) from the following table.
5 6 11
12 13 14 16
PART -A(20 x 1= 20 Marks) (30 Minutes)
(Question Nos. 1to 20 Online Examinations)
PART B (5 x 2 = 10 Marks) (2 ½ Hours)

LieRARY
Answer ALL the Questions

21. Write the formula for method of false position.


22. Solve the system of equations by Gauss eliminatiom method
x+2y+z = 3; 2x+3y+3z = 10; 3x-y +2z = 13 SATORF-641
2
23. Derive the relation between A and E.
24. Write Newton's Forward formula.
25. Derive relation between divided differences and forward differences.
COMRATO
PART C (5 x6=30 Marks)
Answer ALL the Questions

26. a. Find the positive root of x'-x=lcorrect to four decimal places by bisection
Method.
Or
b. Solve for x from cosx-xe = 0by iteration method.

21.a. By method of triangularization, solve the following system


Sx-2y +z =4, 7xty-Sz = 8, 3x+7y+4z = 10
Or
b. Solve the following by Gauss Jacobi method
10x-5y-2z =3, 4x-10Oy+3z = -3, xtóy+ 10z = -3
2
Reg. No...
28. a. Find the two derivative of x at r50 and -56from the given data.
[22CGUZ03| X 50 S1 52 53 54 5ss5 56
KARPAGAM ACADEMY OF HIGHER EDUCATION Y 3.68403.7084 3.73253.75633.7798|3.8030|3.8259
(Deemed to be University) Or
(Established Under Section 3 ofUGC Act, 1956) b. The following table gives the value of density of saturated water for
(Accredited with A+ Grade by NAAC in the Second Cycle)
Pollachi Main Road, Eachanari Post, Coimbatore -641 021 Temperature °C 100 150 200 250 300
(For the candidates admitted from 2022 onwards) 958 917SS 865 799 712
Density
B.Sc., DEGREE EXAMINATION, MAY 2023
Second Semester various temperatures of saturated stcam. Find by interpolation, the density
when the temperature is 275°C.
COMPUTER SCIENCE (COGNITIVE SYSTEMS)
NUMERICAL METHODS 29. a. Evaluate I = o 1+*2 drby using i. Trapezoidal rule i. Simpson's rule
and verify the answer with original integration.
Time:3 Hours Maximum:60 Marks Or

PART -A(20 x1=20Marks) (30Minutes) b. Using Lagrange's method find logs, 656 given that log,o 654 = 2.8156
log1, 65 8 = 2.8182, log,, 659 = 2.8189 and log,o 661 2.8202
(Ouestion Nos. 1to 20 Online Examinations)
PART B (5 x 2 = 10 Marks) (2 %Hours) 30. a. Given y" + xy'+y= 0, y(0) = 0,y'(0) = 1find the value of y(0.1)
by RK method fourth order.
Answer ALL the Questions Or
b. Obtain by Taylor series method, given that
21. What do you mean by the order of convergence of an iterative method for
Finding the root of the equation f(x)=0?
y'+y +1,y(0) =1 forx=0.1 amd 0.2 correct to four decimals.
22. Write the two differences between Gauss seidal and Gauss Jacobi method.
23. State Lagranges interpolation formula for unequal intervals.
24. State Simpson's one third rule.
25. Find y (0.1) if =1+).y(0) = 1using Taylor series method.
de

PART C (5 x6= 30 Marks)


Answer ALL the Questions
26. a. Find an iterative formula to find the reciprocal of a given number N and
hence find the value of
Or
b. Find the positive roots of the equation cos x- 3x+1=0by using
iteration method.

27. a. Apply Gauss-Jordan method to find the solution of the following system
10x+ y +z = 12, 2x + 10y + z = 13 and x + y + 5z = 7.
Or
b. Solve by Gauss seidal method, the following system
28x + 4y -z= 32,x + 3y + 10z = 24,2x + 17y +4z =35.
2
Reg. No.... 28. a. Find the values of y at x = 21 and x = 28 from the following data.
[23CAU102/23CSU102/23CGU102/23ADU102/23ITU102/23CTU102) |x 20 23 26 29

KARPAGAM ACADEMY OF HIGHER EDUCATION |y0.34200.39070.43840.4848


(Deemed to be University) Or
(Established Under Section 3 of UGC Act, 1956) b. Using Lagrange's interpolation formula, find y(10) from the following data.
(Accredited with A+ Grade by NAAC in the Second Cycle)
Pollachi Main Road, Eachanari Post, Coimbatore -641 021 |X56 9 11
(For the candidates admitted from 2023 onwards) Y 12 13 14 16

BCA & B.Sc., DEGREE EXAMINATION, NOVEMBER 2023 29. a. Find the first two derivatives of (a) at x 50 and x = 56 given the table
First Semester
below:
COMPUTER APPLICATIONS/ COMPUTER SCIENCE/ COMPUTER X 50 51 52 53 54 55 56
SCIENCE (COGNITIVE SCIENCE) COMPUTER SCIENCE (ARTIFICIAL y= () |3.6840|3.7084 |3.7325 |3.7563|3.7798|3.8030|3.8259
INTELLIGENCE AND DATA SCIENCEY INFORMATION TECHNOLOGYI
COMPUTER TECHNOLOGY Or

NUMERICAL METHODS b. Evaluate f,x'dz by using i.Trapezoidal rule i. Simpson's rule.


Time:3 Hours Maximum : 60Marks 30. a. Solve = + y,given y(1) = 0, and get y(1.1), y(1.2) by Taylors series
method. Compare your results with the explicit.
PART-A (20 x 1= 20 Marks) (30 Minutes) Or
(Question Nos. 1to 20 Online Examinations) b. Given y' = -y and y(0) = 1, determine the values of
y atx= (0.01)(0.01) (0.04)by Eulers method.
PART B (5 x 2 = 10 Marks) (2 % Hours)
Answer ALL the Questions
21. Define Bisection method.
22. Define Gauss Elimination Method.
23. Write Newton's forward interpolation formula.
24. State Trapezoidal rule.
25. Write the Euler's modified formula.

PART C(5x6=30 Marks)


Answer ALL the Questions

26. a. Findthe positive root of x-x=1correct to four decimal places by bisection


method.
Or
b. Solve for a positive root ofx -4x +1= 0 by Regular Falsi method.
27.a. Solve the system of equations by Gauss Elimination method
x+ Zy + z = 3;2x + 3y + 3z = 10,3x -y + 2z = 13.
Or
b. Solve the system of equations by Gauss Seidal method
10x -5y- 2z =3;4x - 10y + 3z = -3;x + 6y + 10z = -3.
1
2
Reg. No... 8. method is a self- correcting method. c. Iteration d. Elimination
a. Interpolation b. Approximation
|22CAU103/22CSU103/22ADU103/22ITU103/22CTU103] difference table is denoted
KARPAGAM ACADEMY OF HIGHER EDUCATION 9. The difference value y-y in a Newton's forward
(Deemed to be University) by c. A y1 d. V y;
(Established Under Section 3 of UGC Act, 1956) a. V yo b. A yo
(Accredited with A+ Grade by NAAC in the Second Cycle)
Pollachi Main Road, Eachanari Post, Coimbatore -641 021 10. formula can be used for interpolating the value of f(x) near the end of the
(For the candidates admitted from 2022 onwards) tabular values.
a. Newton's forward b. Newton's backward c.Newton's divided
BCA & B.Sc., DEGREE EXAMINATION, NOVEMBER 2024 d. Interpolation
First Semester
COMPUTER APPLICATIONS /COMPUTER sCIENCEI 11. To find the unknown value of xfor some y, which lies at the unequal intervals,
COMPUTER SCIENCE (ARTIFICIAL INTELLIGENCE AND DATA
we use formula.
a. forward b. backward c. Lagrange d. power
SCIENCEVINFORMATION TECHNOLOGY/ COMPUTER TECHNOLOGY
NUMERICAL METHODS 12. Gregory- Newton backward interpolation formula is mainly used for
interpolating the values of y near the of the set of tabular values.
b. end d. side
Time:3 Hours Maximum:60 Marks .beginning C. centre

PART -A (20 x 1 =20 Marks) 13. The (n+1" and higher differences of a polynomial of the"d.degree
three
are
Answer ALL the Questions a. zerO b. one C. two

methodis also called as Bolzano method or interval having method. 14. In Rungekutta method the value x is taken as
a. Bisection b. False position c. Euler d. Newton Raphson a. x= Xo +h b. x= Xo -h c. x=Xo + 2h d. x= X -3h

2. Iff(a) and f (b) are of opposite signs the actual root lies between 15. In Simpson's 1/3, the number of intervals must be
a. (0,a) b. (b,0) c. (a,b) d. (b,a) a. zero b. odd C. even d. equal
3 method converges faster than Regula-Falsi method. 16. While evaluating the definite integral by Trapezoidal rule, the accuracy can be
b. Bisection c. Power d. Secant
a. Newton Raphson increased by taking
a. large number of sub-intervals b. small number of sub-intervals
4. Iterative method is a method. c. multiple of 3 of sub-intervals d. multiples of 6 sub-intervals
a. direct method b. indirect method c. interpolation d. extrapolation
17. In Euler's Method averaged the
times as fast as in Jacobi' s
5. The convergence of Gauss -- Seidal method is a. points b. slopes C. curve d. circle
method.
b. 2 C. 3 d, 4
a. 1 18. In R- k method derivatives of order is required.
a first b. second c. third d. higher
6. The power method will work satisfactorily only if A has a Eigen value.
b. zero c. equal d. dominant
a. small
19. In Newton cote formula if f(x) is interpolate at equally spaced nodes by a
polynomial of degree four then it represents
7. Gauss Jordan method is method.
a. Trapezoidal rule b. Simpson's rule c. Midpoint rule d. Booles rule
a. direct b. indirect c. iteration d. interpolation

2
20. The multistep methods are
a. Simpson's rule b. Euler method 29. a. Obtain the second
c. Milne's method d. Boole's rule derivative of y at x-0.96 from the data
0.96 0.98 1.00 1.02
PART B (5 x 2 = 10 Marks) 1.04
Answer ALL the Questions 0.78250.77390.7651|0.7563 0.7473
Or
21. State the following statement is
true or false' and justify. The
Gauss-Seidel method is thrice as fast as in Jacobi's method. convergence in the
b. Evaluate 6 using Trapezoidal ule with
22. Define iterative method. approximate value of r. h=0.2. Hence obtain te
23. Write Gregory Newton backward
24. Write the formula for Newton interpolation formulae. 30. a. Using Adam's method for y (0.4)
backward
25. Define Euler method with formula. difference formula for derivatives. given _1
y(O=1, y(0.1)=1.01, y0.2-1.022, y(0.3)=1.023.
PART C(5x6=30Marks) b Apply Or
Answer ALL the Questions fourth order Runge-Kutta method to find y(0.2)
y'=+y,y(0) =1 given that
26. a. Using Newton's Method, find the root
to 5 decimal places.
between 0 and 1 of x=6x-4 correct
Or
b. Solve for the positive root of x'-2x-5-0 by method of
false position.
27. a. Solve the following system by Gauss Jordan method.
x+ 2y + =3
2x + 3y + 3z= 10
3x-y+ 2z= 13
Or
b. Solve the following system of equations by Gauss-Jacobi method
8x-3y+2z= 20
4x+1ly-z=33
6x+ 3y +12z =35
28. a. Find f() from the table below. Also find f(7),
X 1 2 3 4 6
f(x) 1 3 19 53 111 199 323
Or
b. Findthe values of y at X=21 and X-28 from the following data,
20 23 26 29
0.3420 0.3907 0.4384 0.4848

You might also like