0% found this document useful (0 votes)
130 views67 pages

Numerical Analysis Assignment Overview

The document is an assignment on Numerical Analysis for the Math-3209 course at Khulna University, detailing various topics including finite differences, interpolation methods, numerical integration, and solution of equations. It emphasizes the importance of numerical analysis in solving real-world problems and understanding computational algorithms. The assignment is submitted by a group of students and includes a comprehensive table of contents outlining the covered subjects.
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)
130 views67 pages

Numerical Analysis Assignment Overview

The document is an assignment on Numerical Analysis for the Math-3209 course at Khulna University, detailing various topics including finite differences, interpolation methods, numerical integration, and solution of equations. It emphasizes the importance of numerical analysis in solving real-world problems and understanding computational algorithms. The assignment is submitted by a group of students and includes a comprehensive table of contents outlining the covered subjects.
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

An Assignment on

“Numerical Analysis (Sec-A)”


Course: Math-3209
Course Title: Numerical Analysis

Submitted To: Submitted By:


Prof. Dr. Munnujahan Ara 201240 – Brotidev Biswas
211209 – Nafisa Amrin
Professor
211215 – Rashed Khan Menon
Mathematics Discipline
211218 – Pronab Bachar
Khulna University, Khulna
211223 – Md. Kashem Ali
211226 – Riaz Uddin
211229 – Miss Sajnin Binta Salam Efty
211237 – Md. Sajjad Hossain
211249 – Mst. Jannatul Nesa Mim
211250 – Md. Saiful Islam Fahad
Gr GROUP-04
3rd Year, 2nd Term
Mathematics Discipline
Khulna University, khulna

Submission Date: 30th October, 2024


1
CONTENTS
Importance of Styding Numerical Analysis………………………………………… 3
CALCULUS OF FINITE DIFFERENCES ………….………………………….… 4-11
The operators 𝐸, Δ 𝑎𝑛𝑑 ∇ …………………………………………….. 4-8
Difference Table ……………………………………………………... 9-11
INTERPOLATION WITH EQUAL INTERVAL …………………..…................. 12-22
Interpolation ………………………………………………………….. 12
Newton-Gregory formula for forward interpolatio……………………. 12-17
Newton-Gregory formula for backward interpolation ……………….. 17-22
INTERPOLATION WITH UNEQUAL INTERVAL …………………………...… 22-27
Newton’s formula for Unequal Intervals/Divided difference….............. 23-25
Lagrange’s interpolation formula …………………………….………. 25-27
CENTRAL DIFFERENCE INTERPOLATION ……………………………..……. 27-38
Difference Table ………………………………………….................... 27
Gauss’s forward interpolation formula ……………………………….. 27-29
Gauss’s Backward interpolation formula …………………………..…. 29-33
Stirling’s interpolation formula …………………………………….… 33-35
Bessel’s interpolation formula ……………………………………..…. 35-36
NUMERICAL INTEGRATION ………………………………………….................. 37
Trapezoidal rule for numerical integration ……………........................ 37-41
Simpson’s ‘1/3’ rule for numerical integration ……………………..… 41-44
Simpson’s ‘3/8’ rule for numerical integration ……………….…….… 44-48
Romberg Integration rule …………………………………………..…. 48-55
Weddle’S Rule…………………………………………………………. 55-59
SOLUTION OF EQUATIONS ……………………………………………………..… 59
Bisection Method ………………………………...…………………… 58-60
Newton – Raphson Method ………………………………………...…. 61-65

Method of False Position………………………………………… 65-66


VIVA QUESTION……………………………………………………………………. 67

2
What is Numerical Analysis?
Numerical analysis is the study of numerical methods that attempt at finding approximate
solutions of problems rather than the exact ones. Numerical analysis finds application in
all fields of engineering and the physical sciences, and in the 21st century also, the life and
social sciences, medicine, business and even the arts.

Importance of Studying Numerical Analysis

Studying Numerical Analysis is important for several key reasons:


1. Practical Problem Solving: Many real-world problems in engineering, physics, and
finance cannot be solved analytically. Numerical analysis provides the tools to find
approximate solutions.
2. Understanding Algorithms: It helps in developing and analyzing algorithms for
computation, enabling efficient processing of data and complex simulations.
3. Error Estimation and Control: Numerical analysis teaches how to assess and minimize
errors in computations, which is crucial for ensuring the accuracy and reliability of results.
4. Interdisciplinary Applications: The techniques learned in numerical analysis are
applicable across various fields, making it valuable for professionals in science,
technology, and mathematics.
5. Foundation for Advanced Studies: It serves as a prerequisite for more advanced topics
in mathematics, computer science, and engineering, enhancing overall analytical skills.
6. Optimizing Performance: By understanding numerical methods, you can optimize
performance in computations, which is essential for handling large datasets and complex
problems.
7. Real-Time Applications: Many modern technologies, such as simulations, machine
learning, and computer graphics, rely heavily on numerical methods, highlighting their
relevance in current and future innovations.
Overall, Numerical Analysis is essential for developing effective solutions and understanding the
computational aspects of various disciplines.

3
❖ Exact and Approximate numbers:
3
• 3,4,9,2,0.5 are exact numbers.

• π, √3,√2 are approximate numbers as they cannot be expressed exactly by finite digits.
• They can be written as 1.414, 3.1416, 1.7320 etc.

❖ Rounding off numbers:


• If 27.73 is rounded off to three decimal places, the result is 27.7
• If 9.2652 is rounded off to three decimal places, the result is 9.27

❖ Computation of errors:
Let, 𝑉𝑇 = True value
𝑉𝐴 = Approximate value of a number
The error, 𝐸 = 𝑉𝑇 − 𝑉𝐴
The absolute error is 𝐸𝐴 = |𝑉𝑇 − 𝑉𝐴 |
𝐸 |𝑉𝑇 −𝑉𝐴 |
The relative error is 𝐸𝑅 = 𝑉𝐴 =
𝑇 𝑉𝑇

|𝑉𝑇 −𝑉𝐴 |
The percentage error is 𝐸𝑃 = 𝐸𝑅 × 100% = × 100%
𝑉𝑇

❖ Operators:

• The Operator E: This is known usually as shifting or shift operator.


Let 𝑦 = 𝑓(𝑥) be any function of 𝑥. By operating E on 𝑓(𝑥) we mean to simply give
an increment to the value of 𝑥 in the function 𝑓(𝑥). If this increment be denoted by
ℎ, then the operation of E on 𝑓(𝑥) means that put 𝑥 + ℎ in the function 𝑓(𝑥)
wherever there is 𝑥
𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
Where 𝑦 = 𝑓(𝑥) be any function of 𝑥. Operating 𝐸 on 𝑥 simply indicate an increment value of 𝑥
in 𝑓(𝑥).
In terms of 𝑦, we can write as
𝐸𝑦𝑖 = 𝑦𝑖+1

4
❖ The operator ∆(forward difference):
The forward difference operator ∆(𝐷𝑒𝑙𝑡𝑎) is defined as:
∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
𝑜𝑟, ∆𝑦𝑛 = 𝑦𝑛+1 − 𝑦𝑛
𝑜𝑟, ∆𝑓(𝑥𝑖 ) = 𝑓(𝑥𝑖 + ℎ) − 𝑓(𝑥𝑖 )
𝑜𝑟, ∆𝑦𝑖 = 𝑦𝑖+1 − 𝑦𝑖 ; 𝑖 = 0,1,2,3, … , 𝑛
∆𝑦0 = 𝑦1 − 𝑦0
∆𝑦1 = 𝑦2 − 𝑦1
………………………
∆𝑦𝑛−1 = 𝑦𝑛 − 𝑦𝑛−1
This is called first order forward difference.

❖ The operator 𝛁(backward difference):


The forward difference operator ∇(𝑁𝑎𝑏𝑙𝑎) is defined as:
∇𝑓(𝑥) = 𝑓(𝑥) − 𝑓(𝑥 − ℎ)
𝑜𝑟, ∇𝑦𝑛 = 𝑦𝑛 − 𝑦𝑛−1
𝑜𝑟, ∇𝑓(𝑥𝑖 ) = 𝑓(𝑥𝑖 ) − 𝑓(𝑥𝑖 − ℎ)
𝑜𝑟, ∇𝑦𝑖 = 𝑦𝑖 − 𝑦𝑖−1 ; 𝑖 = 𝑛, 𝑛 − 1, … ,1
∇𝑦0 = 𝑦1 − 𝑦0
∆𝑦1 = 𝑦2 − 𝑦1
………………………
∆𝑦𝑛 = 𝑦𝑛 − 𝑦𝑛−1
This is called first order backward difference.
Suppose 𝑦 = 𝑓(𝑥) denotes a function which takes the value 𝑦0 , 𝑦1 , 𝑦2 , … , 𝑦𝑛 for the equidistant
value 𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 respectively of the independent variable 𝑥.

❖ Relations between the operators:


Question 01: Prove that: ∆. ∇≡ ∆ − ∇
Solution: We know from forward difference

5
∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
And backward difference
∇𝑓(𝑥) = 𝑓(𝑥) − 𝑓(𝑥 − ℎ)
Now,
∆. ∇f(x) = ∆[𝑓(𝑥) − 𝑓(𝑥 − ℎ)]
= ∆𝑓(𝑥) − ∆𝑓(𝑥 − ℎ)
= ∆𝑓(𝑥) − {𝑓(𝑥) − 𝑓(𝑥 − ℎ)}
= ∆𝑓(𝑥) − ∇𝑓(𝑥)
∴ ∆. ∇f(x) = ∆𝑓(𝑥) − ∇𝑓(𝑥)
𝑜𝑟, ∆. ∇f(x) = (∆ − ∇)𝑓(𝑥)
∴ ∆. ∇≡ ∆ − ∇ [𝒑𝒓𝒐𝒗𝒆𝒅]

Question 02: Show that: ∆≡ 𝐸 − 1


Solution: Here,
𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
∆𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥)
∴ ∆≡ 𝐸 − 1 [𝒔𝒉𝒐𝒘𝒆𝒅]

Question 03: Prove that: 𝐸∇≡ ∇𝐸 ≡ ∆


Solution: We have
(𝐸∇)𝑓(𝑥) = 𝐸{∇𝑓(𝑥)}
= 𝐸{𝑓(𝑥) − 𝑓(𝑥 − ℎ)}
= 𝐸𝑓(𝑥) − 𝐸𝑓(𝑥 − ℎ)
= 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
= ∆𝑓(𝑥) … … … … … (𝑖)
Also

6
(∇𝐸)𝑓(𝑥) = ∇{𝐸𝑓(𝑥)}
= ∇𝑓(𝑥 + ℎ)
= 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
= ∆𝑓(𝑥) … … … … … (𝑖𝑖)
From (𝑖) and (𝑖𝑖) we have
𝐸∇≡ ∇𝐸 ≡ ∆
[𝒑𝒓𝒐𝒗𝒆𝒅]

Question 04: Prove that: 𝐸 𝑛 = (1 + ∆)𝑛 = 1 + 𝑛𝐶1 ∆ + 𝑛𝐶2 ∆2 + ⋯ … ..

Solution: We know 𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ) ∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)


= ∆𝑓(𝑥) + 𝑓(𝑥) ⇒ 𝑓(𝑥 + ℎ) = ∆𝑓(𝑥) + 𝑓(𝑥)
⇒ 𝐸 = (1 + ∆) = (1 + ∆)1 = 1 + 𝑛𝐶1 ∆

Again, 𝐸 2 𝑓(𝑥) = 𝐸[𝐸𝑓(𝑥)] = 𝐸[𝑓(𝑥 + ℎ)] = 𝑓(𝑥 + 2ℎ) … … … … … … . (1)


From Forward Difference, we know, ∆𝑓(𝑥 + ℎ) = 𝑓(𝑥 + 2ℎ) − 𝑓(𝑥 + ℎ) … … … … … … . (2)
And ∆2 𝑓(𝑥) = ∆[∆𝑓(𝑥)] = ∆[𝑓(𝑥 + ℎ) − 𝑓(𝑥)]
= ∆𝑓(𝑥 + ℎ) − ∆𝑓(𝑥)
= 𝑓(𝑥 + 2ℎ) − 𝑓(𝑥 + ℎ) − [𝑓(𝑥 + ℎ) − 𝑓(𝑥)]
= 𝑓(𝑥 + 2ℎ) − 2𝑓(𝑥 + ℎ) + 𝑓(𝑥)
⇒ 𝑓(𝑥 + 2ℎ) = ∆2 𝑓(𝑥) + 2𝑓(𝑥 + ℎ) − 𝑓(𝑥)
= ∆2 𝑓(𝑥) + 2[∆𝑓(𝑥) + 𝑓(𝑥)] − 𝑓(𝑥)
= ∆2 𝑓(𝑥) + 2∆𝑓(𝑥) + 2𝑓(𝑥) − 𝑓(𝑥)
= ∆2 𝑓(𝑥) + 2∆𝑓(𝑥) + 𝑓(𝑥)
= (∆2 + 2 + 1)𝑓(𝑥)
= (∆ + 1)2 𝑓(𝑥)
Now put this value in equation (1),
𝐸 2 𝑓(𝑥) = (∆ + 1)2 𝑓(𝑥) ⇒ 𝐸 2 ≡ (∆ + 1)2
⇒𝐸 2 = 1 + 𝑛𝐶1 ∆ + 𝑛𝐶2 ∆2

Similarly, 𝐸 3 = (∆ + 1)3 = 1 + 𝑛𝐶1 ∆ + 𝑛𝐶2 ∆2 + 𝑛𝐶3 ∆3

7
… … … … … … … … … … ….
… … … … … … … … … … ….
∴ 𝐸 𝑛 = (1 + ∆)𝑛 = 1 + 𝑛𝐶1 ∆ + 𝑛𝐶2 ∆2 + ⋯ … . . 𝑛𝐶𝑛 ∆𝑛

[𝒑𝒓𝒐𝒗𝒆𝒅]

Question 05: Prove that: ∆k f(x) = ∑k0(1)i (k1)f{x − (k − i)h}

Solution:
Proof: From shifting operator, we know that,
𝐸 = 1 + ∆ 𝑎𝑛𝑑 𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
Or, ∆ = 𝐸 − 1
So, we get,
∆𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥 + ℎ) − 𝑓(𝑥)
Also, for ∆2 𝑓(𝑥) = ∆{∆𝑓(𝑥)}
= ∆{𝑓(𝑥 + ℎ) − 𝑓(𝑥)}
= ∆𝑓(𝑥 + ℎ) − ∆𝑓(𝑥)
= (𝐸 − 1)𝑓(𝑥 + ℎ) − (𝐸 − 1)𝑓(𝑥)
= 𝐸𝑓(𝑥 + ℎ) − 𝑓(𝑥 + ℎ) − 𝐸𝑓(𝑥) + 𝑓(𝑥)
= 𝑓(𝑥 + 2ℎ) − 𝑓(𝑥 + ℎ) − 𝑓(𝑥 + ℎ) + 𝑓(𝑥)
∆2 𝑓(𝑥) = 𝑓(𝑥 + 2ℎ) − 2𝑓(𝑥 + ℎ) + 𝑓(𝑥)
Similarly,
∆3 𝑓(𝑥) = (𝐸 − 1)3 𝑓(𝑥)
= (𝐸 3 − 3𝐸 2 + 3𝐸 − 1)𝑓(𝑥)
= 𝐸 3 𝑓(𝑥) − 3𝐸 2 𝑓(𝑥) + 3𝐸𝑓(𝑥) − 𝑓(𝑥)
= 𝑓(𝑥 + 3ℎ) − 3𝑓(𝑥 + 2ℎ) + 3𝑓(𝑥 + ℎ) − 𝑓(𝑥)
∆𝑘 𝑓(𝑥) = (𝐸 − 1)𝑘 𝑓(𝑥)

= [𝐸 𝑘 − 𝑘𝐶1 𝐸 𝑘−1 + 𝑘𝐶2 𝐸 𝑘−2 − 𝑘𝐶3 𝐸 𝑘−3 … … + (−1)𝑘 ]𝑓(𝑥)

