Docsity

Resolution for Homework 8 | Applied Numerical Methods | MATH 151A, Assignments of Mathematics

Toggle sidebar
bg1
Math 151B Homework #8 – Due Friday 3/13
1. Hermite polynomials
The Hermite polynomials are defined by
Hn(x) = (−1)nex2dn
dxne−x2
Show that H0,H1and H2are orthogonal with respect to the weighting function w(x) = e−x2
on (−∞,∞).
[Hint: Think before you integrate.]
Answer:
The first three Hermite polynomials are H0= 1, H1= 2x, and H2= 4x2−2.
To show orthogonality, we must show that integral on [−∞,∞] of H2
0w(x), H2
1w(x), and
H2
2w(x) are non-zero, while the integral of H0H1w(x), H0H2w(x), and H1H2w(x) are zero.
Z∞
−∞
H2
0(x)w(x) = Z∞
−∞
e−x2dx
The integrand is never negative, so the integral cannot be zero.
Z∞
−∞
H2
1(x)w(x) = Z∞
−∞
4x2e−x2dx
Which is non-zero for the same reason. Same is true for H2.
For the cross terms:
Z∞
−∞
H0(x)H1(x)w(x) = Z∞
−∞
2xe−x2dx
This is the integral of an odd function on a symmetric interval; so it is zero.
Z∞
−∞
H1(x)H2(x)w(x) = Z∞
−∞
(8x3−4x)e−x2dx
Again, this is an odd function, so it integrates to zero.
The last one is trickier:
Z∞
−∞
H0(x)H1(x)w(x) = Z∞
−∞
(4x2−2)e−x2dx
=Z∞
−∞
4x2e−x2dx −Z∞
−∞
2e−x2dx
pf3
pf4

Partial preview of the text

Download Resolution for Homework 8 | Applied Numerical Methods | MATH 151A and more Assignments Mathematics in PDF only on Docsity!

Math 151B Homework #8 – Due Friday 3/

  1. Hermite polynomials

The Hermite polynomials are defined by

Hn(x) = (−1)nex 2 dn dxn^ e−x 2

Show that H 0 , H 1 and H 2 are orthogonal with respect to the weighting function w(x) = e−x^2 on (−∞, ∞).

[Hint: Think before you integrate.]

Answer: The first three Hermite polynomials are H 0 = 1, H 1 = 2x, and H 2 = 4x^2 − 2. To show orthogonality, we must show that integral on [−∞, ∞] of H 02 w(x), H 12 w(x), and H 22 w(x) are non-zero, while the integral of H 0 H 1 w(x), H 0 H 2 w(x), and H 1 H 2 w(x) are zero.

∫ (^) ∞

−∞

H 02 (x)w(x) =

−∞

e−x^2 dx

The integrand is never negative, so the integral cannot be zero.

∫ (^) ∞

−∞

H 12 (x)w(x) =

−∞

4 x^2 e−x 2 dx

Which is non-zero for the same reason. Same is true for H 2. For the cross terms: ∫ (^) ∞

−∞

H 0 (x)H 1 (x)w(x) =

−∞

2 xe−x 2 dx

This is the integral of an odd function on a symmetric interval; so it is zero.

∫ (^) ∞

−∞

H 1 (x)H 2 (x)w(x) =

−∞

(8x^3 − 4 x)e−x^2 dx

Again, this is an odd function, so it integrates to zero. The last one is trickier: ∫ (^) ∞

−∞

H 0 (x)H 1 (x)w(x) =

−∞

(4x^2 − 2)e−x 2 dx

=

−∞

4 x^2 e−x 2 dx −

−∞

2 e−x 2 dx

Integrating the first term by parts, with u = 2x and dv = 2xe−x^2 dx gives ∫ (^) ∞

−∞

H 0 (x)H 1 (x)w(x) = − 2 xe−x

∞ −∞

−∞

2 e−x 2 dx −

−∞

2 e−x 2 dx

The first term vanishes, and the last to cancel, yielding zero.

  1. Dirac delta

The Dirac delta function δ(x) is defined by

∫ (^) b

a

δ(x)dx =

1 a < 0 < b 0 otherwise

and has the property that

∫ (^) b

a

δ(x)f (x)dx =

f (0) a < 0 < b 0 otherwise

a. Compute the sixth degree least squares Legendre polynomial approximation to the dirac delta function on [− 1 , 1]. Answer: The coefficients of the Legendre polynomial expansion are given by

an =

− ∫ 1 δ(x)Pn(x)dx 1 − 1 P^ n^2 (x)dx = Pn(0) ∫ (^1) − 1 P^ n^2 (x)dx

The only the constant parts of the Pn’s will survive, and thus we only need to compute the even polynomials:

a 0 = 1 / 2 a 2 =

a 4 =

a 6 =

b. Use the functions φk(x) = cos(kx) to compute the least squares approximation to the dirac delta function up to k = 6.

0

1

2

3

4

5

6

7

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

0.5 - (5.0/4.0)0.5(3x2-1) + (27.0/16.0)(1.0/8.0)(35x4-30x2+3) - (65.0/32.0)(1.0/16.0)(231x6-315x4+105x2-5) 1.0/2.0 + cos(pix) + cos(2pix) + cos(3pix) + cos(4pix) + cos(5pix) + cos(6pi*x)