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

0% found this document useful (0 votes)
71 views178 pages

Yassin Notes

The document provides an overview of numerical methods, emphasizing their role in solving problems numerically and the inherent errors associated with these methods. It discusses various types of errors, including discretization, truncation, round-off, propagated, and modeling errors, as well as concepts of accuracy and precision. Additionally, it outlines methods for calculating absolute and relative errors, and presents examples and theorems related to error propagation in mathematical operations.

Uploaded by

obuombe994
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)
71 views178 pages

Yassin Notes

The document provides an overview of numerical methods, emphasizing their role in solving problems numerically and the inherent errors associated with these methods. It discusses various types of errors, including discretization, truncation, round-off, propagated, and modeling errors, as well as concepts of accuracy and precision. Additionally, it outlines methods for calculating absolute and relative errors, and presents examples and theorems related to error propagation in mathematical operations.

Uploaded by

obuombe994
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/ 178

GSB 3204: Statistics & Numerical Analysis

Yasin K. Kowa
Email:[email protected]

April 30, 2019

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Introduction

Definition
Numerical Methods are methods for solving problems numerically
(in terms of number) on computer or calculator or by hand.
Numerical methods emphasize the implementation of algorithms.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Introduction

Definition
Numerical Methods are methods for solving problems numerically
(in terms of number) on computer or calculator or by hand.
Numerical methods emphasize the implementation of algorithms.

Definition
Numerical methods provide systematic methods of solving
problems in numerical form. Normally starts from an initial data,
using high precision digital computers, steps in algorithms and
finally obtaining the results.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Introduction

Definition
The numerical methods give approximate results or solution, that
is they have errors.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Introduction

Definition
The numerical methods give approximate results or solution, that
is they have errors.

Definition
That is True Value=approximate+error

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Error
Error refers to the difference between the true value and the
estimated (approximated) value

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Error
Error refers to the difference between the true value and the
estimated (approximated) value

Error
Error=Actual value-Estimated value

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Error
Approximate values or numbers are those that represent the
numbers to a certain degree of accuracy.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Error
Approximate values or numbers are those that represent the
numbers to a certain degree of accuracy.

Error
But error is different from mistakes (blunders), the last one are
the deviations due to human factors such as misreading a number,
misreading from a scale or using faulty instrument, misprinting,
misfeeding e.t.c

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Sources of Error
When a computational procedure is involved in solving a scientific
-mathematical problem, errors often will be involved in the process

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Sources of Error
When a computational procedure is involved in solving a scientific
-mathematical problem, errors often will be involved in the process

Sources of Error
(a) Error due to method itself
Sometimes numerical method by virtue of what they are,
introduce some error in the result. This error is called
Discretization error

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Sources of Error
(b) Truncation Error
This occurs due to the failure to do the problem in a finite
steps, we are forced to terminate our calculations somewhere
or carry a few terms.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Sources of Error
(b) Truncation Error
This occurs due to the failure to do the problem in a finite
steps, we are forced to terminate our calculations somewhere
or carry a few terms.

Sources of Error
For instance Taylor’s series,
f 0 (a) f 00 (a)
f (x ) = f (a) + (x − a) + (x − a)2 + . . .
1! 2!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Sources of Error
(c) Round-off Error
Is the error that a rises due to the fact that when we have
large number of digits and it will be necessary to cut them to
usable number of figures. This process is called rounding off

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Sources of Error
(c) Round-off Error
Is the error that a rises due to the fact that when we have
large number of digits and it will be necessary to cut them to
usable number of figures. This process is called rounding off

Sources of Error
(d) Propagated Error
This is an error in the succeeding steps of the process due to
the occurrence of earlier error.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Sources of Error
(e) Modeling Error
Mathematical modeling is a process when mathematical
equations are used to represent a physical systems. This
modeling introduces errors and are called modeling error

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Accuracy
Accuracy refers to how closely a computed or measured value
agrees with the true value.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Accuracy
Accuracy refers to how closely a computed or measured value
agrees with the true value.

Precision
Precision refers to how closely individual computed or measured
values agree with each other.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Calculation of Errors
Absolute Error =⇒ ex = |x − x ∗ | where
x − represents a true value of a quantity
x ∗ − represent approximate value

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Calculation of Errors
Absolute Error =⇒ ex = |x − x ∗ | where
x − represents a true value of a quantity
x ∗ − represent approximate value

Calculation of Errors
When
(i) x ∗ > x , the number x ∗ is said to be an approximation with
excess
(ii) x ∗ < x , the number x ∗ is said to be an approximation with
deficit

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Calculation of Errors
For instance√
x ∗ = 1.4 ≈ √ 2 ,an approximation with deficit

x = 2.24 ≈ 5, an approximation with excess

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Error

Calculation of Errors
For instance√
x ∗ = 1.4 ≈ √ 2 ,an approximation with deficit

x = 2.24 ≈ 5, an approximation with excess

Calculation of Errors
From True Value=Approximate+error, we can write as
x = x ∗ ± ex

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Relative Error
The relative error is the ratio of the absolute error to actual figure,
that is
|x − x ∗ | ex
rx = =
x x

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Relative Error
The relative error is the ratio of the absolute error to actual figure,
that is
|x − x ∗ | ex
rx = =
x x

Relative Error
Where rx is the relative error, the relative error is expressed as
percentage.That is
ex
rx = × 100%
x

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Example-1
Suppose that you have the task of measuring the length of bridge
and rivet and come up with 9999 cm and 9 cm respectively. If the
true values are 10000 cm and 10 cm respectively. Compute

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Example-1
Suppose that you have the task of measuring the length of bridge
and rivet and come up with 9999 cm and 9 cm respectively. If the
true values are 10000 cm and 10 cm respectively. Compute

Example-1
(a) the true error
(b) relative error in %

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Solution-1
(a) Case I
Given x = 10000cm
x ∗ = 9999cm
ex = |10000 − 9999|cm=1cm
Case II
x=10cm
x ∗ = 9cm

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Solution-1
(a) Case I
Given x = 10000cm
x ∗ = 9999cm
ex = |10000 − 9999|cm=1cm
Case II
x=10cm
x ∗ = 9cm

Solution-1
ex = |10 − 9| cm = |9 − 10| cm = 1cm

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Solution-1
(b) Case I
ex 1 cm
rx = × 100% = × 100% = 0.01%
x 10000 cm

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Solution-1
(b) Case I
ex 1 cm
rx = × 100% = × 100% = 0.01%
x 10000 cm

Solution-1
Case II
ex 1cm
rx = × 100% = = 10%
x 10cm

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Exercise-1
Which of the following is more accurate estimate?

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Exercise-1
Which of the following is more accurate estimate?

Exercise-1

0.84 × 45
(a) 10 as an estimate for or
0.6
(b) 150cm2 as the area of circle of diameter 14cm

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Exercise-2
1
Three approximate values of the number are given as 0.30, 0.33
3
and 0.34. Which of these values is the best approximate?

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Theorem
In addition and subtraction on error bound for the results, is given
as the sum of error bounds for the terms.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Theorem
In addition and subtraction on error bound for the results, is given
as the sum of error bounds for the terms.

Proof
For addition
ex +y = |(x + y ) − (x ∗ + y ∗ )| = |x − x ∗ + y − y ∗ |
By triangular rule
ex +y ≤ |x − x ∗ | + |y − y ∗ | =⇒ ex +y ≤ ex + ey
For subtraction
ex −y = |(x −y )−(x ∗ −y ∗ )| = |(x −x ∗ )−(y −y ∗ )| ≤ |x −x ∗ |+|y −y ∗ |
ex −y = ex + ey

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Theorem
In multiplication and division, a bound for the relative error of the
results is given by the sum of the bounds for the relative errors of
the given terms or numbers.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Theorem
In multiplication and division, a bound for the relative error of the
results is given by the sum of the bounds for the relative errors of
the given terms or numbers.

