  The power-2 law, $I_{\lambda}(\mu)=1- c (1 - \mu^{\alpha})$, accurately
represents the limb-darkening profile for cool stars. It has been implemented
in a few transit models to-date using numerical integration but there is as-yet
no implementation of the power-2 law in analytic form that is generally
available. An algorithm to implement the power-2 law is derived using a
combination of an approximation to the required integral and a Taylor expansion
of the power-2 law. The accuracy of stellar and planetary radii derived by
fitting transit light curves with this approximation is tested using light
curves computed by numerical integration of limb-darkening profiles from 3D
stellar model atmospheres. Our algorithm (qpower2) is accurate to about 100 ppm
for broad-band optical light curves of systems with a star-planet radius ratio
p = 0.1. The implementation requires less than 40 lines of python code so can
run extremely fast on graphical processing units (GPUs; $\sim$ 1 million models
per second for the analysis of 1000 data points). Least-squares fits to
simulated light curves show that the star and planet radius are recovered to
better than 1% for p < 0.2. The qpower2 algorithm can be used to efficiently
and accurately analyse large numbers of high-precision transit light curves
using Monte Carlo methods.
