all functions for solving the integrals have been finished