Curve Fitting Divided Difference

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

1

III. INTERPOLATION AND CURVE FITTING

Interpolation is the method of finding the values for a tabulated function


at points not in the table.

Divided Difference Method – is an efficient method for constructing the


interpolating polynomials and getting interpolated values.

Steps: a) Assume f(x) is known at several values of x.


x0 f0
x1 f1
x2 f2
x3 f3
b) Use the following general formulas for the first divided difference between xs
and xt.
f  fs f  ft
f [ x s , xt ]  t  s
xt  x s x s  xt
and the higher-order differences.
f  x1 , x2 ,..., xn   f  x0 , x1 ,..., xn1   n
f [ x0 , x1 ,.., xn ]   f0
xn  x0
[0]
For, zero-order difference: f[xs] = fs = fs .
c) The interpolating polynomial that fits a divided difference table at x0, x1, …,xn
is then
[ 0] [1] [ 2] [n]
Pn ( x)  f 0  ( x  x0 ) f 0  ( x  x0 )( x  x1 ) f 0  ...  ( x  x0 )( x  x1 )...(x  x n 1 ) f 0

Illustrations: First divided difference between x0 and x1.


f  f0  1
f [ x0 , x1 ]  1  f0
x1  x0
First divided difference between x1 and x2
f  f1 1
f [ x1 , x2 ]  2  f1
x2  x1
Second-order difference:
f  x1 , x2   f  x0 , x1   2
f [ x0 , x1 , x2 ]   f0
x2  x0
Example 3.1: Construct the divided difference table for the values shown in the table.
Obtain the interpolating polynomial of degree 4 that fits the table from x0 = 3.2
to x5 = 5.6.

xi f(xi)=fi[0] fi[1] fi[2] fi[3] fi[4]


3.2 22.0
2.7 17.8
2

1.0 14.2
4.8 38.3
5.6 51.7

Least-Squares Approximations – are used to fit a curve to an approximate set of linear


data by determining the constants a and b in the equation involving the variables x and y
(a linear relationship):
y = ax + b.
Let Yi represent an experimental value, and let yi be a value from the equation yi = axi +
b, where xi is a particular value of the variable assumed to be free of error.

Normal Equations: a  xi + b xi =  xi Yi ,
2

a  xi + bN =  Yi .

Example: In a Physics Laboratory, students would want to determine the effects of


temperature on a resistance. They have recorded the temperature and resistance
measurements as shown in the table where the graph suggests a linear relationship. Find
the linear equation that would fit the data. What is the approximate resistance when the
temperature is 1000C?

x=T,0C y=R,ohms
20.5 765
32.7 826
51.0 873
73.2 942
95.7 1032


Resistance, ohms




Temperature, 0C

You might also like