On the Integration of Algebraic Functions