Solve the eigenvalue problem $y''=\lambda y$ numerically

739 Views Asked by At

I am trying to solve the eigenvalue problem $$\begin{cases} y''=\lambda y \\y(0)=y(1)=0\end{cases}$$ I use the finite difference to discretize the ODE with BVs. I get the following equation $$\frac{y_{i-1}+2y_i+y_{i+1}}{(\Delta x)^2}=\lambda_{\Delta x}y_i,$$ where $\Delta x =1/{(n+1)}.$

Then I get the following $n \times n$ tridiagonal matrix formulation

$\frac{1}{(\Delta x)^2}\begin{bmatrix}-2&1&~&~\\1&-2&1&~&~ \\~&~&\ddots\\ ~&~&1&-2&1\\~&~&~&1&-2\end{bmatrix}\begin{bmatrix}y_1 \\y_2\\\vdots\\ y_{n-1}\\y_n\end{bmatrix}=\lambda_{\Delta x}\begin{bmatrix}y_1 \\y_2\\\vdots\\ y_{n-1}\\y_n\end{bmatrix}$

I know that the ODE has infinitely many eigenvalue values and eigenfunction. We can compute the eigenvalue numerically by computing the eigenvalues of the matrix on the LHS.

I have two questions.

  1. Why can I only get the approximation of the first $n$th eigenvalue ($n\times n $ matrix) instead of the kth to $(k+n-1)$th eigenvalues?

  2. If I want to compute the $m$th eigenvalue, do I have to compute the eigenvalues of the $m\times m$ matrix ? When $m$ becomes very large, it needs a lot of computations. Do we have numerical method to compute the $m$th eigenvalue directively?