Proof
For multiplication we what to prove that rx .y = rx + ry
exy |xy − x ∗ y ∗ | |xy − (x − ex )(y − ey )|
rx .y = = =
xy xy xy
|xy − xy + xey + yex + ex ey | |xey + yex + ex ey |
rxy = =
xy xy
Neglecting the small product we have

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Proof
xey + yex ey ex
rxy = = +
xy y x

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Proof
xey + yex ey ex
rxy = = +
xy y x

Proof
rxy ≈ rx + ry

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Proof
For division, we want to prove r yx ≈ rx + ry

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Calculation of Errors

Proof
For division, we want to prove r yx ≈ rx + ry

Proof
x x∗ x x −ex
y − y∗ y − y −ey x (y − ey ) − y (x − ex ) y
r yx = x = x =
y y y (y − e y ) x
xy − xey − yx + yex y −xey + yex y
r yx = =
y (y − ey ) x y (y − ey ) x

ye x − xe y
ry = (y − ey )−1
x y

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Introduction
Consider a function y = f (x ) defined on (a, b), x and y are the
independent and dependent variables respectively. If the points
x0 , x1 , . . . , xn are taken at equidistance.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Introduction
Consider a function y = f (x ) defined on (a, b), x and y are the
independent and dependent variables respectively. If the points
x0 , x1 , . . . , xn are taken at equidistance.

Introduction
That is xi = x0 + ih, i = 0, 1, 2, . . . , n then the value of y when
x = xi is denoted as yi , where yi = f (xi )

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Introduction
Then y1 − y0 , y2 − y1 , y3 − y2 , . . . yn − yn−1 are called the
differences of y . Denoting these differences by
4y0 , 4y1 , . . . , 4yn−1 respectively, we have

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Introduction
Then y1 − y0 , y2 − y1 , y3 − y2 , . . . yn − yn−1 are called the
differences of y . Denoting these differences by
4y0 , 4y1 , . . . , 4yn−1 respectively, we have

Introduction
4y0 = y1 −y0 , 4y1 = y2 −y1 , 4y2 = y3 −y2 · · ·4yn−1 = yn −yn−1
Where 4 is the forward difference operator and
4y0 = y1 −y0 , 4y1 = y2 −y1 , 4y2 = y3 −y2 · · ·4yn−1 = yn −yn−1
are called first forward differences

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Introduction
The differences of the first forward differences are called second
forward differences and are denoted by
42 y0 , 42 y1 , . . . , 42 yn−1

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Introduction
The differences of the first forward differences are called second
forward differences and are denoted by
42 y0 , 42 y1 , . . . , 42 yn−1

Introduction
Similarly we can define the third, fourth, . . .
We will consider three types of finite differences namely
Forward Finite differences
Backward Finite differences
Central Finite differences

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Forward Finite Differences


The forward finite differences or simply differences operator is
denoted by 4 and is defined as
4f (x ) = f (x + h) − f (x ), we can write in terms of y as

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Forward Finite Differences


The forward finite differences or simply differences operator is
denoted by 4 and is defined as
4f (x ) = f (x + h) − f (x ), we can write in terms of y as

Forward Finite Differences


4yi = yi+1 − yi , i = 0, 1, 2, . . . , n − 1.
The differences of the first differences are called the second
differences and they are denoted by 42 y0 , 42 y1 , . . . , 42 yn−1

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Forward Finite Differences


Hence
42 y0 = 4y1 − 4y0 = (y2 − y1 ) − (y1 − y0 ) = y2 − 2y1 + y0
42 y1 = 4y2 − 4y1 = (y3 − y2 ) − (y2 − y1 ) = y3 − 2y2 + y1
..
.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Forward Finite Differences


Hence
42 y0 = 4y1 − 4y0 = (y2 − y1 ) − (y1 − y0 ) = y2 − 2y1 + y0
42 y1 = 4y2 − 4y1 = (y3 − y2 ) − (y2 − y1 ) = y3 − 2y2 + y1
..
.

Forward Finite Differences


But also
43 y0 = 42 y1 − 42 y0 = (y3 − 2y2 + y1 ) − (y2 − 2y1 + y0 ) that is
43 y0 = y3 − 3y2 + 3y1 − y0
43 y1 = y4 − 3y3 + 3y2 − y1

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Forward Finite Differences


Generally
4n+1 yi = 4n yi+1 − 4n yi , n = 0, 1, 2, . . . and i = 0, 1, 2, . . .

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Forward Finite Differences Table


The difference table is the standard format for displaying
differences

x y 4y 42 y 43 y 44 y
x0 y0
4y0
x1 y1 42 y0
4y1 43 y0
x2 y2 42 y1 44 y0
42 y2 43 y1
x3 y3 42 y2
4y3
x4 y4

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Forward Finite Differences Table


The forward difference table is also called as a diagonal difference
table, the y0 term in the table above is called the leading term.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Forward Finite Differences Table


The forward difference table is also called as a diagonal difference
table, the y0 term in the table above is called the leading term.

Forward Finite Differences Table


The differences 4y0 , 42 y0 , 43 y0 . . . are called the leading
differences. In the difference table x is called argument and y as
function or entry.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Backward Finite Differences


The backward difference operator is denoted by 5 and is defined
as 5f (x ) = f (x ) − f (x − h) or
5yi = yi − yi−1 , i = n, n − 1, . . . , 1

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Backward Finite Differences


The backward difference operator is denoted by 5 and is defined
as 5f (x ) = f (x ) − f (x − h) or
5yi = yi − yi−1 , i = n, n − 1, . . . , 1

Backward Finite Differences


5y1 = y1 − y0 , 5y2 = y2 − y1 , 5y3 = y3 − y2 · · · 5 yn = yn − yn−1

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Backward Finite Differences


The second differences are denoted by
52 y2 , 52 y3 , 52 y4 , · · · 52 yn
52 y2 = 5(5y − 2) = 5(y2 − y1 ) = 5y2 − 5y1 =
(y2 − y1 ) − (y1 − y0 ) = y2 − 2y1 + y0

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Backward Finite Differences


The second differences are denoted by
52 y2 , 52 y3 , 52 y4 , · · · 52 yn
52 y2 = 5(5y − 2) = 5(y2 − y1 ) = 5y2 − 5y1 =
(y2 − y1 ) − (y1 − y0 ) = y2 − 2y1 + y0

Backward Finite Differences


52 y3 = y3 − 2y2 + y1
52 y4 = y4 − 2y3 + y2
Generally 5k yi = 5k−1 yi − 5k−1 yi−1 , i=n, n-1, . . . ,k
where 50 yi = yi , 51 yi = 5yi

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Backward Finite Differences Table


x y 5y 52 y V53 y 54 y 55 y
x0 y0
5y1
x1 y1 52 y2
5y2 53 y3
x2 y2 52 y3 54 y4
5y3 53 y 4
x3 y3 52 y4
5y4
x4 y4

The Backward Difference is also known as horizontal differences,


and its table is as follows

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Backward Finite Differences Table


x y 5y 52 y 53 y 54 y
x0 y0

x1 y1 5y1

x2 y2 5y2 52 y2

x3 y3 5y3 52 y3 53 y3

x4 y4 5y4 52 y4 53 y4 54 y4

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Central Finite Differences


The central difference operator is σ and is defined as
σf (x ) = f (x + h2 ) − f (x − h2 ) where h is the interval of differences.
In terms of y , the first central difference is written as

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Central Finite Differences


