  Starting from the equations of collisionless linear gyrokinetics for
magnetised plasmas with an imposed inhomogeneous magnetic field, we present the
first known analytical, closed-form solution for the resulting velocity-space
integrals in the presence of resonances due to both parallel streaming and
constant magnetic drifts. These integrals are written in terms of the
well-known plasma dispersion function (Faddeeva & Terentev 1954; Fried & Conte
1961), rendering the subsequent expressions simpler to treat analytically and
more efficient to compute numerically. We demonstrate that our results converge
to the well-known ones in the straight-magnetic-field and two-dimensional
limits, and show good agreement with the numerical solver by G\"urcan (2014).
By way of example, we calculate the exact dispersion relation for a simple
electrostatic, ion-temperature-gradient-driven instability, and compare it with
approximate kinetic and fluid models.
