# Spectral Differentiation Matrices for the Numerical
Solution of Schroedinger's equation

This page contains additional material related to
the paper "Spectral Differentiation Matrices for the Numerical
Solution of Schroedinger's Equation", submitted to the
Conference Proceedings of the
*Workshop on the Physics of Non-Hermitian Operators*, that was
held in Stellenbosch,
South Africa, November 2005.
A copy of the paper can be downloaded
here .

This research was sponsored by the *National Research Foundation*
in South Africa, under grant **FA2005032300018**.

The paper is concerned with the numerical solution of

-y''(x) + p(x) y = E y,

on the real line (assuming decaying boundary conditions).
Below are some MATLAB M-files, some of which are listed in
the paper, for computing spectra of various potentials
p(x) . Download
the main code and execute by typing its name in MATLAB.
The following are auxilliary codes from DMSUITE
that should be downloaded once. (For the
complete DMSUITE collection, see the
local site or the
MathWorks site).

### Illustration 1

This is the computation of the
spectrum of the quadratic oscillator
p(x) = x^2 , as given in Table 1 of the paper.
**M-file:** table1.m

### Illustration 2

This is the computation of the real
spectrum of the PT-symmetric potential
p(x) = x^4+iax , as given in Table 2 of the paper.
It reproduces
Figure 2
of the paper. **M-file:** table2.m
The code of Table 2 can be combined with MATLAB's *fminsearch*
to minimize the distance between E0 and E1. This computes
the critical value of a=3.169036141. **Main M-file:** finda.m
**Auxilliary:** acrit.m

### Illustration 3

This is the computation of the real
spectrum of the QES potential
p(z) = -z^4-2bz^2-6iz , which reproduces
Figure 3 of the paper.
The code is omitted in the paper, but for the sake of
numbering we'll assume it was given in a Table 3.
**M-file:** table3.m

Andre Weideman
Last modified: Thu Feb 1 18:09:35 GMT 2007