Add some functions to do integration and such.