An approach of generalized analytic functions to the magnetohydrodynamic (MHD) problem of an electrically conducting viscous incompressible flow past a solid nonmagnetic body of revolution is presented. In this problem, the magnetic field and the body's axis of revolution are aligned with the flow at infinity, and the fluid and body are assumed to have the same magnetic permeability. For the linearized MHD equations with non-zero Hartmann, Reynolds and magnetic Reynolds numbers (M , Re and Re m , respectively), the fluid velocity, pressure and magnetic fields in the fluid and body are represented by four generalized analytic functions from two classes: r-analytic and H -analytic. The number of the involved functions from each class depends on whether the Cowling number S = M 2 /(Re m Re) is 1 or is not 1. This corresponds to the well-known peculiarity of the case S = 1. The MHD problem is proved to have a unique solution and is reduced to boundary integral equations based on the Cauchy integral formula for generalized analytic functions. The approach is tested in the MHD problem for a sphere and is demonstrated in finding the minimum-drag spheroids subject to a volume constraint for S < 1, S = 1 and S > 1. The analysis shows that as a function of S, the drag of the minimum-drag spheroids has a minimum at S = 1, but with respect to the equal-volume sphere, drag reduction is smallest for S = 1 and becomes more significant for S 1.