# Why can I make the substitution $x = \sin \theta$?

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)?

• You can choose $x=c\sin\theta$, obtaining near the same integral. – Przemysław Scherwentke Mar 8 '18 at 2:32
• The endpoints for the $\theta$ integral are not $a$ and $b$, they would be $\arcsin(a)$ and $\arcsin(b)$ (if $-\pi/2 \le a \le b \le \pi/2$). – Robert Israel Mar 8 '18 at 2:37
• @Isham So I cannot simply use $x = \cos \theta\,$? And if $x = \sin \theta \implies dx = \cos \theta d\theta$ – Zduff Mar 8 '18 at 2:39
• It is an interesting question. Let's say you are integrating from $8$ to $9$. $Arcsin(8)=...$? Of course you can also temporarily make the integral indefinite and than backsub. That should work! – imranfat Mar 8 '18 at 2:39
• You could try $x = \cosh u$. Of course, this is a silly way to do the integral of a rational function. – Robert Israel Mar 8 '18 at 2:41

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!
One possibility is the direct approach. The complex function $\sin z$ is surjective, so we could take some contour $\gamma$ in $\Bbb{C}$, such that $\sin z$ ranges from $a$ to $b$ over $\gamma$, and remains real-valued the whole time. Your substitution would then turn the original real integral into a complex integral over that contour.
Since $\sin(a+bi)=\sin a \cosh b + i \cos a \sinh b$, you probably want the contour to live in the union of the real axis with the set of complex numbers that have real part $\pm\frac{\pi}{2}$ (or some other specified pair of zeroes of $\cos a$: one with $\sin a = 1$ and one with $\sin a = -1$). This will lead to essentially the same algebra as Robert Israel's suggestion of making a hyperbolic substitution to start with, with perhaps slightly more conceptual unification of the case analysis.
Alternately, you could argue as follows. We know that for $a,b \in [-1, 1]$, the given definite integral is equal to some expression which can be found by trig substitution. Additionally, that expression as well as the original integral should both be holomorphic on some large domain in $\Bbb{C}$. It will then follow by the strong version of the identity theorem that they are in fact equal on that large domain, not just on $[-1, 1]$. I think that, if you want to make imranfat's idea of "temporarily making the integral improper" rigorous, this is the path that you need to go down.