MATH 124B Solution Key HW 01 - UC Santa...

9
5.1 THE COEFFICIENTS MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1. In the expansion 1 = n odd (4/nπ) sin nx , valid for 0 < x , put x = π/4 to calculate the sum 1 - 1 5 + 1 9 - 1 13 + ··· + 1 3 - 1 7 + 1 11 + ··· = 1 + 1 3 - 1 5 - 1 7 + 1 9 + ··· Hint: Since each of the series converges, then can be combined as indicated. However, they cannot be arbitrarily rearranged because they are only conditionally, not absolutely, convergent. SOLUTION. Putting x = π/4 makes it plain that 1 = 4 π X n odd 1 n sin nπ 4 = 4 π sin π 4 + 1 3 sin 3π 4 + 1 5 sin 5π 4 + 1 7 sin 7π 4 + ··· = 4 π p 2 2 + 1 3 p 2 2 + 1 5 - p 2 2 + 1 7 - p 2 2 + ··· = 4 π p 2 2 1 + 1 3 - 1 5 - 1 7 + ··· = 2 p 2 π 1 + 1 3 - 1 5 - 1 7 + ··· = 4 π p 2 1 + 1 3 - 1 5 - 1 7 + ··· . Hence; π p 2 4 = 1 + 1 3 - 1 5 - 1 7 + ··· = 1 - 1 5 + 1 9 - 1 13 + ··· + 1 3 - 1 7 + 1 11 + ··· 2. Let φ( x ) x 2 for 0 x 1 = . (a) Calculate its Fourier sine series (b) Calculate its Fourier cosine series. SOLUTION. 1 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Transcript of MATH 124B Solution Key HW 01 - UC Santa...

Page 1: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.1 THE COEFFICIENTS

MATH 124B Solution Key HW 01

5.1 THE COEFFICIENTS

1. In the expansion 1 =∑

n odd(4/nπ) sin nx , valid for 0 < x < π, put x = π/4 to calculatethe sum

1− 15+ 1

9− 1

13+ · · ·

+�

13− 1

7+ 1

11+ · · ·

= 1+ 13− 1

5− 1

7+ 1

9+ · · ·

Hint: Since each of the series converges, then can be combined as indicated. However,they cannot be arbitrarily rearranged because they are only conditionally, not absolutely,convergent.

SOLUTION. Putting x = π/4 makes it plain that

1=4

π

n odd

1

nsin

4

=4

π

sinπ

4+

1

3sin

4+

1

5sin

4+

1

7sin

4+ · · ·

=4

π

�p2

2+

1

3

�p2

2

+1

5

−p

2

2

+1

7

−p

2

2

+ · · ·�

=4

π

�p2

2

1+1

3−

1

5−

1

7+ · · ·

=2p

2

π

1+1

3−

1

5−

1

7+ · · ·

=4

πp

2

1+1

3−

1

5−

1

7+ · · ·

.

Hence;

πp

2

4= 1+

1

3−

1

5−

1

7+ · · ·=

1− 15+ 1

9− 1

13+ · · ·

+�

13− 1

7+ 1

11+ · · ·

2. Let φ(x)≡ x2 for 0≤ x ≤ 1= `.

(a) Calculate its Fourier sine series

(b) Calculate its Fourier cosine series.

SOLUTION.

1 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Page 2: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.1 THE COEFFICIENTS

(a) For `= 1, the Fourier coefficients are given by

Am = 2

∫ 1

0

x2 sin(mπx) d x .

Integrating by parts twice makes it plain that

Am = 2x2− cos mπx

i1

0+ 4

∫ 1

0

xcos mπx

mπd x

= 2− cos mπ

mπ+ 4x

sin mπx

(mπ)2i1

0− 4

∫ 1

0

sin mπx

(mπ)2d x

= 2(−1)m+1

mπ+ 4

cos mπx

(mπ)3i1

0

= 2(−1)m+1

mπ+ 4(−1)m− 1

(mπ)3.

(b) For `= 1, the Fourier cosine coefficients are

Am = 2

∫ 1

0

x2 cos(mπx) d x .

When m= 0 it’s easy to see thatA0 = 2/3.

Otherwise, we integrate by parts twice and discover

Am = 2x2 sin(mπx)mπ

i1

0− 4

∫ 1

0

xsin mπx

mπd x

= 4xcos mπx

(mπ)2i1

0− 4

∫ 1

0

cos mπx

(mπ)2d x

= 4(−1)m

(mπ)2.

5. Given the Fourier sine series of φ(x) ≡ x on (0,`). Assume the series can be integratedterm by term, a fact that will be shown later. 1

