Integration with trigonometric substitution