A Special S-L Equation

Consider the Sturm-Liouville equation
y''+ky=0
y(-L)=y(L) y'(-L)=y'(L)
on [-L,L].
Using Sturm-Liouville notation, r(x)=1, p(x)=1, and q(x)=0.
The eigenvalue k=0 has corresponding eigenfunction 1 (in fact any constant function). The eigenvalues (nPi/L)^2 (n a positive integer) have linearly independent eigenfunctions un(x)=Cos[nPix/L] and vn(x)=Sin[nPix/L].


  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}]


  

Up to Fourier Series via Sturm-Liouville Equations