Choose the trigonometric substitution with . The cosine is nonnegative there, so and . The double-angle formula then gives
Since and ,
The formula is an antiderivative on and has continuous endpoint values at .
A trigonometric substitution is integration by substitution using a trigonometric function to simplify an integrand, especially a square root. For example, , with and , changes to and to . The interval restriction fixes the sign of the square root. Similarly simplifies . The transformed integral must include the differential and, for a definite integral, the new limits.