Solve a Sturm–Liouville Problem for the Airy Equation
Solve an eigenvalue problem for the Airy equation.
In[1]:=
![Click for copyable input](assets.en/solve-a-sturm-liouville-problem-for-the-airy-equat/In_35.png)
eqns = {-y''[x] + x y[x] == \[Lambda] y[x], y[0] == 0, y[1] == 0};
In[2]:=
![Click for copyable input](assets.en/solve-a-sturm-liouville-problem-for-the-airy-equat/In_36.png)
sol = DSolveValue[eqns, y[x], x, Assumptions -> 1 < \[Lambda] < 300];
List the eigenvalues for the problem.
In[3]:=
![Click for copyable input](assets.en/solve-a-sturm-liouville-problem-for-the-airy-equat/In_37.png)
eigvals = {ToRules[sol[[1, 1, 2]]]}
Out[3]=
![](assets.en/solve-a-sturm-liouville-problem-for-the-airy-equat/O_21.png)
Find the eigenfunctions for this problem.
In[4]:=
![Click for copyable input](assets.en/solve-a-sturm-liouville-problem-for-the-airy-equat/In_38.png)
eigfuns = (sol[[1, 1, 1]] /. {C[1] -> 1})
Out[4]=
![](assets.en/solve-a-sturm-liouville-problem-for-the-airy-equat/O_22.png)
Plot the eigenfunctions for the range .
In[5]:=
![Click for copyable input](assets.en/solve-a-sturm-liouville-problem-for-the-airy-equat/In_39.png)
Plot[Evaluate[eigfuns /. eigvals], {x, 0, 1}]
Out[5]=
![](assets.en/solve-a-sturm-liouville-problem-for-the-airy-equat/O_23.png)