Solving the 1D Helmholtz Differential Equation Using Finite Differences

This Demonstration implements a recently published algorithm of an improved finite difference scheme for solving the Helmholtz differential equation in one dimension. Dirichlet and Sommerfeld boundary conditions are supported. Different source functions can be specified. Sommerfeld boundary conditions can be specified at either end of the domain but not at both ends at the same time. The current value of points per wavelength (PPW) is shown at the top of the display. You can also vary the value. You can view the matrix and its eigenvalues using the dropdown menu in the top row.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


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.
The PDE is discretized using , where . The points per wavelength (PPW) number is calculated using .
[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.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.