8
= 𝐸 𝑘 𝑓(𝑥) − 𝑘𝐶1 𝐸 𝑘−1 𝑓(𝑥) + 𝑘𝐶2 𝐸 𝑘−2 𝑓(𝑥) − 𝑘𝐶3 𝐸 𝑘−3 𝑓(𝑥) … … + (−1)𝑘 𝑓(𝑥)

= 𝑓(𝑥 + 𝑘ℎ) − 𝑘𝐶1 𝑓{𝑥 + (𝑘 − 1)ℎ} + 𝑘𝐶2 𝑓{𝑥 + (𝑘 − 2)ℎ} … … + (−1)𝑘 𝑓(𝑥)

Which is k-th order difference of a function 𝑓(𝑥)


𝑘

∆ 𝑓(𝑥) = ∑(−1)𝑖 𝑘𝐶𝑖 𝑓{(𝑥 + (𝑘 − 𝑖)ℎ)


𝑘

𝑖=0

[Proved]

Difference Table:
❖ Forward difference: Let 𝑦 = 𝑓(𝑥) be any function of 𝑥. ℎ is the equal interval of 𝑥.
𝑥0 , 𝑥1 = (𝑥0 + ℎ), 𝑥2 = (𝑥0 + 2ℎ) … … are the values of 𝑥.
𝑦0 = 𝑓(𝑥0 ), 𝑦1 = 𝑓(𝑥0 + ℎ), 𝑦2 = 𝑓(𝑥0 + 2ℎ) … … are the corresponding values of 𝑦.
∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
∆𝑦𝑛 = 𝑦𝑛+1 − 𝑦𝑛
∆2 𝑦𝑛 = ∆𝑦𝑛+1 − ∆𝑦𝑛
……………………………
……………………………
❖ Horizontal forward difference table:
Argument Entry 1𝑠𝑡 differences 2𝑛𝑑 differences 3𝑟𝑑 differences 4𝑡ℎ differences
𝑥 𝑦 = 𝑓(𝑥) ∆𝑦 ∆2 𝑦 ∆3 𝑦 ∆4 𝑦
𝑥0 𝑦0 ∆𝑦0 = 𝑦1 − 𝑦0 ∆2 𝑦𝑜 ∆3 𝑦0 ∆4 𝑦0
= ∆𝑦1 − ∆𝑦0 = ∆2 𝑦1 − ∆2 𝑦𝑜 = ∆3 𝑦1 − ∆3 𝑦0
𝑥1 𝑦1 ∆𝑦1 = 𝑦2 − 𝑦1 ∆2 𝑦1 ∆3 𝑦1
(𝑥0 + ℎ) = ∆𝑦2 − ∆𝑦1 = ∆2 𝑦2 − ∆2 𝑦1
𝑥2 𝑦2 ∆𝑦2 = 𝑦3 − 𝑦2 ∆2 𝑦2
(𝑥0 + 2ℎ) = ∆𝑦3 − ∆𝑦2
𝑥3 𝑦3 ∆𝑦3 = 𝑦4 − 𝑦3
(𝑥0 + 3ℎ)
𝑥4 𝑦4
(𝑥0 + 4ℎ)

9
❖ Diagonal forward difference table:
Argument Entry 1𝑠𝑡 differences 2𝑛𝑑 differences 3𝑟𝑑 differences 4𝑡ℎ differences
𝑥 𝑦 = 𝑓(𝑥) ∆𝑦 ∆2 𝑦 ∆3 𝑦 ∆4 𝑦
𝑥0 𝑦0
∆𝑦0 = 𝑦1 − 𝑦0
𝑥1 𝑦1 ∆2 𝑦𝑜
(𝑥0 + ℎ) = ∆𝑦1 − ∆𝑦0 ∆3 𝑦0
∆𝑦1 = 𝑦2 − 𝑦1 = ∆2 𝑦1 − ∆2 𝑦𝑜
𝑥2 𝑦2 ∆2 𝑦1 ∆4 𝑦0
(𝑥0 + 2ℎ) = ∆𝑦2 − ∆𝑦1 ∆3 𝑦1 = ∆3 𝑦1 − ∆3 𝑦0
∆𝑦2 = 𝑦3 − 𝑦2 = ∆2 𝑦2 − ∆2 𝑦1
𝑥3 𝑦3 ∆2 𝑦2
(𝑥0 + 3ℎ) = ∆𝑦3 − ∆𝑦2
∆𝑦3 = 𝑦4 − 𝑦3
𝑥4 𝑦4
(𝑥0 + 4ℎ)

❖ Backward difference: Let 𝑦 = 𝑓(𝑥) be any function of 𝑥. ℎ is the equal interval of 𝑥.


𝑥0 , 𝑥1 = (𝑥0 + ℎ), 𝑥2 = (𝑥0 + 2ℎ) … … are the values of 𝑥.
𝑦0 = 𝑓(𝑥0 ), 𝑦1 = 𝑓(𝑥0 + ℎ), 𝑦2 = 𝑓(𝑥0 + 2ℎ) … … are the corresponding values of 𝑦.
∇𝑓(𝑥) = 𝑓(𝑥) − 𝑓(𝑥 − ℎ)
∇𝑦𝑛 = 𝑦𝑛 − 𝑦𝑛−1
∇2 𝑦𝑛 = ∆𝑦𝑛 − ∆𝑦𝑛−1
……………………………
……………………………

10
I. Horizontal backward difference table:
Argument Entry 1𝑠𝑡 differences 2𝑛𝑑 differences 3𝑟𝑑 differences 4𝑡ℎ differences
𝑥 𝑦 = 𝑓(𝑥) ∇𝑦 ∇2 𝑦 ∇3 𝑦 ∇4 𝑦
𝑥0 𝑦0

𝑥1 𝑦1 ∇𝑦1 = 𝑦1 − 𝑦0
(𝑥0 + ℎ)
𝑥2 𝑦2 ∇𝑦2 = 𝑦2 − 𝑦1 ∇2 𝑦2
(𝑥0 + 2ℎ) = ∇𝑦2 − ∆𝑦1
𝑥3 𝑦3 ∇𝑦3 = 𝑦3 − 𝑦2 ∇2 𝑦3 ∆3 𝑦3
(𝑥0 + 3ℎ) = ∇𝑦3 − ∆𝑦2 = ∆2 𝑦3 − ∆2 𝑦2
𝑥4 𝑦4 ∇𝑦4 = 𝑦4 − 𝑦3 ∇2 𝑦4 ∆3 𝑦4 ∆4 𝑦4
(𝑥0 + 4ℎ) = ∇𝑦4 − ∆𝑦3 = ∆2 𝑦4 − ∆2 𝑦3 = ∆3 𝑦4 − ∆3 𝑦3

II. Diagonal backward difference table:


Argument Entry 1𝑠𝑡 differences 2𝑛𝑑 differences 3𝑟𝑑 differences 4𝑡ℎ differences
𝑥 𝑦 = 𝑓(𝑥) ∇𝑦 ∇2 𝑦 ∇3 𝑦 ∇4 𝑦
𝑥0 𝑦0
∆𝑦1 = 𝑦1 − 𝑦0
𝑥1 𝑦1 ∆2 𝑦2
(𝑥0 + ℎ) = ∆𝑦2 − ∆𝑦1 ∆3 𝑦3
∆𝑦2 = 𝑦2 − 𝑦1 = ∆2 𝑦3 − ∆2 𝑦2
𝑥2 𝑦2 ∆2 𝑦3 ∆4 𝑦4
(𝑥0 + 2ℎ) = ∆𝑦3 − ∆𝑦2 ∆3 𝑦4 = ∆3 𝑦4 − ∆3 𝑦3
∆𝑦3 = 𝑦3 − 𝑦2 = ∆2 𝑦4 − ∆2 𝑦3
𝑥3 𝑦3 ∆2 𝑦4
(𝑥0 + 3ℎ) = ∆𝑦4 − ∆𝑦3
∆𝑦4 = 𝑦4 − 𝑦3
𝑥4 𝑦4
(𝑥0 + 4ℎ)

Interpolation & Extrapolation

𝑥 x0 x1 x2 x3 …………………… xn
F(x) y0 y1 y2 y3 …………………… yn

11
Interpolation is the process of finding the value of f(x) corresponding to any unablated value of x
between x0 and xn .
The process of finding the value of f(x) for some value of x outside the given range [x0 , xn ] is
called extrapolation.
There are several methods of interpolating data points within a given range, depending upon the
location where the value is to be interpolated as given below.
❖ Interpolation with equal interval:
o Newton’s/ Newtons-Gregory for forward interpolation.
o Newton’s/ Newtons-Gregory for backward interpolation.
❖ Interpolation with unequal interval:
o Newton’s general interpolation.
o Lagrange’s interpolation.
❖ Central differences:
o Gauss’s forward difference formula.
o Gauss’s backward difference formula.
o Stirling’s central difference formula.
o Bessel’s interpolation formula.

Newtons Gregory for Forward Interpolation

Y = f(x) denotes a function which takes the value y0 , y1 , y2 … … … … . . yn for the equidistant
value x0 , x1 , x2 , … … … … . . xn respectively of the independent variable x.
y(x0 ) = y0 , y(x1 ) = y1 , …………… y(xn ) = yn

x0 x1 x2 x3 …………….. x𝑛−1 x𝑛
(x0 + h) (x1 + h) (x2 + h) (x𝑛−2 + h) (x𝑛−1 + h)
y0 y1 y2 y3 ……………... y𝑛−1 y𝑛

Let us consider a polynomial φ(x) ≡ f(x)

φ(x) = a0 + a1 (x − x0 ) + a2 (x − x0 )(x − x1 ) + a3 (x − x0 )(x − x1 )(x − x2 ) + … … … … … +


𝑎𝑛 (x − x0 )(x − x1 )(x − x2 ) … … . (x − xn )…………………………(1)
Putting 𝑥 = x0 , x1 , x2 , … … … … . . xn successively in equation (1) we get

12
y0 = a0
𝑦1 = 𝑎0 + a1 (x1 − x0 )
𝑦2 = 𝑎0 + a1 (x2 − x0 ) + a2 (x2 − x0 )(x2 − x1 )
………………………………………………….
a0 = y0 and
∆y0 = y1 − y0
= 𝑎0 + a1 (x1 − x0 ) − a0
∆y0 = a1 (x1 − x0 )
∆y0 = a1 ℎ
∆y0
a1 = 1!ℎ

∆y1 = y2 − y1
= 𝑎0 + a1 (x2 − x0 ) + a2 (x2 − x0 )(x2 − x1 ) − 𝑎0 − a1 (x1 − x0 )
∆y1 = a1 (x2 − x1 ) + a2 (x2 − x0 )(x2 − x1 )
∆y1 = a1 ℎ + a2 2ℎ2
∆y1 = ∆y0 + 2ℎ2 𝑎2
1
a2 = 2ℎ2 (∆y1 − ∆y0 )

∆2 y0
a2 = 2!h2

………………….
…………………..
∆𝑛 𝑦0
𝑎𝑛 = 𝑛!ℎ𝑛

f(x) ≡ φ(x)
∆y0 ∆ 2 y0
φ(x) ≡ 𝑦0 + (x − x0 ) + (x − x0 )(x − x1 ) + … … … … … … … … … … ….
1!h 2!h2

∆n y
+ n!hn0 (x − x0 )(x − x1 ) … … … … . . (x − xn−1 ) ……………………(2)
𝑥−𝑥0
Let, =𝑢

x = x0 + hu

13
𝑥−𝑥1 𝑥0 +ℎ𝑢−𝑥1
=
ℎ ℎ

ℎ𝑢−(𝑥1 −𝑥0 )
= ℎ
ℎ𝑢−ℎ
= ℎ

=𝑢−1

And so on.
Hence equation (2) become as
∆y0 ∆2 y0 ∆3 y0
f(x) ≡ φ(x) = 𝑦0 + u+ u(u − 1) + u(u − 1)(u − 2) + … … … … … … ..
1! 2! 3!

∆n y0
+ u(u − 1)(u − 2) … … … . {u − (n − 1)}
n!

This is the standard from for newton forward interpolation formula.

∆y0 = y1 − y0 , ∆y1 = y2 − y1 … … … … … … ∆yn−1 = yn − yn−1

1st forward difference of the function f(x) is ∆f(x) = f(x + h) − f(x)

2nd forward difference of the function f(x) is ∆2 f(x) = ∆f(x + h) − ∆f(x)

3rd forward difference of the function f(x) is ∆3 f(x) = ∆2 f(x + h) − ∆2 f(x)


……………………………………………………………………………
nth forward difference of the function f(x) is ∆𝑛 f(x) = ∆𝑛−1 f(x + h) − ∆𝑛−1 f(x)

Problem Solving Using Newton’s Forward Interpolation Formula

Q:1 Problem: Find the cubic polynomial with given set of points Also evaluate f(0.5).
X 0 1 2 3
F(x) 5 6 3 14

14
Solution:
Newton forward difference table –
x y=f(x) ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚
0 5
1
1 6 -4
-3 18
2 3 14
11
3 14

Newton's forward difference interpolation formula is –


∆y0 ∆2 y0 ∆ 3 y0
𝑓(𝑥) = 𝑦0 + u+ u(u − 1) + u(u − 1)(u − 2) ………………(1)
1! 2! 3!

Now,
𝑥−𝑥0
=𝑢

𝑥0 = 0; ℎ = 1;
So, u=x;
∆𝑦0 = 1 ; ∆2 𝑦0 = −4 ; ∆3 𝑦0 = 18
Now, putting value equation (1), we get
𝑥(𝑥−1) 𝑥(𝑥−1)(𝑥−2)
𝑓(𝑥) ≡ 5 + 1(𝑥) + (−4) + (18)
2! 3!

𝑓(𝑥) ≡ 5 + 𝑥 + (−2)𝑥(𝑥 − 1) + 3𝑥(𝑥 − 1)(𝑥 − 2)


𝑓(𝑥) ≡ 3𝑥 3 + 11𝑥 2 + 9𝑥 + 5
Also,
𝑓(0.5) = 3(0.5)3 + 11(0.5)2 + 9(0.5) + 5
= 7.125
∴ 𝑓(0.5) = 7.125
Q:2 Problem: The population of a country in the decennial census were as under. Estimate the
population for the year 1946.
Years: 1911 1921 1931 1941 1951 1961
Population:12 15 20 27 39 52

15
Solution:
Newton forward difference table –
Year Population ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚 ∆𝟒 𝒚 ∆𝟓 𝒚
1911 12
3
1921 15 2
5 0
1931 20 2 3
7 3 -10
1941 27 5 -7
12 -4
1951 39 1
13
1961 52

By Newton’s forward interpolation formula,


∆y0 ∆2 y0 ∆ 3 y0 ∆4 y0
𝑓(𝑥) = 𝑦0 + u+ u(u − 1) + u(u − 1)(u − 2) + u(u − 1)(u − 2)(𝑢 − 3) +
1! 2! 3! 4!

∆5 y0
u(u − 1)(u − 2)(𝑢 − 3)(𝑢 − 4) ……………(1)
5!

Now,
1946−1911
𝑢= = 3.5
10

𝑦0 = 12; ∆𝑦0 = 3 ; ∆2 𝑦0 = 2 ; ∆3 𝑦0 = 0; ∆4 𝑦0 = 3; ∆5 𝑦0 = −10


Putting the value equation (1), we get
2 3
𝑓(𝑥) = 12 + 3(3.5) + (3.5)(3.5 − 1) + 0 + (3.5)(3.5 − 1)(3.5 − 2)(3.5 − 3)
2! 4!
(−10)
+ (3.5)(3.5 − 1)(3.5 − 2)(3.5 − 3)(3.5 − 4)
5!
𝑓(1946) = 12 + 10.5 + 8.75 + 0.8203 + 0.2734 = 32.3437

Q:3 Problem: Find 𝒇(𝟏𝟓) from the following table using Newton's Forward interpolation
formula.
X: 10 20 30 40
Y: 9 39 74 116

16
Solution:
Newton forward difference table –
X y ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚
10 9 30 5 2
20 39 35 7
30 74 42
40 116

The value of 𝑦 at 𝑥=15,


ℎ = 𝑥1 − 𝑥0 = 20 − 10 = 10
𝑥−𝑥0
=𝑢

15−10
𝑢= = 0.5
10

Newton's forward difference interpolation formula is –


∆y0 ∆2 y0 ∆ 3 y0
𝑓(𝑥) = 𝑦0 + u+ u(u − 1) + u(u − 1)(u − 2)
1! 2! 3!
5 2
𝑓(15) = 9 + 30(0.5) + 2 (0.5)(0.5 − 1) + 6 (0.5)(0.5 − 1)(0.5 − 2)

= 9 + 15 − 0.62 + 0.12
= 23.5

Newtons Gregory for Backward Interpolation


Y = f(x) denotes a function which takes the value y0 , y1 , y2 … … … … . . yn for the equidistant value
x0 , x1 , x2 , … … … … . . xn respectively of the independent variable x.
y(x0 ) = y0 , y(x1 ) = y1 , …………… y(xn ) = yn

x0 x1 x2 x3 …………….. x𝑛−1 x𝑛
(x0 + h) (x1 + h) (x2 + h) (x𝑛−2 + h) (x𝑛−1 + h)
y0 y1 y2 y3 ……………... y𝑛−1 y𝑛

Let us consider a polynomial φ(x) ≡ f(x)

17
φ(x) = a0 + a1 (x − xn ) + a2 (x − xn )(x − xn−1 ) + a3 (x − xn )(x − xn−1 )(x −
xn−2 )+………………..+𝑎𝑛 (x − xn )(x − xn−1 )(x − xn−2 ) … … . (x − x1 )

……………………………(1)
Putting 𝑥 = xn , xn−1 , xn−2 , … … … … . . x0 successively in equation (1) we get
yn = a0
yn−1 = 𝑎0 + a1 (xn−1 − xn )
𝑦𝑛−2 = 𝑎0 + a1 (xn−1 − xn ) + a2 (xn−2 − xn )(xn−2 − xn−1 )
Here we know,
yn−1 = 𝑎0 + a1 (xn−1 − xn )=yn + a1(-h)
Or, yn−1 = yn − a1 ℎ
yn −yn−1
Or, a1 = ℎ
∇yn
Or, a1 = 1!ℎ

∇2 y
Similarly, a2 = 2! ℎn2
∇𝑛 y
And, an = 𝑛! ℎn𝑛

∇y ∇2 y ∇𝑛 y
So, F(x)= φ(x) = yn + 1!ℎn (x − xn ) + 2! ℎn2 (x − xn )(x − xn−1 ) + … … … … … . . + 𝑛! ℎn𝑛 (x −
xn )(x − xn−1 )(x − xn−2 ) … … … (x − x1 ) ………………………(2)
(x−xn )
Let, =𝑢

X=xn + ℎ𝑢
Again,
(x−xn−1 ) xn +ℎ𝑢−xn−1 ℎ𝑢+(xn −xn−1 ) ℎ𝑢+ℎ
= = = =𝑢+1
ℎ ℎ ℎ ℎ

So, equation (2) becomes,


∇yn ∇2 y ∇𝑛 y
F(x)= φ(x) = yn + u + 2! ℎn2 u(u + 1)+………………..+ 𝑛! ℎn𝑛 u(u + 1)(u + 2) … … … {𝑢 +
1!
(𝑛 − 1)}
This is the standard form for Newton backward interpolation formula.

18
Mathematical problem of Newton backward interpolation formula
Problem 1: Estimate 𝑓(7.5) by Newton backward interpolation formula
x 1 2 3 4 5 6 7 8
f(x) 1 8 27 64 125 216 343 512
Solution:
𝑥−(𝑎+𝑛ℎ) 7.5−8
Here, 𝑢 = = = −0.5
ℎ 1

The difference table:


x f ( x) f ( x )  2 f ( x) 3 f ( x )

1 1
7
2 8 12
19 6
3 27 18
37 6
4 64 24
61 6
5 125 30
91 6
6 216 36
127 6
7 343 42
169
8 512

Here  f ( x) is same number of element, we can skip this order .


3

By Newton’s backward interpolation formula,


𝑢(𝑢+1) 𝑢(𝑢+1)(𝑢+2)
𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ) = 𝑓(𝑎 + 𝑛ℎ) 𝑢𝛻𝑓(𝑎 + 𝑛ℎ) + 2!
𝛻 2 𝑓(𝑎 + 𝑛ℎ) + 3!
𝛻 3 𝑓(𝑎 + 𝑛ℎ)

