4.5.5
Sturm-Liouville Problem for equation
:
X''-
X=0, case 2) -X'(0)+HX(0)=0, X(L)=0 (Robin-Dirichlet)
> | restart; |
> | L:=2;H:=3; |
Characteristic equation:
> | w(x):=x*cos(x*L)+H*sin(x*L); |
> | plot(w(x),x=0..20); |
Eigenvalues:
> | lambda:=array(1..100); |
> | n:=1: for m from 1 to 100 do z:=fsolve(w(x)=0,x=m*1..(m+1)*1): if type(z,float) then lambda[n]:=z: n:=n+1 fi od: |
> | for i to n-1 do lambda[i] od; |
> | N:=n-1; |
> | n:='n':i:='i': |
Eigenfunctions:
> | X[n]:=sin(lambda[n]*(x-L)); |
Squared norm:
> | NX[n]:=int(X[n]^2,x=0..L); |
GENERALIZED FOURIER SERIES
Function:
> | f(x):=exp(x/2); |
Fourier coefficients:
> | a[n]:=int(f(x)*X[n],x=0..L)/NX[n]; |
Generalized Fourier series:
> | u(x):=sum(a[n]*X[n],n=1..5): |
> | plot({f(x),u(x)},x=0..L,axes=boxed); |
> | u(x):=sum(a[n]*X[n],n=1..20): |
> | plot({f(x),u(x)},x=0..L,axes=boxed); |
> | u(x):=sum(a[n]*X[n],n=1..N): |
> | plot({f(x),u(x)},x=0..L,axes=boxed); |
> |
> |
> |
> |
> |
> |
> |
> |
> |
> |