0% found this document useful (0 votes)
69 views

Linear Interpolation

Linear interpolation uses linear polynomials to construct new data points within the range of known data points by assuming the relationship between points is linear. Newton interpolation determines an approximate curve to replace an unknown curve given three or more points, using a general formula to calculate coefficients for a polynomial of order n-1, where n is the number of points. It was shown using four points to estimate ln(2) with a third order polynomial, achieving an error of 9.3%.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Linear Interpolation

Linear interpolation uses linear polynomials to construct new data points within the range of known data points by assuming the relationship between points is linear. Newton interpolation determines an approximate curve to replace an unknown curve given three or more points, using a general formula to calculate coefficients for a polynomial of order n-1, where n is the number of points. It was shown using four points to estimate ln(2) with a third order polynomial, achieving an error of 9.3%.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

NEWTON AND LINERAR INTERPOLATION

Linear Interpolation
Linear Interpolation is a method of curve fitting using linear polynomials to construct new data points
within the range of a discrete set of known data points.

Linear interpolation uses the approach of finding the gradient of a straight line. Taking gradient of a
y 2− y 1
straight line m= . Linear interpolation makes the assumption that using point B and C to find
x 2−x 1
the gradient of the line should give the same answer as using point A and C given:
y− y 1 y1 − y 0
=
x−x 1 x1 −x 0
y 1− y 0
y= y1 + ×( x−x 1 )
x 1−x 0
Linear interpolation also assumes that the graph (curve) formed by the points very close enough to
form an assumed straight line.
In the graph above, the curve blue represents a quadratic equation f ( x )=x 2−2 x +4 and the yellow
line represent a line connecting the two points (-2, 12) and (0,4) that is f (−2 )∧f ( 0 ) on the curve
f ( x). Assuming f (−1 ) is unknown and will be determined by linear interpolation.
f (−1 )−f (0) f (−2 )−f (0)
=
−1−0 −2−0
12−4
f (−1 ) =4 + ×(−1−(0))
−2−0
f (−1 ) =8
And the estimated value of the absolute true percentage error is

ε t=|8−78|×100 %
ε t=12.5 %

Newton Interpolation

The newton interpolation uses the a general formular

f n−1 ( x )=b 1+ b2 ( x−x1 ) + …+bn ( x−x 1 ) ( x−x 2 ) … ( x −xn −1 ) … … … … … … … .. equ(1)

Where (n−1) will be the order of the function that is (n−1)th order polynomial.

Newton Interpolation is an interpolation method which is used to determine an approximate curve


which is capable of replacing a curve in question given three or more points on that curve.

C
B

A
In the figure above, when given the coordinate at points A, B and C there will be the need to
determine the value of f ( x ) at point D given the value of x at that point.

Using Newton interpolation method to approximate the value of f ( x ) at point D, the given coordinate
A, B and C which are found on unknown line f ( x ) is evaluated to obtain the line f 2 ( x) which is
evaluated for f 2 (2) which is expected to be a value very close to f ( 2 ) if not equal.

In order to use the newton evaluation method, one is required to be given an n number of points on
the assume unknown line in order to evaluate for the coefficients b 1 , b2 , b3 , … ,b n.

Where, b 1=f ( x 1 )

b 2=f [ x 1 , x 2 ]

b 3=f [ x 1 , x 2 , x 3 ]
. .
. .
. .

b n=f [ x 1 , x 2 , x 3 ,.. , x n−1 , x n ]

Also Note that,

f ( x i )−f ( x j )
f ( x i , x j , )=
x i−x j

f ( xi , x j , )−f ( x j , x k , )
f ( xi , x j , xk )=
x i−x k

Try example:

In this try example data points at x 1=1, x 2=4 and x 3=6 were used to estimate ln (2) with a
parabola. Now adding a fourth point [ x 4 =5 ;f ( x 4 ) =1.609438 ], estimate ln (2) with a third order
newton’s interpolating polynomial.
Solution
The third-order polynomial, with n=4 , is

f 3 ( x )=b 1+ b2 ( x−x 1) + b3 ( x−x 1) ( x−x 2 ) +b 4 ( x−x 1 )( x−x 2) ( x−x 3 ) … … … equ (2)

x f (x)
1 0 0.4620981 −0.05187311 0.007865529
4 1.386294 0.2027326 −0.02041100
6 1.791759 0.1823216
5 1.609438
f 3 ( x )=0+ 0.4620981( x−1)−0.05187311( x−1)(x−4 )+ 0.007865529( x−1)( x −4)( x−6)

After the equation f 3 ( x ) have been derived, it is evaluated for f 3 ( 2 ) to obtain 0.6287686 .

But the actual value for f ( x )=ln ⁡( x ) that is f ( 2 ) =ln ( 2 )=0.6931471806 .

ε t= |0.6931471806−0.6287686
0.6931471806 |×100 %
ε t=9.2878 % ≅ 9.3 %

There it can be seen that the approximation worked with only 9.3% error.

You might also like