19
(−.5)(−.5 + 1) 2 (−.5)(−.5 + 1)(−.5 + 2) 3
f (7.5) = f (8) + (−.5)f (8) +  f (8) +  f (8)
2 6
(−0.5)(−0.5+1) (−0.5)(−0.5+1)(0.5+2)
𝑓(7.5) = 𝑓(8) + (−5)𝛻𝑓(8) + 𝛻 2 𝑓(8) + 𝛻 3 𝑓(8)
2 2

= 512 − 84.5 − 5.25 − .375


= 421.875.

Problem 2: Estimate sin (57°) by Newton’s Backward Interpolation Formula.


x: 45° 50° 55° 60°
sin(x): 0.7071 0.7660 0.8192 0.8660

Solution: Given,
x: 45° 50° 55° 60°
sin(x): 0.7071 0.7660 0.8192 0.8660

The difference table:


x f ( x) f ( x )  2 f ( x) 3 f ( x )

45 .7071
.0589
50 .7660 -.0057
.0532 -.0007
55 .8192 -.0064
.0468
60 .8660

52−45
Here,𝑢 = = 1.4
5

By Newton’s backward interpolation formula,


𝑢(𝑢+1) 𝑢(𝑢+1)(𝑢+2)
𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ) = 𝑓(𝑎 + 𝑛ℎ) 𝑢𝛻𝑓(𝑎 + 𝑛ℎ) + 𝛻 2 𝑓(𝑎 + 𝑛ℎ) + 𝛻 3 𝑓(𝑎 + 𝑛ℎ)
2! 3!

20
(1.4)(1.4 + 1) 2 (1.4)(1.4 + 1)(1.2 + 2) 3
𝑓(52) = 𝑓(45) + 1.4𝛻𝑓(45) + 𝛻 𝑓(45) + 𝛻 𝑓(45)
2! 3!
= 0.7786512 𝑎𝑝𝑝𝑟𝑜𝑥.
Problem 3:
Estimate the population for the year 1905 by using Newton’s formula for interpolation.
Year Population
1891 98, 752
1901 132,285
1911 168,076
1921 195,690
1931 246,050

Solution:
The difference table:
x f ( x) f ( x )  2 f ( x) 3 f ( x )  4 f ( x)

1891 98752
33533
1901 132285 2258
35791 -10435
1911 168076 -8177 41358
27614 30923
1921 195690 22746
50360
1931 246050

1905 − 1891
u=
Here, 10 =1.4
By Newton’s backward interpolation formula,

21
𝑢(𝑢+1) 𝑢(𝑢+1)(𝑢+2)
𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ) = 𝑓(𝑎 + 𝑛ℎ) 𝑢𝛻𝑓(𝑎 + 𝑛ℎ) + 𝛻 2 𝑓(𝑎 + 𝑛ℎ) + 𝛻 3 𝑓(𝑎 +
2! 3!
𝑢(𝑢+1)(𝑢+2)(𝑢+3)
𝑛ℎ) + 𝛻 4 𝑓(𝑎 + 𝑛ℎ)
4!

𝑓(1905) = 147841 approximately.

Divided Difference

Or f ( x) = f ( x0 ) + ( x − x0 ) f ( x, x0 ) … (1)

f ( x, x0 ) − f ( x0 , x1 )
Also f ( x, x0 , x1 ) = A divided difference is defined to be the difference
x − x1
between two successive values of the entry divided by the difference between the corresponding
value of the arguments e.g. given the following values of the function y = f ( x)

x= a b c d e …
f ( x) = f (a ) f (b) f (c ) f (d ) f (e) …
𝑓(𝑏)−𝑓(𝑎)
the first divided difference at x = a is 𝑏−𝑎

𝑓(𝑐)−𝑓(𝑏)
the first divided difference at x = b is 𝑐−𝑏

Let f ( x0 ), f ( x1 ),... f ( xn ) be the values of f ( x) corresponding to the arguments x0 , x1 ,...xn , not


necessarily equally spaced. From the definition of divided differences,
f ( x) − f ( x0 )
f ( x, x0 ) =
x − x0

Or f ( x, x0 ) = f ( x0 , x1 ) + ( x − x1 ) f ( x, x0 , x1 ) … (2)

Similarly, f ( x, x0 , x1 ) = f ( x0 , x1 , x2 ) + ( x − x2 ) f ( x, x0 , x1 , x2 ) … (3)

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

f ( x, x0 , x1 ,..., xn−1 ) = f ( x0 , x1 ,..., xn ) + ( x − xn ) f ( x, x0 , x1 ,..., xn ) … (4)

Multiplying the equation (2) by ( x − x0 ) ,(3) by ( x − x0 )( x − x1 ) and so on and finally the equation
(4) by ( x − x0 )( x − x1 )...( x − xn−1 ) and adding to the equation (1), we have

22
f ( x) = f ( x0 ) + ( x − x0 ) f ( x0 , x1 ) + ( x − x0 )( x − x1 ) f ( x0 , x1, x2 ) + ...
+( x − x0 )( x − x1 )...( x − xn−1 ) f ( x0 , x1 ,..., xn ) + Rn ,

Where the remainder Rn is given by

Rn = ( x − x0 )( x − x1 )...( x − xn ) f ( x, x0 , x1,..., xn ).

Assuming that f ( x) is a polynomial of degree n,

f ( x, x0 , x1 ,..., xn ) vanishes so that

f ( x) = f ( x0 ) + ( x − x0 ) f ( x0 , x1 ) + ( x − x0 )( x − x1 ) f ( x0 , x1, x2 ) + ...
…(5)
+( x − x0 )( x − x1 )...( x − xn−1 ) f ( x0 , x1 ,..., xn )

This formula is called Newton’s divided difference interpolation formula

Newton’s Divided Difference:


Let y0, y1, y2, …, yn be values of 𝑓(𝑥) or y corresponding to the arguments x0, x1, x2, …, xn not
necessarily equally spaced.
𝑓(𝑥)−𝑓(𝑥0 ) 𝑦−𝑦0
From the definition of divided difference 𝑓(𝑥, 𝑥0 ) = = = 𝛿(𝑥, 𝑥0 ) . . . (1)
𝑥−𝑥0 𝑥−𝑥0

2nd difference:
𝛿(𝑥,𝑥0 )−𝛿(𝑥0 ,𝑥1 )
= 𝛿(𝑥, 𝑥0 , 𝑥1 )
𝑥−𝑥1

∴ 𝛿(𝑥, 𝑥0 ) = 𝛿(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥1 ) 𝛿(𝑥, 𝑥0 , 𝑥1 ). . . (2)


From (1) we have,
𝑦 = 𝑦0 + (𝑥 − 𝑥0 ) 𝛿(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) 𝛿(𝑥, 𝑥0 , 𝑥1 ) (3)
3rd difference:
𝛿(𝑥,𝑥0 ,𝑥1 )−𝛿(𝑥0 ,𝑥1 ,𝑥2 )
= 𝛿(𝑥, 𝑥0 , 𝑥1 , 𝑥2 )
𝑥1 −𝑥2

∴ 𝛿(𝑥, 𝑥0 , 𝑥1 ) = 𝛿(𝑥0 , 𝑥1 , 𝑥2 ) + (𝑥1 − 𝑥2 ) 𝛿(𝑥, 𝑥0 , 𝑥1 , 𝑥2 )


From (3) we have,
𝑦 = 𝑦0 + (𝑥 − 𝑥0 ) 𝛿(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) 𝛿(𝑥0 , 𝑥1 , 𝑥2 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 −
𝑥2 ) 𝛿(𝑥, 𝑥0 , 𝑥1 , 𝑥2 )… (4)
𝑦 = 𝑦0 + (𝑥 − 𝑥0 ) 𝛿(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) 𝛿(𝑥0 , 𝑥1 , 𝑥2 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 −
𝑥2 ) 𝛿(𝑥, 𝑥0 , 𝑥1 , 𝑥2 ) + ⋯ + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛−1 ) 𝛿(𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 ) + 𝑅𝑛 …
(5)

23
Where,
𝑅𝑛 = (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 ) 𝛿(𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 , 𝑥𝑛+1 ) and assuming that
𝑓(𝑥) = 𝑦 is polynomial of degree n. So, 𝑅𝑛 be vanished.
From (3) we have,
𝑦 = 𝑦0 + (𝑥 − 𝑥0 ) 𝛿(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) 𝛿(𝑥0 , 𝑥1 , 𝑥2 )
+ (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) 𝛿(𝑥, 𝑥0 , 𝑥1 , 𝑥2 ) + ⋯
+ (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛−1 ) 𝛿(𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 )
This is called Newton’s general interpolation formula for unequal interval.
Example: Use Newton’s divided difference formula to find the value of 𝑓(8)
𝑥 4 5 7 10 11 13

𝑓(𝑥) 48 100 294 900 1210 2028

Solution :
Divided difference table:
𝑥 𝑓(𝑥) 𝛿 𝛿2 𝛿3 𝛿4
4 48
100−48
= 52
5−4
5 100 97−52
= 15
7−4
294−100 21−15
= 97 =1
7−5 10−4
7 294 202−97 1−1
= 21 =0
10−5 11−4
900−294 27−21
= 202 =1
10−7 11−5
10 900 310−202 1−1
= 27 =0
11−7 13−5
1210−900 33−27
= 310 =1
11−10 13−7
11 1210 409−310
= 33
13−10
2028−1210
= 409
13−11
13 2028

Using Newton’s interpolation formula for unequal difference/intervals. We get,

24
𝑦 = 𝑦0 + (𝑥 − 𝑥0 ) 𝛿(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) 𝛿(𝑥0 , 𝑥1 , 𝑥2 )
+ (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) 𝛿(𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 )
𝑦 = 𝑓(8) = (48 + 8 − 4) × 52 + (8 − 4)(8 − 5) × 15 + (8 − 4)(8 − 5)(8 − 7) × 1
= 448

Lagrange’s Interpolation formula for unequal intervals


