  We present an algorithm for solving the linear dispersion relation in an
inhomogeneous, magnetised, relativistic plasma. The method is a generalisation
of a previously reported algorithm that was limited to the homogeneous case.
The extension involves projecting the spatial dependence of the perturbations
onto a set of basis functions that satisfy the boundary conditions (spectral
Galerkin method). To test this algorithm in the homogeneous case, we derive an
analytical expression for the growth rate of the Weibel instability for a
relativistic Maxwellian distribution and compare it with the numerical results.
In the inhomogeneous case, we present solutions of the dispersion relation for
the relativistic tearing mode, making no assumption about the thickness of the
current sheet, and check the numerical method against the analytical
expression.
