MATH528Due date: 12/05/18

Homework 12

1Exercises

Exercise. PS11.4.11

Solution. The Fourier series of the periodic rectangular wave function f(x)=2k(u(πx)-.5), for x[-π,π), f(x)=f(x+2π), with u(x) the unit step function is (Example 11.1.1, p. 478)

f(x)=4kπ(sinx+13sin3x+15sin3x+)=m=1b2m-1sin[(2m-1)x],b2m-1=4kπ(2m-1)

The Parseval equality states

m=1b2m-12=(4kπ)2[1+132+152+]=||f||2=-ππf(x)2dx=2πk2
1+132+152+=π28

In[3]:=

S[n_]:=Sum[1/(2m-1)^2,{m,1,n}]; Sinf=N[Pi^2/8.,16]

1.2337

In[11]:=

Table[N[S[n]],{n,10,100,10}]

{1.20872,1.2212,1.22537,1.22745,1.2287,1.22953,1.23013,1.23058,1.23092,1.2312}

In[13]:=

Table[Log10[Abs[N[(S[n]-Sinf)/Sinf]]],{n,10,100,10}]

{-1.69363,-1.99439,-2.17043,-2.29535,-2.39225,-2.47143,-2.53838,-2.59637,-2.64752,-2.69327}

In[14]:=

Convergence is not rapid due to discontinuity in f(x) at x=±kπ

Exercise. PS11.5.7

Solution. The problem y''+λy=0, y(0)=0, y(10)=0 is of Sturm-Liouville type, with the scalar product

(f,g)=010f(x)g(x)dx.

For λ=0, applying boundary conditions to the general solution y(x)=ax+b, y(0)=b=10, y(10)=10a=0a=0, hence y(x)=0 which is not an eigenfunction. For λ>0, applying boundary conditions to the general solution y(x)=acos(λx)+bsin(λx), y(0)=a=0, y(10)=bsin(λ10)=0λ10=kπλk=(kπ/10)2 are eigenvalues, with associated eigenfunctions yk(x)=sin(kπx/10). For λ<0, applying boundary conditions to the general solution y(x)=aeλx+be-λx, y(0)=a+b=0, y(10)=aC+b/C=0, leads to a homogeneous linear system with principal determinant

Δ=| 1 1 C 1/C |=1C-C

that would have to be null in order to obtain a non-trivial solution. This occurs for C=1=eλ10λ=0, a contradiction. Hence the only eigenvalue, eigenfunction pairs are

λk=(kπ/10)2,yk(x)=sin(kπx/10).

In[1]:=

Exercise. PS1.1.7

Solution.

In[1]:=

Exercise. PS1.1.8

Solution.

In[1]:=

Exercise. PS1.2.2

Solution.

In[1]:=

Exercise. PS1.2.3

Solution.

In[1]:=

Exercise. PS1.2.4

Solution.

In[1]:=

Exercise. PS1.3.5

Solution.

In[1]:=

2Problems

Problem. PS11.6.1

Solution. The function f(x)=63x5-90x3+35x, has the Fourier-Legendre series expansion

f(x)=m=0amPm(x),

with

am=2m+12-11f(x)Pm(x)dx,

and Pm(x) the Legendre polynomials

In[16]:=

p=Table[LegendreP[m,x],{m,0,5}]

{1,x,12(3x2-1),12(5x3-3x),18(35x4-30x2+3),18(63x5-70x3+15x)}

In[17]:=

Since f(x) has only odd powers less than m=5, the expansion is

f(x)=a1P1(x)+a3P3(x)+a5P5(x).

One can compute am directly, but simple observations lead to a quicker result

a5=8,f(x)-a5P5(x)=

In[17]:=

f[x_]=63 x^5 - 90 x^3 + 35 x;

Table[ (2m+1)/2 Integrate[f[x] LegendreP[m,x],{x,-1,1}],{m,1,5}]

{8,0,-8,0,8}

In[18]:=

f[x]-8 LegendreP[5,x]

20x-20x3

In[20]:=

Expand[f[x]- 8 LegendreP[5,x] + 8 LegendreP[3,x]]

8x

In[21]:=

Problem. PS1.1.17

Solution.

In[1]:=

Problem. PS1.1.18

Solution.

In[1]:=

Problem. PS1.3.22

Solution.

In[1]:=

3Projects

3.1PS2.1.16