0% found this document useful (0 votes)
243 views18 pages

Numerical Methods

Newton's interpolation formula can be used to find values of a function between given data points. It uses forward and backward difference formulas. Lagrange's interpolation formula represents a function as a polynomial and can find values at any data points, whether evenly spaced or not. Both formulas were demonstrated to find unknown y-values from x-y data tables through 3 examples, with Newton's formula finding values within the interval and Lagrange's outside it.

Uploaded by

Abed Masaud
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
243 views18 pages

Numerical Methods

Newton's interpolation formula can be used to find values of a function between given data points. It uses forward and backward difference formulas. Lagrange's interpolation formula represents a function as a polynomial and can find values at any data points, whether evenly spaced or not. Both formulas were demonstrated to find unknown y-values from x-y data tables through 3 examples, with Newton's formula finding values within the interval and Lagrange's outside it.

Uploaded by

Abed Masaud
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 18

 

NUMERICAL METHODS
INTERPOLATION AND SOLUTION OF ALGEBRAIC AND
TRANSCENDENTAL EQUATIONS.
INTRODUCTION
Interpolation denotes the process
of computing the value of a
function for any value of the
independent variable within the
interval for which some values are
given.
Interpolation is a fundamental operation in
mathematics it has been described as a art of reading
between the lines of the tables.
Suppose the following table represents a set of corresponding values of two equations X and y .
X : x₀ x₁ x₂………………..xn
Y : y₀ y₁ y ₂……………… yn.
We may require the value of y=yr corresponding to a value x=xr between x0 and xn .
Suppose the following table represents a set of
corresponding values of two equations
X and y .
X : x₀ x₁ x₂………………..xn
Y : y₀ y₁ y ₂……………… yn.
We may require the value of y=yr corresponding to a
value x=xr between x0 and xn . Thus interpolation
denotes the process of computing the value of a
function for any value of the independent variable
within the interval for which some values are given.
The term extrapolation is used to
denote the process of finding the
values outside this interval.
However the term interpolation
is supplied to both process.
Example : Y=X3+2X+5
y0,y1,y2………….yn
corresponding to the value x0,x1,x2…….xn of the
independent variable of x.
let the value of x be at the equi-distant
intervals.
yp=y0+p∆y0+p(p-1)∆2y0+ p(p-1)(p-2)∆3y0+
2ḷ 3ḷ

