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

Math251 CHAPTER4 Exercises

The document contains exercises related to polynomial interpolation and spline data fitting, including tasks such as constructing divided difference tables, deriving interpolating polynomials, and determining spline functions. It covers various methods for interpolation, including Newton's polynomials and natural cubic splines, and includes specific data sets for practice. Additionally, it poses questions about the properties and characteristics of splines and their graphical representations.

Uploaded by

clara2004fakhry
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Math251 CHAPTER4 Exercises

The document contains exercises related to polynomial interpolation and spline data fitting, including tasks such as constructing divided difference tables, deriving interpolating polynomials, and determining spline functions. It covers various methods for interpolation, including Newton's polynomials and natural cubic splines, and includes specific data sets for practice. Additionally, it poses questions about the properties and characteristics of splines and their graphical representations.

Uploaded by

clara2004fakhry
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CHAPTER IV

POLYNOMIAL INTERPOLATION AND SPLINES DATA


FITTING

Exercises

(Extracted from textbook of N. Nassif and D. Fayyad )

Polynomial Interpolation
1. Given the data
D4 = {(1, −1), (2, −1/3), (2.5, 3/32), (3, 4/3), (4, 25)}
(a) Construct the divided difference table.
(b) Use the ”best” quadratic then cubic Newton’s interpolating polynomial, to find
an approximation to f (2.9).
2. Write Newton’s interpolating polynomial for the data shown:
{(0, 7), (2, 11), (3, 28), (4, 63)}

3. Using a difference table, derive the polynomial of least degree that assumes the values
2, 14, 4, 2 and 2 respectively for x = −2, −1, 0, 1 and 2. Use that result, to find a
polynomial that takes the values shown and has at x = 3 the value 10.
4. The polynomial p(x) = x4 − x3 + x2 − x + 1 satisfies the following set of data
i xi yi
0 −2 31
1 −1 5
2 0 1
3 1 1
4 2 11
5 3 61
Find a polynomial q that takes these values:
i xi yi
0 −2 31
1 −1 5
2 0 1
3 1 1
4 2 11
5 3 30

1
5. Construct a divided difference (or difference) table based on the two given sets of data
in the preceding exercise, then use Newton’s polynomials of all orders (1,2, 3, 4) to
approximate f (2.5), in each case.

6. Create the table of all Neville’s polynomials in P4 satisfying the following set of data:

i xi yi
0 1.0 −1.5
1 2.0 −0.5
2 2.5 0.0
3 3.0 0.5
4 4.0 1.5

7. Determine by two methods the polynomial of degree 2 or less whose graph passes
through the points (0, 1.1), (1, 2), and (2, 4.2). Verify that they are the same.

8. Let f (x) = x3 + 2x2 + x + 1. Find the polynomial of degree 4 that interpolates the
values of f at x = −2, −1, 0, 1, 2. Find the polynomial of degree 2 that interpolates
the values of f at x = −1, 0, 1.

9. The following data are associated with 0-th order Bessel’s function of the first kind.

i xi yi
0 1.0 0.7651977
1 1.3 0.6200860
2 1.6 0.4554022
3 1.9 0.2818186
4 2.2 0.1103623

Determine by two methods the polynomial p1234 (x) .

2
Spline Interpolation

10. Determine whether each of the following functions is a first degree spline, and plot its
graph.

(a) 
 x ; −1 ≤ x ≤ 0
S(x) = 1 − x; 0 ≤ x < 1
2x − 2 ; 1 ≤ x ≤ 2

(b) 
 x ; −1 ≤ x ≤ 0.5
S(x) = 0.5x + 2(x − 0.5) ; 0.5 ≤ x ≤ 2
x + 1.5 ; 2 ≤ x ≤ 4

11. Determine the linear spline function s(x) interpolating the set of data D3 and plot its
graph. Interpolate f (2.4).

D3 = {(0, 1); (1.5, 3); (2, 5); (3, 2)}