Let 𝑓(𝑥) denotes a polynomial of the 𝑛𝑡ℎ degree which takes the values 𝑦0 , 𝑦1 , 𝑦2 , … , 𝑦𝑛 when 𝑥
has the values 𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 respectively.
We know that the (n+1) the differences of this polynomial are zero and hence we have,
𝑓(𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 ) = 0 … (1)
But we have,
𝑓(𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 )
𝑦 𝑦0
= +
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑛 ) (𝑥0 − 𝑥)(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) … (𝑥0 − 𝑥𝑛 )
𝑦1
+ +⋯
(𝑥1 − 𝑥)(𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … (𝑥1 − 𝑥𝑛 )
𝑦𝑛
+ =0
(𝑥𝑛 − 𝑥)(𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥1 ) … (𝑥𝑛 − 𝑥𝑛−1 )
From (1) we can write,
𝑦 𝑦0
+
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑛 ) (𝑥0 − 𝑥)(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) … (𝑥0 − 𝑥𝑛 )
𝑦1
+ +⋯
(𝑥1 − 𝑥)(𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … (𝑥1 − 𝑥𝑛 )
𝑦𝑛
+ =0
(𝑥𝑛 − 𝑥)(𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥1 ) … (𝑥𝑛 − 𝑥𝑛−1 )
𝑦 𝑦 𝑦1
Or, (𝑥−𝑥 )(𝑥−𝑥 )(𝑥−𝑥
− (𝑥 −𝑥)(𝑥 −𝑥 )(𝑥0 −𝑥 )…(𝑥 −𝑥 ) − (𝑥 − ⋯−
0 1 2 )…(𝑥−𝑥 𝑛 ) 0 0 1 0 2 0 𝑛 1 −𝑥)(𝑥1 −𝑥0 )(𝑥1 −𝑥2 )…(𝑥1 −𝑥𝑛 )
𝑦𝑛
(𝑥𝑛 −𝑥)(𝑥𝑛 −𝑥0 )(𝑥𝑛 −𝑥1 )…(𝑥𝑛 −𝑥𝑛−1 )
= 0
𝑦 𝑦 𝑦1
Or, (𝑥−𝑥 )(𝑥−𝑥 )(𝑥−𝑥
= (𝑥 −𝑥)(𝑥 −𝑥 )(𝑥0 −𝑥 )…(𝑥 −𝑥 ) + (𝑥 + ⋯+
0 1 2 )…(𝑥−𝑥 𝑛 ) 0 0 1 0 2 0 𝑛 1 −𝑥)(𝑥1 −𝑥0 )(𝑥1 −𝑥2 )…(𝑥1 −𝑥𝑛 )
𝑦𝑛
(𝑥𝑛 −𝑥)(𝑥𝑛 −𝑥0 )(𝑥𝑛 −𝑥1 )…(𝑥𝑛 −𝑥𝑛−1 )

(𝑥−𝑥1 )(𝑥−𝑥2 )…(𝑥−𝑥𝑛 ) (𝑥−𝑥0 )(𝑥−𝑥2 )…(𝑥−𝑥𝑛 ) (𝑥−𝑥0 )(𝑥−𝑥1 )…(𝑥−𝑥𝑛 )


Or, 𝑦 = (𝑥 𝑦 + (𝑥
) 𝑜
𝑦 + (𝑥
) 1
𝑦2 + ⋯ +
0 −𝑥1 )(𝑥0 −𝑥2 )…(𝑥0 −𝑥𝑛 1 −𝑥0 )(𝑥1 −𝑥2 )…(𝑥1 −𝑥𝑛 2 −𝑥0 )(𝑥2 −𝑥1 )…(𝑥2 −𝑥𝑛 )
(𝑥−𝑥0 )(𝑥−𝑥1 )…(𝑥−𝑥𝑛 )
𝑦
(𝑥𝑛 −𝑥0 )(𝑥𝑛 −𝑥1 )…(𝑥𝑛 −𝑥𝑛−1 ) 𝑛
… (2)

25
Example -1: For the following table find the form of the function 𝑓(𝑥)
𝑥 0 1 2 5

𝑓(𝑥) 2 3 12 147

Solution:
Here, 𝑥0 = 0, 𝑥1 = 1, 𝑥2 = 2, 𝑥3 = 5
We know,
(𝑥 − 1)(𝑥 − 2)(𝑥 − 5) (𝑥 − 0)(𝑥 − 2)(𝑥 − 5)
𝑦 = 𝑓(𝑥) = ×2+ ×3
(0 − 1)(0 − 2)(0 − 5) (1 − 0)(1 − 2)(1 − 5)
(𝑥 − 0)(𝑥 − 1)(𝑥 − 5) (𝑥 − 0)(𝑥 − 1)(𝑥 − 2)
+ × 12 + ⋯ + × 147
(2 − 0)(2 − 1)(2 − 5) (5 − 0)(5 − 1)(5 − 2)
= 𝑥3 + 𝑥2 − 𝑥 + 2

Example -2 : The value of 𝑦 and 𝑥 are given below:


𝑥 5 6 9 11

𝑦 = 𝑓(𝑥) 12 13 14 16

Find the value of 𝑦 when 𝑥 = 10 .


Solution :
Here, 𝑥 = 10, 𝑥0 = 5, 𝑥1 = 6, 𝑥2 = 9, 𝑥3 = 11 and 𝑦0 = 12, 𝑦1 = 13, 𝑦2 = 14, 𝑦3 = 16
By Lagrange’s formula, we have,
(𝑥−𝑥1 )(𝑥−𝑥2 )(𝑥−𝑥3 ) (𝑥−𝑥 )(𝑥−𝑥 )(𝑥−𝑥3 ) (𝑥−𝑥0 )(𝑥−𝑥1 )(𝑥−𝑥3 )
𝑦 = (𝑥 )(𝑥 )(𝑥 )
𝑦𝑜 + (𝑥 −𝑥 0)(𝑥 −𝑥2 )(𝑥 −𝑥 𝑦1 + (𝑥 𝑦2 +
0 −𝑥 1 0 −𝑥 2 0 −𝑥 3 1 0 1 2 1 3) 2 −𝑥0 )(𝑥2 −𝑥1 )(𝑥2 −𝑥3 )
(𝑥−𝑥0 )(𝑥−𝑥1 )(𝑥−𝑥2 )
(𝑥 −𝑥 )(𝑥 −𝑥 )(𝑥 −𝑥 ) 3
𝑦 … (1)
3 0 3 1 3 2

Substituting the values of 𝑥, 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 , 𝑦0 , 𝑦1 , 𝑦2 , 𝑦3 in (1) we get,


(10 − 6)(10 − 9)(10 − 11) (10 − 5)(10 − 9)(10 − 11)
𝑦= × 12 + × 13
(5 − 6)(5 − 9)(5 − 11) (6 − 5)(6 − 9)(6 − 11)
(10 − 5)(10 − 6)(10 − 11) (10 − 5)(10 − 6)(10 − 9)
+ × 14 + × 16
(9 − 5)(9 − 6)(9 − 11) (11 − 5)(11 − 6)(11 − 9)

26
Or, 𝑦 = 2 − 4.33 + 11.66 + 5.33
∴ 𝑦 = 14.66
So the value of 𝑦 = 14.66 when 𝑥 = 10 .

CENTRAL DIFFERENCE INTERPOLATION


Newton’s difference formulas are fundamental and applicable to almost all cases of interpolation,
but in general they do not converge as rapidly as central difference formula. The central difference
formulas are used for interpolating the function near the middle of tabulated set.

Figure: Interpolation

Difference Table
Let y = f(x) be any function of x. h is the equal interval of x.
Central value = 𝑥0 and 𝑥−1 = (𝑥0 − ℎ), 𝑥−2 = (𝑥0 − 2ℎ), 𝑥1 = (𝑥0 + ℎ), 𝑥2 = (𝑥0 + 2ℎ) … are the
values of 𝑥. 𝑦0 = 𝑓(𝑥0), 𝑦−1 = 𝑓 (𝑥0 − ℎ), 𝑦−2 = 𝑓(𝑥0 − 2ℎ), 𝑦1 = 𝑓(𝑥0 + ℎ), 𝑦2 = 𝑓(𝑥0 + 2ℎ) … are
the corresponding values of y, then differences : 𝚫𝒚𝒏 = 𝒚𝒏+𝟏 − 𝒚𝒏

Gauss’s forward interpolation formula:


The general Newton formula is

𝑦 = 𝑓 (𝑥) = 𝑓 (𝑥0) + (𝑥 − 𝑥0) 𝑓(𝑥0, 𝑥1) + (𝑥 − 𝑥0)(𝑥 − 𝑥1)𝑓(𝑥0, 𝑥1, 𝑥2)

+(𝑥 − 𝑥0) (𝑥 − 𝑥1) (𝑥 − 𝑥2) 𝑓(𝑥0, 𝑥1, 𝑥2, 𝑥3)

27
+(𝑥 − 𝑥0) (𝑥 − 𝑥1) (𝑥 − 𝑥2) (𝑥 − 𝑥3) 𝑓(𝑥0,𝑥1, 𝑥2, 𝑥3, 𝑥4)

+(𝑥 − 𝑥0) (𝑥 − 𝑥1) (𝑥 − 𝑥2) (𝑥 − 𝑥3) (𝑥 −𝑥4)𝑓(𝑥0, 𝑥1, 𝑥2, 𝑥3, 𝑥4, 𝑥5)
+(𝑥 − 𝑥0) (𝑥 − 𝑥1) … (𝑥 − 𝑥5) 𝑓(𝑥0, 𝑥1, 𝑥2, 𝑥3, 𝑥4, 𝑥5, 𝑥6) ……(1)

Putting 𝑥0 = 𝑥0, 𝑥1 = 𝑥0 + ℎ, 𝑥2 = 𝑥0 − ℎ, 𝑥3 = 𝑥0 + 2ℎ, 𝑥4 = 𝑥0 − 2ℎ, 𝑥5 = 𝑥0 + 3ℎ, 𝑥6 =𝑥0 − 3ℎ etc ,


we get
𝑓(𝑥) = 𝑓(𝑥0) + (𝑥 − 𝑥0) 𝑓(𝑥0 + ℎ) + (𝑥 − 𝑥0)(𝑥 − 𝑥0 − ℎ)𝑓(𝑥0, 𝑥0 + ℎ, 𝑥0 − ℎ)

+(𝑥 − 𝑥0) (𝑥 − 𝑥0 − ℎ)(𝑥 − 𝑥0 + ℎ)𝑓(𝑥0, 𝑥0 + ℎ, 𝑥0 − ℎ, 𝑥0 + 2ℎ)

+(𝑥 − 𝑥0) (𝑥 − 𝑥0 − ℎ)(𝑥 − 𝑥0 + ℎ)(𝑥 − 𝑥0 − 2ℎ) 𝑓(𝑥0, 𝑥0 + ℎ, 𝑥0 − ℎ, 𝑥0 + 2ℎ, 𝑥0 − 2ℎ)

+(𝑥 − 𝑥0)(𝑥 − 𝑥0 − ℎ)(𝑥 − 𝑥0 + ℎ)(𝑥 − 𝑥0 − 2ℎ)(𝑥 − 𝑥0 + 2ℎ) × 𝑓(𝑥0, 𝑥0 +

ℎ, 𝑥0 − ℎ, 𝑥0 + 2ℎ, 𝑥0 − 2ℎ, 𝑥0 + 3ℎ)+. ..

Now put 𝑢 =(x-x0)/ℎ 𝑖 𝑒. 𝑥 − 𝑥0 = ℎ𝑢 . Then we have

𝑓(𝑥) = 𝑓(𝑥0) + ℎ𝑢 𝑓(𝑥0, 𝑥0 + ℎ) + ℎ𝑢(ℎ𝑢 − ℎ) 𝑓 (𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ)

+ℎ𝑢(ℎ𝑢 − ℎ)(ℎ𝑢 + ℎ)𝑓(𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ)

+ℎ𝑢(ℎ𝑢 − ℎ)(ℎ𝑢 + ℎ)(ℎ𝑢 − 2ℎ) 𝑓 (𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ)

+ℎ𝑢(ℎ𝑢 − ℎ)(ℎ𝑢 + ℎ)(ℎ𝑢 − 2ℎ)(ℎ𝑢 + 2ℎ) 𝑓(𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ, 𝑥0 + 3ℎ)+. . . … (2)

But, we have

𝑓(𝑥0, 𝑥0 + ℎ) =∆𝑦0/ℎ, 𝑓(𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ) =∆2𝑦−1 /2ℎ2

𝑓(𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ) = ∆3𝑦-1 /3!h3 ,

𝑓(𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ) = ∆4𝑦−1/ 4! ℎ4 ,

𝑓(𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ, 𝑥0 + 3ℎ)


=∆5𝑦−1/5!ℎ5 , 𝑒𝑡𝑐.

Substituting these values in (2), we get

𝑦 = (𝑦0 + ℎ𝑢 ) ∆𝑦0 /h+ ℎ2𝑢(𝑢 − 1) ∆2ℎ𝑦-1 /2h2 + ℎ3𝑢(𝑢 − 1)(𝑢 + 1) ∆3y-1/3!h3+……..

28
Or, 𝑦=𝑦0+𝑢 ∆ 𝑦0+𝑢(𝑢−1)∆2y-1 /2! +𝑢(𝑢2−1)∆3𝑦-1/ 3!+……………..(3)

This result is known as Gauss’s forward formula for equal intervals.

Problem Solving Using Gauss Forward Formula:

Question 1: The difference table is given below:

𝒙 21 25 29 33 37

𝒚 18.4708 17.8144 17.107 16.3432 15.5154


Solution:

The difference table is given below:

𝒙 𝒚 𝜟𝒚 𝜟𝟐𝒚 𝜟𝟑𝒚 𝜟𝟒𝒚


21 18.4708
-0.6564
25 17.8144 -0.051
-0.7074 -0.0054
29 17.107 -0.0564 -0.0022
-0.7638 -0.0076
33 16.3432 -0.064
-0.8278
37 15.5154

Here,
h=25-21=4 and 𝑥 = 30 Taking
𝑥0 = 29,

𝑦0 = 17.107, 𝛥𝑦0 = −0.7638, 𝛥2𝑦−1 = −0.0564, 𝛥3𝑦−1 = −0.0076, 𝛥4𝑦−2 = −0.0022


𝑥 − 𝑥0
𝑢=

29
=
= 0.25
Gauss forward interpolation formula:
𝑢(𝑢 − 1) 𝑢(𝑢2 − 1) 𝑢(𝑢2 − 1)(𝑢 − 2)
2 3 4
𝑦 = 𝑦0 + 𝑢∆𝑦0 + ∆ 𝑦−1 + ∆ 𝑦−1 + ∆ 𝑦−2
2! 3! 4!
0.
= 17.107 + 0.25 × (−0.7638) +× (−0.0564)

0. 0.
+× (−0.0076) +× (−0.0022)

= 17.107 − 0.19095 + 0.0052875 + 0.000296875 − 0.0000375977


= 16.92159678

Question 2: By using Gauss Forward formula, evaluate 𝒔𝒊𝒏(𝟓𝟕°) from the following table.

𝒙 𝒔𝒊𝒏𝟒𝟓𝟎 𝒔𝒊𝒏𝟓𝟎𝟎 𝒔𝒊𝒏𝟓𝟓𝟎 𝒔𝒊𝒏𝟔𝟎𝟎 𝒔𝒊𝒏𝟔𝟓𝟎


𝒇(𝒙) 0.7071 0.7660 0.8192 0.8660 0.9063

Solution: The difference table is given below:

𝒙 𝒚 = 𝒇(𝒙) 𝜟𝒇(𝒙) 𝜟𝟐𝒇(𝒙) 𝜟𝟑𝒇(𝒙) 𝜟𝟒𝒇(𝒙)


45 0.7071
0.0589
50 0.7660 -0.0057
0.0532 -0.0007
55 0.8192 -0.0064 0.0006
0.0468 -0.0001
60 0.8660 -0.0065
0.0403
65 0.9063

30
Here,
ℎ = 50 − 45 = 5 and 𝑥 = 57
Taking 𝑥0 = 55,
𝑥 𝑥
𝑢= == 0.4

By Gauss’s Forward Formula


𝑢 2 𝑢 𝑢
𝑦 = 𝑦0 + 𝑢∆𝑦0 + ∆ 𝑦−1 + ∆3𝑦−1 + ∆4𝑦−2
! ! !

= 0.8192 + (0.4)(0.0468) + (0.4)(0.4 − 1) + (0.4)(0. 42 − 1)

+ (0.4)(0. 42 − 1)(0.4 − 2)
= (0.8192) + (0.01872) + (0.000768) + (0.0000056) + (0.00001344)
= 0.83870704
Hence the value for 𝑠𝑖𝑛 (570) is 0.83870704

Gauss’s backward interpolation formula:

We know, Newton’s general interpolation formula is


𝑦 = 𝑓(𝑥) = 𝑓(𝑥0) + (𝑥 − 𝑥0)𝑓(𝑥0, 𝑥1) + (𝑥 − 𝑥0)(𝑥 − 𝑥1)𝑓(𝑥0, 𝑥1, 𝑥2)
+ (𝑥 − 𝑥0)(𝑥 − 𝑥1)(𝑥 − 𝑥2)𝑓(𝑥0, 𝑥1, 𝑥2, 𝑥3)
+ (𝑥 − 𝑥0)(𝑥 − 𝑥1)(𝑥 − 𝑥2)(𝑥 − 𝑥3)𝑓(𝑥0, 𝑥1, 𝑥2, 𝑥3, 𝑥4) + ……………………...…
(1)
Substituting 𝑥0 = 𝑥0, 𝑥1 = 𝑥0 − ℎ, 𝑥2 = 𝑥0 + ℎ, 𝑥3 = 𝑥0 − 2ℎ, 𝑥4 = 𝑥0 + 2ℎ, 𝑥5 = 𝑥0 − 3ℎ,
𝑥6 = 𝑥0 + 3ℎ etc.
We get,
𝑓(𝑥) = 𝑓(𝑥0) + (𝑥 − 𝑥0) 𝑓(𝑥0, 𝑥0 − ℎ) + (𝑥 − 𝑥0)(𝑥 − 𝑥0 + ℎ) 𝑓(𝑥0, 𝑥0 − ℎ, 𝑥0 + ℎ)
+ (𝑥 − 𝑥0)(𝑥 − 𝑥0 + ℎ)(𝑥 − 𝑥0 − ℎ) 𝑓(𝑥0, 𝑥0 − ℎ, 𝑥0 + ℎ, 𝑥0 − 2ℎ)
+ (𝑥 − 𝑥0)(𝑥 − 𝑥0 + ℎ)(𝑥 − 𝑥0 − ℎ)(𝑥 − 𝑥0 + 2ℎ) 𝑓(𝑥0, 𝑥0 − ℎ, 𝑥0 + ℎ,
𝑥0 − 2ℎ, 𝑥0 + 2ℎ)+ ⋯…

31
Now, Let 𝑢=(𝑥−𝑥0)/ ℎ . i.e. 𝑥−𝑥0=ℎu

Then, we have,
𝑓(𝑥) = 𝑓(𝑥0) + ℎ𝑢𝑓(𝑥0 − ℎ, 𝑥0) + ℎ𝑢(ℎ𝑢 + ℎ)𝑓(𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ) + ℎ𝑢(ℎ𝑢 + ℎ)(ℎ𝑢 −
ℎ)𝑓(𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ) + ℎ𝑢(ℎ𝑢 + ℎ)(ℎ𝑢 − ℎ)(ℎ𝑢 + 2ℎ)𝑓(𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 +
2ℎ) + ℎ𝑢(ℎ𝑢 + ℎ)(ℎ𝑢 − ℎ)(ℎ𝑢 + 2ℎ)(ℎ𝑢 − 2ℎ)𝑓(𝑥0 − 3ℎ, 𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 +
ℎ)(𝑥0 + 2ℎ) + ⋯………………………… (2)
But we have, from the relation between simple and divided difference,
∆𝑦-1
𝑓(𝑥0, 𝑥0 − ℎ) =

∆2𝑦−1
𝑓(𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ) =

2! ℎ2 ,

∆3𝑦−2
𝑓(𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ) =

3! ℎ3 ,

∆4𝑦−2
𝑓(𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ) =

4! ℎ4 ,

∆5𝑦−3 𝑓(𝑥0
− 3ℎ, 𝑥0 − 2ℎ, 𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ) = etc.

5! ℎ5

Substituting these values in (2), We get,

𝑦 = 𝑓(𝑥) = 𝑦0 + 𝑢∆𝑦−1 + u(u+1) ∆2𝑦-1/2!+𝑢(𝑢2−1) ∆𝑦-1


/3!+𝑢(𝑢2−1)(𝑢+2)∆4𝑦-2/4! +𝑢(𝑢2−1)(𝑢−22)∆5y-3/5!+... …………

This formula is known as Gauss’s backward interpolation formula for equal intervals.

32
Stirling’s interpolation formula:-

We have Gauss’s forward interpolation and backward interpolation formulas are


respectively,
𝒖(𝒖−𝟏) 𝒖(𝒖𝟐 −𝟏) 𝒖(𝒖𝟐 −𝟏)(𝒖−𝟐)
𝐲(𝐱) = 𝒚𝟎 + 𝒖∆𝒚𝟎 + ∆𝟐 𝒚−𝟏 + ∆𝟑 𝒚−𝟏 + ∆𝟒 𝒚−𝟏 +
𝟐! 𝟑! 𝟒!
… … … … … … … … … (𝟏)
And,
𝒖(𝒖+𝟏) 𝒖(𝒖𝟐 −𝟏) 𝒖(𝒖𝟐 −𝟏)(𝒖+𝟐)
𝐲(𝐱) = 𝒚𝟎 + 𝒖∆𝒚𝟎 + ∆𝟐 𝒚−𝟏 + ∆𝟑 𝒚−𝟐 + ∆𝟒 𝒚−𝟐 +
𝟐! 𝟑! 𝟒!
… … … … … … … … (𝟐)
Adding (1) and (2) we get,
𝒖(𝒖 − 𝟏) 𝒖(𝒖 + 𝟏) 𝟐
𝟐𝐲(𝐱) = 𝟐𝒚𝟎 + 𝒖[∆𝒚𝟎 + ∆𝒚−𝟏 ] + [ + ] ∆ 𝒚−𝟏
𝟐! 𝟐!
𝒖(𝒖𝟐 − 𝟏) 𝟑
+ [∆ 𝒚−𝟏 + ∆𝟑 𝒚−𝟐 ]
𝟑!
𝒖(𝒖𝟐 − 𝟏)(𝒖 − 𝟐) 𝒖(𝒖𝟐 − 𝟏)(𝒖 + 𝟐) 𝟒
+[ + ] ∆ 𝒚−𝟐 + … … … … … … ..
𝟒! 𝟒!
𝟐𝒖𝟐 𝒖(𝒖𝟐 −𝟏) 𝟐𝒖𝟐 (𝒖𝟐 −𝟏)
= 𝟐𝒚𝟎 + 𝒖[∆𝒚𝟎 + ∆𝒚−𝟏 ] + ∆𝟐 𝒚−𝟏 + [∆𝟑 𝒚−𝟏 + ∆𝟑 𝒚−𝟐 ] + ∆𝟒 𝒚−𝟐 +
𝟐! 𝟑! 𝟒!
………
So,
[∆𝒚𝟎 + ∆𝒚−𝟏 ] 𝒖𝟐 𝟐 𝒖(𝒖𝟐 − 𝟏) [∆𝟐 𝒚−𝟐 + ∆𝟑 𝒚−𝟏 ] 𝒖𝟐 (𝒖𝟐 − 𝟏) 𝟒
𝐲(𝐱) = 𝒚𝟎 + 𝒖 + ∆ 𝒚−𝟏 + + ∆ 𝒚−𝟐
𝟐 𝟐! 𝟑! 𝟐 𝟒!
+ ……
𝒙−𝒙𝟎
where 𝒖 = 𝒉

which is Stirling’s formula.

Example-01: Use Stirling formula to find y35, given that


y20=520, y30=439, y40=346, y50=243
35−30
Soln: Take x0=30. h=10. Then we required the value of y for . 𝑢 = = 5 . Ten the difference
12
table is given below:

33
x u yu Δyu Δ2yu Δ3yu
20 -1 512
-73
30 0 439 -20
40 1 346 -93 10
-10
50 2 243 -103

We know the Stirling formula is:


[∆𝒚𝟎 + ∆𝒚−𝟏 ] 𝒖𝟐 𝟐 𝒖(𝒖𝟐 − 𝟏) [∆𝟐 𝒚−𝟐 + ∆𝟑 𝒚−𝟏 ]
𝐲(𝒖) = 𝒚𝟎 + 𝒖 + ∆ 𝒚−𝟏 + …………
𝟐 𝟐! 𝟑! 𝟐
(−93−73) (.5)2
𝑦.5 = 439 + (. 5) + (−20)
2 2

= 395
Hence the estimate value of 𝑦.5 is 395.

Example-02: Use Stirling formula to find y28, given that


y20=49225, y25=48316, y30=47236, y35=45926, y40=44306
28−30
Soln: Take x0=49225. h=5 as the unit. Then we required the value of y for, 𝑢 = = −0.4 .
5
Then the difference table is given below:
x u yu Δyu Δ2yu Δ3yu Δ4yu
20 -2 49225
25 -1 48316 -909
-171
0 0 47236 -1080 -59
-230 -21
35 1 45926 -1310 -80
-310
40 2 44306 -1620

We know the Stirling formula is:


[∆𝒚𝟎 + ∆𝒚−𝟏 ] 𝒖𝟐 𝟐 𝒖(𝒖𝟐 − 𝟏) [∆𝟐 𝒚−𝟐 + ∆𝟑 𝒚−𝟏 ]
𝐲(𝒖) = 𝒚𝟎 + 𝒖 + ∆ 𝒚−𝟏 + …………
𝟐 𝟐! 𝟑! 𝟐
Putting the values in Stirling formula, we get

34
(−1310−1080) (−0.4)2 (−0.4)(0.16−1) (−59−80)
𝑦−0.4 = 47236 + (−0.4) + (−230) +
2 2 6 2
(0.16)(0.16−1)
+ (−21)
24

= 47692 approx.
Hence the estimate value of 𝑦28 is 47692 approx.

Bessel’s Interpolation Formula:

We know that the gauss’s forward interpolation formula for equal interval
∆𝑦0 ∆2 𝑦−1 ∆3 𝑦−1
𝑦 = 𝑦0 + 𝑢 + 𝑢(𝑢 − 1) + 𝑢(𝑢 − 1)(𝑢 + 1)
1! 2! 3!
4
∆ 𝑦−2
+ 𝑢(𝑢2 − 1)(𝑢 − 2) + ⋯ __(1)
4!

Where,
𝑥−𝑥0
𝑢= ℎ

We know ∆𝑦0 = 𝑦1 − ∆𝑦−1


𝑦0 = 𝑦1 − ∆𝑦0 … (1)
And 𝑦−1 = 𝑦0 − ∆𝑦−1
∆2 𝑦−1 = ∆3 ∆𝑦−1 …………..(3)
Similarly ∆4 𝑦−2 = ∆5 ∆𝑦−2 … … … …(4)
Finally became as
1
𝑦0 + 𝑦1 1 𝑢(𝑢 − 1) (∆2 𝑦−1 + ∆2 𝑦0) 𝑢(𝑢 − 2)(𝑢 − 1) 3
𝑦= + (𝑢 − ) ∆𝑦0 + + ∆ 𝑦−1
2 2 2 2 3!
𝑢(𝑢2 − 1)(𝑢 − 2) (∆4 𝑦−2 + ∆4 𝑦−1 )
+
4! 2
1 2
𝑢(𝑢 − 2)(𝑢 − 1)(𝑢 − 2)
+ ∆5 𝑦−2 + ⋯
5!
This is Bessel’s formula

35
Example:
From the following table, find 𝑒 0.644 by applying Bessel’s formula :
x 0.61 0.62 0.63 0.65 0.66 0.67
y 1.84043 1.85892 1.87761 1.9155 1.93472 1.95423
1 8 0 1 9 7

1
𝑦0 + 𝑦1 1 𝑢(𝑢 − 1) (∆2 𝑦−1 + ∆2 𝑦0) 𝑢(𝑢 − 2)(𝑢 − 1) 3
𝑦= + (𝑢 − ) ∆𝑦0 + + ∆ 𝑦−1
2 2 2 2 3!
𝑢(𝑢2 − 1)(𝑢 − 2) (∆4 𝑦−2 + ∆4 𝑦−1 )
+ …
4! 2
𝑥−𝑥0
𝑢= = 0.4 𝑥 = 0.644 𝑥0 = 0.64 ℎ = 0.01

𝑦(0.644) = 1.906011 − 0.001906 − 0.000228 + 0.0000008 + 0.00000056


=1.904082336
Actual value,
𝑒 0.644 = 1.904081995
𝐸𝑆 = (1.90408225 − 1.904081995)
=0.000000255
𝐸𝐵 = (1.904082336 − 1.904081995)
=0.000000341

36
The Trapezoidal Rule:
Putting 𝑛 = 1 in the formula (1) i.e.,
𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ⋯ ] 𝑑𝑢
2! 3!

