Docsity

MATH 417: Numerical Analysis - Homework Assignment 9, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
MATH 417: Numerical Analysis
Instructors: Prof. Wolfgang Bangerth, Prof. Guido Kanschat
Teaching Assistants: Seungil Kim, Yan Li
Homework assignment 9 – due 11/9/06 and 11/13/06
Problem 1 (Lagrange interpolation). For the data set xi={1,2,3,4,5},
yi={1,1
2,1
3,1
4,1
5}, compute the Lagrange interpolation polynomial. Plot this
polynomial together with the function f(x) = 1
xand describe where the inter-
polating polynomial is a reasonable approximation of f(x).
(3 points)
Problem 2 (Lagrange interpolation of higher order). For each of the
values N= 1,2,4,6,8,12,20, compute the polynomial p2N(x) of order 2Nsuch
that
•p2N(0) = 1,
•p2N(±j
N) = 0 for j= 1, . . . , N.
Plot these polynomials in the interval −1≤x≤1. What happens as Nbecomes
larger? (Hint: You will want to compute the polynomials with a computer
algebra system or a self-written program, since computing polynomials of degree
40 on paper becomes tedious. You can make your life a lot easier by only
computing those polynomials that you actually need.) (6 points)
Problem 3 (Non-equidistant Lagrange interpolation). Modify your pro-
gram for Problem 2 to solve the interpolation problem
•p2N(0) = 1,
•p2Nsin ±πj
2N = 0 for j= 1, . . . , N
for all values of Nin problem 2. Note that the interpolation points sin ±πj
2N
are between −1 and 1 as before, but are now no longer equidistantly spaced.
(3 points)
1
pf2

Partial preview of the text

Download MATH 417: Numerical Analysis - Homework Assignment 9 and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

MATH 417: Numerical Analysis

Instructors: Prof. Wolfgang Bangerth, Prof. Guido Kanschat [email protected], [email protected] Teaching Assistants: Seungil Kim, Yan Li [email protected], [email protected]

Homework assignment 9 – due 11/9/06 and 11/13/

Problem 1 (Lagrange interpolation). For the data set xi = { 1 , 2 , 3 , 4 , 5 }, yi = { 1 , 12 , 13 , 14 , 15 }, compute the Lagrange interpolation polynomial. Plot this polynomial together with the function f (x) = (^1) x and describe where the inter- polating polynomial is a reasonable approximation of f (x). (3 points)

Problem 2 (Lagrange interpolation of higher order). For each of the values N = 1, 2 , 4 , 6 , 8 , 12 , 20, compute the polynomial p 2 N (x) of order 2N such that

  • p 2 N (0) = 1,
  • p 2 N (± (^) Nj ) = 0 for j = 1,... , N.

Plot these polynomials in the interval − 1 ≤ x ≤ 1. What happens as N becomes larger? (Hint: You will want to compute the polynomials with a computer algebra system or a self-written program, since computing polynomials of degree 40 on paper becomes tedious. You can make your life a lot easier by only computing those polynomials that you actually need.) (6 points)

Problem 3 (Non-equidistant Lagrange interpolation). Modify your pro- gram for Problem 2 to solve the interpolation problem

  • p 2 N (0) = 1,
  • p 2 N

sin

± 2 πjN

= 0 for j = 1,... , N

for all values of N in problem 2. Note that the interpolation points sin

± 2 πjN

are between −1 and 1 as before, but are now no longer equidistantly spaced. (3 points)

Problem 4 (Numerical differentiation). In class, the symmetric second difference quotient

f ′′(x) ≈

f (x − h) − 2 f (x) + f (x + h) h^2

was introduced. Here, we want to study its properties.

(a) Compute the quadratic Lagrange interpolation polynomial p 2 (x) that in- terpolates f in the points x − h, x and x + h and show that the formula is the second derivative L′′(x) of this polynomial.

(b) Show that the formula is exact for all polynomials of degree at most 3 (Hint: show this for the monomials xk, k = 0, 1 , 2 , 3 and explain why this is sufficient).

(c) Use the Taylor polynomial of degree 3 for f around the point x and its remainder term to show that

f ′′(x) −

f (x − h) − 2 f (x) + f (x + h) h^2

h^2 12

f (4)(ξ)

for some ξ ∈ (x − h, x + h). (6 points)