…………………………
p(p-1(p-2)……(p-(n-1))∆ny0­
nḷ

It is known as newtons forward interpolation


formula.
This formula is used to interpolate the value of y
near the beginning of a set of tabular value.

Problem
1.Following are the data from the steam table.
Temperature C° 140 150 160 170 180
Pressure 3.685 4.854 6.302 8.076 10.225
Using newtons formula find the pressure of a
steam for a temperature 142°?
Solution:
x y ∆y ∆2y ∆3y ∆4y
140 3.685 1.169 0.279 0.047 0.002
150 4.854 1.448 0.326 0.049
160 6.302 1.774 0.375
170 8.076 2.149
180 10.225
yp=y0+p∆y0+p(p-1)∆2y0+ p(p-1)(p-2)∆3y0+­…………………………
2ḷ 3ḷ

p(p-1(p-2)……(p-(n-1))∆ny0­
nḷ
y0=3.685 p=x-x0
h
∆y0=1.169 =(142-140)/10=0.2
∆2y0=0.279
∆3y0=0.047
∆4y0=0.002
Yp=3.685+0.2(1.169)+0.2(0.2-1)0.279+0.2(0.2-1)(0.2-2)0.047+0.2(0.2-
2 6 24
1)(0.2-2)(0.2-3)0.002
24
=3.685+0.2338+0.0223+0.0022+0.00007
=3.89863
=3.899
2.Following data gives the value x and y. find the value of y when x is 21. From the table
X 20 23 26 29
Y 0.3420 0.3907 0.4384 0.4848
Solution:
x y ∆y ∆ 2y ∆ 3y
120 0.3420 0.0487 -0.001 0.0003
23 0.3907 0.0477 -0.0013
26 0.4384 0.0464
29 0.4848
Formula
yp=y0+p∆y0+p(p-1)∆2y0+ p(p-1)(p-2)∆3y0+­………………………… p(p-1(p-2)……(p-(n-1))∆ny0­
2ḷ 3ḷ nḷ
Y0=0.3420 p=x-x0
h
∆y0=0.0487 =(21-20)/3=0.3
∆2y0=-0.001
∆3y0=0.0003

yp= 0.3420+0.3(0.0487)+0.3(0.3-1)(-0.001)+0.3(0.3-1)(0.3-2)0.0003
2 6
=0.3420+0.01461+0.000105+0.00001785
=0.3567
3.Using newtons forward interpolation formula. Calculate x is 1.02 upto 3 decimal places in the table given
below
X 1.0 1.1 1.2 1.3 1.4
F(x) 0.841 0.89 1.932 0.964 0.985
Solution
X f(x) ∆y ∆2y ∆3y ∆4y
1.0 0.841 0.05 -0.009 0 -0.002
1.1 0.891 0.041 -0.0009 -0.002
1.2 0.932 0.032 -0.011
1.3 0.964 0.021
1.4 0.985
yp=y0+p∆y0+p(p-1)∆2y0+ p(p-1)(p-2)∆3y0+­………………………… p(p-1(p-2)……(p-(n-1))∆ny0­
2ḷ 3ḷ nḷ
y0=0.841 p=x-x0
h
∆y0=0.05 =(1.02-1)/0.1=0.2
∆ y0=-0.009
2

∆3y0=0
∆4y0=-0.002
Yp=0.841+0.2(0.05)+0.2(0.2-1)(-0.009)+0.2(0.2-1)(0.2-2)0+0.2(0.2-1)(0.2-2)(0.2-3)(-0.009)
2 6 24
=0.841+0.01+0.00072+0+0.0000672
=0.851
NEWTONS GREGORY BACKWARD INTERPOLATION FORMULA
Let yx=f(x) be a function which takes the value y0,y1,y2………….yn corresponding to the value
x0,x1,x2…….xn of the independent variable x. let the value of x be at equi-distance intervals.

Let x=xn + ph

Yp=yn+ pṼyn+p(p+1)Ṽ2yn+ p(p+1)(p+2) Ṽ3yn +­………………………… p(p+1(p+2)……(p+(n-1)) Ṽnyn ­


2ḷ 3ḷ nḷ
Note:
This formula is used to interpolate the value of y near the end of a set of tabular values .
Problem:
From the following table of half yearly premium of policies maturing at qunnial ages estimate the
premium for polices maturing at age 63
Age(x) : 45 50 55 60 65
Premium(y): 114.84 96.16 83.32 74.48 64.48
Solution:
Age premium Ṽy Ṽ2y Ṽ3y Ṽ4y
45 114.84 -18.68 5.84 -1-84 0.68
50 96.16 -12.84 4 -1.16
55 83.32 -8.84 2.84
60 74.48 -6
65 68.4
Formula:
Yp=yn+ pṼyn+p(p+1)Ṽ2yn+ p(p+1)(p+2) Ṽ3yn +­………………………… p(p+1(p+2)……(p+(n-1)) Ṽnyn ­
2ḷ 3ḷ nḷ
yn=68.48
Ṽyn=-6
Ṽ2yn=2.84
Ṽ3yn=-1.16
Yp=68.48+(-0.4)(-6)+(-0.4)(0.4+1)2.84+(-0.4)(-0.2+1)(-0.4+2)(-1.16)+(-0.4)(-0.2+1)(-0.4+2)(0.4+3)(0.68)
2 6 24
=68.48+2.4-0.3400+0.07424-0.02828
=70.58
2. The amount A of a substance remaining reacting of interveral of time t in certain chemical
experiment is given below
T(min) 2 5 8 11
A(gm) 94.8 87.9 81.3 75.1
Obtain the value of A where t=9 mints using newton backward difference interpolation formula.
T A Ṽy Ṽ2y Ṽ3y
2 94.8 -6.9 0.3 0.1
5 87.9 -6.6 0.4
8 81.3 -6.2
11 75.1
Yp=yn+ pṼyn+p(p+1)Ṽ2yn+ p(p+1)(p+2) Ṽ3yn +­………………………… p(p+1(p+2)……(p+(n-1)) Ṽnyn ­
2ḷ 3ḷ nḷ
yn=75.1
Ṽyn=-6.2
Ṽ2yn=0.4
Ṽ3yn=0.1
Yp=75.1+(-0.6)(-6.2)+(-0.6)(0.6+1)0.4+(-0.6)(-0.6+1)(-0.6+2)(0.1)
2 6
=75.1-3.72-0.048-0.0056+4.12
=79.20
3.Using newtons formula the value of x=27
X 10 15 20 25 30
Y 35.4 32.2 29.1 26 23.1
Solution:
X y Ṽy Ṽ2y Ṽ3y Ṽ4y
10 35.4 -3.2 0.1 -0.1 0.3
15 32.2 -3.1 0 0.2
20 29.1 -3.1 0.2
25 26 -2.9
30 23.1
Yp=yn+ pṼyn+p(p+1)Ṽ2yn+ p(p+1)(p+2) Ṽ3yn +­………………………… p(p+1(p+2)……(p+(n-1)) Ṽnyn ­
2ḷ 3ḷ nḷ
yn=23.1
Ṽyn=-2.9
Ṽ2yn=0.2
Ṽ3yn=0.2
Ṽ4yn=0.3
Yp=23.1+(-0.6)(-2.9)+(-0.6)(0.6+1)0.2+(-0.6)(-0.6+1)(-0.6+2)(0.2) +(-0.6)(-0.6+1)(-
2 6 24
0.6+2)(0.3)
=23.1+1.74+-0.024-0.01008-0.0112
=24.7947
LAGRANGE’S INTERPOLATION FORMULA
Let f(x) = y be a function which takes the values y0,y1,y2………………yn
corresponding to the value x = x0,x1,x2…….xn .Since there are n+1 values of y corresponding
to n+1 value of x.

we can represent the function f(x) by a polynomial in x of degree n.


y=f(x)=(x-x1)(x-x2)……….(x-xn)y0 + (x-x0)(x-x2)……….(x-xn)y1 +……+(x-x0)(x-x1)……….(x-xn-1)yn
(x0-x1)(x0-x2)……….(x0-xn) (x1-x0)(x1-x2)…….(x1-xn) (xn-x0)(xn-x1)…….(xn-xn-1)

is known as lagrange’s interpolation formula.


It can be used whether the values x0,x1,x2…….xn are equally spaced or not and whether the
differences of y become smaller or not.
1.Given the values
x :14 17 31 35
f(x): 64 44 39.1
find the value of f(x) corresponding of x=27

solution:
since there are only fours corresponding pairs of values given in the polynomial
representing the data is
x0=14 x1=17 x2=31 x3=35
y0=68.7 y1=64 y2=44 y3=39.1

by lagrange’s interpolation formula


y=f(x)=(x-x1)(x-x2)……….(x-xn)y0 + (x-x0)(x-x2)……….(x-xn)y1 +……+(x-x0)(x-x1)……….(x-
xn-1)yn
(x0-x1)(x0-x2)……….(x0-xn) (x1-x0)(x1-x2)…….(x1-xn) (xn-x0)(xn-x1)…….(xn-
xn-1)

= (27-17)(27-31)(27-35)68.7 +(27-17)(27-31)(27-35)64 + (27-17)(27-31)(27-35)44

(14-17)(14-31)(14-35) (17-14)(17-31)(17-35) (31-14)(31-17)(31-35)

+(27-14)(27-31)(27-17)39.1
(35.4-14)(35-17)(35-31)
=20.5266+35.2169+48.0672-13.4479
=49.3104

You might also like