integration with completing the square