program to calculate the integration of a given function