I was trying to evaluate a complicated integral by substitution and along the way I got stuck in nonsensical answer. Surprisingly enough the point I wanted to discuss can be demonstrated using the following primitive integral:
$\displaystyle\int_0^\pi \sin\theta d\theta=-\cos\theta|_0^\pi=-\cos\pi+\cos 0=1+1=2$
Now Imagine we are trying to do the same integral in another way, by substitution.
If we take $\sin\theta\equiv y$ then the limits of the integral will change accordingly from $0$ to $\pi$ to from $0$ to $0$, which will kill the integral instantly and give us $0$!
So either there is a flaw in my solution that I cannot find, or that there are conditions under which one can (or cannot) use integration by substitution that I am not aware of (at least I have never seen it in college level calculus).