The central difference operator is σ and is defined as
σf (x ) = f (x + h2 ) − f (x − h2 ) where h is the interval of differences.
In terms of y , the first central difference is written as

Central Finite Differences


σyi = yi+ 1 − yi− 1
2 2
where yi+ 1 = f (x + h2 ) and yi− 1 = f (x − h2 )
2 2
That is
σy 1 = y1 − y0
2
σy 3 = y2 − y1
2
..
.
σyn− 1 = yn − yn−1
2

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Central Finite Differences


The second central differences are given by
σ 2 yi = σyi+ 1 − σyi− 1
2 2

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Central Finite Differences


The second central differences are given by
σ 2 yi = σyi+ 1 − σyi− 1
2 2

Central Finite Differences


σ 2 yi = σyi+ 1 − σy1− 1 = (yi+1 − yi ) − (yi − yi−1 )
2 2
σ 2 yi = yi+1 − 2yi + yi−1
Generally σ n yi = σ n−1 yi+ 1 − σ n−1 yi− 1
2 2

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences
Central Finite Differences Table
x y σy σ2y σ3y σ4y σ5y σ6y
x0 y0
σy 1
2
x1 y1 σ 2 y1
σy 3 σ3y 3
2 2
x2 y2 σ 2 y2 σ 4 y2
σy 5 σ3y 5 σ5y 5
2 2 2
x3 y3 σ 2 y3 σ 4 y3 σ 6 y3
σy 7 σ3y 7 σ5y 7
2 2 2
x4 y4 σ 2 y4 σ 4 y4
σy 9 σ3y 9
2 2
x5 y5 σ2y 5
σy 11
2
x6 y6
Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis
Finite Differences

Example-3
(a) Construct the forward difference table and the horizontal tab;e
for the following data
x 1 2 3 4 5
y 4 6 9 12 17

Example-3
(b) Construct a forward difference table for the following data
x 0 10 20 30
y 0 0.174 0.347 0.518

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example-3
(c) Obtain the backward differences for the function f (x ) = x 3
from x = 1 to 1.05 to three decimal places take h = 0.01

Example-4
Calculate differences up to the fourth order for the function y = x 3
from x = 1 to x = 6 take h = 1

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Solution -4
x y 4y 42 y 43 y 44 y
1 1
7
2 8 12
19 6
3 27 18 0
37 6
4 64 24 0
61 6
5 125 30
91
6 216

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Solution -4
From the table above we see that third differences are constant (6)
and the fourth differences as zero.

Solution -4
Thus the finite difference of order n of an algebraic polynomial of
degree n is constant.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example- 5
Find the missing values in the following table

x 45 50 55 60 65
y 3 - 2 - -2.4

Example- 6
Assuming that the following values of y belongs to polynomial to
degree 4, compute the next three values

x 0 1 2 3 4 5 6 7
y 1 -1 1 -1 1 - - -

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Error Propagation in a Difference Table


Let y0 , y1 , . . . , yn be the true values of a function and suppose
the value y2 to be affected with an error ξ.

Error Propagation in a Difference Table


Thus its value is y2 + ξ. Then the successive differences of the y
are as shown below:

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Error Propagation in a Difference Table


x y 4y 42 y
x0 y0
4y0
x1 y1 42 y0 + ξ
4y1 + ξ
x2 y2 + ξ 42 y1 − 2ξ
4y2 − ξ
x3 y3 42 y2 + ξ
4y3
x4 y4

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Error Propagation in a Difference Table


From the table above, error have the following characteristics
(i) The effect of the error increases with the order of the
differences
(ii) The errors in any column are binomial coefficients with
alternating signs

Error Propagation in a Difference Table


(iii) The algebraic sum of the errors in any difference column is
zero
(iv) The error influences a triangular portion of the difference table

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example -6
The following table gives the values of a polynomial of degree five.
It is given that f (4) is in error. Correct the value of f (4)

Example -6
x 1 2 3 4 5 6 7
y 0.975 -0.6083 -3.5250 -5.5250 -6.3583 4.2250 36.4750

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example -7
The following table gives the values of a polynomial of degree five.
It is given that f (3) is in error. Correct the error

Example -7
x 0 1 2 3 4 5 6
y 1 2 33 254 1054 3126 7777

ans. ξ = −10, f (3) = 244

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Properties of the Operator 4


(i) If c is a constant then 4c = 0
(ii) 4 is distributive
4(f (x ) ± g(x )) = 4f (x ) ± 4g(x )
(iii) If c is constant then
4(cf (x )) = c 4 f (x )

Properties of the Operator 4


(iv) If m and n are positive integers then
4m 4n f (x ) = 4m+n f (x )
(v) 4(f (x ).g(x )) = f (x ) 4 g(x ) + g(x ) 4 f (x )
f (x ) g(x ) 4 f (x ) − f (x ) 4 g(x )
 
(v) 4 =
g(x ) g(x )g(x + h)

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Other Difference Operators


(a) Shift Operator E
The shift operator is defined as Ef (x ) = f (x + h), in terms of
y as Eyi = yi+1
E 2 f (x ) = E (Ef (x )) = E (f (x + h)) = f (x + 2h)
Generally E n f (x ) = f (x + nh) or E n yi = yi+nh

Other Difference Operators


The inverse shift operator E −1 is defined as E −1 f (x ) = f (x − h)
E −2 f (x ) = f (x − 2h)
Generally E −n f (x ) = f (x − nh)

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Other Difference Operators


(b) Average Operator
 µ is defined as
µf (x ) = 12 f (x + h2 ) + f (x − h2 )
 
1
µyi = 2 yi+ 1 + yi− 1
2 2

Other Difference Operators


(c) Differential Operator, D
The differential operator is usually denoted by D where
d d
D= , Df (x ) = f (x ) = f 0 (x )
dx dx

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences
Relation between Difference Operators
Operator Definition Relation
4 4f (x ) = f (x + h) − f (x ) (E − 1)f (x )
5 5f (x ) = f (x ) − f (x − h) (1 − E −1 )f (x )
1 1
σ σf (x ) = f (x + h2 ) − f (x − h2 ) (E 2 − E − 2 )f (x )
  1 1 1

