Here we will take a good look at the substitution situation
The expression under the root cannot be negative, which yields the
inequality
Requirements on this interval J are as follows: The function
This choice satisfies all requirements on J. Since on this interval both sine and cosine are non-negative, we also have
Thus in this case we can ignore the absolute value. Now we look at the version with negative values of y.
This choice satisfies all requirements on J. Since on this interval the sine is positive and cosine negative, we this time have
So we see that indeed we are then evluating a different integral.