We present a method to solve a kind of integral equations (we call it the integral kernel expansion method), and apply it to an analysis of excitation of magnetostatic surface-wave/magnetostatic backward-volume-wave modes in a magnetized yttrium-iron-garnet film. The Fourier integral of a normal component of magnetic flux density is derived in terms of an unknown current density flowing in a microstrip transducer. The integral kernel is expanded into a series of the Legendre polynomials and expansion of the unknown current density in terms of appropriate functions reduces the Fourier integral to a system of linear equations with unknown coefficients. Determination of the unknown coefficients allows us to estimate the power of magnetostatic waves, which characterizes the excitation. It is found that our numerical method is superior to the previous conventional method based on an assumed current density. In order to verify the validity of our method, we compare our results with the corresponding experiments, and we have found good agreement between the two.