# Making trigonometric substitutions rigorous

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:

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:

1. 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?

2. 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 (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?

3. 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)$?

1. Yes, in a sense it's like a $u$-substitution "in reverse". However, there is really no problem here as long as you are careful (this will also take care of your issue in 2).

You can think of the integral you are seeing as what you would have gotten if you had started with the integral

and had tried the substitution $u=\cos\alpha$; and the trig substitution merely gets you back to this after a substitution that didn't work out so well.

In your example, for the integral to be defined you must have $x\in (-1,1)$. This means that each value of $x$ can be written uniquely as $x = \cos(\alpha)$ for some $\alpha\in (0,\pi)$. Now, because we want the substitution to be reversible, we have to specify this. But this also ensures that the "correct" inverse is $\arccos(x)$.

2. Now, indeed, $\sqrt{\sin^2 \alpha} = |\sin \alpha|$, not $\sin \alpha$. But, remember that we were restricting $\alpha$ to lie in $(0,\pi)$. In that interval, $|\sin\alpha|=\sin\alpha$, so we can indeed drop the absolute value bars. And yes, this argument also works for any trigonometric substitution: if you are going from $\sqrt{a^2-x^2}$, you need $x$ to lie on $[-a,a]$ or $(-a,a)$, so the substitution $x=a\sin\alpha$ with $-\pi/2\leq \alpha\leq \pi/2$ ensures the cosine is positive; the substitution $x=a\cos\alpha$ with $\alpha\in[0,\pi]$ ensures sine is positive.

When using the substitution $x = a\tan\theta$, you likewise restrict to the "main" branch of the tangent, on $-\pi/2\lt \theta\lt \pi/2$, where the inverse is $\arctan(x)$, and the secant is positive (so that $\sqrt{1+\tan^2\theta} = \sec\theta$).

The tricky one is $x=a\sec\theta$; you want to restrict to $[0,\pi/2)\cup(\pi/2,\pi]$. When there are no radicals involved, you probably want to avoid this identity anyway; when there are radicals, like $\sqrt{x^2-a^2}$, you need to take into account that the domain consists of two disjoint intervals, $(-\infty,-a]$ and $[a,\infty)$; you use $0\leq\theta\lt \pi/2$ on the latter, and $\pi/2\lt\theta\leq\pi$ for the former. Which one you are in determines whether $\tan(\theta)$ is positive or negative. Added. Sometimes you want to pick different intervals to ensure the signs work out right, though.

3. Drawing the triangle is a simple mnemonic, but it can be justified purely algebraically.
You want to find $\sin(\arccos(\alpha))$. Well,

hence $\sin^2(\arccos(\alpha)) = 1 - \alpha^2$. Remembering that $\arccos(\alpha)$ is always on $[0,\pi]$, it follows that $\sin(\arccos(\alpha)) = \sqrt{1-\alpha^2}$. Similar manipulations of the standard trigonometric identities work for other trig substitutions.