add integrate interface for functions, fix ^ for rational powers