µ µf (x ) = 1
2 f (x + h
2 + f (x − h2 ) E 2 + E − 2 f (x )
2

Relation between Difference Operators


To link different operators with differential operator D we consider
the Taylor’s formula or series
h2 f 00 (x )
f (x + h) = f (x ) + hf 0 (x ) + + ...
2!!
h2 D 2
Ef (x ) = 1 + hD + + . . . f (x )
2!
Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis
Finite Differences

Example- 8
4f (x )
 
Show that 4 log f (x ) = log 1 +
f (x )

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example- 8
4f (x )
 
Show that 4 log f (x ) = log 1 +
f (x )

Example-9
!
42
Evaluate x3
E

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Exercise
Prove that (1 + 4)(1 − 4) = 1

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Exercise
Prove that (1 + 4)(1 − 4) = 1

Exercise
Prove that 45 = 4 − 5

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example-9
Estimate the missing term in the following table by using shift
operator

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example-9
Estimate the missing term in the following table by using shift
operator

Exercise
x 0 1 2 3 4
y 4 3 4 - 12

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Representing a Polynomial Using Factorial Notation


A polynomial of degree n can be expressed as factorial polynomial
of the same degree.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Representing a Polynomial Using Factorial Notation


A polynomial of degree n can be expressed as factorial polynomial
of the same degree.

Representing a Polynomial Using Factorial Notation


Let f(x) be a polynomial of degree n which is expressed in factorial
notation and let
f (x ) = a0 + a1 x + a2 x 2 + · · · + an x n , where a0 , a1 , a2 , . . . an are
constants and an 6= 0

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Representing a Polynomial Using Factorial Notation


4f (x ) = 4(a0 + a1 x + a2 x 2 + · · · + an x n , where a0 , a1 , a2 , . . . an )
From 4f (x ) = f (x + h) − f (x ) then
4f (x ) = a1 h + 2a2 hx + · · · + nan hx n−1
42 f (x ) = 4(a1 h + 2a2 hx + · · · + nan hx n−1 )
42 f (x ) = 2a2 h2 · · · + h2 n(n − 1)an x n−2

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Representing a Polynomial Using Factorial Notation


4f (x ) = 4(a0 + a1 x + a2 x 2 + · · · + an x n , where a0 , a1 , a2 , . . . an )
From 4f (x ) = f (x + h) − f (x ) then
4f (x ) = a1 h + 2a2 hx + · · · + nan hx n−1
42 f (x ) = 4(a1 h + 2a2 hx + · · · + nan hx n−1 )
42 f (x ) = 2a2 h2 · · · + h2 n(n − 1)an x n−2

Representing a Polynomial Using Factorial Notation


4f (x ) is a polynomial of degree n − 1 where the coefficient of
x n−1 is nan h,
42 f (x ) is a polynomial of degree n − 2 where the coefficient of
x n−2 is n(n − 1)an h2

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Representing a Polynomial Using Factorial Notation


4n f (x ) is a polynomial of degree zero with coefficient of
(n(n − 1)(n − 2) . . . 1)hn an , and this can be written as n!an hn
∴ 4n f (x ) = n!an hn
The (n + 1)th and higher differences of polynomial of nth degree
will be zero

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Representing a Polynomial Using Factorial Notation


4n f (x ) is a polynomial of degree zero with coefficient of
(n(n − 1)(n − 2) . . . 1)hn an , and this can be written as n!an hn
∴ 4n f (x ) = n!an hn
The (n + 1)th and higher differences of polynomial of nth degree
will be zero

Representing a Polynomial Using Factorial Notation


4n f (x )
We can write = an h n .
n!
Now for h=1, and x=0 we have
4f (0) 42 f (0) 43 f (0)
a0 = f (0), a1 = , a2 = , a3 = , . . . an =
n
1! 2! 3!
4 f (0)
n!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Representing a Polynomial Using Factorial Notation


Then
4f (0) 42 f (0) 2 43 f (0) 3 4n f (0) n
f (x ) = f (0) + x+ x + x +···+ x
1! 2! 3! n!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Representing a Polynomial Using Factorial Notation


Then
4f (0) 42 f (0) 2 43 f (0) 3 4n f (0) n
f (x ) = f (0) + x+ x + x +···+ x
1! 2! 3! n!

Example -10
(a) Find 43 ((1 − 3x )(1 − 2x )(1 − x ))
(b) Express f (x ) = 3x 3 + x 2 + x + 1, in the factorial notation,
interval of differencing being unity

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
Interpolation is the approximate computation of the values of the
function f (x ) from several of its given values
f (x0 ), f (x1 ), f (x2 ), . . . , f (xn ), corresponding to the set of
x0 , x1 , x2 , . . . , xn equally spaced values of independent variable.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
Interpolation is the approximate computation of the values of the
function f (x ) from several of its given values
f (x0 ), f (x1 ), f (x2 ), . . . , f (xn ), corresponding to the set of
x0 , x1 , x2 , . . . , xn equally spaced values of independent variable.

Interpolation
Let y = f (x ) which takes the values y0 , y1 , y2 , . . . , yn
corresponding to set of equally spaced values of the independent
variable, x0 , x1 , x2 , . . . , xn that is xi = x0 + ih such that
i = 0, 1, 2, . . . , n where h is spacing.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
Let φ(x ) be a polynomial of the nth degree in x . Then φ(x )
represents the continuous function y = f (x ) such that
f (xi ) = φ(xi ) for i = 0, 1, 2, . . . , n and at all points
f (x ) = φ(x ) + R(x ) where R(x ) is called the error term of the
interpolation formula

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
Let φ(x ) be a polynomial of the nth degree in x . Then φ(x )
represents the continuous function y = f (x ) such that
f (xi ) = φ(xi ) for i = 0, 1, 2, . . . , n and at all points
f (x ) = φ(x ) + R(x ) where R(x ) is called the error term of the
interpolation formula

Interpolation
Let φ(x ) = a0 + a1 (x − x0 ) + a2 (x − x0 )(x − x1 ) + a3 (x − x0 )(x −
x1 )(x − x2 ) + · · · + an (x − x0 )(x − x1 )(x − x2 ) . . . (x − xn−1 ) and
φ(xi ) = yi , ∀ i = 0, 1, 2, 3, . . . , n

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
The constants a0 , a1 , a2 , . . . , an can be determined by
substituting x = x0 , x1 , x2 , . . . , xn successively in the equation
above, and get

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
The constants a0 , a1 , a2 , . . . , an can be determined by
substituting x = x0 , x1 , x2 , . . . , xn successively in the equation
above, and get

Interpolation
a0 = y0 when x = x0 , taking x = x1 we have
y1 = y0 + a1 (x1 − x0 )
y1 − y0 4y0
y1 − y0 = a1 (x1 − x0 ) =⇒ a1 = =
x1 − x0 h

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
For x = x2 we have
y1 − y0
y2 = y0 + (x2 − x0 ) + a2 (x2 − x0 )(x2 − x1 )
x1 − x0
y1 − y0
y2 − y0 − (x2 − x0 ) = a2 (x2 − x0 )(x2 − x1 )
x1 − x0
y1 − y0
y2 − y0 − 2h = a2 (2h)(h)
h

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
For x = x2 we have
y1 − y0
y2 = y0 + (x2 − x0 ) + a2 (x2 − x0 )(x2 − x1 )
x1 − x0
y1 − y0
y2 − y0 − (x2 − x0 ) = a2 (x2 − x0 )(x2 − x1 )
x1 − x0
y1 − y0
y2 − y0 − 2h = a2 (2h)(h)
h

Interpolation
y2 − y0 − 2y1 + 2y0 = 2a2 h2
y2 − 2y1 + y0 = a2 (2h2 )
42 y0
42 y0 = a2 (2h2 =⇒ a2 =
2!h2

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
43 y0
Continuing in this way we have, a3 =
3!h3
4n y0
Generally an =
n!hn
4y0 42 y0 43 y0
φ(x ) = y0 + (x − x0 ) + (x − x0 )(x − x1 ) + (x −
h n
2!h2 3!h3
4 y0
x0 )(x −x1 (x −x2 )+· · ·+ (x −x0 )(x −x1 )(x −x2 ) . . . (x −xn−1 )
n!hn

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
43 y0
Continuing in this way we have, a3 =
3!h3
4n y0
Generally an =
n!hn
4y0 42 y0 43 y0
φ(x ) = y0 + (x − x0 ) + (x − x0 )(x − x1 ) + (x −
h n
2!h2 3!h3
4 y0
x0 )(x −x1 (x −x2 )+· · ·+ (x −x0 )(x −x1 )(x −x2 ) . . . (x −xn−1 )
n!hn

Interpolation
x − x0
Let x = x0 + kh =⇒ k = , then
h
x − x1 = (x − x0 ) − (x1 − x0 ) = kh − h = (k − 1)h
x − x2 = (x − x1 ) − (x2 − x1 ) = (k − 1)h − h = (k − 2)h e.t.c

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
Now we have
k(k − 1) 2 k(k − 1)(k − 2) 3
φ(x ) = y0 + k 4 y0 + 4 y0 + 4 y0 +
2! n 3!
k(k − 1)(k − 2) . . . 1 4 y0
··· +
n!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Interpolation
Now we have
k(k − 1) 2 k(k − 1)(k − 2) 3
φ(x ) = y0 + k 4 y0 + 4 y0 + 4 y0 +
2! n 3!
k(k − 1)(k − 2) . . . 1 4 y0
··· +
n!

Interpolation
This is called Newton’s Forward Interpolation Formula

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example- 11
(a) Find a polynomial of degree two which takes the following
value
x 1 2 3 4
f (x ) 6 11 18 27
√ √
(b) Given that √ 15500 = 124.4990, √ 15510 =
124.5392, √ 15520 = 124.5793, 15530 = 124.6194. Find
the value of 1516

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example- 11
(a) Find a polynomial of degree two which takes the following
value
x 1 2 3 4
f (x ) 6 11 18 27
√ √
(b) Given that √ 15500 = 124.4990, √ 15510 =
124.5392, √ 15520 = 124.5793, 15530 = 124.6194. Find
the value of 1516

Example- 11
(c) A second degree polynomial passes through the points
(1, −1), (2, −2), (3, −1), (4, 2). Find the polynomial

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example- 12
(a) Evaluate y = e 3x at x = 0.05. Using the following table
x 0 0.1 0.2 0.3 0.4
e 3x 1 1.3499 1.8221 2.4596 3.3201

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example- 12
(a) Evaluate y = e 3x at x = 0.05. Using the following table
x 0 0.1 0.2 0.3 0.4
e 3x 1 1.3499 1.8221 2.4596 3.3201

Example- 12
(b) Find the value of sin 42◦ . Using the following table
x 40 45 50 55 60
sin x 0.6428 0.7071 0.7660 0.8192 0.8660

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Exercise
Find the cubic polynomial which takes the following values
y (1) = 24, y (3) = 120, y (5) = 336, y (7) = 720. Hence obtain
the value of y (8), using Newton’s Forward Difference Interpolation.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Newton’s Backward Interpolation Formula


Newton’s Backward Interpolation is given as
φ(x ) =
5yn 52 yn 53 yn
yn + (x − xn ) + (x − xn )(x − xn−1 ) + (x − xn )(x −
h 2!h2 n 3!h3
5 yn
xn−1 )(x − xn−2 ) + · · · + (x − xn )(x − xn−1 . . . (x − x1 )(x − x0 )
n!hn

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Newton’s Backward Interpolation Formula


Newton’s Backward Interpolation is given as
φ(x ) =
5yn 52 yn 53 yn
yn + (x − xn ) + (x − xn )(x − xn−1 ) + (x − xn )(x −
h 2!h2 n 3!h3
5 yn
xn−1 )(x − xn−2 ) + · · · + (x − xn )(x − xn−1 . . . (x − x1 )(x − x0 )
n!hn

Newton’s Backward Interpolation Formula


Now setting x = xn + vh, we obtain
x − xn = vh
x −xn−1 = (x −xn )−(xn−1 −xn ) = (x −xn )+(xn −xn−1 ) = (v +1)h

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Newton’s Backward Interpolation Formula


x − xn−2 = (x − xn ) + (xn − xn−2 ) = (v + 2)h
..
.
x − x0 = v + n − 1)h

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Newton’s Backward Interpolation Formula


x − xn−2 = (x − xn ) + (xn − xn−2 ) = (v + 2)h
..
.
x − x0 = v + n − 1)h

Newton’s Backward Interpolation Formula


Then
v (v + 1) 2 v (v + 1)(v + 2) 3
φ(x ) = yn + v 5 yn + 5 yn + 5 yn +
2! 3!
v (v + 1)(v + 2) . . . (v + n − 1) n
··· + 5 yn
n!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Newton’s Backward Interpolation Formula


Newton’s forward interpolation formula is suitable for interpolating
values of y near the beginning of the table, while Newton’s
Backward Interpolation Formula is suitable for interpolation values
of y near the end of the table of values

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Newton’s Backward Interpolation Formula


Newton’s forward interpolation formula is suitable for interpolating
values of y near the beginning of the table, while Newton’s
Backward Interpolation Formula is suitable for interpolation values
of y near the end of the table of values

Example-13
Calculate the value of f (84) for the data given in the table below

x 40 50 60 70 80 90
f (x ) 204 224 246 270 296 324

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example-14
Values of x in degrees and sinx are given in the following table

x 15 20 25 30 35 40
sin x 0.2588 0.3420 0.4226 0.5 0.5736 0.6428

Determine the value of sin 38◦

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Example-14
Values of x in degrees and sinx are given in the following table

x 15 20 25 30 35 40
sin x 0.2588 0.3420 0.4226 0.5 0.5736 0.6428

Determine the value of sin 38◦

Example-15
From the following table estimate the number of students who
obtained marks in GSB 3204 between 75 and 80

Marks 35-45 45-55 55-65 65-75 75-85


No. of Students 20 40 60 60 20

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Central Difference Interpolation Formulas


The central difference interpolation formulas are most suitable for
interpolation near the middle of a tabulated set

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Central Difference Interpolation Formulas


The central difference interpolation formulas are most suitable for
interpolation near the middle of a tabulated set

Central Difference Interpolation Formulas


The most important central difference formulas are Gauss’s
Formulas, Bessel, Stirling, and Everett

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Central Difference Interpolation Formulas


Let’s start with Gauss’s formulas, let the function y = f (x ) be
given for 2n + 1 equispaced values of argument
x0 , x0 ± h, x0 ± 2h, . . . , x0 ± nh

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Central Difference Interpolation Formulas


Let’s start with Gauss’s formulas, let the function y = f (x ) be
given for 2n + 1 equispaced values of argument
x0 , x0 ± h, x0 ± 2h, . . . , x0 ± nh

Central Difference Interpolation Formulas


The corresponding values of y be yi for i = 0, ‘ ± 1, ±2, . . . , ±n
Also let y = y0 denote the central ordinate corresponding to
x = x0 . We can then form the difference table as shown below

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences
Central Difference Interpolation Formulas
x y 4y 42 y 43 y 44 y 45 y 46 y
x0 − 3h y−3
4y−3
x0 − 2h y−2 42 y−3
4y−2 43 y−3
x0 − h y−1 42 y−2 44 y−3
4y−1 43 y−2 45 y−3
x0 y0 42 44 y−2 46 y−3
4y0 43 y−1 45 y−2
x0 + h y1 42 y0 44 y−1
4y1 43 y0
x0 + 2h y2 42 y1
4y2
x0 + 3h y−3
Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis
Finite Differences

Gauss’s Forward Interpolation Formulas


Consider the Newton’s Forward Interpolation formula
u(u − 1) 2 u(u − 1)(u − 2) 3
y = f (x ) = y0 +u4y0 + 4 y0 + 4 y0 +. . .
2! 3!
x − x0
where u = and x = x0 is the origin. Now for Gauss’s
h
Forward Interpolation Formula, we assume the differences lies on
the bottom solid lines and they are of the form

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


Consider the Newton’s Forward Interpolation formula
u(u − 1) 2 u(u − 1)(u − 2) 3
y = f (x ) = y0 +u4y0 + 4 y0 + 4 y0 +. . .
2! 3!
x − x0
where u = and x = x0 is the origin. Now for Gauss’s
h
Forward Interpolation Formula, we assume the differences lies on
the bottom solid lines and they are of the form

Gauss’s Forward Interpolation Formulas


y = y0 + G1 4 y0 + G2 42 y−1 + G3 43 y−1 + G4 44 y−2 + . . .
Where G1 , G2 , G3 , G4 , . . . , Gn are coefficients to be determined.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


From the Newton’s Forward Interpolation formula we have
yp = E p y0 = (1 + 4)p y0 =
u(u − 1) 2 u(u − 1)(u − 2) 3
y0 + u 4 y0 + 4 y0 + 4 y0 + . . .
2! 3!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


From the Newton’s Forward Interpolation formula we have
yp = E p y0 = (1 + 4)p y0 =
u(u − 1) 2 u(u − 1)(u − 2) 3
y0 + u 4 y0 + 4 y0 + 4 y0 + . . .
2! 3!

Gauss’s Forward Interpolation Formulas


Now 42 y−1 = 42 E −1 y0 = 42 (1 + 4)−1 y0
42 (1 + 4)−1 y0 = 42 (1 − 4 + 42 − 43 + . . . )y0

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


42 y−1 = 42 y0 − 43 y0 + 44 y0 − 45 y0 + . . .
43 y−1 = 43 y0 − 44 y0 + 45 y0 − 46 y0 + . . .

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


42 y−1 = 42 y0 − 43 y0 + 44 y0 − 45 y0 + . . .
43 y−1 = 43 y0 − 44 y0 + 45 y0 − 46 y0 + . . .

Gauss’s Forward Interpolation Formulas


44 y−2 = 44 E −2 y0 = 44 (y0 − 2 4 y0 + 3 42 y0 − 4 43 y0 + . . . )
44 y2 = 44 y0 − 2 45 y0 + 3 46 y0 − 4 47 + . . .
and so on.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


Now
yp =
y0 + G1 4 y0 + G2 (42 y0 − 43 y0 + 44 y0 − 45 y0 + . . . ) + G3 (43 y0 −
44 y0 +45 y0 −46 y0 +. . . )+G4 (44 y0 −245 y0 +346 y0 −447 + . . . )

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


Now
yp =
y0 + G1 4 y0 + G2 (42 y0 − 43 y0 + 44 y0 − 45 y0 + . . . ) + G3 (43 y0 −
44 y0 +45 y0 −46 y0 +. . . )+G4 (44 y0 −245 y0 +346 y0 −447 + . . . )

Gauss’s Forward Interpolation Formulas


Comparing the equation above to Newton’s Forward Interpolation
Formula we have
u(u − 1) (u + 1)u(u − 1)
G1 = u, G2 = , G3 = ,
2! 3!
(u + 1)u(u − 1)(u − 2)
G4 =
4!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


Hence, the Gauss’s Forward Interpolation Formula can be written
as

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Forward Interpolation Formulas


Hence, the Gauss’s Forward Interpolation Formula can be written
as

Gauss’s Forward Interpolation Formulas


u(u − 1) 2 (u + 1)u(u − 1) 3
yp = y0 + u 4 y0 + 4 y0 + 4 y0 +
2! 3!
(u + 1)u(u − 1)(u − 2) 4
4 y0 + . . .
4!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Backward Interpolation Formulas


The Gauss’s backward Interpolation Formula uses the differences
which lies on the upper dash line and can be assumed of the form
yp = y0 + J1 4 y−1 + J2 42 y−1 + J3 43 y−2 + J4 44 y−2 + . . .

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Backward Interpolation Formulas


The Gauss’s backward Interpolation Formula uses the differences
which lies on the upper dash line and can be assumed of the form
yp = y0 + J1 4 y−1 + J2 42 y−1 + J3 43 y−2 + J4 44 y−2 + . . .

Gauss’s Backward Interpolation Formulas


Where J1 , J2 , J3 , J4 , . . . are to be determined.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Backward Interpolation Formulas


Using the same procedure as in the Gauss’s Forward Interpolation
Formula we determine

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Backward Interpolation Formulas


Using the same procedure as in the Gauss’s Forward Interpolation
Formula we determine

Gauss’s Backward Interpolation Formulas


J1 = u
u(u + 1)
J2 =
2!
(u + 2)(u + 1)u(u − 1)
J3 =
3!
(u + 1)u(u − 1)(u − 2)
J4 =
4!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Backward Interpolation Formulas


u(u + 1) 2 (u + 1)u(u − 1) 3
y = y0 + u 4 y−1 + 4 y−1 + 4 y−2 +
2! 3!
(u + 2)(u + 1)u(u − 1) 4
4 y−2 + . . .
4!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Finite Differences

Gauss’s Backward Interpolation Formulas


u(u + 1) 2 (u + 1)u(u − 1) 3
y = y0 + u 4 y−1 + 4 y−1 + 4 y−2 +
2! 3!
(u + 2)(u + 1)u(u − 1) 4
4 y−2 + . . .
4!

Example- 16
Use Gauss’s Forward Interpolation Formula to find y for x = 20
given that

x 11 15 19 23 27
y 19.5673 18.8243 18.2173 17.1236 16.6162

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Central Differences Interpolation Formula

Laplace-Everett’s Formula
Eliminating odd differences in Gauss’s Forward formula, by using
the relation
4y0 = y1 −y0 , 43 y−1 = 42 y0 −42 y−1 , 45 y−2 = 44 y−1 −44 y−2

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Central Differences Interpolation Formula

Laplace-Everett’s Formula
Eliminating odd differences in Gauss’s Forward formula, by using
the relation
4y0 = y1 −y0 , 43 y−1 = 42 y0 −42 y−1 , 45 y−2 = 44 y−1 −44 y−2

Laplace-Everett’s Formula
u(u − 1) 2 (u + 1)u(u − 1) 2
y = y0 + u(y1 − y0 ) + 4 y−1 + (4 y0 −
2! 3!
(u + 1)u(u − 1)(u − 2) 4
42 y−1 ) + 4 y−2 +
4!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
(4 y−1 − 44 y−2 ) + . . .
5!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Central Differences Interpolation Formula

Laplace-Everett’s Formula
1 u+1
 
y = (1 − u)y0 + uy1 + u(u − 1) − 42 y−1 +
2! 3!
(u + 1)u(u − 1) 2 1 u+2
 
4 y0 + (u + 1)u(u − 1)(u − 2) − 44
3! 4! 6!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
y−2 + 4 y−1 + . . .
5!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Central Differences Interpolation Formula

Laplace-Everett’s Formula
1 u+1
 
y = (1 − u)y0 + uy1 + u(u − 1) − 42 y−1 +
2! 3!
(u + 1)u(u − 1) 2 1 u+2
 
4 y0 + (u + 1)u(u − 1)(u − 2) − 44
3! 4! 6!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
y−2 + 4 y−1 + . . .
5!

Laplace-Everett’s Formula
u(u − 1)(u − 2) 2
y = (1 − u)y0 + uy1 − 4 y−1 +
3!
(u + 1)u(u − 1) 2 (u + 1)u(u − 1)(u − 2)(u − 3) 4
4 y0 − 4 y−2 +
3! 5!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
4 y−1 + . . .
5!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Central Differences Interpolation Formula

Laplace-Everett’s Formula
Let v = 1 − u =⇒ u = 1 − v , u − 2 = −v − 1
(1 − v )v (v + 1) 2 (u + 1)u(u − 1) 2
y = vy0 + uy1 + 4 y−1 + 4
3! 3!
(v + 2)(v + 1)v (v − 1)(v − 2) 4
y0 + 4 y−2 +
5!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
4 y−1 + . . .
5!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Central Differences Interpolation Formula

Laplace-Everett’s Formula
Let v = 1 − u =⇒ u = 1 − v , u − 2 = −v − 1
(1 − v )v (v + 1) 2 (u + 1)u(u − 1) 2
y = vy0 + uy1 + 4 y−1 + 4
3! 3!
(v + 2)(v + 1)v (v − 1)(v − 2) 4
y0 + 4 y−2 +
5!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
4 y−1 + . . .
5!

Laplace-Everett’s Formula
v (v 2 − 1) 2 v (v 2 − 1)(v 2 − 4) 4
y = vy0 + 4 y−1 + 4 y−2 +. . . +uy1 +
3! 5!
(u + 1)u(u − 1) 2 (u + 2)(u + 1)u(u − 1)(u − 2) 4
4 y0 + 4 y−1 +. . .
3! 5!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Laplace-Everett’s Formula

Example
Use Everett’s Interpolation formula to find the value of y given
that x = 1.60 from the following table

x 1.0 1.25 1.5 1.75 2 2.25


y 1.0543 1.1281 1.2247 1.3219 1.4243 1.4987

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Interpolation

Choice of Interpolation Formula


The selection of an interpolation formula depends to a great extent
on the position of the interpolated value in the given data
(a) Use Newton’s Forward Interpolation formula to find a
tabulated value near the beginning of the table
(b) Use Newton’s backward interpolation formula to find a value
near the end of the table
(c) Use either Stirling’s or Bessel’s or Laplace-Everrett’s formula
to find an interpoated value near the center of the table. if u
is lying between −1 1 1
4 and 4 ., Stirling’s formula is preffered, 4
3
and 4 use Bessel’s or Everett’s Formula

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Interpolation with Unequal Intervals

Lagrange’s Interpolation Formula


Let y = f (x ) be areal valued continuous function defined in the
interval [a, b], let x0 , x1 , ..., xn be (n+1) distinct points which are
not necessary equally spaced and the corresponding values of the
function are y0 , y1 , y2 , ...., yn

Lagrange’s Interpolation Formula


We can represent the function y = f (x ) as polynomial in x of
degree n.
Let the polynomial be represented as
f (x ) = a0 (x − x1 )(x − x2 )...(x − xn ) + a1 (x − x0 )(x − x2 )...(x −
xn ) + a2 (x − x0 )(x − x1 )(x − x3 )...(x − xn ) + .......... + an (x −
x0 )(x − x1 )(x − x2 )...(x − xn−1 )

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Interpolation with Unequal Intervals

Lagrange’s Interpolation Formula


If we put x = x0 in the above we get,
f (x0 )
a0 =
(x0 − x1 ))(x0 − x2 )....(x0 − xn )
Putting x = x1
f (x1 )
a1 =
(x1 − x0 ))(x1 − x2 )....(x1 − xn )
Putting x = x2
f (x2 )
a2 =
(x2 − x0 ))(x2 − x1 )....(x2 − xn )
Putting x = xn
f (xn )
an =
(xn − x0 ))(xn − x1 )....(xn − xn−1 )

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Interpolation with Unequal Intervals

