The work in the question is not correct. The most salient problem is that when we make the substitution x=sinθ, we restrict the possible values of x to [−1,1], since this is the range of the sine function. However, the original integral had no such restriction.
How can we be sure we avoid this problem in the future? In the introductory text to Section 1.9 (before Example 1.9.1), the
CLP-2 text tells us that we are allowed to write our old variable as a function of a new variable (say x=s(u)) as long as that function is invertible to recover our original variable x. There is one very obvious reason why invertibility is necessary: after we antidifferentiate using our new variable u, we need to get it back in terms of our original variable, so we need to be able to recover x. Moreover, invertibility reconciles potential problems with domains: if an inverse function u=s−1(x) exists, then for any x, there exists a u with s(u)=x. (This was not the case in the work for the question, because we chose x=sinθ, but if x=2, there is no corresponding θ. Note, however, that x=sinθ is invertible over [−1,1], so the work is correct if we restrict x to those values.)