𝑛2 𝑛3 𝑛2 ∆2 𝑦0 𝑛4 ∆3 𝑦0
= ℎ [𝑛𝑦0 + ∆𝑦0 + ( 3 − ) + ( 4 − 𝑛3 + 𝑛2 )
2 2 2! 3!

𝑛5 3𝑛4 11𝑛3 ∆4 𝑦0
+( 5 − + − 3𝑛2 ) + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠]
2 3 4!

And neglecting second and higher order differences, we get,


𝑥0 +ℎ 1 ℎ
∫𝑥0 𝑦𝑑𝑥 = ℎ [𝑦0 + 2 ∆𝑦0 ] = 2 [2𝑦0 + (𝑦1 − 𝑦0 )] ( ∵ ∆𝑦0 = 𝑦1 − 𝑦0 )

= 2 [𝑦0 + 𝑦1 ] …………… (2)

Formula (2) gives the area of the one strip bounded by the ordinates 𝑥 = 𝑥0 and 𝑥 = 𝑥0 + ℎ.
Now by using the formula (2), we find that
0 𝑥 +2ℎ ℎ
∫𝑥0+ℎ 𝑦𝑑𝑥 = 2 [𝑦1 + 𝑦2 ]

0 𝑥 +3ℎ ℎ
∫𝑥0+2ℎ 𝑦𝑑𝑥 = 2 [𝑦2 + 𝑦3 ]

…………………………………
𝑥 +𝑛ℎ
0 ℎ
∫𝑥0+(𝑛−1)ℎ 𝑦𝑑𝑥 = 2 [𝑦(𝑛−1) + 𝑦𝑛 ]

Adding these n integrals, we get


𝑏 𝑥 +𝑛ℎ
⸫ 𝐼 = ∫𝑎 𝑦𝑑𝑥 = ∫𝑥 0 𝑦𝑑𝑥
0

𝑥 +ℎ 𝑥 +2ℎ 𝑥 +3ℎ 𝑥 +𝑛ℎ


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

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

= [(𝑦0 + 𝑦𝑛 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + ⋯ + 𝑦𝑛−1 )]
2

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

= distance between two consecutive ordinates × [(mean of the first and last
ordinates) + (sum of all the intermediate ordinates)].
This rule is known as the Trapezoidal rule.
In trapezoidal rule we find the area of each strip separately and then add.

37
In other words, we evaluate the integral on each interval (𝑥𝑖 + 𝑥𝑖+1 ) separately.
Question 1:
5.2
Calculate the value of the integral ∫4 𝑙𝑛𝑥 𝑑𝑥 by Trapezoidal rule and also find the error with
comparing the actual integral value.

Solution:
5.2−4
Divided the range of the integration (4, 5.2) equal parts each of width, ℎ = = 0.2 , where
6
f(x)= ln(x)=y. The values of ln(x) for each point of sub-division are given below:

𝑥 𝑦 = 𝑙𝑛𝑥
𝑥𝑜 = 4.0 𝑦𝑜 = 1.3862944
𝑥1 = 𝑥𝑜 + ℎ = 4.0 + 0.2 = 4.2 𝑦1 = 1.4350845

𝑥2 = 𝑥𝑜 + 2ℎ = 4.4 𝑦2 = 1.4816045

𝑥3 = 𝑥𝑜 + 3ℎ = 4.6 𝑦3 = 1.5260563
𝑥4 = 𝑥𝑜 + 4ℎ = 4.8 𝑦4 = 1.5686159

𝑥5 = 𝑥𝑜 + 5ℎ = 5.0 𝑦5 = 1.6094379
𝑥6 = 𝑥𝑜 + 6ℎ = 5.2 𝑦6 = 1.6486586

From Trapezoidal rule, we have:


5.2

∫ 𝑙𝑛𝑥 𝑑𝑥 = [(𝑦 + 𝑦6 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 )]
4 2 𝑜
0.2
= [3.034953 + 2 × 7.6207991]
2

= 0.1 × 18.276551
= 1.8276551
5.2
Actual value of ∫4 𝑙𝑛𝑥 𝑑𝑥 = [𝑥(ln 𝑥 − 1)]5.2
4

= 3.3730249 − 1.5451774
= 1.8278475
Hence the error is: 1.8278475 − 1.8276551 = 0.0001924

38
Question 2:
1.4
Evaluate the value of the integral ∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒 𝑥 )𝑑𝑥 by Trapezoidal rule. After finding
the true value of the integral, calculate the error.
Solution:
1.4−0.2
Divide the range of integration (0.2, 1.4) into 12 equal parts each of width = = 0.1. Hence
12
h=0.1. the values of the function at each point of sub-division are given below:

𝑥 sin 𝑥 𝑙𝑛𝑥 𝑒𝑥 𝑦 = sin 𝑥 − 𝑙𝑛𝑥 + 𝑒 𝑥


