Integration of product of two functions