Where is the absolute value when computing antiderivatives?

The function we are integrating is only defined on the interval $(-1,1)$. We want a bijective relationship; therefore, when we substitute $x=\sin(\theta)$ we force $\theta$ to only take on values between $-\frac{\pi}{2}$ and $\frac{\pi}{2}$, giving us our bijection. Note that $\cos(x)$ is positive in this region, so we can drop the absolute value.


Addendum

One may ask what happens if we choose a different interval for $\theta$, such as $[\pi/2,3\pi/2]$. Everything works out the same until we get the answer $-\theta+c$, which gives an answer of $-\arcsin(x)+c$. This might seem confusing, but remember that this $\arcsin$ function is different than the one we are used to; it is the inverse of $\sin(x)$ on the interval $[\pi/2,3\pi/2]$ instead of the usual $[-\pi/2,\pi/2]$. What this yields is an $\arcsin$ function that is flipped horizontally around the $y$-axis and is shifted higher. However, note that the negative sign we got flips the function back, and then the constant of integration account for the vertical shift.

If a visual is desired, here you go. The purple curve is the $\arcsin(x)$ we are used to (associated with the green section of sine curve) and the orange curve if the "new" $\arcsin(x)$ (associated with the red section of the sine curve) enter image description here


Let $\operatorname{sgn}(x)$ be the function that takes values $-1, 0, 1$ depending on the sign of $x$.

For the sake of generality, if you have two variables $x$ and $\theta$ related by $x = \sin \theta$ and the square root symbol means to always take the positive square root, then the opening post is correct: the right formula relating the differentials is

$$ \frac{\mathrm{d}x}{\sqrt{1 - x^2}} = \operatorname{sgn}(\cos(\theta)) \mathrm{d} \theta $$

Now, one thing to note is that the domain of these functions excludes $x = \pm 1$; similarly, it excludes all values of $\theta$ for which $\cos(\theta) = 0$.

On this domain, $\operatorname{sgn}(\cos(\theta))$ is locally constant. In this situation, the domain consists of a series of completely disjoint intervals $$\ldots \cup (-3\pi/2, -\pi/2) \cup (-\pi/2, \pi/2) \cup (\pi/2, 3\pi/2) \cup \ldots$$ "Locally constant" means any function that is constant on each of these intervals, but can have different values on different intervals.

Nearly everywhere in calculus where you learned something involving constants is actually about things that are locally constant

For example, since $\operatorname{sgn}(\cos(\theta))$ is locally constant, its antiderivatives are all of the form

$$ \operatorname{sgn}(\cos(\theta)) \theta + C(\theta) $$

where $C(\theta)$ is also locally constant. (note that we need a local constant of integration, not merely a constant of integration!)

Now, if we were so inclined, we can extend this formula to the domain of all $\theta$ by lining up all of the constants. The end result is that the antiderivative is a constant plus the sawtooth function depicted below:

Sawtooth function Image produced by Wolfram alpha


As an example of seeing how this working, suppose our goal was to compute the integral

$$ \int_{-1}^1 \frac{\mathrm{d}x}{\sqrt{1 - x^2}} $$

While unusual, we can rewrite this as

$$ \int_{-\pi/2}^{5\pi/2} \operatorname{sgn}(\cos(\theta)) \mathrm{d} \theta $$

This isn't an invertible substitution, since each value of $x$ corresponds to three different values of $\theta$ (barring a few exceptions). But one-dimensional integration is very robust, and we should still expect to get the right answer if we have the details right.

And we do; if we take the sawtooth function above as the antiderivative, then the integral becomes

$$ \left( \frac{\pi}{2} \right) - \left( -\frac{\pi}{2} \right) = \pi $$

which is the correct answer — and the same answer we'd get by only integrating over $(-\pi/2, \pi/2)$.


Of course, if we aren't interested in the greater generality, we can just simplify by insisting that $\theta \in [-\pi/2, \pi/2]$ and simply take $\theta + C$ as the antiderivative, thus avoiding any hassles with the sign.


This is a good question. Note that the domain for the arcsine function, $\arcsin(x)=\int_0^x\frac{1}{\sqrt{1-t^2}}\,dt$,is $|x|\le1$.

Hence, upon enforcing the substitution $t=\sin(\theta)$, then for $|\theta|\le \pi/2$, $\cos (\theta)\ge 0$.


We could have chosen alternatively $\theta \in (-\pi/2+n\pi,\pi/2+n\pi)$ from which we see that

$$\text{sgn}\left(\cos(\theta)\right)=\begin{cases}1&,n\,\,\text{even}\\\\-1&,n\,\,\text{odd}\end{cases}$$

For odd values of $n$, the substitution $x=\sin(\theta)$ yields

$$\begin{align} \int \frac{1}{\sqrt{1-x^2}}\,dx&=-\theta +C\\\\ &=-\arcsin(x)+C\\\\ &=n\pi -\arcsin(x)+C'\\\\ &=\arcsin(x)+C' \end{align}$$

And hence, the antiderivative $\int \frac{1}{\sqrt{1-x^2}}\,dx=\arcsin(x)+C$ is valid regardless of whether $n$ is even or odd.


Because in integrals like this we make the substitution $x=\sin\theta$ with an additional assumption that $\displaystyle \theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$. That places $\theta$ in the fourth and first quadrants only. And although it is true that we should say that $\sqrt{\cos^2\theta}=|\cos\theta|$, in both these quadrants cosine is non-negative, and thus we can continue to simplify $\sqrt{\cos^2\theta}=|\cos\theta|=\cos\theta$.