𝑥0 = 0.2 0.19867 −1.60943 1.22140 𝑦0 = 3.02950
𝑥1 = 𝑥0 + ℎ = 0.3 0.29552 −1.20397 1.34986 𝑦1 = 2.84935
𝑥2 = 𝑥0 + 2ℎ = 0.4 0.38942 −0.91629 1.49182 𝑦2 = 2.79753
𝑥3 = 𝑥0 + 3ℎ = 0.5 0.47943 −0.69315 1.64872 𝑦3 = 2.82130
𝑥4 = 𝑥0 + 4ℎ = 0.6 0.56464 −0.51083 1.82212 𝑦4 = 2.89759
𝑥5 = 𝑥0 + 5ℎ = 0.7 0.64422 −0.35667 2.01375 𝑦5 = 3.01464
𝑥6 = 𝑥0 + 6ℎ = 0.8 0.71736 −0.22314 2.22554 𝑦6 = 3.16604
𝑥7 = 𝑥0 + 7ℎ = 0.9 0.78333 −0.10536 2.45960 𝑦7 = 3.34829
𝑥8 = 𝑥0 + 8ℎ = 1.0 0.84147 0.00000 2.71828 𝑦8 = 3.55975
𝑥9 = 𝑥0 + 9ℎ = 1.1 0.89121 0.09531 3.00417 𝑦9 = 3.80007
𝑥10 = 𝑥0 + 10ℎ = 1.2 0.93204 0.18232 3.32012 𝑦10 = 4.06984
𝑥11 = 𝑥0 + 11ℎ = 1.3 0.96356 0.26236 3.66930 𝑦11 = 4.37050
𝑥12 = 𝑥0 + 12ℎ = 1.4 0.98545 0.33647 4.05520 𝑦12 = 4.70418

By Trapezoidal rule, we get,


1.4 ℎ
∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒 𝑥 )𝑑𝑥 = 2 [(𝑦0 + 𝑦12 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 + 𝑦6 + 𝑦7 + 𝑦8 + 𝑦9 +
𝑦10 + 𝑦11 )]
0.1 0.1
= [7.73368 + 2(36.69481)] = (81.1233)
2 2

= 4.05617

39
1.4
Now, the actual value of ∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒 𝑥 )𝑑𝑥 = [−cos 𝑥 − 𝑥(𝑙𝑛𝑥 − 1) + 𝑒 𝑥 ]1.4
0.2

= [{−cos 1.4 − (1.4)(𝑙𝑛 1.4 − 1) + 𝑒 1.4 } − {−cos 0.2 − (0.2)(𝑙𝑛0.2 − 1) + 𝑒 0.2 }]


= 4.05095
Hence the error is: 4.05095 − 4.05617 = −0.00522
Question 3:
𝜋
Calculate an approximate value of ∫02 sin 𝑥 𝑑𝑥 by the Trapezoidal rule using 11 ordinates.

Solution:
First we divide the range of integration into ten equal parts by taking the interval of differencing
𝜋
−0 𝜋
2
h= 10 = 20 and then we compute the values of the function 𝑓(𝑥) = sin 𝑥 for each point of sub-
division. These computed values are as shown in the following table.
𝑥 𝑦 = sin 𝑥
𝑥0 = 0 𝑦0 = 0.00000
𝜋 𝑦1 = 0.15643
𝑥1 = 𝑥0 + ℎ =
20
2𝜋 𝑦2 = 0.30902
𝑥2 = 𝑥0 + 2ℎ =
20
3𝜋 𝑦3 = 0.45399
𝑥3 = 𝑥0 + 3ℎ =
20
4𝜋 𝑦4 = 0.58778
𝑥4 = 𝑥0 + 4ℎ =
20
5𝜋 𝑦5 = 0.70711
𝑥5 = 𝑥0 + 5ℎ =
20
6𝜋 𝑦6 = 0.80902
𝑥6 = 𝑥0 + 6ℎ =
20
7𝜋 𝑦7 = 0.89101
𝑥7 = 𝑥0 + 7ℎ =
20
8𝜋 𝑦8 = 0.95106
𝑥8 = 𝑥0 + 8ℎ =
20
9𝜋 𝑦9 = 0.98769
𝑥9 = 𝑥0 + 9ℎ =
20
10𝜋 𝑦10 = 1.00000
𝑥10 = 𝑥0 + 10ℎ =
20

By Trapezoidal rule, we have,

40
𝜋

∫02 sin 𝑥 𝑑𝑥 = 2 [(𝑦0 + 𝑦10 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 + 𝑦6 + 𝑦7 + 𝑦8 + 𝑦9 )]
(𝜋⁄20) 𝜋
= [1.00000 + 2(5.85311)] = [12.70622]
2 40

= 0.9981
𝜋
⁄2
Now the exact value of the integral is: ∫02 sin 𝑥 𝑑𝑥 = [cos 𝑥]0𝜋 = 1.0000

Therefore, the error is: 1.0000 − 0.9981 = 0.0019

Simpson’s one third rule


Putting n=2 in formula (1) i.e.,
𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ⋯ ] 𝑑𝑢
2! 3!

𝑛2 𝑛3 𝑛2 ∆2 𝑦0 𝑛4 ∆3 𝑦0
= ℎ [𝑛𝑦0 + ∆𝑦0 + ( 3 − ) + ( 4 − 𝑛3 + 𝑛2 )
2 2 2! 3!

𝑛5 3𝑛4 11𝑛3 ∆4 𝑦0
+( 5 − + − 3𝑛2 ) + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠]
2 3 4!

And neglecting the third and higher order differences, we obtain


𝑥0 +2ℎ 22 23 22 ∆2 𝑦0
∫𝑥0 𝑦𝑑𝑥 = ℎ [2𝑦0 + ∆𝑦0 + ( 3 − ) ]
2 2 2!

2 1
=h [2y0 + 2(𝑦1 − 𝑦0 ) + (3 . 2) (𝑦2 − 2𝑦1 + 𝑦0 )]

[as ∆2 𝑦0 = ∆𝑦1 − ∆𝑦0 = (𝑦2 − 𝑦1 ) − (𝑦1 − 𝑦0 )]



= 3 [𝑦0 + 4𝑦1 + 𝑦0 ] ………………… (3)

Clearly (3) determines the area of two strips, bounded by the ordinates at
𝑥0 , 𝑥0 + ℎ 𝑎𝑛𝑑 𝑥0 + 2ℎ , at a time. Now by using (3), if n is a multiple of 2 i.e.
n is an even positive integer, we obtain,
𝑥0 +4ℎ ℎ
∫𝑥 𝑦𝑑𝑥 = [𝑦2 + 4𝑦3 + 𝑦4 ]
0 +2ℎ 3

𝑥 +6ℎ
0 ℎ
∫𝑥0+4ℎ 𝑦𝑑𝑥 = 3 [𝑦4 + 4𝑦5 + 𝑦9 ]

………………………………………
𝑥 +𝑛ℎ
0 ℎ
∫𝑥0+(𝑛−2)ℎ 𝑦𝑑𝑥 = 3 [𝑦(𝑛−2) + 4𝑦(𝑛−1) + 𝑦𝑛 ]

Adding all these integrals, we get

41
𝑏
𝑥0 +𝑛ℎ
𝐼 = ∫ 𝑦𝑑𝑥 = ∫ 𝑦𝑑𝑥
𝑥0
𝑎
𝑥 +2ℎ 𝑥 +4ℎ 𝑥 +6ℎ 𝑥 +𝑛ℎ
= ∫𝑥 0 𝑦𝑑𝑥 +∫𝑥 0 𝑦𝑑𝑥 + ∫𝑥 0 𝑦𝑑𝑥 + ⋯ + ∫𝑥 0 𝑦𝑑𝑥
0 0+2ℎ 0+4ℎ 0+(𝑛−2)ℎ

ℎ ℎ
= 3 [𝑦0 + 4𝑦1 + 𝑦0 ] + 3 [𝑦2 + 4𝑦3 + 𝑦4 ] + ⋯ + [𝑦(𝑛−2) + 4𝑦(𝑛−1) + 𝑦𝑛 ]

= 3 [(𝑦0 + 𝑦𝑛 ) + 4(𝑦1 + 𝑦3 + … + 𝑦𝑛−1 ) + 2(𝑦2 +𝑦4 + ⋯ + 𝑦𝑛−2 )]

= 3[(sum of extreme ordinates) + 4(sum of odd ordinates) + 2(sum of even

ordinates)].
This is known as Simpson’s one third rule.
In this method we find the area of two strips at a time. Also in this method, in two consecutive
intervals we replace y by a second degree polynomial as its differences of order higher than 2
will vanish.
Question 1:
1 𝑑𝑥 1
Find ∫0 by using Simpson’s 3 rule. Hence obtain the approximate value of 𝜋 in each case.
1+𝑥 2

Solution:
1−0 1
Divide the range of integration (0,1) into 6 equal parts each of width = 6. The values of 𝑓(𝑥)
6
at each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2
𝑥𝑜 = 0 1
𝑦𝑜 = = 1.0000000
1
1 1 36
𝑥1 = 𝑥𝑜 + ℎ = 0 + = 𝑦1 = = 0.9729729
6 6 37
2 36
𝑥2 = 𝑥𝑜 + 2ℎ = 𝑦2 = = 0.9000000
6 40
3 36
𝑥3 = 𝑥𝑜 + 3ℎ = 𝑦3 = = 0.8000000
6 45
4 36
𝑥4 = 𝑥𝑜 + 4ℎ = 𝑦4 = = 0.6923076
6 52
5 36
𝑥5 = 𝑥𝑜 + 5ℎ = 𝑦5 = = 0.5901639
6 61
𝑥6 = 𝑥𝑜 + 6ℎ = 1 1
𝑦6 = = 0.5000000
2

42
1
By Simpson’s ‘3’ rule, we get,
1 𝑑𝑥 ℎ
∫0 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦6 ) + 2(𝑦2 + 𝑦4 )]
1+𝑥 2
1
= 18 [1.5000000 + 4(2.3631369) + 2(1.5923077)]
1
= 18 (14.137163) = 0.7853979 … … … … … … (1)
1 𝑑𝑥 𝜋
But ∫0 = [tan−1 𝑥]01 = tan−1 1 − tan−1 0 = … … … … … … (2)
1+𝑥 2 4

Now from (1) and (2) we get,


𝜋
= 0.7853979 or, 𝜋 = 3.1415916
4

Question 2:
1 3
Calculate by Simpson’s ‘3’ rule, an approximation value of ∫−3 𝑥 4 𝑑𝑥 by taking seven equidistant
ordinates. Compare it with the exact value.
Solution:
3−(−3)
Divide the range of integration (-3,3) into six equal parts each of width= = 1. Hence h=1.
6
The values of the function for each point of sub-division are given below:
𝑥 𝑦 = 𝑥4
𝑥0 = −3 𝑦0 = 81
𝑥1 = 𝑥0 + ℎ = −2 𝑦1 = 16
𝑥2 = 𝑥0 + 2ℎ = −1 𝑦2 = 1
𝑥3 = 𝑥0 + 3ℎ = 0 𝑦3 = 0
𝑥4 = 𝑥0 + 4ℎ = 1 𝑦4 = 1
𝑥5 = 𝑥0 + 5ℎ = 2 𝑦5 = 16
𝑥6 = 𝑥0 + 6ℎ = 3 𝑦6 = 81

1
By Simpson’s ‘3’ rule, we get,
3 ℎ
∫−3 𝑥 4 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
1
= 3 [162 + 4 × 32 + 2 × 2]
1
= 3 × 294 = 98

43
3
3 𝑥5 1 1
Now the exact value is: ∫−3 𝑥 4 𝑑𝑥 = [ 5 ] = 5 [(3)5 − (−3)5 ] = 5 × 486 = 97.2
−3

Hence the error is: 97.2 − 98 = −0.8

Question 3:
0.7 1
1
Evaluate ∫0.5 𝑥 2 𝑒 −𝑥 𝑑𝑥 approximately by using Simpson’s ‘3’ rule.

Solution:
0.7−0.5
Divide the range of integration (0.5, 0.7) into 4 equal parts each of width= = 0.05. Hence
4
h=0.05. The values of the function for each point of sub-division are given below:
1
𝑥
𝑦 = 𝑥 2 𝑒 −𝑥
𝑥0 = 0.50 𝑦0 = 0.4288818
𝑥1 = 𝑥0 + ℎ = 0.55 𝑦1 = 0.4278774
𝑥2 = 𝑥0 + 2ℎ = 0.60 𝑦2 = 0.4251076
𝑥3 = 𝑥0 + 3ℎ = 0.65 𝑦3 = 0.4208867
𝑥4 = 𝑥0 + 4ℎ = 0.70 𝑦4 = 0.4154730

1
By Simpson’s ‘3’ rule, we get,
1
0.7 ℎ
∫0.5 𝑥 2 𝑒 −𝑥 𝑑𝑥 = 3 [(𝑦0 + 𝑦4 ) + 4(𝑦1 + 𝑦3 ) + 2𝑦2 ]
0.05
= [0.8443548 + 3.3950564 + 0.8502152]
3

= 0.0848271

Simpson’s three- eighth rule


Putting n=3 in formula
𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ⋯ ] 𝑑𝑢
2! 3!

𝑛2 𝑛3 𝑛2 ∆2 𝑦0 𝑛4 ∆3 𝑦0
= ℎ [𝑛𝑦0 + ∆𝑦0 + ( 3 − ) + ( 4 − 𝑛3 + 𝑛2 )
2 2 2! 3!

𝑛5 3𝑛4 11𝑛3 ∆4 𝑦0
+( 5 − + − 3𝑛2 ) + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠]
2 3 4!

And neglecting fourth and higher order differences, we obtain

44
𝑥0 +3ℎ 32 33 32 ∆2 𝑦0 34 ∆3 𝑦0
∫𝑥0 𝑦𝑑𝑥 = ℎ [3𝑦0 + ∆𝑦0 + ( 3 − ) + ( 4 − 33 + 32 ) ]
2 2 2! 3!

9 9
= ℎ [3𝑦0 + 2 (𝑦1 − 𝑦0 ) + 4 (𝑦2 − 2𝑦1 + 𝑦0 )
9
+ 8 (𝑦3 − 3𝑦2 + 3𝑦1 − 𝑦0 )]
3ℎ
= [𝑦0 − 3𝑦1 + 3𝑦2 + 𝑦3 ] ……………………… (4)
8

Clearly (3) determines the area of three strips at a time, which bounded by the ordinates 𝑥0 , 𝑥0 +
ℎ , 𝑥0 + 2ℎ and 𝑥0 + 3ℎ . Now by using (4), if n is a multiple of three, we obtain
𝑥 +6ℎ
0 3ℎ
∫𝑥0+3ℎ 𝑦𝑑𝑥 = [𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ]
8

………………………………………………………
𝑥 +𝑛ℎ
0 3ℎ
∫𝑥0+(𝑛−3)ℎ 𝑦𝑑𝑥 = [𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 ]
8

Adding all these integrals, we get


𝑥0 +𝑛ℎ 𝑥0 +3ℎ 𝑥0 +6ℎ 𝑥0 +𝑛ℎ
∫ 𝑦𝑑𝑥 = ∫ 𝑦𝑑𝑥 + ∫ 𝑦𝑑𝑥 + ⋯ + ∫ 𝑦𝑑𝑥
𝑥0 𝑥0 𝑥0 +3ℎ 𝑥0 +(𝑛−3)ℎ

