A Special S-L Equation
Clear[u,v,L]
u[x_,L_,n_]:=Cos[n Pi x/L]
ColumnForm[Table[u[x,L,k],{k,0,10}]]Note that u[x,L,0]=1 and this will be used.
v[x_,L_,n_]:=Sin[n Pi x/L]
ColumnForm[Table[v[x,L,k],{k,0,10}]]Note that v[x,L,0]=0 and will not be used.
Verify these by substituting into the boundary value problem.
Check the first seven:
Table[D[u[x,L,k],{x,2}]+(k Pi/L)^2 u[x,L,k],{k,0,6}]
Table[D[v[x,L,k],{x,2}]+(k Pi/L)^2 v[x,L,k],{k,1,6}]
By the Sturm-Liouville Theorem, we know that
un and um and vn and vm are orthogonal with respect to the weight function
p(x)=1.
Check many at a time:
Table[Integrate[u[x,L,k]u[x,L,m],{x,-L,L}],{k,0,4},{m,0,4}];
MatrixForm[%]
Table[Integrate[v[x,L,k]v[x,L,m],{x,-L,L}],{k,1,4},{m,1,4}];
MatrixForm[%]In addition, since the un and vn are linearly independent, we have that un and vn are othogonal to each other.
Table[Integrate[u[x,L,k]v[x,L,m],{x,-L,L}],{k,0,4},{m,1,4}];
MatrixForm[%]We will also require the following. These facts will make our lives easier when finding Fourier coefficients of the eigenfunction expansions.
Table[Integrate[u[x,L,k]u[x,L,k],{x,-L,L}],{k,0,4}]
Table[Integrate[v[x,L,k]v[x,L,k],{x,-L,L}],{k,1,4}]
