I've been tutoring some basic calculus, and it made me think about something pretty basic.
Let me explain the problem by example:
Say we are given the integral $\int \frac{x^2}{\sqrt{1-x^2}}\ \mathrm dx$. It is then customary to write $x=\cos(\alpha), \mathrm dx=-\sin(\alpha)\ \mathrm d\alpha$. So: $$\begin{align*} \int \frac{\cos^2(\alpha)}{\sqrt{\sin^2(\alpha))}}(-\sin(\alpha))\ \mathrm d\alpha&=-\int\frac{\cos^2(\alpha)}{\sin(\alpha)}\sin(\alpha)\ \mathrm d\alpha\\ &=-\int \cos^2(\alpha)\ \mathrm d\alpha\\ &=-\int\frac{1+\cos(2\alpha)}{2}\ \mathrm d\alpha\\ &=-\frac{\alpha}{2}-\frac{\sin(2\alpha)}{4}\\ &=-\frac{\alpha}{2}-\frac{\sin(\alpha)\cos(\alpha)}{2}. \end{align*}$$
We know plug in $\alpha=\arccos(x)$. It is left to know what $\sin(\arccos(x))$ is.
For this, we now we pretend that $0\leq \alpha\leq \frac{\pi}{2}$ and draw a triangle which shows via the Pythagorean theorem that $\sin(\arccos(x))=\sqrt{1-x^2}$.
Similarly there are the common substitutions $x=\tan(\alpha)$ and $x=\sec(\alpha)$.
This technique seems less than rigorous. Here are some of my issues with it:
At first it seemed to me like this is $u$-substitution in reverse (think that $x$ plays the role of $u$ and $\alpha$ plays the role of $x$). But in $u$-substitution, if the substitution is $u=g(x)$ then we eventually plug in $g(x)$ instead of $u$. But here the roles are reversed. So it seems that this really is ordinary $u$-substitution. But then that means that the substitution is $\alpha=\arccos(x)$ -- however there are many ways to choose inverses to $\cos$ and $\arccos(x)$ is only one of them. Are we really choosing just that one?
I feel uncomfortable with $\sqrt{\sin^2(x)}=\sin(x)$. What if $\sin(x)$ is negative? What's going on here? Is the issue that we are just doing it on a segment where $\sin(x)$ is positive, do the whole thing, and then after we get an answer we do some argument using analytic continuation? Or is perhaps the issue that we are looking at $-1<x<1$ (because that's where $\sqrt{1-x^2}$ is defined), and so $\arccos(x)$ would go from $0$ to $\pi$ where $\sin(x)$ is positive? Would this weird argument also work for other trigonometric substitutions?
That part at the end where we figure out what the trigonometric function of an inverse trigonometric function is (in my example $\sin(\arccos(x))$ is fishy to me. To figure it out I draw a triangle, which seems to assume $\arccos(x)$ is between $0$ and $\frac{\pi}{2}$. What's going on there.
So, while I'm very familiar with the method, tutoring it made me realize I'm not sure what's really behind it. Could it really be something as complicated as analytic continuation behind it? Is there a uniform way of explaining this method with respect to the substitutions $x=\cos(\alpha), x=\tan(\alpha)$ and $x=\sec(\alpha)$?