3ℎ 3ℎ
= [𝑦0 − 3𝑦1 + 3𝑦2 + 𝑦3 ] + [𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ]
8 8
3ℎ
+⋯+ [𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 ]
8
3ℎ
= [(𝑦0 + 𝑦𝑛 ) + 3((𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 + 𝑦7 + ⋯ + 𝑦𝑛−1 )
8

+2(𝑦2 + 𝑦6 + ⋯ + 𝑦𝑛−3 )]
This is known as Simpson’s three- eight rule.

Problem Solving using Simpson’s three- eight rule Formula:


Question 1:
6 𝑑𝑥 3
Evaluate ∫0 by using Simpson’s ‘8’ rule.
1+𝑥 2

Solution:
6−0
Divide the range of integration (0, 6) into six equal parts each of width= = 1. Hence h=1.
6
The values of the function for each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2

45
𝑥0 = 0 1
𝑦0 = = 1.0000000
1
𝑥1 = 𝑥0 + ℎ = 1 1
𝑦1 = = 0.5000000
2
𝑥2 = 𝑥0 + 2ℎ = 2 1
𝑦2 = = 0.2000000
5
𝑥3 = 𝑥0 + 3ℎ = 3 1
𝑦3 = = 0.1000000
10
𝑥4 = 𝑥0 + 4ℎ = 4 1
𝑦4 = = 0.0588235
17
𝑥5 = 𝑥𝑜 + 5ℎ = 5 1
𝑦5 = = 0.0384615
26
𝑥6 = 𝑥𝑜 + 6ℎ = 6 1
𝑦6 = = 0.0270270
37

1
By Simpson’s ‘3’ rule, we get,
6 𝑑𝑥 3ℎ
∫0 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
1+𝑥 2 8
3
= 8 [1.0270270 + 2.391855 + 0.200000
3
= 8 × 3.618882 = 1.3570808

Question 2:
3 7 𝑑𝑥
Use Simpson’s ‘8’ rule to find the value of ∫1 approximately and compare it with the actual
𝑥
value.
Solution:
7−1
Divide the range of integration (1, 7) into six equal parts each of width= = 1. Hence h=1.
6
The values of y for each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2
𝑥0 = 1 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 2 1
𝑦1 =
2
𝑥2 = 𝑥0 + 2ℎ = 3 1
𝑦2 =
3

46
𝑥3 = 𝑥0 + 3ℎ = 4 1
𝑦3 =
4
𝑥4 = 𝑥0 + 4ℎ = 5 1
𝑦4 =
5
𝑥5 = 𝑥𝑜 + 5ℎ = 6 1
𝑦5 =
6
𝑥6 = 𝑥𝑜 + 6ℎ = 7 1
𝑦6 =
7

1
By Simpson’s ‘3’ rule, we get,
7 𝑑𝑥 3ℎ
∫1 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
𝑥 8
3
= 8 [1.1429 + (3 × 1.2) + (2 × 0.25)]
3
= 8 × 5.2429 = 1.9661
7 𝑑𝑥
Now the actual value is: ∫1 = [𝑙𝑛𝑥]17 = ln 7 − ln 1 = 1.9459
𝑥

Hence, the error is: 1.9459 − 1.9661 = −0.0202


Question 3:
3 1 3
Evaluate ∫0 𝑑𝑥 by using Simpson’s ‘8’ rule and compare it with the actual value.
1+𝑥

Solution:
3−0
Divide the range of integration (0, 3) into six equal parts each of width= = 0.5. Hence
6
h=0.5. The values of y for each point of sub-division are given below:

1
𝑥 𝑦 = 1+𝑥
𝑥0 = 0 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0.5 𝑦1 = 0.6667
𝑥2 = 𝑥0 + 2ℎ = 1 𝑦2 = 0.5
𝑥3 = 𝑥0 + 3ℎ = 1.5 𝑦3 = 0.4
𝑥4 = 𝑥0 + 4ℎ = 2 𝑦4 = 0.3333
𝑥5 = 𝑥𝑜 + 5ℎ = 2.5 𝑦5 = 0.2857
𝑥6 = 𝑥𝑜 + 6ℎ = 3 𝑦6 = 0.25

47
1
By Simpson’s ‘3’ rule, we get,
3 1 3ℎ
∫0 𝑑𝑥 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
1+𝑥 8

3(0.5)
= [1.25 + (3 × 1.7857) + (2 × 0.4)]
8
3(0.5)
= × 7.4071 = 1.3888
8

3 1
Now the actual value is: ∫0 𝑑𝑥 = [ln (1 + 𝑥)]30 = ln 4 − ln 1 = 1.3863
1+𝑥

Hence, the error is: 1.3863 − 1.3888 = −0.0025

Romberg Integration:

Romberg Integration is an extrapolation of two results of the trapezoid method applied to a


regular partition cut into subintervals of sizes that are consecutive powers of 2.

Define a sequence of values Ai where:

A1 = Trapezoid method with 20 = 1 partition i.e. 1⁄2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))


1
A2 = Trapezoid method with 21 = 2 partitions (2[A1+ℎ1(𝑓(𝑎 + ℎ2)])
1
A3 = Trapezoid method with 22 = 4 partitions (2[A2+ℎ2{(𝑓(𝑎 + ℎ3)+(𝑓(𝑎 + 3ℎ3)}])

A4 = Trapezoid method with 23 = 8 partitions ………………


. . .
. . .
. . .

Each Ai calculation is considered an iteration.


In generally we get,
1 𝑘−2
Ak = 2 [Ak-1+ℎk-1∑2𝑖=1 𝑓(𝑎 + (2𝑖 − 1) ℎk)]

48
For each 𝑘 = 2,3,4 … …
A1
4 A2 − A1
B1 =
3
16 B2 − B1
A2 C1 =
15
4 A3 − A2
B2 =
3
16 B3 − B2
A3 C2 =
15
4 A4 − A3
B3 =
3
A4
. . .
. . .
. . .

The values for Romberg’s Method of integration con be arranged in a triangular matrix.
1 2 3 4 5 6
1 A1
2 A2 B1
3 A3 B2 C1
4 A4 B3 C2 D1
5 A5 B4 C3 D2 E1
6 A6 B5 C4 D3 E2 F1

The best possible estimate in each row is the right most entry: A1, B1 ,C1 ,D1 ,E1 ,F1.
Since we will run out of letters after 6 rows we express this with R(i,j).
1 2 3 4 5 6
1 R(1,1)
2 R(2,1) R(2,2)
3 R(3,1) R(3,2) R(3,3)
4 R(4,1) R(4,2) R(4,3) R(4,4)
5 R(5,1) R(5,2) R(5,3) R(5,4) R(5,5)
6 R(6,1) R(6,2) R(6,3) R(6,4) R(6,5) R(6,6)

The best possible estimate in each row is the right most entry: R(i,i) .
The R(i,j) can be obtained in the following way:

49
R(i,1) is always the trapezoid method applied with a partition size of 2i .
1 2 3 4 5 6
1 R(1,1)
2 R(2,1) R(2,2)
3 R(3,1) R(3,2) R(3,3)
4 R(4,1) R(4,2) R(4,3) R(4,4)
5 R(5,1) R(5,2) R(5,3) R(5,4) R(5,5)
6 R(6,1) R(6,2) R(6,3) R(6,4) R(6,5) R(6,6)

4𝑗−1 𝑅(𝑖,𝑗−1)−𝑅(𝑖−1,𝑗−1)
R(i,j)= ; i,j= 2,3,4….
4𝑗−1 −1

For the rest of them a triangular pattern exist as how one fill in the other entries.
4 R(2,1) − R(1,1)
R(2, 2) =
4 −1 42 R(3, 2) − R(2, 2)
R(3,3) =
4 R(3,1) − R(2,1) 42 − 1 43 R(4,3) − R(3,3)
R(3, 2) = R(4, 4) =
4 −1 42 R(4,1) − R(3, 2) 43 − 1
R(4,3) =
4 R(4,1) − R(3,1) 42 − 1 43 R(5,3) − R(4,3)
R(4, 2) = R(5, 4) = .......
4 −1 42 R(5, 2) − R(4, 2) 43 − 1
R(5,3) =
4 R(5,1) − R(4,1) 42 − 1 43 R(6,3) − R(5,3)
R(5, 2) = R(6, 4) = .......
4 −1 42 R(6, 2) − R(3, 2) 43 − 1
4 R(6,1) − R(5,1) R(6,3) =
R(6, 2) = 42 − 1
4 −1

Problem Solving using Romberg Integration Formula:


Question 1:
1 𝑑𝑥
Apply Romberg Extrapolation to get the best possible estimate for: ∫0 for n=4.
1+𝑥

Solution:
𝑏−𝑎 1 𝑏−𝑎 1
Here, 𝑎 = 0, 𝑏 = 1, ℎ1 = (𝑏 − 𝑎) = 1, ℎ2 = = 2, ℎ3 = = 4,
2 22
𝑏−𝑎 1
ℎ4 = =8
23

50
Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
3
𝑅(1,1) = 4 = 0.75

1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]

𝑅(2,1) = 0.708331

1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]

𝑅(3,1) = 0.697024

1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]

𝑅(4,1) = 0.694122

4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 0.69444; 𝑅(3,3) = = 0.693176
4−1 42 −1

4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 0.693255; 𝑅(4,3) = = 0.693148
4−1 42 −1

4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 0.693155; 𝑅(4,4) = = 0.693148
4−1 43 −1

𝑅(1,1) = 0.75
𝑅(2,1) = 0.708331 𝑅(2,2) = 0.69444
𝑅(3,1) = 0.697024 𝑅(3,2) = 0.693255 𝑅(3,3) = 0.693176
𝑅(4,1) = 0.694122 𝑅(4,2) = 0.693155 𝑅(4,3) = 0.693148 𝑅(4,4) = 0.693148

Hence the best possible estimate is 0.693148 .


1 𝑑𝑥
Now, exact value is: ∫0 = [ln (1 + 𝑥)]10 = 𝑙𝑛2 − 𝑙𝑛1 = 0.69314718
1+𝑥

So, the error is: 0.69314718 − 0.693148 = −0.00000082

51
Question 2:
2 𝑑𝑥
Apply Romberg Extrapolation to get the best possible estimate for: ∫1 for n=4.
𝑥

Solution:
𝑏−𝑎 1 𝑏−𝑎 1
Here, 𝑎 = 1, 𝑏 = 2, ℎ1 = (𝑏 − 𝑎) = 1, ℎ2 = = 2, ℎ3 = = 4,
2 22
𝑏−𝑎 1
ℎ4 = =8
23

Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
3
𝑅(1,1) = 4 = 0.75

1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]

𝑅(2,1) = 0.70833333

1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]

𝑅(3,1) = 0.69702381

1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]

𝑅(4,1) = 0.69412185

4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 0.69444444; 𝑅(3,3) = = 0.69317461
4−1 42 −1

4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 0.69325397; 𝑅(4,3) = = 0.6931479
4−1 42 −1

4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 0.69315453; 𝑅(4,4) = = 0.69314748
4−1 43 −1

52
𝑅(1,1) = 0.75

𝑅(2,1) = 𝑅(2,2)
0.70833333 = 0.69444444
𝑅(3,1) = 𝑅(3,2) 𝑅(3,3)
0.69702381 = 0.69325397 = 0.69317461
𝑅(4,1) = 𝑅(4,2) 𝑅(4,3) = 0.6931479 𝑅(4,4) =
0.69412185 = 0.69315453 0.69314748

Hence the best possible estimate is 0.69314748 .


2 𝑑𝑥
Now, exact value is: ∫1 𝑥
= [ln (𝑥)]12 = 𝑙𝑛2 − 𝑙𝑛1 = 0.69314718

So, the error is: 0.69314718 − 0.69314748 = −0.0000003

Question 3:
𝜋
Use Romberg Extrapolation to get the best possible estimate for: ∫0 𝑓(𝑥)𝑑𝑥 where 𝑓(𝑥) = sin 𝑥,
for n=4.

Solution:
𝑏−𝑎 𝜋 𝑏−𝑎 𝜋
Here, 𝑎 = 0, 𝑏 = 𝜋, ℎ1 = (𝑏 − 𝑎) = 𝜋, ℎ2 = = 2, ℎ3 = = 4,
2 22
𝑏−𝑎 𝜋
ℎ4 = =
23 8

Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
1
𝑅(1,1) = 2 × 𝜋 × (sin 0 + sin 𝜋) = 0

1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]
𝜋
𝑅(2,1) = = 1.5708
2

1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]

53
𝑅(3,1) = 1.8961

1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]

𝑅(4,1) = 1.9742

4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 2.0944; 𝑅(3,3) = = 1.9986
4−1 42 −1

4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 2.0046; 𝑅(4,3) = = 2.0000
4−1 42 −1

4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 2.0003; 𝑅(4,4) = = 2.0000
4−1 43 −1

𝑅(1,1) = 0
𝑅(2,1) = 1.5708 𝑅(2,2) = 2.0944
𝑅(3,1) = 1.8961 𝑅(3,2) = 2.0046 𝑅(3,3) = 1.9986
𝑅(4,1) = 1.9742 𝑅(4,2) = 2.0003 𝑅(4,3) = 2.0000 𝑅(4,4) = 2.0000

Hence the best possible estimate is 2.0000


𝜋
So, ∫0 sin 𝑥 𝑑𝑥 ≈ 𝑅(4,4) = 2.0000
𝜋
Here, the exact value is: ∫0 sin 𝑥 𝑑𝑥 = [−cos 𝑥]0𝜋 = 2

54
WEDDLE’S RULE
Weddle’s rule can be expressed as:
𝑥0+𝑛ℎ
∫𝑥0 𝑓(𝑥)𝑑𝑥 = 3/10{𝑓(0) + 5𝑓(ℎ) + 𝑓(2ℎ) + 6𝑓(3ℎ) + 𝑓(4ℎ) + 𝑓(4ℎ) + 𝑓(4ℎ) +
𝑓(6ℎ) ∗ 4 5𝑓(5ℎ) + 𝑓(6ℎ)}
1 𝑑𝑥
Problem: Find the approximate value of ∫0 by using weddles rule.
1+𝑥2

Solution: Here,
h=1/6 and y=1/1+x2
X Y Weddle’s factor Product
0 1 1 1
0+1/6=1/6 0.973 5 4.865
0+2/3=1/3 0.9 1 0.9
0+3/6=1/2 0.8 6 4.8
2/3 0.6923 1 0.6923
5/6 0.5902 5 2.95
1 0.5 1 0.5

Product total:15.7083
1
The approximate value of ∫0 𝑦𝑑𝑥

=3/10 h (15.7083)
=0.78542
Problem: A smooth curve passes through the following points (0,3.049) , (1,3.724) , (2,4.492) ,
(3,5.359) , (4,6.332) ,(5,7.415) ,(6,8.615) use weddl’s rule to find the area of the curve x=0 upto
x=6.
Solution: here, h=1
Approximate value is= 3/10
*h{(3.049*1)+(3.724*5)+(4.492*1)+(5.359*6)+(6.332*1)+(7.415*5)+(8.615*1)}
=3/10*1*110.337
=33.101

55
SOLUTION OF EQUATIONS
Suppose, 𝑓(𝑥) = 0 is a equation which may be algebraic or transcendental or combination of
both. Finding roots of 𝑓(𝑥) = 0 means find the values of 𝑥 for which 𝑓(𝑥) = 0. So, 𝑥 = 𝑎 is a root
of the equation 𝑓(𝑥) = 0 if and only if 𝑓(𝑎) = 0. But if 𝑥 = 𝑎 is a numerical solution of 𝑓(𝑥) = 0
after some iteration then 𝑓(𝑎) may be equal to zero or approximately zero.
Bisection Method: If 𝑓(𝑥) is continuous in the interval (𝑎, 𝑏) such that 𝑓(𝑎) and 𝑓(𝑏) are of
opposite signs, then 𝑓(𝑎). 𝑓(𝑏) < 0

Let 𝑓(𝑎) = −𝑣𝑒 and 𝑓(𝑏) =


+𝑣𝑒.
So, 𝑓(𝑥) crosses the 𝑥 axis between 𝑎 and 𝑏 then the first approximation to the root is, 𝑥1 = (1/ 2
)(𝑎 + 𝑏)
Now, three cases can happen
1. 𝑓(𝑥1 ) = 0, then 𝑥1 is the root of 𝑓(𝑥) = 0
2. 𝑓(𝑥1 ) < 0, then root lies between 𝑥1 and 𝑏
3. 𝑓(𝑥1 ) > 0, then root lies between 𝑎 and 𝑥1
Suppose 𝒇(𝒙1 ) > 𝟎, then 𝒂 < 𝒓𝒐𝒐𝒕 < 𝒙1
So, second approximation to the root is,
𝑥2 = (1/ 2) (𝑎 + 𝑥1 )
Again, three cases can happen
4. 𝑓(𝑥2 ) = 0, then 𝑥2 is the root of 𝑓(𝑥) = 0