Lagrange’s Interpolation Formula


(x − x1 )(x − x2 )(x − x3 ) . . . (x − xn )
y= f (x0 )+
(x0 − x1 )(x0 − x2 )(x0 − x3 ) . . . (x0 − xn )

(x − x0 )(x − x2 )(x − x3 ) . . . (x − xn )
f (x1 ) . . . +
(x1 − x0 )(x1 − x2 )(x1 − x3 ) . . . (x1 − xn )

(x − x1 )(x − x2 )(x − x3 )....(x − xn−1 )


f (xn )
(xn − x1 )(xn − x2 )(xn − x3 ) . . . (xn − xn−1 )

This is called as Lagrange’s Interpolation Formula

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Lagrange’s Interpolation Formula

Example
Apply Lagrange’s Interpolation Formula to find a polynomial of
which passes through the point (0, -20), (1,-12), (3, -20) and (4,
-24)

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Lagrange’s Interpolation Formula

Example
Apply Lagrange’s Interpolation Formula to find a polynomial of
which passes through the point (0, -20), (1,-12), (3, -20) and (4,
-24)

Example
(a) Use Lagrange’s Interpolation Formula to find a polynomial
which passes through the points (0, -12), (1, 0), (3, 6), (4,
12)
(b) Use Lagrange’s Interpolation Formula to find the value of y
corresponding to x = 10 from the following table
x 5 6 9 11
y 380 -2 196 508

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Numerical Differentiation
Numerical differentiation is the process of calculating the derivative
of a function at some particular value of independent variable by
means of a set of given values of that function.

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Numerical Differentiation
Numerical differentiation is the process of calculating the derivative
of a function at some particular value of independent variable by
means of a set of given values of that function.

