In this paper we present an efficient method for calculating the friction factor for forced laminar flow in arbitrary axially symmetric pipes. The approach is based on an analytic expression for the friction factor, obtained after integrating the Navier-Stokes equations over a segment of the pipe. The friction factor is expressed in terms of surface integrals over the pipe wall, these integrals are then estimated by means of approximate velocity and pressure profiles computed via the method of slow variations. Our method for computing the friction factor is validated by comparing the results, to those obtained using CFD techniques for a set of examples featuring pipes with sinusoidal walls. The amplitude and wavelength parameters are used for describing their influence on the flow, as well as for characterizing the cases in which the method is applicable. Since the approach requires only numerical integration in one dimension, the method proves to be much faster than general CFD simulations, while predicting the friction factor with adequate accuracy.