Sturm-Liouville Boundary Value problem
Sturm-Liouville Boundary Value problem
Given the following boundary value problem
′′
X
X(0)0,(1)+X(1)0
′
X
Easilywecanprovefor,theeigenvaluesoftheproblemsatisfytheequation
λ>0
λ
-tanλ
We are going to solve this problem with two ways
First way
First way
We are going to find the first 10 approximate values and then to find numerically the first 10 eigenvalues
In[]:=
Clear["Global`*"]
In[]:=
f[x_]:=
x
In[]:=
h[x_]:=-Tan[
x
]In[]:=
Plot[f[x],{x,0,1200},PlotRange->All,PlotLegends->"Expressions"]
Out[]=
In[]:=
Plot[h[x],{x,0,1200}]
Out[]=
In[]:=
Show[Plot[{f[x],h[x]},{x,0,1200}]]
Out[]=
From the plot we find the first 10 approximate values
In[]:=
Coord3={{"4.255","2.388"},{"25.05","4.748"},{"62.215","8.183"},{"125.792","11.655"},{"201.369","14.94"},{"299.318","17.09"},{"418.459","20.308"},{"550","23.698"},{"715.291","26.938"},{"891.183","30.122"}}
Out[]=
{{4.255,2.388},{25.05,4.748},{62.215,8.183},{125.792,11.655},{201.369,14.94},{299.318,17.09},{418.459,20.308},{550,23.698},{715.291,26.938},{891.183,30.122}}
No we use the command FindRoot and the approximate values to find numerically the first 10 eigenvalues
In[]:=
x1=FindRoot[f[x]==h[x],{x,4.255}]
Out[]=
{x4.11586}
In[]:=
x2=FindRoot[f[x]==h[x],{x,25.05}]
Out[]=
{x24.1393}
In[]:=
x3=FindRoot[f[x]==h[x],{x,62.215}]
Out[]=
{x63.6591}
In[]:=
x4=FindRoot[f[x]==h[x],{x,125.792}]
Out[]=
{x122.889}
In[]:=
x5=FindRoot[f[x]==h[x],{x,201.369}]
Out[]=
{x201.851}
In[]:=
x6=FindRoot[f[x]==h[x],{x,299.318}]
Out[]=
{x300.55}
In[]:=
x7=FindRoot[f[x]==h[x],{x,418.459}]
Out[]=
{x418.987}
In[]:=
x8=FindRoot[f[x]==h[x],{x,550}]
Out[]=
{x300.55}
In[]:=
x9=FindRoot[f[x]==h[x],{x,715.291}]
Out[]=
{x715.077}
In[]:=
x10=FindRoot[f[x]==h[x],{x,891.183}]
Out[]=
{x892.73}
In[]:=
a={x1,x2,x3,x4,x5,x6,x7,x8,x9,x10}
Out[]=
{{x4.11586},{x24.1393},{x63.6591},{x122.889},{x201.851},{x300.55},{x418.987},{x300.55},{x715.077},{x892.73}}
We define the asymptotic estimation
In[]:=
λ[n_]=((2*n-1)^2*(Pi^2))/4
Out[]=
1
4
2
(-1+2n)
2
π
and we compare with the numerical results
In[]:=
TableForm[Table[{Evaluate[a[[n]]],N[λ[n]]},{n,1,10}],TableSpacing->{3,3},TableAlignments->Center,TableHeadings->{Table[n,{n,1,10}],{"Root","Asymptotic estimation"}}]
Out[]//TableForm=
Root | Asymptotic estimation | ||
1 |
| 2.4674 | |
2 |
| 22.2066 | |
3 |
| 61.685 | |
4 |
| 120.903 | |
5 |
| 199.859 | |
6 |
| 298.556 | |
7 |
| 416.991 | |
8 |
| 555.165 | |
9 |
| 713.079 | |
10 |
| 890.732 |
Second way
Second way
Now we are going to solve the same problem with the command DEigenSystem and NDEigenSystem
Now we are going to solve the same problem with the command DEigenSystem and NDEigenSystem
Let' s start with DEigenSystem
Let' s start with DEigenSystem
In[]:=
Clear["Global`*"]
In[]:=
ℒ=-Laplacian[u[x],{x}]
Out[]=
-[x]
′′
u
In[]:=
=DirichletCondition[u[x]==0,x==0];
In[]:=
newv=NeumannValue[u[x],x==1];
In[]:=
eigensys=DEigensystem[{ℒ+newv,},u[x],{x,0,1},10];
(*EigenValues*)
In[]:=
eigensys[[1]]
Out[]=
,,,,,,,,,
(*EigenFunctions*)
In[]:=
eigensys[[2]]
Now we are going to use NDEigenSystem
Now we are going to use NDEigenSystem
We notice that we receive the same result as the first way of our solution