Transform user-defined function to the different function
calculating the integral of the input function