56
5. 𝑓(𝑥2 ) < 0, then root lies between 𝑥2 and 𝑥1
6. 𝑓(𝑥2 ) > 0, then root lies between 𝑎 and 𝑥2
Suppose 𝒇(𝒙2 ) < 𝟎, then 𝒙2 < 𝒓𝒐𝒐𝒕 < 𝒙1
So, third approximation to the root is
X3 = 1/ 2 (𝑥2 + 𝑥1 )
…. ….. ….. …. ….. …..
…. ….. ….. …. ….. ….. This process continues till 𝑓(𝑥n) = 0 or approximately 0 then, 𝑥n is the
root.
EXAMPLE:
Question-1: Find the root of the following polynomial function using the Bisection method: 𝒙 3 −
𝟒𝒙 − 𝟗.
Solution: Let, 𝑓(𝑥) = 𝑥 3 − 4𝑥 − 9
𝑓(2) = 8 − 8 − 9 = −9
𝑓(3) = 27 − 12 − 9 = 6
So, the root lies in [2,3] First iteration: 𝑥1 = 2 + 3 2 = 2.5
Now, 𝑓(𝑥1 ) = 2.5 3 − 4(2.5) − 9 = −3.375
Then, 𝑓(𝑥1 ). 𝑓(3) < 0
So, the root lies in [2.5, 3]
Second iteration:
X2 = 2.5 + 3 2 = 2.75
Now, 𝑓(𝑥2 ) = (2.75) 3 − 4(2.75) − 9 = 0.7969
Then, 𝑓(2.5). 𝑓(𝑥2 ) < 0
So, the root lies in [2.5, 2.75]

57
Hence we can make the following iteration table:
Iterations A B xn f (a) f (b) f (xn)
1 2 3 2.5 -9 6 -3.375
2 2.5 3 2.75 -3.375 6 0.7969
3 2.5 2.75 2.625 -3.375 0.7969 -1.4121
4 2.625 2.75 2.6875 -1.4121 0.7969 0.3391
5 2.6875 2.75 2.71875 -0.3391 0.7969 0.2209
6 2.6875 2.71875 2.703125 -0.3391 0.2209 -0.0615
7 2.703125 2.71875 2.7109 0.2209 -0.0615 0.0787
8 2.703125 2.7109 2.707 -0.0615 0.0787 0.00849

So, after 8th iteration the root of the function is 2.707


Question-2: Find the root of 𝒙 2 − 𝟓 = 𝟎 by using the Bisection method.
Solution: Here, 𝑓(𝑥) = 𝑥 2 – 5
𝑓(2) = 4 − 5 = −1
𝑓(3) = 9 − 5 = 4
So the root lies in [2,3]
First iteration: 𝑥1 = 2 + 3 2 = 2.5
Now, 𝑓(𝑥1 ) = 2.5 2 − 5 = 1.25
Then, 𝑓(2). 𝑓(𝑥1 ) < 0
So, the root lies in [2,2.5]
Hence, we can make the following iteration table:
Iterations a B xn f (a) f (b) f (xn)
1 2 3 2.5 -1 4 1.25
2 2 2.5 2.25 -1 1.25 0.0625
3 2 2.25 2.2125 -1 0.0625 -0.48437
4 2.2125 2.25 2.23125 -0.1048 0.0625 -0.02152
5 2.23125 2.25 2.2406 0.3476 0.0625 0.0204
6 2.23125 2.2406 2.2359 -0.02152 0.0202 -0.0007
th
So, after 6 iteration the root of the equation is 2.2359 (approximately).

58
Newton-Raphson Method
The desired root of the equation f(x)=0 and let h be the correction which must be applied to x0
the extant value of the root. Then
( 𝑥0 + ℎ )is the root of the equation f(x)=0. So that f(x+h)=0.
Expanding by taylor series,
ℎ ℎ2
𝑓(𝑥0 + ℎ) = 𝑓(𝑥0 ) + 1! 𝑓 ′ (𝑥0 ) + 𝑓′′(𝑥0 ) +…….=0
2!
−𝑓(𝑥0 )
This gives,ℎ = provided that 𝑓(𝑥0 ) ≠ 0
𝑓(𝑥0 )

𝑥1 = 𝑥0 + ℎ
𝑥2 = 𝑥0 + ℎ + ℎ = 𝑥0 + 2ℎ
……………
𝑓(𝑥 )
𝑥1 = 𝑥0 − 𝑓′ (𝑥0 )
0

𝑓(𝑥 )
𝑥2 = 𝑥1 − 𝑓′ (𝑥1 )
1

𝑓(𝑥 )
𝑥𝑛+1 = 𝑥𝑛 + {𝑓′(𝑥𝑛 )}
𝑛

This is known as Newton-Raphson formula.

Geometrical interpretation of Newton-Raphson formula

𝑓(𝑥0 )

𝑓(𝑥1 )
𝑓(𝑥2 )

𝑥2 𝑥1 𝑥0

59
*A tangent is drawn at the point [𝑥0 , 𝑓(𝑥0 )] to the curve 𝑦 = 𝑓(𝑥) *Another tangent is drawn at
[𝑥1 , 𝑓(𝑥1 )]
*The process can be continued till the desired accuracy is achieved.
Problem: Use newton Raphson method to find the root of the equation 𝑥 3 − 3𝑥 − 5 = 0
Solution:
Here we have𝑓(𝑥) = 𝑥 3 − 3𝑥 − 5
𝑓 ′ (𝑥) = 3𝑥 2 − 3
𝑓(2) = −3 < 0
𝑓(3) = 13 > 0
Thus 𝑓(𝑥) = 0 has a root between 2 and 3.
2+3
Now,𝑥0 = = 2.5
2

We know that 𝑥𝑛+1 = 𝑥𝑛 − {𝑓(𝑥𝑛 )/𝑓′(𝑥𝑛 )}


= 𝑥𝑛 − {(𝑥𝑛3 − 3𝑥𝑛 − 5)/(3𝑥𝑛2 − 3)}

First approximation,
𝑥03 −3𝑥0 −5
𝑥1 = 𝑥0 − { } = 2.3016
3𝑥02 −3

𝑓(𝑥1 ) = 0.2876096681
Second approximation,
𝑥13 −31−5
𝑥2 = 𝑥1 − { } = 2.2793
3𝑥12 −3

𝑓(𝑥2 ) = 0.0035387113

Third approximation,
𝑥23 −3𝑥2 −5
𝑥3 = 𝑥2 − { } = 2.2790
3𝑥22 −3

𝑓(𝑥3 ) = −0.000236361

60
𝑥33 −3𝑥3 −5
𝑥4 = 𝑥3 − { } = 2.2790
3𝑥32 −3

Thus 2.279 is the root of the given equation correct to the three decimal place.

Problem: Find a real root of the equation −4𝑥 + 𝑐𝑜𝑠𝑥 + 2 = 0 using Newton-Raphson method
upto 4 decimal places
Solution: 𝑓(𝑥) = −4𝑥 + 𝑐𝑜𝑠𝑥 + 2
𝑓(0) = −4(0) + cos(0) + 2 = 3 > 0
𝑓(1) = −1.4597 < 0

Thus, a real root lies between 0 and 1


0+1
𝑥0 = = 0.5
2
We know that 𝑥𝑛+1 = 𝑥𝑛 − {𝑓(𝑥𝑛 )/𝑓′(𝑥𝑛 )}

1st approximation,
𝑓(𝑥0 )
𝑥1 = 𝑥0 − = ⋯ … … … . . = 0.6958
𝑓 ′ (𝑥0 )
2nd approximation,
𝑓(𝑥 )
𝑥2 = 𝑥1 − 𝑓′ (𝑥1 ) = ⋯ … … … . . =0 .6924
1

3rd approximation,
𝑓(𝑥 )
𝑥3 = 𝑥2 − 𝑓′ (𝑥2 ) = ⋯ … … … . . =0.6924
2

Thus,0.6924 is the root.

61
Home-Work
Problem: Find a real root of the equation 𝑥𝑒 𝑥 = 𝑐𝑜𝑠𝑥 using Newton-Raphson method upto 4
decimal place.
Solution: 𝑓(𝑥) = 𝑥𝑒 𝑥 − 𝑐𝑜𝑠𝑥 = 0
𝑓 ′ (𝑥) = 𝑥𝑒 𝑥 + 𝑒 𝑥 + 𝑠𝑖𝑛𝑥
𝑓(0) = 0 − cos(0) = −1 < 0
𝑓(1) = 1. 𝑒 1 − cos(1) = 2.1779 > 0
Root lies between 0 and 1.
0+1
𝑥0 = = 0.5
2
We know that 𝑥𝑛+1 = 𝑥𝑛 − {𝑓(𝑥𝑛 )/𝑓′(𝑥𝑛 )}
1st approximation,

𝑓(𝑥0 ) 0.5𝑒 0.5 − cos(. 5)


𝑥1 = 𝑥0 − = 0.5 − = 0.5181
𝑓 ′ (𝑥0 ) 0.5𝑒 0.5 − 𝑒 0.5 + sin(0.5)
2nd approximation,

𝑓(𝑥1 )
𝑥2 = 𝑥1 − = ⋯ … … . . = 0.5171
𝑓 ′ (𝑥1 )
3rd approximation,

𝑓(𝑥2 )
𝑥3 = 𝑥2 − = ⋯ … . . = 0.5171
𝑓 ′ (𝑥2 )
That means, 0.5177 is the root of the equation.

Problem: Find a real root of the equation 10𝑥 + 𝑥 − 4 = 0using Newton-Raphson method upto
4 decimal place
Solution: 𝑓(𝑥) = 10𝑥 + 𝑥 − 4 = 11𝑥 − 4 = 0
𝑓 ′ (𝑥) = 11
𝑓(0) = −4 < 0

62
𝑓(1) = 7 > 0
Root lies between 0 and 1.
0+1
𝑥0 = = 0.5
2
We know that 𝑥𝑛+1 = 𝑥𝑛 − {𝑓(𝑥𝑛 )/𝑓′(𝑥𝑛 )}
1st approximation,

𝑓(𝑥0 ) 11(. 5) − 4
𝑥1 = 𝑥0 − ′
= 0.5 = 0.3637
𝑓 (𝑥0 ) 11
2nd approximation,

𝑓(𝑥1 )
𝑥2 = 𝑥1 − = ⋯ … … . . = 0.3636
𝑓 ′ (𝑥1 )
3rd approximation,

𝑓(𝑥2 )
𝑥3 = 𝑥2 − = ⋯ … . . = 0.3636
𝑓 ′ (𝑥2 )
That means, 0.3636 is the root of the equation.

Problem: Use newton Raphson method to find the root of the equation 𝑥 4 − 𝑥 − 10 = 0
Solution:
Here we have𝑓(𝑥) = 𝑥 4 − 𝑥 − 10
𝑓 ′ (𝑥) = 4𝑥 3 − 1
𝑓(1) = −10 < 0
𝑓(2) = 4 > 0
Thus 𝑓(𝑥) = 0 has a root between 1 and 2.
1+2
Now,𝑥0 = = 0.5
2

We know that 𝑥𝑛+1 = 𝑥𝑛 − {𝑓(𝑥𝑛 )/𝑓′(𝑥𝑛 )}


= 𝑥𝑛 − {(𝑥𝑛4 − 𝑥𝑛 − 10)/(4𝑥 3 − 1)}

63
First approximation,
4𝑥03 −𝑥0 −10
𝑥1 = 𝑥0 − { } = 2.015
4𝑥03 −1

𝑓(𝑥1 ) = 4.470427051
Second approximation,
3𝑥14 −𝑥1 −10
𝑥2 = 𝑥1 − { } = 1.8741
4𝑥13 −1

𝑓(𝑥2 ) = 0.461805752

Third approximation,
𝑥3 = 1.8558
𝑓(𝑥3 ) = 5.2921 × 10−3
4Th approximation,
𝑥4 = 1.8555
5th approximation,
𝑥5 = 1.8555

Thus 1.8555 is the root of the given equation correct to the four decimal place.

64
Method of False Position
This is the method for finding the real root of an equation and closely resembles the bisector
method.
In this method, we choose two points 𝑥1 and 𝑥2 such that,𝑓(𝑥1 ) and 𝑓(𝑥2 ) are of opposite signs,
Since the graph of 𝑦 = 𝑓(𝑥) crosses the x axis between these two points. A root must lie in
between these two point.

y=f(x)
Fig: Geometrical representation of method of false position.

Now the equation of the chord joining the two points [𝑥1 , 𝑓(𝑥1 )]and [𝑥2 , 𝑓(𝑥2 )] is

𝑦−𝑓(𝑥1 ) 𝑓(𝑥2 )−𝑓(𝑥1 )


=
𝑥−𝑥1 𝑥2 −𝑥1

The method consists in replacing the part of the curve between the point [𝑥1 , 𝑓(𝑥1 )] and
[𝑥2 , 𝑓(𝑥2 )] by means of the chord joining these points and taking the point of intersection of the
chord with the axis as a approximation to the root.

The point of intersection in the present case is giving by putting y=0 in 1


Thus, we obtain
𝑓(𝑥1 )
𝑥 = 𝑥1 − 𝑓(𝑥 (𝑥2 − 𝑥1 )
2 )−𝑓(𝑥1 )

Hence the 1st approximation to the root 𝑓(𝑥) = 0 is giving by

65
𝑓(𝑥1 )
𝑥3 = 𝑥1 − (𝑥 − 𝑥1 )
𝑓(𝑥2 ) − 𝑓(𝑥1 ) 2

If now 𝑓(𝑥3 )and 𝑓(𝑥1 ) are at opposite signs, then the roots lies between 𝑥1 and 𝑥3 and we
replace 𝑥2 by 𝑥3 in ( 2)
and obtain the next approximation.
Otherwise, we replace 𝑥2 by 𝑥3 and generate the next approximation.

Problem: Find a real root of waills’s(1685) equation fx=x^3-2x-5=0


Solution:
We observe that
𝑓(2) = −1 and 𝑓(3) = 16
Hence a root lies between 2 and 3 we have
𝑓(𝑥1 )
𝑥 = 𝑥1 − 𝑓(𝑥 (𝑥2 − 𝑥1 ) ……. (1)
2 )−𝑓(𝑥1 )

−1
= 2 − 16+1 (3 − 2)
1
= 2 + 17 = 2.059

i.e, 𝑥3 = 2.059
Now, 𝑓(𝑥3 ) = −0.386 and hence the root lies between 2.059 and 3.0
using equation (1) again,
𝑓0.386
𝑥4 = 2.059 + 16.386 (3 − 2.059)

Repeating the process, we obtain successively


𝑥5 =2.0904
𝑥6 =2.0934, 𝑥7 = 2.0945
The correct value is 2.0945.
So that 𝑥7 is correct.

66
VIVA QUESTION
1. What is Interpolation?
2. What is Extrapolation?
3. Why do we use Newton-Gregory forward interpolation formula?
4. What is the error in Newton's forward interpolation formula?
5. What is h in Newton-forward interpolation?
6. What is the principle of interpolation?
7. DEFINE BACKWARD DIFFERENCE?
8. WRITE THE FORMULA OF BACKWARD DIFFERENCE?
9. WRITE THE CONDITION WHEN WE CAN USE BACKWARD DIFFERENCE
FORMULA?
10. WHAT IS DIVIDED DIFFERENCE?
11. What is the Newton-Raphson method used for?
12. What are the limitations of Newton-Raphson method?
13. What is the conclusion of the Newton-Raphson method?
14. What are the applications of Newton-Raphson method in real life?
15. What is the method of false position?
16. Why is false position called so?
17. What are the advantages of false position method
18. What is exact and approximate numbers?
19. What is rounding off numbers?
20. What is operator?
21. What is the Newton's formula for the divided difference?
22. What is the first divided difference?
23. Which of the formula can be used for interpolation of data with unequal intervals?
24. Which method is used for unequal intervals?
25. Which average Cannot be calculated for unequal class intervals?
26. What is the Newton formula for unequal intervals?
27. What is the Gauss forward interpolation formula?
28. What is the formula for Gaussian interpolation?
29. What is the Gauss backward interpolation formula?
30. When to use Gauss forward and backward interpolation?
31. What is the formula for Stirling interpolation?
32. Why do we use Stirling formula?
33. How accurate is Stirling formula?
34. When to use Stirling approximation?
35. What is the application of Stirling's formula?
36. What is Bessel method of interpolation?
37. What is Bessel's formula and where it is used?
38. What are the applications of Bessel formula?
39. What is the trapezoidal rule for numerical integration?

67

You might also like