util: Add phase_integral.
Add some phase functions.