Beruflich Dokumente
Kultur Dokumente
f (x) = 1 + x.
Answer:
Given
f (x) =
1.9.
y1 +
x2 x1
x x0
y1 , for x [x0 , x1 ],
x1 x0
x x1
y2 , for x [x1 , x2 ],
x2 x1
x [x0 , x2 ],
where
(x x1 )(x x2 )
,
(x0 x1 )(x0 x2 )
(x x0 )(x x2 )
,
l1 (x) =
(x1 x0 )(x1 x2 )
(x x0 )(x x1 )
.
l2 (x) =
(x2 x0 )(x2 x1 )
l0 (x) =
2. Use Nevilles method to approximate 3 with the function f (x) = x and the values
x0 = 0, x1 = 1, x2 = 2, x3 = 4, and x4 = 5.
Answer:
To approximate
P2 = f (x2 ) = 2,
P3 = f (x3 ) = 2,
P4 = f (x4 ) = 5;
3 x0
3 x1
P0,1 =
P1 +
P0 = 3,
x1 x0
x0 x1
3 x2
3 x1
P2 +
P1 1.828,
P1,2 =
x2 x1
x1 x2
3 x2
3 x3
P2,3 =
P3 +
P2 1.707,
x3 x2
x2 x3
3 x3
3 x4
P3,4 =
P4 +
P3 1.764;
x4 x3
x3 x4
3 x0
3 x2
P0,1,2 =
P1,2 +
P0,1 1.242,
x2 x0
x0 x2
3 x3
3 x1
P2,3 +
P1,2 1.747,
P1,2,3 =
x3 x1
x1 x3
3 x2
3 x4
P2,3,4 =
P3,4 +
P2,3 1.726;
x4 x2
x2 x4
3 x3
3 x0
P1,2,3 +
P0,1,2 1.621,
P0,1,2,3 =
x3 x0
x0 x3
3 x1
3 x4
P1,2,3,4 =
P2,3,4 +
P1,2,3 1.737;
x4 x1
x1 x4
x x4
x x0
P1,2,3,4 +
P0,1,2,3 1.691.
P0,1,2,3,4 =
x4 x0
x0 x4
We summarize the
x0 = 0 P0 = 0
x1 = 1 P1 =
1
x2 = 2 P2 = 2
x3 = 4 P3 =
2
x4 = 5 P4 = 5
=3
1.828 P0,1,2 1.242
1.707 P1,2,3 1.747 P0,1,2,3 1.621
1.764 P2,3,4 1.726 P1,2,3,4 1.737 P0,1,2,3,4 1.691
3. Let L3 (x) be the interpolation polynomial for the data (0, 0), (0.5, y), (1, 3) and (2, 2).
Find y if the coefficient of x3 in L3 (x) is 6.
Answer:
Assume that
L3 (x) = 6x3 + c2 x2 + c1 x + c0 .
Data (0, 0), (1, 3) and (2, 2) lead to the following equations:
c0 = 0,
c + c1 + c2 + 6 = 3,
c0 + 2c
0
1 + 4c2 + 48 = 2.
So,
L3 (x) = 6x3 20x2 + 17x.
Therefore, y = L3 (0.5) = 4.25.
4. Use Newtons forward-difference formula to construct interpolation polynomials of degrees
1, 2 and 3 for the following data. Approximate the specified value using each of the
polynomials.
f (0.25) if f (0.1) = 0.6205, f (0.2) = 0.2839, f (0.3) = 0.0066, f (0.4) = 0.2484.
Answer:
Denote x0 = 0.1, x1 = 0.2, x2 = 0.3 and x3 = 0.4. From the following formulas,
f [x0 ] = f (x0 ),
f [x1 ] = f (x1 ),
f [x2 ] = f (x2 ),
f [x3 ] = f (x3 );
f [x1 ] f [x0 ]
f [x0 , x1 ] =
,
x1 x0
f [x2 ] f [x1 ]
,
f [x1 , x2 ] =
x2 x1
f [x3 ] f [x2 ]
;
f [x2 , x3 ] =
x3 x2
f [x1 , x2 ] f [x0 , x1 ]
f [x0 , x1 , x2 ] =
,
x2 x0
f [x2 , x3 ] f [x1 , x2 ]
,
f [x1 , x2 , x3 ] =
x3 x1
f [x1 , x2 , x3 ] f [x0 , x1 , x2 ]
f [x0 , x1 , x2 , x3 ] =
.
x3 x0
we obtain
x0
x1
x2
x3
= 0.1
= 0.2
= 0.3
= 0.4
f (x0 ) = 0.6205
f (x1 ) = 0.2839
f (x2 ) = 0.0066
f (x3 ) = 0.2484
f [x0 , x1 ] = 3.366
f [x1 , x2 ] = 2.905
f [x2 , x3 ] = 2.418
f [x0 , x1 , x2 ] = 2.305
f [x1 , x2 , x3 ] = 2.435
f [x0 , x1 , x2 , x3 ] 0.4333
Using points (x1 , f (x1 )) and (x2 , f (x2 )), we can construct the interpolation polynomial of
degree 1 as
N1 (x) = f [x1 ] + f [x1 , x2 ](x x1 ).
Using points (x0 , f (x0 )), (x1 , f (x1 )) and (x2 , f (x2 )), we construct the interpolation polynomial of degree 2 as
N2 (x) = f [x0 ] + f [x0 , x1 ](x x0 ) + f [x0 , x1 , x2 ](x x0 )(x x1 ).
(Note: we can also use points (x1 , f (x1 )), (x2 , f (x2 )) and (x3 , f (x3 )) to construct the
interpolation polynomial of degree 2.)