The external-field approximation in quantum optics