I'm trying to find the integral . Here is what I did:

Let . Then so that , which is right.

My first question is, is there something wrong with the highlighted step? I have seen people raising questions about being treated as if they were numbers.

My second question is to do with when I tried to substitute for and got different results than the above:

Let . Then so that .

Getting two different results for the same integral is something I can't grasp at all.