12. Is S(x) = |x| a first degree spline ? Why or why not ?

13. Find the natural quadratic spline interpolant for the following data

(a)
x y
−1 2
0 1
1/2 0
1 1
2 2
5/2 3
(b)
x y
1 2
2 1
5/2 0
3 1
4 3

14. Are these functions quadratic splines ? Explain why or why not ?Plot their graphs.

(a) 
−x2 ; 0 ≤ x ≤ 1
Q(x) =
x ; 0 ≤ x ≤ 100

3
(b) 
 x ; −50 ≤ x ≤ 1
Q(x) = x2 ; 1 ≤ x ≤ 2
4 ; 2 ≤ x ≤ 50

15. Determine a quadratic spline that interpolates the data f (0) = 0, f (1) = 1, f (2) = 2,
and satisfiea s0 (0) = 2.

16. Do there exist a,b, c and d so that the function



 −x ; −10 ≤ x ≤ −1
S(x) = ax + bx2 + cx + d ; −1 ≤ x ≤ 1
3

x ; 1 ≤ x ≤ 10

is a natural cubic spline function ?

17. Do there exist coefficients for which the function



 x + 1 ; −2 ≤ x ≤ −1
S(x) = ax3 + bx2 + cx + d ; −1 ≤ x ≤ 1
x − 1; 1 ≤ x ≤ 2

is a natural cubic spline function ? Why or why not ?

18. Determine the natural cubic spline that interpolates the function f (x) = x6 over the
interval [0, 2] using nodes 0, 1 and 2 .

19. Find the natural cubic spline interpolant for this table

x y
1 0
2 1
3 0
4 1
5 0

20. Consider the following set of data generated using the function f (x) = xcos x − 2x2 +
3x − 1
x y
0.1 −0.620499
0.2 −0.283986
0.3 +0.006600
0.4 +0.248424

(a) Construct the natural cubic spline for the data above

4
(b) Use the cubic spline constructed above to approximate f (0.25 and f 0 (0.25), and
calculate the absolute error.

21. Give an example of a cubic spline with nodes 0, 1, 2, and 3 that is quadratic in [0, 1],
cubic in [1, 2], and quadratic in [2, 3].

22. Give an example of a cubic spline with nodes 0, 1, 2, and 3 that is linear in [0, 1], but
of degree 3 in the other two intervals.

23. List all the ways in which the following functions fail to be natural cubic splines:

(a) 
 x + 1 ; −2 ≤ x ≤ −1
3
S(x) = x − 2x + 1 ; −1 ≤ x ≤ 1
x − 1; 1 ≤ x ≤ 2

(b) 
x3 + x − 1 ; −1 ≤ x ≤ 0
S(x) =
x3 − x − 1 ; 0 ≤ x ≤ 1
24. Determine the coefficients so that the function

x2 + x3 ; 0 ≤ x ≤ 1
S(x) =
a + bx + cx2 + dx3 ; 1 ≤ x ≤ 2

is a cubic spline that has the property S1000 (x) = 12

25. Use the data points (0, 1), (1, e), (2, e2 ), (3, e3 ) to form a natural cubic spline that ap-
proximates f (x) = ex .
R3
26. Use the cubic spline obtained in the preceding exercise, to approximate 0 ex dx. What
is the relative error in this approximation ?

27. Construct a natural cubic spline to approximate f (x) = e−x based on the nodes x =
0, 0.25, 0.75 and 1. Integrate the spline over the interval [0, 1] and compare the results
R 1 −x
to 0 e dx. Use the derivatives of the spline to approximate f 0 (0.5) and f ”(0.5).
Compare the approximations to the actual values.

28. How many additional conditions are needed to specify uniquely a spline of degree 4
over n knots ?

29. Let S be a cubic spline that has knots t0 < t1 < ... < tn . Suppose that on the 2
intervals [t0 , t1 ] and [t2 , t3 ], S reduces to linear polynomials. What can be said of S on
[t1 , t2 ]?

You might also like