For a dummy variable in an integral like $x$ in
$$\int_a^b \frac{x^2}{1-x^2} \, dx$$
Why is it acceptable to make a substitution: let $ x = \sin \theta$ to get something like
$$\int_a^b \frac{\sin^2\theta}{\cos^2\theta} \cos \theta \, d\theta$$
I am not interested in solving this problem but I am curious as to why the substitution is legal since $x$, depending on the boundaries can take on any value, whereas $\left|\sin \theta \right| < 1$. So, why is it allowed, and are there restrictions on substitution (besides: continuous on that interval, defined on that interval)?
I will give it a try to answer your question: When you do a trig sub, it is very often the case that you can't tag the given boundaries along into your new integral. Many times, there isn't a standard angle $\theta$ that matches a given $a$ or $b$, for example, $a=\frac{2}{3}=sin\theta$. This does not mean that the trig sub cannot be done. It means you "temporarily" make it improper, evaluate the anti derivative and then back-sub. In your case, it is possible that there is no $\theta$ because likely $a$ and/or $b$ falls outside the range of sine. So then again same approach as above. There is nothing wrong with that. Now if there is no square root (for which trig subs are often used), then you have some more "liberty", as suggested in the first comment. Assuming that your function is continuous on interval $[a,b]$, here is a rationale why your trig sub is allowed. Step 1: Do a u-sub $x-a=t$, so that $dx=dt$. Now your new integral has a lower boundary of zero and an upper boundary of a new value, say $c$. Second: Choose $t=(2c)sin\theta$ and when performing this sub, you new boundaries will be $0$ and $\theta=\pi/6$ and this is clean!