Numerical Differentiation
Consider the function y=f(x) which is tabulated for the values
x = a + nh, n = 0, 1, 2, ....
Numerical Differentiation are based on numerical interpolation as
follows:

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Numerical Differentiation
(a) Derivatives based on Newton’s Forward interpolation Formula.
This formula is used to find the derivative for some given x
lying near the beginning of the data table/points.
(b) Derivatives based on Newton’s Forward interpolation Formula.
This formula is used to find the derivative for some given x
lying near the end of the data table/points.
(c) Derivatives based on Stirling’s Interpolation Formula. This
formula is used to find the derivative for some point lying near
the middle of tabulated value

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Using Newton’s Forward Difference Formula


Recall the Newton’s Forward Interpolation Formula

u(u − 1) 2 u(u − 1)(u − 2) 3


y = y0 + u 4 y0 + 4 y0 + 4 y0 +
2! 3!
u(u − 1)(u − 2)(u − 3) 4
4 y0 + ....
4!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Using Newton’s Forward Difference Formula


Recall the Newton’s Forward Interpolation Formula

u(u − 1) 2 u(u − 1)(u − 2) 3


y = y0 + u 4 y0 + 4 y0 + 4 y0 +
2! 3!
u(u − 1)(u − 2)(u − 3) 4
4 y0 + ....
4!

