Chebyshev Collocation Method for the Helmholtz Problem
Consider the Helmholtz equation: , with the boundary conditions and . You can set the value of . This Demonstration then solves this PDE using the Chebyshev collocation method adapted for 2D problems. The solution is given either as a 3D plot or a contour plot.
In the discrete Chebyshev–Gauss–Lobatto case, the interior points are given by . These points are the extrema of the Chebyshev polynomials of the first kind, .
The Chebyshev derivative matrix at the quadrature points is an matrix given by
, , for , and for and ,
where for and .
The discrete Laplacian is given by where is the identity matrix, is the Kronecker product operator, , and is without the first row and first column.
 L. N. Trefethen, Spectral Methods in MATLAB, Philadelphia: SIAM, 2000.