Details of the algorithm are described in [1]. This implementation converts the finite difference scheme to the standard

form and uses the built-in

*Mathematica* function

LinearSolve to obtain the solution. Sparse matrices are used. The matrix

and its eigenvalues and the numerical solution vector

can be viewed using the dropdown menu. The table below summarizes the boundary conditions, with

and

the values at the left and right boundaries,

the length of the domain, and

and

the solution at the left and right edge of the domain, respectively.

[1] Y. S. Wong and G. Li, "Exact Finite Difference Schemes for Solving Helmholtz Equations at Any Wavenumber,"

*International Journal of Numerical Analysis and Modeling B*,

**2**(1), 2010 pp. 91–108.