DOC PREVIEW
LSU CSC 2262 - CSC 2262 Assignment 7

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS2262 Spring 2007Assignment 7: Interpolation1. Given the data points (0,2) and (1,1) find the following (a) the straight line interpolating thisdata. (b) the function f(x) = a + bexinterpolating this data. (c) the function f(x) = a/(b + x)interpolating this data. In each of the three cases graph the interpolating function.2. (a) Find the function P (x) = a + b cos(πx) + c sin(πx) which interpolates the datax 0 0.5 1y 2 5 4(b) Find the quadratic polynomial interpolating this data.(c) Graph the interpolating function for (a) and (b)3. The following table was obtained in solving a differential equation. Using linear interpolationbetween adjacent nodes, xi, produce a continuous graph of this data in the interval 0 ≤ x ≤ 6.xi0.0 1.0 2.0 3.0 4.0 5.0 6.0yi2.0000 2.1592 3.1697 5.4332 9.1411 14.406 21.3034. Using Lagrange’s formula for the quadratic interpolating polynomial, find the polynomial P2(x)that interpolates the following data, In each case simplify the expression for the polynomial as muchas possible and graph the points and interpolating polynomial, and comment on your results.(a) {(0, 1), (1, 2), (2, 3)}(b) {(0, 1), (1, 1), (2, 1)}5. Write out the complete formula for P3(x), including all four of the polynomials L0(x), L1(x),L2(x) and L3(x). Explain why L0(x) + L1(x) + L2(x) + L3(x) = 1.6. Write a MATLAB program to do either linear or quadatic interpolation and check its accuracy.Input, two and three node points, and then generate the data values using the exponential function(e.g. ex). For a variety of values of x both inside and outside the range of the node values computeP1(x), P2(x), ex, and the errors E1(x) = ex− P1(x), E2(x) = ex− P2(x). Plot the values of theerrors to see how they vary with x.7. Let x0= 0.85, x1= 0.87, x2= 0.89. Using the values of ex0, ex1, ex2and f(x) = ex, calculatef[x0, x1], f[x1, x2], and f [x0, x1, x2]. Check the accuracy of the approximationf[x0, x1] ≈ f!!x0+ x12"8. Produce a MATLAB program to check the accuracy of higher-order interpolation by using Newton’sdivided difference formula. For some f (x) and some node points x0, x1, . . . , x6, use the functiondivdif provided in Atkinson & Han to produce the divided differencesDi= f[x0, . . . , xi], i = 0, 1, . . . , 6Then evaluate P6(x) for a variety of values of x, and compare them to the true values of f(x).Check the program by reproducing some of the results in Tables 4.1 and 4.2 of the textbook forf(x) = cos(x). Then repeat the process with a nonpolynomial function f(x) of your choice.Due March 16th 2007Email completed assignments to cs2262


View Full Document

LSU CSC 2262 - CSC 2262 Assignment 7

Documents in this Course
Load more
Download CSC 2262 Assignment 7
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CSC 2262 Assignment 7 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CSC 2262 Assignment 7 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?