Code for solving dispersion relations