Derivatives Using Newton’s Forward Difference Formula


x − x0
where u = ⇒ x = x0 + uh
h
u2 − u 2 u 3 − u 2 + 2u 3
y = y0 + u 4 y0 + 4 y0 + 4 y0 +
2 6
4 3 2
u − 6u + 11u − 6u 4
4 y0 + ....
24

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Using Newton’s Forward Difference Formula


dy 2u − 1 2 3u 2 − 6u + 2 3
= 4y0 + 4 y0 + 4 y0 +
du 2 6

4u 3 − 18u 2 + 22u − 6 4
4 y0 + ....
24

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Using Newton’s Forward Difference Formula


dy 2u − 1 2 3u 2 − 6u + 2 3
= 4y0 + 4 y0 + 4 y0 +
du 2 6

4u 3 − 18u 2 + 22u − 6 4
4 y0 + ....
24

Derivatives Using Newton’s Forward Difference Formula


dx
and =h
du

dy dy du
= ×
dx du dx

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Using Newton’s Forward Difference Formula


dy 1 2u − 1 2 3u 2 − 6u + 2 3
= [4y0 + 4 y0 + 4 y0 +
dx h 2 6

4u 3 − 18u 2 + 22u − 6 4
4 y0 + ....]
24

If x = x0 , u = 0

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Using Newton’s Forward Difference Formula


dy 1 2u − 1 2 3u 2 − 6u + 2 3
= [4y0 + 4 y0 + 4 y0 +
dx h 2 6

4u 3 − 18u 2 + 22u − 6 4
4 y0 + ....]
24

If x = x0 , u = 0

Derivatives Using Newton’s Forward Difference Formula


