Interpolating Polynomials Homework, Assignments of Mathematics

A set of homework problems focused on finding interpolating polynomials using calculus and divided differences. The problems involve finding the constants c for given intervals and functions, determining the degree of the lagrange interpolating polynomial, and evaluating the polynomial and its derivative. The document also includes instructions on using matlab to find the coefficients and plot the polynomial.

Typology: Assignments

Pre 2010

Uploaded on 03/28/2010

koofers-user-7vb
koofers-user-7vb 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Homework #5
1. Use calculus to find the constant Csuch that
|f(x)P(x)| C
for all x[0,0.3], where P(x) is the Lagrange interpolating polynomial for data with
nodes x0= 0, x1= 0.1, x2= 0.3 and values from the underlying function f(x) = ex+1.
2. Use calculus to find the constant Csuch that
|f(x)P(x)| C
for all x[0,1], where P(x) is the piecewise linear interpolating polynomial for data
with nodes xj=j/10, j= 0,...,10 and values from the underlying function f(x) =
x2+ 1.
3. Find nsuch that the piecewise linear interpolating polynomial for data with nodes
xj= 2j/n,j= 0, . . . , n and values from the underlying function f(x) = sin xhas
absolute error in [0,2] less than 105.
4. Suppose x0= 0, x1= 0.4, x2= 0.7 and f[x2]=6, f [x1, x2] = 10, f[x0, x1, x2] = 50/7.
Find the values of f[x0], f[x1], f [x0, x1].
5. Consider the data points (2,1),(1,4),(0,11),(1,16),(2,13),(3,4).
(a) Write down the divided difference table associated to this data.
(b) Determine from the table the degree of the Lagrange interpolating polynomial
passing through these data points.
6. Write down the the Newton form of the Lagrange interpolating polynomial using x1=
1, x2= 3, x3= 4, x4= 6 and f[x3] = 5, f [x3, x2] = 1, f [x3, x2, x4] = 2, f[x3, x2, x4, x1] =
3.
7. (a) Verify that f[x0, x1, x2] = f[x2, x0, x1].
(b) Also verify that the Newton forms for the Lagrange interpolating polynomial
using the data points with nodes x0=a, x1=band the data points with nodes
in reverse order x0=b, x1=asimplify to the same polynomial.
8. Consider the data points (2,1),(0,1),(1,3).
(a) Write down the Newton interpolatory divided difference form for this data.
(b) Add the data point (1,1) and write down the new Newton interpolatory divided
difference form.
(c) Evaluate the polynomial of part (b) and its derivative at x= 1/2.
1
pf2

Partial preview of the text

Download Interpolating Polynomials Homework and more Assignments Mathematics in PDF only on Docsity!

Homework #

  1. Use calculus to find the constant C such that

|f (x) − P (x)| ≤ C for all x ∈ [0, 0 .3], where P (x) is the Lagrange interpolating polynomial for data with nodes x 0 = 0, x 1 = 0. 1 , x 2 = 0.3 and values from the underlying function f (x) = ex+1.

  1. Use calculus to find the constant C such that

|f (x) − P (x)| ≤ C for all x ∈ [0, 1], where P (x) is the piecewise linear interpolating polynomial for data with nodes xj = j/10, j = 0,... , 10 and values from the underlying function f (x) = x^2 + 1.

  1. Find n such that the piecewise linear interpolating polynomial for data with nodes xj = 2j/n, j = 0,... , n and values from the underlying function f (x) = sin x has absolute error in [0, 2] less than 10−^5.
  2. Suppose x 0 = 0, x 1 = 0. 4 , x 2 = 0.7 and f [x 2 ] = 6, f [x 1 , x 2 ] = 10, f [x 0 , x 1 , x 2 ] = 50/7. Find the values of f [x 0 ], f [x 1 ], f [x 0 , x 1 ].
  3. Consider the data points (− 2 , 1), (− 1 , 4), (0, 11), (1, 16), (2, 13), (3, −4). (a) Write down the divided difference table associated to this data. (b) Determine from the table the degree of the Lagrange interpolating polynomial passing through these data points.
  4. Write down the the Newton form of the Lagrange interpolating polynomial using x 1 = 1 , x 2 = 3, x 3 = 4, x 4 = 6 and f [x 3 ] = 5, f [x 3 , x 2 ] = − 1 , f [x 3 , x 2 , x 4 ] = − 2 , f [x 3 , x 2 , x 4 , x 1 ] =
  5. (a) Verify that f [x 0 , x 1 , x 2 ] = f [x 2 , x 0 , x 1 ]. (b) Also verify that the Newton forms for the Lagrange interpolating polynomial using the data points with nodes x 0 = a, x 1 = b and the data points with nodes in reverse order x 0 = b, x 1 = a simplify to the same polynomial.
  6. Consider the data points (− 2 , −1), (0, 1), (− 1 , 3). (a) Write down the Newton interpolatory divided difference form for this data. (b) Add the data point (1, −1) and write down the new Newton interpolatory divided difference form. (c) Evaluate the polynomial of part (b) and its derivative at x = 1/2.

1

  1. Suppose x 0 , x 1 ,... , xn are distinct numbers in the interval [a, b] and f is n + 1 times differentiable in [a, b]. Prove for each x ∈ [a, b], a number ξ(x) ∈ (a, b) exists with f (x) = P (x) + f^ (n+1)(ξ(x)) (n + 1)! (x^ −^ x^0 )(x^ −^ x^1 )^...^ (x^ −^ xn) (Hint: See the proof in the book).
  2. Enter Matlab and type:

help polyfit help polyval Read these instructions on how the two functions work. Then enter: x = 0:.1:1; y = [0.95 0.23 0.6 0.48 0.89 0.76 0.45 0.01 0.82 0.44 0.61]; These are the data points. Then enter: a = polyfit(x,y,10); These are the coefficients of the Lagrange interpolating polynomial. Then enter: plot(x,y,’o’) hold on xfine = 0:.005:1; plot(xfine,polyval(a,xfine)) axis([0 1 -3 3]) hold off This is the Lagrange interpolating polynomial. Note the oscillations and the fact that this probably would not be the interpolating function you would draw through the points. Print this plot out and turn it in.