Write a Matlab code implementing the inverse power method to compute approximations of the smallest eigenvalue λ1 = π2 of L and corresponding eigenfunctions. Use N = 500 and apply the algorithm to h-2TN. Start with a random initial guess, use normalization in the 2-norn, and stope when the difference of two subsequent approximate eigenvectors has 2-norm less than some prescribed tolerance τ. (e. g. τ = 10-6).
(i) Report the number of iterations performed.
(ii) Compared approximations with exact eigenvalue/eigenvector pair.
(iii) Use matalb to plot the computed eigenvector.