(a) Find the Fourier cosine series of the function x2/2. Find the constant of integrationthat will be the first term in the cosine series.

(b) Then by setting x = 0 in your result, find the sum of the series

∞∑

n=1

(−1)n+1

n

2

.

1This result is highly non-trivial. The proof involves advanced techniques from Math 118B (real analysis).

2 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Page 3: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.2 EVEN, ODD, PERIODIC, AND COMPLEX FUNCTIONS

SOLUTION.

(a) Armed with the results from Example 3 on page 109 in our text we see that Fouriersine series of φ(x)≡ x on (0,`) is given by

φ(x)≡ x =2`

π

sinπx

`−

1

2sin

2πx

`+

1

3sin

3πx

`− · · ·

=∞∑

m=1

(−1)m+1 2`

mπsin

mπx

`.

Integrating both sides our equality in the variable x along with the assumption vali-dating term-by-term integration, we indeed obtain the Fourier cosine series

x2

2=

∞∑

m=1

(−1)m2`2

(mπ)2cos

mπx

`+ C ,

where

C =A0

2=

1

`

∫ `

0

x2

2d x =

`2

6.

(b) Putting x = 0 in the result of part (a) we see that

0=`2

6+

∞∑

m=1

(−1)m2`2

(mπ)2,

or equivalently,π2

12=

∞∑

m=1

(−1)m+1

m2 .

5.2 EVEN, ODD, PERIODIC, AND COMPLEX FUNCTIONS

1. For each of the following functions, state whether it is even or odd or periodic. If periodic,what is its smallest period?

(a) sin ax (a > 0)

(b) eax (a > 0)

(c) xm (m= integer)

(d) tan x2

(e) | sin(x/b)| (b > 0)

(f) x cos ax (a > 0)

3 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Page 4: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.2 EVEN, ODD, PERIODIC, AND COMPLEX FUNCTIONS

SOLUTION.

(a) Odd, period 2π/a.

(b) Neither even nor odd nor periodic.

(c) Even when m is even, while odd when m is odd, not periodic.

(d) Even, not periodic.

(e) Even, period 2πb.

(f) Odd, not periodic.

5. Show that the Fourier sine series on (0,`) can be derived form the full Fourier series on(−`,`) as follows. Let φ(x) be any (continuous) function on (0,`). Let eφ(x) be its oddextension. Write the full series for eφ(x) on (−`,`). Assume that its sum is eφ(x). ByExercise 4, this series has only sine terms. Simply restrict your attention to 0 < x < ` toget the sine series for φ(x).

SOLUTION. Recall that definite integrals on symmetric intervals of odd and even functionshave the following useful property

∫ `

−`(odd) d x = 0 and

∫ `

−`(even) d x = 2

∫ `

0

(even) d x .

Now, given a function φ(x) on (0,`), the odd extension is given by

φodd(x) = eφ(x) =

φ(x), 0< x < `,−φ(−x), −` < x < 0,

0, x = 0.

Each of the terms in the Fourier sine series for φ(x), sinnπx

`, is odd. As with the full

Fourier series, each of these terms also has period 2`. So we may think of the Fourierseries as the expansion of an odd function with period 2` defined on the entire line whichcoincides with φ(x) on (0,`). In fact, the full Fourier seres of φodd(x) is precisely the sameas the Fourier series of φ(x). To see this, let

1

2A0+

∞∑

n=1

An cosnπx

`+ Bn sin

nπx

`

be the Fourier series for φodd(x), with the usual coefficients. Then

An =1

`

∫ `

−`φodd(x) cos

nπx

`d x = 0,

4 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Page 5: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.2 EVEN, ODD, PERIODIC, AND COMPLEX FUNCTIONS

inasmuch, φodd is odd and cos is even, so their product is again odd. Also, both φodd andsin are odd, so their product is even, hence;

Bn =1

`

∫ `

−`φodd(x) sin

nπx

`d x

=2

`

∫ `

0

φodd(x) sinnπx

`d x

=2

`

∫ `

0

φ(x) sinnπx

`d x ,

which are the Fourier sine coefficients of φ(x). Therefore, as the Fourier sine series ofφ(x) is the full Fourier series of φodd, the 2`-periodic odd function that the Fourier sineseries expands is just the periodic extension of φodd. �

6. Show that the cosine series on (0,`) can be derived from the full series on (−`,`) by usingthe even extension of a function.

SOLUTION. The argument is nearly identical as that presented in Exercise 5. �

10. (a) Let φ(x) be a continuous function on (0,`). Under what conditions is its odd extensionalso a continuous function?

(b) Let φ(x) be a differentiable function on (0,`). Under what conditions is its odd exten-sion also a differentiable function?

(c) Same as part (a) for the even extension.

(d) Same as part (b) for the even extension.

15. Without any computation, prediction which of the Fourier coefficients of | sin x | on theinterval (−π,π) must vanish.

SOLUTION. Since sin x is odd it follows that | sin x | defines an even function. By the resultestablished in Exercise 4 we note that the full Fourier series on (−π,π) has only cosineterms. That is, all of the sine coefficients must necessarily vanish. �

16. Use the De Moivre formulas

sinθ =eiθ − e−iθ

2i, and cosθ =

eiθ + e−iθ

2. (5.11)

to derive the standard formulas for cos(θ +φ) and sin(θ +φ).

5 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Page 6: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.2 EVEN, ODD, PERIODIC, AND COMPLEX FUNCTIONS

SOLUTION. A direct calculation makes it plain that

cosθ + i sinθ =eiθ + e−iθ

2+ i

eiθ − e−iθ

2i

=eiθ + e−iθ

2+

eiθ − e−iθ

2

=2eiθ

2= eiθ .

Armed with this result we now assume we have two complex numbers which we write as:

eiθ = cosθ + i sinθ

andeiφ = cosφ + i sinφ.

We multiply these complex numbers together. Multiplying the left hand sides:

eiθ eiφ = ei(θ+φ).

We can write this answer as:

ei(θ+φ) = cos(θ +φ) + i sin(θ +φ). (5.1)

Multiplying the right hand sides:

(cosθ + i sinθ)�

cosφ + i sinφ�

= cosθ cosφ − sinθ sinφ + i(cosθ sinφ + sinθ sinφ),(5.2)

inasmuch i2 =−1. Now, equating (5.1) and (5.2):

cos(θ +φ) + i sin(θ +φ) = cosθ cosφ − sinθ sinφ + i(cosθ sinφ + sinθ cosφ).

Equating the real parts gives:

cos(θ +φ) = cosθ cosφ − sinθ sinφ.

Equating the imaginary parts gives:

sin(θ +φ) = sinθ cosφ + cosθ sinφ.

6 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Page 7: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.3 ORTHOGONALITY AND GENERAL FOURIER SERIES

5.3 ORTHOGONALITY AND GENERAL FOURIER SERIES

2. (a) On the interval [−1,1], show that the function x is orthogonal to the constant func-tions.

(b) Find a quadratic polynomial that is orthogonal to both 1 and x .

(c) Find a cubic polynomial that is orthogonal to all quadratics. (These are the first fewLegendre polynomials.)

SOLUTION.

(a) A direct calculation makes it plain that

∫ 1

−1

x · C d x = Cx2

2

i1

−1= 0.

(b) Since x2 and 1 are even functions it must be the case that they are orthogonal tox , which is odd. This suggest that we produce some constant C such that x2 + C isorthogonal to 1. Hence,

∫ 1

−1

(x2+ C) · 1 d x =x3

3+ C x

i1

−1=

2

3+ 2C = 0.

We have a solution for C = −1/3, so the desired quadratic is any non-zero multipleof x2− 1/3.

(c) In a similar fashion we look for x3+ C x orthogonal to x . We find

∫ 1

−1

(x3+ C x) · x d x =x5

5+ C

x3

3

i1

−1=

2

5+ C

2

3= 0.

Taking C = −3/5 we get that any non-zero multiple of x3 − 3x/5 is orthogonal to xby construction and orthogonal to both 1 and x2 by an even-odd argument.

3. Consider ut t = c2ux x for 0 < x < `, with boundary conditions u(0, t) = 0, ux(`, t) = 0 andthe initial conditions u(x , 0) = x , ut(x , 0) = 0. Find the solution explicitly in series form.

SOLUTION. Recall that a separated solution is a solution of the form

u(x , t) = X (x)T (t).

Plugging this form into the wave equation we get

X (x)T ′′(t) = c2X ′′(x)T (t),

7 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Page 8: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.3 ORTHOGONALITY AND GENERAL FOURIER SERIES

or equivalently,T ′′(t)c2T (t)

=X ′′(x)X (x)

=−λ

for some constant λ. Indeed, since the left-hand-side is independent of x and the right-hand-side is independent of t, respectively, it follows that λ is independent of both t andx and must be constant.

Now, let λ= β2, where β > 0, then we obtain two separate ODE’s. Namely,

X ′′+ β2X = 0 and T ′′+ (cβ)2T = 0.

Next, we solve for the function X by imposing our given boundary conditions. That is,(

u(0, t) = X (0)T (t) = 0

ux(`, t) = X ′(`)T (t) = 0⇒ X (0) = X ′(`) = 0,

and we obtain the Sturm-Liouville eigenvalue problem(

X ′′+λX = 0

X (0) = X ′(`) = 0.

Since−d2

d x2 defines a self-adjoint operator on the space of functions satisfying the Dirichlet

boundary conditions, it follows that all of its eigenvalues are real. 2 More specifically,λ ∈ R. The cases λ= 0, λ < 0 and λ > 0 must be addressed separately.

λ = 0 : We getX ′′ = 0

hence, X (x) = Ax + B. The conditions X (0) = X ′(`) = 0 makes it plain that X (0) =B = 0 and x ′(`) = A= 0 so X ≡ 0 and we have a trivial solution.

λ < 0 : We getX ′′− β2X = 0

andX (x) = Aeβ x + Be−β x

Again, X (0) = A+ B = 0 and X ′(`) = βAeβ`− βBe−β` = 0 reveals that A= B = 0 andour solution is again trivial.

λ > 0 : We getX ′′+ β2X = 0

andX (x) = Acosβ x + B sinβ x .

The conditions X (0) = A= 0 and X ′(`) = βB cosβ x = 0 make it plain that

β = nπ+π/2= (n+ 1/2)π/`.2This is a standard result in upper-division linear algebra.

8 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013

Page 9: MATH 124B Solution Key HW 01 - UC Santa Barbaraweb.math.ucsb.edu/~atzberg/pmwiki_intranet/uploads/Teaching2013...MATH 124B Solution Key HW 01 5.1 THE COEFFICIENTS 1.In the expansion

5.3 ORTHOGONALITY AND GENERAL FOURIER SERIES

Indeed, the solution is non-trivial when λ > 0 and by the superposition principle we obtainthe family

Xn(x) = Bn sin(n+ 1/2)πx/`,

where Bn denotes the usual Fourier cosine coefficient. Furthermore, we solve for T in asimilar fashion, that is,

(

u(x , 0) = X (x)T (0) = xut(x , 0) = X (x)T ′(0) = 0

⇒ T ′(0) = 0,

Since,T ′′+ (cβ)2T = 0,

it follows that

T (t) = C cos(cβ t) + D sin(cβ t), thus T ′(t) =−cβC sin(cβ t) + cβD cos(cβ t).

Imposing the condition T ′(0) = 0 makes it plain that D = 0, hence;

T (t) = C cos(cβ t)

and by the superposition principle we get the family

Tn(t) = Cn cos(cβn t)

where Cn denotes the usual Fourier cosine coefficient with βn = (n+ 1/2)π/`. Putting allof this together we see that

u(x , t) =∞∑

n=1

Tn(t)Xn(x).

The condition u(x , 0) = x now gives that

x =∞∑

n=1

Tn(0)Xn(x) =∞∑

n=1

CnXn(x) =∞∑

n=1

CnBn sin(n+1/2)πx/`=∞∑

n=1

Kn sin(n+1/2)πx/`,

where Kn = CnBn is given by the inner product

Kn =2

`

∫ `

0

x sin�

(n+ 1/2)πx

`

d x

=4` [π(2n+ 1) sin(πn) + 2 cos(πn)]

(2πn+π)2

=8`(−1)n

(2πn+π)2,

since cos(nπ) = (−1)n and sin(nπ) = 0 for all n= 1, 2,3, . . . Therefore,

u(x , t) =∞∑

n=1

Tn(t)Xn(x) =∞∑

n=1

8`(−1)n

(2πn+π)2cos(cβn t) sin(βn x).

9 Solutions prepared by Jon Tjun Seng Lo Kim Lin, TA Math 124B, Winter 2013