dy 1 42 y0 43 y0 44 y0
= [4y0 − + − + ....]
dx h 2 3 4
and
d 2y 1 2
2 y + 6u − 6 43 y + 12u − 36u + 22 44 y + ...]
= [4 0 0 0
dx 2 h2 6 24
Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis
Numerical Differentiation

Derivatives Using Newton’s Forward Difference Formula


Foru = 0

d 2y 1 11 4 5
2
= 2 [42 y0 − 43 y0 + 4 y0 − 45 y0 + ...]
dx h 24 6

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Using Newton’s Forward Difference Formula


Foru = 0

d 2y 1 11 4 5
2
= 2 [42 y0 − 43 y0 + 4 y0 − 45 y0 + ...]
dx h 24 6

Example
dy d 2y
From the following table find the value of and at the
dx dx 2
point x = 1.0

x 1 1.1 1.2 1.3 1.4 1.5


y 5.4680 5.6665 5.9264 6.2551 6.6601 7.1488

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Example
dy d 2y
From the following table of values of x and y, obtain and
dx dx 2
for x = 1.1 and x = 1.2

x 1.0 1.2 1.4 1.6 1.8 2.0 2.2


y 2.7183 3.3201 4.0562 4.9530 6.0496 7.3891 9.0250

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Example
dy d 2y
From the following table of values of x and y, obtain and
dx dx 2
for x = 1.1 and x = 1.2

x 1.0 1.2 1.4 1.6 1.8 2.0 2.2


y 2.7183 3.3201 4.0562 4.9530 6.0496 7.3891 9.0250

Derivatives Based on Newton’s Backward Interpolation Formula


Here, we assume that the function y=f(x) is known at (n+1)
points x0 , x1 , x2 , . . ., xn

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Based on Newton’s Backward Interpolation Formula


x − xn
Let xi = x0 + ih i=0, 1, 2, . . .,n and u =
h

Recall the Newton’s Backward Interpolation formula

u(u + 1) 2 u(u + 1)(u + 2) 3


f (x ) = yn + u 5 yn + 5 yn + 5 yn +
2! 3!
u(u + 1)(u + 2)(u + 3) 4
5 yn +.....
4!

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Based on Newton’s Backward Interpolation Formula


x − xn
Let xi = x0 + ih i=0, 1, 2, . . .,n and u =
h

Recall the Newton’s Backward Interpolation formula

u(u + 1) 2 u(u + 1)(u + 2) 3


f (x ) = yn + u 5 yn + 5 yn + 5 yn +
2! 3!
u(u + 1)(u + 2)(u + 3) 4
5 yn +.....
4!

Derivatives Based on Newton’s Backward Interpolation Formula


1 2u + 1 2 3u 2 + 6u + 2 3
f 0 (x ) =
[5yn + 5 yn + 5 yn +
h 2! 3!
3 2
4u + 18u + 22u + 6 4
5 yn + ......]
4!
Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis
Numerical Differentiation

Derivatives Based on Newton’s Backward Interpolation Formula


1 2
f 00 (x ) = [52 y + 6u + 6 53 y + 12u + 36u + 22 54 y + ......]
n n n
h2 3! 4!

For x = xn , u = 0 we have

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Based on Newton’s Backward Interpolation Formula


1 2
f 00 (x ) = [52 y + 6u + 6 53 y + 12u + 36u + 22 54 y + ......]
n n n
h2 3! 4!

For x = xn , u = 0 we have

Derivatives Based on Newton’s Backward Interpolation Formula


1 52 yn 53 yn 54 yn
f 0 (x ) = [5yn + + + + ......]
h 2 3 4

1 11 4
f 00 (x ) = 2
[52 yn + 53 yn + 5 yn + ......]
h 12

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Example
A slider in a machine moves a long a fixed straight rod. Its
distance xm along the rod are given in the following table for
various values of the time t(seconds).

t(sec) 1 2 3 4 5 6
x(m) 0.0201 0.0844 0.3444 1.0100 2.3660 4.7719

Find the velocity and acceleration of the slider at time t=6 sec

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Example
A slider in a machine moves a long a fixed straight rod. Its
distance xm along the rod are given in the following table for
various values of the time t(seconds).

t(sec) 1 2 3 4 5 6
x(m) 0.0201 0.0844 0.3444 1.0100 2.3660 4.7719

Find the velocity and acceleration of the slider at time t=6 sec

Derivatives Based on Stirling’s Interpolation Formula


Suppose y±i = f (x±i ), i=0, 1, 2, ......,n are given for (2n+1)
points x0 , x±1 , x±2 , ......, x±n where x±i = x0 ± ih, i=0, 1, .....n

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation
Derivatives Based on Stirling’s Interpolation Formula
The Stirling’s Interpolation formula is given by

f (x ) =
4y−1 + 4y0 u2 2 u 3 − u 43 y−2 + 43 y−1
y0 + u[ ]+ 4 y−1 + [ ]+
2 2! 3! 2
u4 − u2 4 u 5 − 5u 3 + 4u 45 y−3 + 45 y−2
4 y−2 + [ + ....]
4! 5! 2

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation
Derivatives Based on Stirling’s Interpolation Formula
The Stirling’s Interpolation formula is given by

f (x ) =
4y−1 + 4y0 u2 2 u 3 − u 43 y−2 + 43 y−1
y0 + u[ ]+ 4 y−1 + [ ]+
2 2! 3! 2
u4 − u2 4 u 5 − 5u 3 + 4u 45 y−3 + 45 y−2
4 y−2 + [ + ....]
4! 5! 2
Derivatives Based on Stirling’s Interpolation Formula
x − x0
where u =
h
Then
1 4y−1 + 4y0 3u 2 − 1 43 y−2 + 43 y−1
f 0 (x ) = [ + u 42 y−1 + [ ]+
h 2 6 2
3
4u − 2u 4 4 2 5
5u − 15u + 4 4 y−3 + 4 y−2 5
4 y−2 + [ ] + .......]
4! 5! 2
Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis
Numerical Differentiation

Derivatives Based on Stirling’s Interpolation Formula


and
1 43 y−2 + 43 y−2 12u 2 − 2 4
f 00 (x ) = 2 [42 y−1 + u[ ]+ 4 y−2 +
h 2 4!
20u 3 − 30u 45 y−3 + 45 y−2
[ ]+..........]
5! 2
at x = x0

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation

Derivatives Based on Stirling’s Interpolation Formula


and
1 43 y−2 + 43 y−2 12u 2 − 2 4
f 00 (x ) = 2 [42 y−1 + u[ ]+ 4 y−2 +
h 2 4!
20u 3 − 30u 45 y−3 + 45 y−2
[ ]+..........]
5! 2
at x = x0

Derivatives Based on Stirling’s Interpolation Formula


f 0 (x ) =
1 4y−1 +4y0 1 43 y−2 + 43 y−1 1 45 y−3 + 45 y−2
[ 2 − [ ] + [ ] + .....]
h 6 2 30 2

1 1 4
f 00 (x ) = [42 y−1 − 4 y−2 + ..........]
h2 12

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation
Example
dy d 2y
Find and for x=0.2 for the data given in the following
dx dx 2
table.

x 0 0.1 0.2 0.3 0.4 0.5


y 0 0.10017 0.20134 0.30452 0.41076 0.52115

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis


Numerical Differentiation
Example
dy d 2y
Find and for x=0.2 for the data given in the following
dx dx 2
table.

x 0 0.1 0.2 0.3 0.4 0.5


y 0 0.10017 0.20134 0.30452 0.41076 0.52115

Exercise
Compute the values of f 0 (3.1) and f 0 (3.2) using the following table

x 1 2 3 4 5
f(x) 0 1.4 3.3 5.6 8.1

Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis

You might also like