of 9 /9

• Author

ngothien
• Category

Documents

• view

213

1

Embed Size (px)

Transcript of HW 1 Solutions - Brown University 1 Solutions 1:1:1: Prove Eqs. (1.1.8) and (1.1.9) for the L2...

HW 1 Solutions

1.1.1. Prove Eqs. (1.1.8) and (1.1.9) for the L2 scalar product and norm.

1.1.8 (a) (f, g) = (g, f)

(f, g) =

∫ 2π

0

fgdx =

∫ 2π

0

fgdx = (g, f).

(b) (f + g, h) = (f, h) + (g, h)

(f + g, h) =

∫ 2π

0

(f + g)hdx =

∫ 2π

0

fh + ghdx = (f, h) + (g, h).

(c) (λf, g) = λ(f, g)

(λf, g) =

∫ 2π

0

λfgdx =

∫ 2π

0

λ fgdx = λ

∫ 2π

0

fgdx = λ(f, g).

(d) (f, λg) = λ(f, g)

(f, λg) =

∫ 2π

0

fλgdx = λ

∫ 2π

0

fgdx = λ(f, g).

1.1.9 (a) ||λf || = |λ| ||f ||

(λf, λf) =

∫ 2π

0

λλffdx = |λ|2∫ 2π

0

|f |2dx = |λ|2 ||f ||2.

Therefore,

||λf || = (λf, λf)1/2 = |λ| ||f ||.

(b) |(f, g)| ≤ ||f || ||g||

1

(i) if ||g|| = 0, then O.K.

(ii) if ||g|| 6= 0

Consider

(f + λg, f + λg) = ||f ||2 + λ(f, g)|+ λ(g, f) + |λ|2||g||2 ≥ 0. (1)

Let

λ = −(g, f)

||g||2 , (2)

and substituting λ into equation (1) yields

||f ||2 − (g, f)

||g||2 (f, g)− (g, f)

||g||2 (g, f) +(g, f)(g, f)

||g||2 ≥ 0. (3)

Multiplying equation (3) by ||g||2 gives

||f ||2||g||2 − (g, f)(f, g)− (g, f)(g, f) + (g, f)(g, f) ≥ 0. (4)

Therefore,

||f || ||g|| ≥ |(f, g)|. (5)

(c) ||f + g|| ≤ ||f ||+ ||g||

(f + g, f + g) = ||f ||2 + (f, g) + (g, f) + ||g||2

≤ ||f ||2 + 2||f || ||g||+ ||g||2 = (||f ||+ ||g||)2. (1)

(2)

=⇒ ||f + g|| ≤ ||f ||+ ||g||. (3)

(d)∣∣∣||f || − ||g||

∣∣∣ ≤ ||f − g||

2

||f − g||2 = ||f ||2 − (f, g)− (g, f) + ||g||2 ≥ (||f || − ||g||)2 (1)

=⇒ ||f − g|| ≤∣∣∣||f || − ||g||

∣∣∣. (2)

3

1.2.1. Derive estimates for

∣∣∣∣(

D − ∂3

∂x3

)eiωx

∣∣∣∣ .

1. D = D3+

h3D3+ = (E − E0)3 = E3 − 3E2 + 3E − E0. (1)

Then,

h3D3+eiωx = (e3iωh − 3e2iωh + 3eiωh − 1)eiωx

= (−iω3h3 + O(ω4h4))eiωx. (2)

Therefore,

∣∣∣∣(

D3+ −

∂3

∂x3

)eiωx

∣∣∣∣ = O(ω4h). (3)

2. D = D−D2+

h3D−D2+ = h3E−1D3

+ = E2 − 3E + 3E0 − E−1. (1)

Then,

h3D−D2+eiωx = (e2iωh − 3eiωh + 3− e−iωh)eiωx

= (−iω3h3 + O(ω4h4))eiωx (2)

Therefore,

∣∣∣∣(

D−D2+ −

∂3

∂x3

)eiωx

∣∣∣∣ = O(ω4h). (3)

4

3. D = D2−D+

h3D2−D+ = h3E−2D3

+ = E1 − 3E0 + 3E−1 − E−2. (1)

Then,

h3D2−D+eiωx = (eiωh − 3 + 3e−iωh − e−2iωh)eiωx

= (−iω3h3 + O(ω4h4))eiωx (2)

Therefore,∣∣∣∣(

D2−D+ − ∂3

∂x3

)eiωx

∣∣∣∣ = O(ω4h). (3)

4. D = D3−

h3D3− = h3E−3D3

+ = E0 − 3E−1 + 3E−2 − E−3. (1)

Then,

h3D3−eiωx = (1− 3e−iωh + 3e−2iωh − e−3iωh)eiωx

= (−iω3h3 + O(ω4h4))eiωx (2)

Therefore,∣∣∣∣(

D3− −

∂3

∂x3

)eiωx

∣∣∣∣ = O(ω4h). (3)

5. D = D0D+D−

h3D0D+D− =h3

2(D+ + D−)D+D− =

h3

2(E−1 + E−2)D3

+ (1)

Then,

h3D0D+D−eiωx =1

2(e2iωh − 2eiωh + 2e−iωh − e−2iωh)eiωx

= (−iω3h3 + O(ω5h5))eiωx (2)

5

Therefore,

∣∣∣∣(

D0D+D− − ∂3

∂x3

)eiωx

∣∣∣∣ = O(ω5h2). (3)

6

1.2.3. Compute ||D+D−||h.Clearly,

||D+D−||h ≤ ||D+|| ||D−|| = 4

h2. (1)

Consider uj = (−1)j. Then,

||u||2h = (N + 1)h. (2)

Now,

||D+D−u||2h =1

h3

N∑j=0

((−1)j+1 − 2(−1)j + (−1)j−1

)2=

16

h3(N + 1)

=16

h4||u||2h. (3)

From equations (1, 3),

||D+D−||h = supu6=0

||D+D−u||h||u||h =

4

h2. (4)

7

1.1.3 Write a program for computing v(x)−vN(x). Verify the theoretical

error estimate numerically.

The error of the partial sum can be obtained analytically,

v(x)− vN(x) = R((N + 1/2)x) + O

( |x|+ 1/N

N

), (1)

where

R(y) =π

2−

∫ y

0

sin t

tdt. (2)

Define a new variable

φN(x) = |v(x)− vN(x)−R((N + 1/2)x)|. (3)

Since the second term on the R.H.S of equation (1) behaves as ∼ 1/N for N

large, the new error estimate φN would show the same 1/N behavior.

Figure 2 (a) shows φN(x) for 4 different x. It is shown that when N > 100

φN(x) decreases as ∼ 1/N . To emphasize the behavior, φN normalized by

φ100 is displayed in figure 2 (b). All the curves collapse onto one curve for

N > 100.

8

x/π

v,v N

0 0.5 1 1.5 2-2

-1

0

1

2vvN

(a)

x/πv,

v N

0 0.5 1 1.5 2-2

-1

0

1

2vvN

(b)

Figure 1: v and vN for (a) N = 10 and (b) N = 100

N

φ N

101 102 103 10410-7

10-6

10-5

10-4

10-3

10-2

10-1

100

101(a)

N

φ N

101 102 103 10410-2

10-1

100

101(b)

Figure 2: (a) φN(x) for x = π/100, ◦; π/2, 4; 3π/2, ♦; and 199π/100,¤.

(b) φN(x)/φ100(x).

9