The equations for the direct boundary element method for both finite and infinite domains are. derived and the equation for an infinite domain, is applied to obtain the potential flow solution around two and three-dimensional bodies, for which analytical solutions are available. To check the accuracy of the method, the calculated flow velocities or the pressure distributions are compared with the analytical solutions for flows over the surfaces of a sphere and ellipsoids of revolution in three-dimensional case, and over the boundary of a circular cylinder in the two-dimensional case.