Académique Documents
Professionnel Documents
Culture Documents
By Syaiful Anam
Applied Mathematical Modeling and
Computation Laboratory
Mathematics Department
Brawijaya University
Basic Scenario
We are able to prod some function, but do
not know what it really is.
This gives us a list of data points: [xi,fi]
f(x)
fi fi+1
xi xi+1
Maclaurin and Taylor Polynom
ials
When a Taylor series is truncated to a finite
number of terms the result is a Taylor
polynomial.A Taylor series expanded about
, is called a Maclarin series.These Taylor
(and Maclaurin) polynomials are used to
numerically approximate functions.We
attribute much of the founding theory to
Brook Taylor (1685-1731), Colin Maclaurin
(1698-1746) and Joseph-Louis Lagrange
(1736-1813).
Polynomial Interpolation
Use polynomial of degree N-1 to fit exactly
with N data points (xi,yi), i =1, 2, , N.
N 1
f ( x) c0 c1 x c2 x L cN 1 x
2
P x L1 x y1 L2 x y2
Lagrange Interpolation
Pn 1 x L1 x y1 L2 x y2 Ln x yn
where,
Lk x
x x1 x x2 x xn 1 x xn
xk x1 xk x2 xk xn 1 xk xn
n
x - xi
i 1 xk xi
k i
Lagrange Interpolation
y1 10.6
x y C1 9.298
x1 x2 x1 x3 1.1 1.7 1.1 3.0
1.1 10.6
15.2
1.7 15.2 C2 19.4872
3 20.3 1.7 1.11.7 3.0
20.3
C3 8.2186
3.0 1.1 3.0 1.7
Example of Lagrange Interpolation
Lagrange Interpolation
The values are evaluated
25
P(x) = 9.2983*(x-1.7)(x-3.0) 20
- 19.4872*(x-1.1)(x-3.0)
15
y values
+ 8.2186*(x-1.1)(x-1.7)
10
P(2.3) = 9.2983*(2.3-1.7)(2.3-3.0) 5
- 19.4872*(2.3-1.1)(2.3-3.0)
0
+ 8.2186*(2.3-1.1)(2.3-1.7) 1 1.5 2 2.5 3
= 18.3813 x values
Example of Lagrange
Interpolation
Y Values
10
The problem with adding
5
additional points will create
bulges in the graph. 0
1 1.5 2 2.5 3
X Values
Example of Lagrange
Interpolation
Example
Given points (x1,y1)=(-2,4), (x2,y2)=(0,2),
(x3,y3)=(2,8)
( x 0)( x 2) ( x (2))( x 2) ( x (2))( x 0)
p( x) 4 2 8
(2 0)(2 2) (0 (2))(0 2) (2 (2))(2 0)
x ( x 2) ( x 2)( x 2) x( x 2)
4 2 8 x2 x 2
8 4 8
Sir Isaac Newton
1643 - 1727
Newton laid the
foundation for
differential and
integral calculus.
His work on optics
and gravitation
make him one of
the greatest
scientists the
world has known.
Newton Interpolation
Polynomials
Newton form of the equation of a straight line passing
through two points (x0, y0) and (x1, y1) is
p1 ( x) p0 ( x) a1 ( x x0 )
a0 a1 ( x x0 )
Newton form of the equation of a parabola passing
through three points (x0, y0), (x1, y1), and (x2, y2) is
p2 ( x) p1 ( x) a2 ( x x0 )( x x1 )
a0 a1 ( x x0 ) a2 ( x x0 )( x x1 )
the general form of the polynomial passing through n
points (x0, y0), ,(xn-1, yn-1) is
pn ( x) pn 1 ( x) an ( x x0 )...( x xn 1 )
a0 a1 ( x x0 ) a2 ( x x0 )( x x1 ) ... an ( x x0 )...( x xn 1 )
Newton Interpolation Polynomials (Newton
Divided Difference )
p ( x) a0 a1 ( x x0 ) a2 ( x x0 )( x x1 ) ... an ( x x0 )...( x xn 1 )
Substituting (x0, y0) into y a0 a1 ( x x0 ) a2 ( x x0 )( x x1 )
a0 f ( x0 )
y0
Substituting (x1, y1) into y a0 a1 ( x x0 ) a2 ( x x0 )( x x1 )
f ( x1 ) f ( x0 )
a1 f [ x1 , x0 ]
x1 x0
y1 y0
x1 x0
Substituting (x2, y2) into y a1 a2 ( x x1 ) a3 ( x x1 )( x x2 )
a2 f [ x2 , x1 , x0 ]
y2 y1 y1 y0
x x x1 x0 f [ x2 , x1 ] f [ x1 , x0 ]
2 1
x2 x0 x2 x0
Newton Polynomial (Newtons Divided
Differences)
Differences
i xi yi=f(xi) ST-1 ST-2 ST-3
0 x0 f(x0) f[x1,x0] f[x2,x1,x0] f[x3,x2,x1,x0]
1 x1 f(x1) f[x2,x1] f[x3,x2,x1]
2 x2 f(x2) f[x3,x2]
3 x3 f(x3)
f ( x1 ) f ( x0 ) f 0
f [ x1 , x0 ]
(2) x1 x0 h
f [ x2 , x1 ] f [ x1 , x0 ]
(3) f [ x2 , x1 , x0 ]
x2 x0
f ( x2 ) f ( x1 ) f ( x1 ) f ( x0 )
x2 x1 x1 x0
x2 x0
f1 f 0
h 2
f0
2h 2!h 2
Forward Newton
General Form
f0 n
f [ xn ,..., x1 , x0 ] n
n!h
f 0 2 f 0 n f 0
pn ( x ) f 0 ( x x0 ) 2
( x x0 )( x x1 ) ... n
( x x0 )( x x1 )..( x xn 1 )
1!h 2!h n!h
Forward Newton
f 0 2 f 0 n f 0
pn ( x ) f 0 ( x x0 ) 2
( x x0 )( x x1 ) ... n
( x x0 )( x x1 )..( x xn 1 )
1!h 2!h n!h
f 0 f ( x0 )
y0
( x x0 )
x x0 sh, s R s
h
Rekursif Relation
k+1fi=kfi- kf i-1
sf 0 s ( s 1) 2 f 0 s ( s 1)( s 2)...( s n 1) n f 0
pn ( x ) f 0 ...
1! 2! n!
Example
sf 0 s( s 1) 2 f 0 s ( s 1)( s 2)...( s n 1) n f 0
pn ( x ) f 0 ...
1! 2! n!
1.7 * 8 1.7(1.7 1)4 1.7( 1.7 1)(1.7 2)2 1.7(1.7 1)(1.7 2)(1.7 3)1
p4 ( 2.3) 16
1! 2! 3! 4!
4.918338