Docsity

Numerical Analysis - Homework 2 with Solutions | MATH 471, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Homework 2, Math 471, 4 September, 2008
Name:
ID:
1. Give an example of a function fthat is in C0[−1,1] and in C1(−1,1) but is not in
C1[−1,1].
2. Give an example of a function fthat is in C1[a, b] and in C2(a, b) but is not in
C2[a, b].
3. Let xi,i= 0,1,...,n, be distinct real numbers, where n≥1. Suppose Lk(x)∈Pn
and Hk(x), Kk(x)∈P2n+1 are defined as follows:
Lk(x) =
n
Y
j=0
j6=k
x−xj
xk−xj
,
Hk(x) = [Lk(x)]2{1−2L′
k(xk) (x−xk)},
Kk(x) = [Lk(x)]2(x−xk).
Define the Kronecker delta function as
δik =(1, i =k
0, i 6=k.
Show the following
Lk(xi) = δik,
Hk(xi) = δik, H ′
k(xi) = 0,
Kk(xi) = 0, K′
k(xi) = δik.
4. Construct the Lagrange interpolation polynomial p1∈ P1for a continuous function
fdefined on the interval [−1,1] using the interpolation points x0=−1 and x1= 1.
Show that if f∈C2[−1,1] then
|f(x)−p1(x)| ≤ M2
21−x2≤M2
2,∀x∈[−1,1],
where M2:= maxx∈[−1,1] |f′′(x)|. Give an example of a function fand a point xfor
which equality is achieved.
1
pf2

Partial preview of the text

Download Numerical Analysis - Homework 2 with Solutions | MATH 471 and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Homework 2, Math 471, 4 September, 2008

Name:

ID:

  1. Give an example of a function f that is in C^0 [− 1 , 1] and in C^1 (− 1 , 1) but is not in C^1 [− 1 , 1].
  2. Give an example of a function f that is in C^1 [a, b] and in C^2 (a, b) but is not in C^2 [a, b].
  3. Let xi, i = 0, 1 ,... , n, be distinct real numbers, where n ≥ 1. Suppose Lk(x) ∈ Pn and Hk(x), Kk(x) ∈ P 2 n+1 are defined as follows:

Lk(x) =

∏^ n j j 6 ==0k

x − xj xk − xj

Hk(x) = [Lk(x)]^2 { 1 − 2 L′ k(xk) (x − xk)} , Kk(x) = [Lk(x)]^2 (x − xk).

Define the Kronecker delta function as

δik =

{ 1 , i = k 0 , i 6 = k.

Show the following

Lk(xi) = δik, Hk(xi) = δik, H k′(xi) = 0, Kk(xi) = 0 , K′ k(xi) = δik.

  1. Construct the Lagrange interpolation polynomial p 1 ∈ P 1 for a continuous function f defined on the interval [− 1 , 1] using the interpolation points x 0 = −1 and x 1 = 1. Show that if f ∈ C^2 [− 1 , 1] then

|f (x) − p 1 (x)| ≤

M 2

( 1 − x^2

) ≤

M 2

, ∀x ∈ [− 1 , 1],

where M 2 := maxx∈[− 1 ,1] |f ′′(x)|. Give an example of a function f and a point x for which equality is achieved.

  1. (i) Write down the Lagrange interpolation polynomial of degree 1 for the function f (x) = x^3 using the interpolation points x 0 = 0 and x 1 = a. Verify Thm. 6. by direct calculation, showing that, in this case, ξ is unique and has the value ξ = (x + a)/3.

(ii) Repeat the calculation for the function f (x) = (2x − a)^4 ; show that, in this case, there are two possible values for ξ, and give their values.

  1. Given the distinct points xi, i = 0, 1 ,... , n+1, and the points yi, i = 0, 1 ,... , n+1, let qn and rn ∈ Pn be the Lagrange interpolation polynomials for the coordinate sets Q = {(xi, yi) | i = 0, 1 ,... , n} and R = {(xi, yi) | i = 1, 2 ,... , n + 1}, respectively. Define p(x) =

(x − x 0 ) rn(x) − (x − xn+1) qn(x) xn+1 − x 0

Show that p is the Lagrange interpolating polynomial of degree n + 1 for the coor- dinate set P = {(xi, yi) | i = 0, 1 ,... , n + 1}.

  1. Construct the Hermite interpolation polynomial of degree 3 for the function f (x) = x^5 , using the points x 0 = 0 and x 1 = a, and show that it has the form p 3 (x) = 3 a^2 x^3 − 2 a^3 x^2. Verify Thm. 6.4 by direct calculation, showing that, in this case, ξ has the unique value ξ = (x + 2a)/5.