38

I made a silly mistake in evaluating some integral by using a non-injective $u$-substitution. But why should $u$-substitutions be injective in the first place?

I reasoned in the following way: the formula $$ \int_{\phi(a)}^{\phi(b)}g(x)\ dx = \int_a^b g(\phi(t))\phi^\prime(t)\ dt $$ holds for a general $C^1$ function $\phi$, even if it is not injective. When you calculate an integral of the form $\int_a^b f(\phi(t))\ dt$, to use the formula above from right to left, you should find a function $f$ such that $$ f(\phi(t)) = g(\phi(t))\phi^\prime(t), $$ which do not exist if $\phi$ is not injective, i.e., $\phi(t) = 0$ for some $t$. This is why substitutions should be injective.

Is my reasoning correct? If so, I believe that if $\phi^\prime(t) = 0 \Rightarrow f(\phi(t)) = 0$, a function $g$ that satisfies the formula above may exist and $\phi$ should not necessarily be injective. Is this right?

I am often confused about the fact $\phi$ should be injective. Is there an intuitive way to interpret this fact, so that I always remember to take a $\phi$ that is injective?

I would be grateful if you could help me understand this matter.

Pteromys
  • 7,220
  • You are correct. The formula only requires that $\phi$ be continuously differentiable. – wj32 Aug 18 '13 at 12:23
  • @wj32 Thank you. Could I also ask you about the possibility of $\phi$ not being injective, and the intuition about the issue, as I stated above? – Pteromys Aug 18 '13 at 12:46
  • Correct me if I'm wrong, but I believe that the formula is true for a general $\phi \in C^1$ only if $$\frac{\text d}{\text d x} \int _{\phi(a)} ^{\phi(x)} g(t),\text d t=g(\phi(x))\phi '(x)=\frac{\text d}{\text d x}\int _a ^x g(t) \phi '(t) \text d t,$$ which is the case if $g\in C^0.$ I don't have a counterexample at hand (if there exist one), but I think the general case requires $\phi$ to be monotonous. – pppqqq Aug 18 '13 at 13:21
  • @pppqqq My textbook also states the formula for $f\in C^0$ and $g\in C^1$. You state that the general case requires $\phi$ to be monotonous, but what is the general case you are talking about? – Pteromys Aug 18 '13 at 13:32
  • Referring to your first formula, I'm considering the case where $g\in \mathscr R ([a,b])$, that is: $g$ is Riemann-integrable in $[a,b]$. – pppqqq Aug 18 '13 at 13:41

3 Answers3

32

When $f:\ I\to{\mathbb R}$ has a primitive $F$ on the interval $I$, then by definition $$\int_a^b f(t)\ dt =F(b)-F(a)$$ for any $a$, $b\in I$; in particular $b<a$ is allowed.

When $\phi$ is differentiable on $[a,b]$ and $g$ has a primitive $G$ on an interval $I$ containing $\phi\bigl([a,b]\bigr)$, then by the chain rule $G \circ \phi$ is a primitive of $(g\circ\phi)\cdot\phi'$ on $[a,b]$. It follows that $$\int_{\phi(a)}^{\phi(b)} g(x)\ dx =G\bigl(\phi(b)\bigr)-G\bigl(\phi(a)\bigr)=\int_a^bg\bigl(\phi(t)\bigr)\phi'(t)\ dt\ .\tag{1}$$ No question of injectivity here.

Now there is a second kind of substitution. Here we are given an integral $$\int_a^b f(x)\ dx$$ without any $\phi$ visible neither in the boundaries nor in the integrand. It is up to us to choose a clever $\phi$ defined on some interval $J$ such that (i) $a$, $b\in \phi(J)$ and (ii) $f\circ\phi$ is defined on $J$. Assume that $\phi(a')=a$, $\>\phi(b')=b$. Then according to $(1)$ we have $$\int_a^b f(x)\ dx=\int_{a'}^{b'}f\bigl(\phi(t)\bigr)\>\phi'(t)\ dt\ .$$ No question of injectivity here, either. Consider the following example: $$\int_0^{1/2} x^2\ dx=\int_{-\pi}^{25\pi/6}\sin^2 t\>\cos t\ dt.$$ It is true that for this second kind of substitution one usually chooses an injective $\phi$ so that one can immediately write $\phi^{-1}(a)$ and $\phi^{-1}(b)$ instead of "take an $a'$ such that $\phi(a')=a\ $".

  • I was most interested in the cases where the formula for integration by substitution is used from right to left, when there is no apparent $\phi^\prime(t)$ factor in the integrand on the RHS, but thank you any way. – Pteromys Aug 18 '13 at 23:35
  • @Pteromys: That's exactly the "second kind of substitution" referred to above. Only LHS and RHS are interchanged. – Christian Blatter Aug 19 '13 at 10:10
  • 4
    So to be explicit: is the message here, "no, substitutions need not be injective"? – Resigned June 2023 Apr 08 '15 at 02:09
  • 1
    @raxod502: True. On the other hand it would be difficult to cook up an example for which some noninjective substitution would produce a computational advantage. – Christian Blatter Apr 08 '15 at 08:48
  • Christian, would you mind taking a look at this answer of mine? It's precisely about this... Thanks http://math.stackexchange.com/questions/1911892/in-proving-primitive-by-substitution-we-demand-x-phit-to-be-a-bijection-i/1912253#1912253 – An old man in the sea. Sep 02 '16 at 16:17
  • Should it say "$G\circ \phi$ is a primitive of $(g\circ\phi)\cdot\phi'$" in the second paragraph? – ziggurism Sep 11 '16 at 21:55
  • How does this work in the case of indefinite integrals? In the indefinite case, we must resubstitute to get back to the original variable, isn't that resubstitution an inversion of phi? – JMC Jul 19 '23 at 21:03
4

Well, imagine the substitution as tracing a path (along the $x$-axis in this case). If you go from $a$ to $b$ and then back from $b$ to $a$ you will cancel out the integral and not compute the integral on $[a,b]$ as you intended. And all sorts of intermediate things can happen.

Try "parametrizing" $[0,1]$ by $x=\sin t$, $0\le t\le\pi$, and computing $\displaystyle\int_0^1 x\,dx$, for example. Of course, if you do the official substitution, you end up with $\int_0^0 x\,dx = 0$. But the function has "covered" the interval $[0,1]$ and then "uncovered" it.

Ted Shifrin
  • 115,160
  • Are you sure about the example you gave? For that integral, $x$ runs from $0$ to $1$, so $t$ runs from $0$ to $\pi/2$ and not $\pi$ – Parth Thakkar Aug 18 '13 at 13:08
  • But if you run from $0$ to $\pi$, you hit every $x$ twice, and look what happens to the integral. That's exactly my point. – Ted Shifrin Aug 18 '13 at 13:28
  • What is actually relevant is a notion of degree of a mapping ... which you can learn about in a differential topology course. If the map has degree $1$, even if it hits some values more than once, then it'll work out fine. – Ted Shifrin Aug 18 '13 at 13:28
  • Hmmm, so all this isn't all that simple as it seems. I don't know even know what topology is, and I am dealing with something like differential topology. I'll rather keep quiet :) – Parth Thakkar Aug 18 '13 at 13:30
  • 4
    This answer is true but not relevant, since you wouldn't change the bounds to $0$ and $\pi$ when making the substitution $x = \sin t$. The lesson here is just that it's the values of the substitution function $\phi$ that are important, not the endpoints of the image on an interval. – Jim Belk Jun 19 '15 at 16:15
  • 3
    @TedShifrin $\sin t , 0\le t \le \pi$ is not a parametrization of $[0,1]$. Of course it depends of the definition used, but a parametrization $\phi : [a,b] \rightarrow [0,1] $ should have $\phi(a)=0, \phi(b)=1$. It's a nice, illustrative example, but it doesn't contradict anything and it doesn't adress the original question. The fact that the image of $[0,\pi]$ by $\sin t$ is $[0,1]$ doesn't prove anything – Emilio Jan 27 '18 at 03:54
  • if you do the official substitution, you end up with $\int^0_0x dx=0$---I don't understand this. By the "official substitution", at $x=1$, $t=\pi/2$; and at $x=0$, $t=0$. And now we have $\int_{0}^{1}x,\mathrm{d}x=\int_{0}^{\pi/2}\sin t\cos t,\mathrm{d}t=\left[-\frac{1}{4}\cos2t\right]{0}^{\pi/2}=\frac{1}{2}$, which is the correct answer. Why would one write $\int{0}^{1}x,\mathrm{d}x=\int_{0}^{\pi}\sin t\cos t,\mathrm{d}t$ as you seem to be suggesting? – user182601 Feb 26 '24 at 03:44
  • @user182601 I’m not suggesting that. When $t$ goes from $0$ to $\pi$, $\sin t$ goes from $0$ to $1$ and then back from $1$ to $0$, so the two integrals cancel and give a net result of $0$. – Ted Shifrin Feb 26 '24 at 04:10
  • But why does that correspond to (or have anything to do with) $\int^1_0 x ,\mathrm d x$? – user182601 Feb 26 '24 at 04:12
  • Reread the OP. A non-injective substitution may lead to the wrong answer. There are plenty of other examples with different wrong results. – Ted Shifrin Feb 26 '24 at 17:40
0

I think using a specific example supported with pictures can help answer this question, which seems to be a pretty common one over the years on this site. The following comments are specific to $\mathbb R$eal-valued functions of the form: $\mathbb R \to \mathbb R$.

The function we will look at is: $f(\cdot)=\sqrt{1-(\cdot)^2}$.

Taken directly from the solution manual of my book (Spivak's Calculus Ed. 4), here is the argument the author provides to find the so-called 'primitive' of $f(x)=\sqrt{1-x^2}$:

Let $x=\sin(u)$, $dx=\cos(u)du$. The integral becomes \begin{align} \int\sqrt{1-\sin^2(u)}\cos(u)du&=\int\cos^2(u)du=\int\frac{1+\cos(2u)}{2}du\\&=\frac{u}{2}+\frac{\sin(2u)}{4}\\&=\frac{u}{2}+\frac{\sin(u)\cos(u)}{2}\\&=\frac{\arcsin(x)}{2}+\frac{x\sqrt{1-x^2}}{2}\end{align}

So what exactly does any of this mean? For starters, let us remind ourselves of the definite integral version of the substitution theorem for a continuous function $f$ and continuously differentiable function $g$. Here is how my book (and likely many others) report it:

$$\int_{g(a)}^{g(b)}f(u)du=\int_a^bf(g(x))\cdot g'(x)dx$$

Here is how I, personally, prefer to write it (which is completely equivalent):

$$\int_{g(a)}^{g(b)}f(x)dx=\int_a^b[f\circ g](x)\cdot g'(x)dx \quad(\dagger_1)$$

You will notice I switched out the left-side's dummy variables so that they match the right side. I do this intentionally as I think it detracts from understanding, otherwise. We will use my version going forward.

Importantly, observe that the following form is one eligible instantiation of $(\dagger_1)$:

$$\int_{g\circ g^{-1}(a)}^{g\circ g^{-1}(b)}f(x)dx=\int_{g^{-1}(a)}^{g^{-1}(b)}[f\circ g](x)\cdot g'(x)dx$$, assuming, of course, that the $g$ in question has an inverse $g^{-1}$. Because we are composing inverses, this can be rewritten as:

$$\int_{a}^{b}f(x)dx=\int_{g^{-1}(a)}^{g^{-1}(b)}[f\circ g](x)\cdot g'(x)dx \quad (\dagger_2)$$

Focusing on $(\dagger_1)$ and $(\dagger_2)$, let us now direct our attention to the function $f(\cdot)=\sqrt{1-(\cdot)^2}$.


The $(\dagger_1)$ Perspective

Suppose our integral looked like the following: $\displaystyle \int_{-1}^{\sin(x)}\sqrt{1-t^2}dt$. Graphically, we have:

Picture 1

Well, by $(\dagger_1)$ and imposing that $g(\cdot)=\sin(\cdot)$:

$$\int_{-1}^{\sin(x)}\sqrt{1-t^2}dt=\int_{?}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt \quad (\dagger_3)$$

There is a '$?$' symbol in the lower bound on the right side (and we'll get to that shortly), but, first, let us make one thing clear: $\sqrt{1-t^2} \neq \sqrt{1-\sin^2(t)}\cos(t)$...i.e. these two functions are not the same (go graph them and convince yourself).

Now, time to address the '$?$' symbol. From referencing $(\dagger_1)$, it should be clear why the left side upper bound of integration was $\sin(x)$ and why the right side upper bound of integration was $x$. However, $\sin(x)$ (without any sort of domain restriction) is not an injective function. As such, because we are imposing that $g=\sin$, the left lower bound bound of integration is implicitly saying $g(a)=\sin(a)=-1$. But because a non-restricted $\sin$ is not injective, there is no inverse $g^{-1}$ for us to trivially solve the above expression... i.e. we cannot write $a=g^{-1}(-1)$. We know that $\sin(-\frac{\pi}{2})=-1$...but, more generally, we know that $\sin(-\frac{\pi}{2}-2\pi k)=-1$. For convenience, suppose we choose $k=0$ and $k=1$. Then, adhering to the $(\dagger_1)$ structure, it would seem perfectly legitimate to rewrite $(\dagger_3)$ as both:

  1. $\displaystyle \int_{-1}^{\sin(x)}\sqrt{1-t^2}dt=\int_{-\frac{\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt$

  2. $\displaystyle \int_{-1}^{\sin(x)}\sqrt{1-t^2}dt=\int_{\frac{-5\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt$

Indeed, you can see graphically that both of these statements are true (as the red line and dotted blue lines perfectly coincide...note the different lower bound of integration for the red lines):

Picture 2

Picture 3

Let's return to the author's solution manual argument. Recall that the author implicitly argues: $\sqrt{1-\sin^2(t)}\cos(t)=\cos^2(t)$. The only way this is true is if we agree to the assertion that $\sqrt{1-\sin^2(t)}=\cos(t)$. Realize, though, that this is only true if $t \in [-\frac{\pi}{2}+2\pi m, \frac{\pi}{2}+2\pi m]$. If, instead, $t \in [\frac{\pi}{2}+2\pi m, \frac{3\pi}{2}+2\pi m]$, then $\sqrt{1-\sin^2(t)}=-\cos(t)$. From the perspective of the $(\dagger_1)$ representation, this matters (although, as we will see later, this issue is irrelevant for the $(\dagger_2)$ representation).

For convenience, let us focus on $\displaystyle \int_{-\frac{\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt$. Referencing the author's solution, you may be tempted to say $\displaystyle \int_{-\frac{\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt=\frac{x}{2}+\frac{\sin(x)\cos(x)}{2}-\left[\frac{-\frac{\pi}{2}}{2}+\frac{\sin\left(\frac{-\pi}{2}\right)\cos\left(\frac{-\pi}{2}\right)}{2}\right]$...and this would be just fine assuming we restrict $x$ to $[-\frac{\pi}{2},\frac{\pi}{2}]$. Refer to the below graph, and notice the location where the overlap takes places:

Picture 4

Take my word for it...it's on the interval $[-\frac{\pi}{2},\frac{\pi}{2}]$.

Instead of assuming $\sqrt{1-\sin^2(t)}=\cos(t)$, let's instead assume that $\sqrt{1-\sin^2(t)}=-\cos(t)$. Then you may be tempted to say:

$\displaystyle \int_{-\frac{\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt=-\frac{x}{2}-\frac{\sin(x)\cos(x)}{2}+\left[\frac{-\frac{\pi}{2}}{2}+\frac{\sin\left(\frac{-\pi}{2}\right)\cos\left(\frac{-\pi}{2}\right)}{2}\right]$...and this would be just fine assuming we restrict $x$ to $[-\frac{3\pi}{2},-\frac{\pi}{2}]$. Refer to the below graph, and notice the location where the overlap takes places:

Picture 5

Take my word for it...it's on the interval $[-\frac{3\pi}{2},-\frac{\pi}{2}]$.

You may be wondering to yourself, "Why is the overlap only taking place at that one isolated interval?" Well, you need to realize that as $x$ varies continuously across the number line, we will experience alternating patterns of when $\sqrt{1-\sin^2(t)}=\cos(t)$ and when $\sqrt{1-\sin^2(t)}=-\cos(t)$, which means, for example if I want to find an expression that is equivalent to $\displaystyle \int_{-\frac{\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt$ for an $x \lt -\frac{3\pi}{2}$, or for an $x \gt \frac{\pi}{2}$, I would have to make a more complicated expression that takes into consideration the alternating $-\cos(t)$ and $\cos(t)$. Consider, for example, the piece-wise function:

$$\int_{-\frac{\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt=\begin{cases}\frac{x}{2}+\frac{\sin(x)\cos(x)}{2}-\left[\frac{-\frac{\pi}{2}+2\pi m}{2}+\frac{\sin\left(\frac{-\pi}{2}+2 \pi m\right)\cos\left(\frac{-\pi}{2}+2 \pi m\right)}{2}\right] \quad &\text{if } x \in [-\frac{\pi}{2}+2 \pi m,\frac{\pi}{2}+2 \pi m] \text{ for any }m \in \mathbb Z \\ -\frac{x}{2}-\frac{\sin(x)\cos(x)}{2}+\left[\frac{-\frac{\pi}{2}+2 \pi m}{2}+\frac{\sin\left(\frac{-\pi}{2}+2 \pi m\right)\cos\left(\frac{-\pi}{2}+2 \pi m\right)}{2}\right]\quad & \text{if }x \in [-\frac{3\pi}{2}+2 \pi m,-\frac{\pi}{2}+2\pi m] \text{ for any }m \in \mathbb Z\end{cases}$$

And because $\cos(-\frac{\pi}{2}+2 \pi m)=0$, we can rewrite this as:

$$\int_{-\frac{\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt=\begin{cases}\frac{x}{2}+\frac{\sin(x)\cos(x)}{2}-\left[\frac{-\frac{\pi}{2}+2\pi m}{2}+\right] \quad &\text{if } x \in [-\frac{\pi}{2}+2 \pi m,\frac{\pi}{2}+2 \pi m] \text{ for any }m \in \mathbb Z \\ -\frac{x}{2}-\frac{\sin(x)\cos(x)}{2}+\left[\frac{-\frac{\pi}{2}+2 \pi m}{2}\right]\quad & \text{if }x \in [-\frac{3\pi}{2}+2 \pi m,-\frac{\pi}{2}+2\pi m] \text{ for any }m \in \mathbb Z\end{cases}$$

This is true for all $x \in \mathbb R$. After reading my explanation up to this point, you may be wondering, "So when does $\arcsin$ come into play?". For that, we will now turn our attention to $(\dagger_2)$.


The $(\dagger_2)$ Perspective

Suppose the integral we want to talk about takes the following form: $\displaystyle \int_{\arcsin(a)}^{\arcsin(x)} \sqrt{1-\sin^2(t)}\cos(t)dx$. Before we apply $(\dagger_2)$, let us take note of an important concept. By definition, we know that $\arcsin$ has an inverse in the form of a restricted-domain $\sin$ function, which I will refer to using a capital S...i.e. $\text{Sin}$ is the inverse of $\arcsin$ and, by definition, has the domain $[-\frac{\pi}{2},\frac{\pi}{2}]$. In accordance with this, let us rewrite our integral of interest as follows:

$$\displaystyle \int_{\arcsin(a)}^{\arcsin(x)} \sqrt{1-\text{Sin}^2(t)}\cos(t)dt \quad (\dagger_4)$$.

Note that, for the bounds of integration we are interested in, $\text{Sin}(t)=\sin(t)$ and therefore: $\displaystyle \int_{\arcsin(a)}^{\arcsin(x)} \sqrt{1-\text{Sin}^2(t)}\cos(t)dt=\int_{\arcsin(a)}^{\arcsin(x)} \sqrt{1-\sin^2(t)}\cos(t)dx$.

Letting $f(\cdot)=\sqrt{1-(\cdot)^2}$, $g(\cdot)=\text{Sin}(\cdot)$, and $g'(\cdot)=\cos(\cdot)$ (...the derivative of $\text{Sin}(x)$ on the interval $[-\frac{\pi}{2},\frac{\pi}{2}]$ is just $\cos(x)$...), we see that $(\dagger_4)$ is eligible for a $(\dagger_2)$ application. Thus, we have the relationship:

$$\int_{a}^{x}\sqrt{1-t^2}dt=\int_{\arcsin(a)}^{\arcsin(x)}\sqrt{1-\text{Sin}^2(t)}\cos(t)dt$$

Further simplifying the right side of the expression, and acknowledging that $\text{Image}(\arcsin)=[-\frac{\pi}{2},\frac{\pi}{2}]$, we know that $\sqrt{1-\text{Sin}^2(t)}=\cos(t)$...as opposed to $-\cos(t)$...which means that we can follow the exact argument of author's solution manual up until:

$$\left[\frac{t}{2}+\frac{\text{Sin}(t)\cos(t)}{2}\right] \Bigg |_{\arcsin(a)}^{\arcsin(x)}$$

Remembering that $\cos(t)=\sqrt{1-\text{Sin}^2(t)}$, we can simplify the above expression to:

$$\frac{\arcsin(x)}{2}+\frac{\text{Sin}(\arcsin(x))\sqrt{1-\left(\text{Sin}(\arcsin(x)\right)^2}}{2} - \left[\frac{\arcsin(a)}{2}+\frac{\text{Sin}(\arcsin(a))\sqrt{1-\left(\text{Sin}(\arcsin(a)\right)^2}}{2}\right]$$

Finally, we can simplify to a suspiciously recognizable equation:

$$\frac{\arcsin(x)}{2}+\frac{x\sqrt{1-x^2}}{2} - \left[\frac{\arcsin(a)}{2}+\frac{a\sqrt{1-a^2}}{2}\right] \quad(\dagger_6)$$

That is to say:

\begin{align} \int_{a}^{x}\sqrt{1-t^2}dt&=\int_{\arcsin(a)}^{\arcsin(x)}\sqrt{1-\text{Sin}^2(t)}\cos(t)dt \\ &=\frac{\arcsin(x)}{2}+\frac{x\sqrt{1-x^2}}{2} - \left[\frac{\arcsin(a)}{2}+\frac{a\sqrt{1-a^2}}{2}\right] \end{align}


Concluding Remarks

Our first section revealed that the function $\int_{-\frac{\pi}{2}}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt$ could be written as:

$$\begin{cases}\frac{x}{2}+\frac{\sin(x)\cos(x)}{2}-\left[\frac{-\frac{\pi}{2}+2\pi m}{2}+\frac{\sin\left(\frac{-\pi}{2}+2 \pi m\right)\cos\left(\frac{-\pi}{2}+2 \pi m\right)}{2}\right] \quad &\text{if } x \in [-\frac{\pi}{2}+2 \pi m,\frac{\pi}{2}+2 \pi m] \text{ for any }m \in \mathbb Z \\ -\frac{x}{2}-\frac{\sin(x)\cos(x)}{2}+\left[\frac{-\frac{\pi}{2}+2 \pi m}{2}+\frac{\sin\left(\frac{-\pi}{2}+2 \pi m\right)\cos\left(\frac{-\pi}{2}+2 \pi m\right)}{2}\right]\quad & \text{if }x \in [-\frac{3\pi}{2}+2 \pi m,-\frac{\pi}{2}+2\pi m] \text{ for any }m \in \mathbb Z\end{cases}$$

I provided an explicit lower bound value for $G$ to help with some of the visualizations. But, referencing the above piece-wise function (which is specific to the lower bound of integration $-\frac{\pi}{2}$), you should see that I could have just as easily made the lower bound value of the integral an arbitrary constant...let us call it $\gamma$. In this case, we can represent $G(x)=\int_{\gamma}^{x}\sqrt{1-\sin^2(t)}\cos(t)dt$ by the following piece-wise function:

$$\begin{cases}\frac{x}{2}+\frac{\sin(x)\cos(x)}{2}-\left[\frac{\gamma+2\pi m}{2}+\frac{\sin\left(\gamma+2 \pi m\right)\cos\left(\gamma+2 \pi m\right)}{2}\right] \quad &\text{if } x \in [-\frac{\pi}{2}+2 \pi m,\frac{\pi}{2}+2 \pi m] \text{ for any }m \in \mathbb Z \\ -\frac{x}{2}-\frac{\sin(x)\cos(x)}{2}+\left[\frac{\gamma+2 \pi m}{2}+\frac{\sin\left(\gamma+2 \pi m\right)\cos\left(\gamma+2 \pi m\right)}{2}\right]\quad & \text{if }x \in [-\frac{3\pi}{2}+2 \pi m,-\frac{\pi}{2}+2\pi m] \text{ for any }m \in \mathbb Z\end{cases} \quad (*_1)$$

Because $\gamma$ is just a constant, $G'(x)$ evaluates to:

\begin{align}G'(x)&= \begin{cases} \frac{1}{2}+\frac{\cos^2(x)}{2}-\frac{\sin^2(x)}{2} \quad && \text{if } x \in [-\frac{\pi}{2}+2 \pi m,\frac{\pi}{2}+2 \pi m] \text{ for any }m \in \mathbb Z\\ -\frac{1}{2}-\frac{\cos^2(x)}{2}+\frac{\sin^2(x)}{2} \quad && \text{if }x \in [-\frac{3\pi}{2}+2 \pi m,-\frac{\pi}{2}+2\pi m] \text{ for any }m \in \mathbb Z\end{cases} \\&= \begin{cases}\cos^2(x)\quad &&\text{if } x \in [-\frac{\pi}{2}+2 \pi m,\frac{\pi}{2}+2 \pi m] \text{ for any }m \in \mathbb Z \\ -\cos^2(x) \quad && \text{if }x \in [-\frac{3\pi}{2}+2 \pi m,-\frac{\pi}{2}+2\pi m] \text{ for any }m \in \mathbb Z\end{cases}\end{align}

...and this above derivative-based piece-wise function is precisely what $\sqrt{1-\sin^2(x)}\cos(x)$ evaluates to for all $x \in \mathbb R$. Therefore, if someone were to ask what is a primitive of the function $\sqrt{1-\sin^2(x)}\cos(x)$, we can respond with the claim that $(*_1)$ describes a collection of such primitives.

And at long last, we can finally understand what Spivak's solution, first mentioned at the beginning of this post, is attempting to describe. Our section about $(\dagger_2)$'s perspective showed us that the function $F(x)=\int_{a}^{x}\sqrt{1-t^2}dt$ could be described with the following function:

$$\frac{\arcsin(x)}{2}+\frac{x\sqrt{1-x^2}}{2} - \left[\frac{\arcsin(a)}{2}+\frac{a\sqrt{1-a^2}}{2}\right] \quad (*_2)$$

Noting that $a$ is just a constant, if we take the derivative of $F$, then we get:

\begin{align}F'(x)&=\frac{1}{2\sqrt{1-x^2}}+\frac{\sqrt{1-x^2}}{2}+\frac{1}{2}\cdot\frac{x}{2\sqrt{1-x^2}}\cdot(-2x) \\&=\frac{1+(1-x^2)-x^2}{2\sqrt{1-x^2}}\\&=\frac{2(1-x^2)}{2\sqrt{1-x^2}}\\&=\sqrt{1-x^2}\end{align}

What we just demonstrated is that the collection of functions described by $(*_2)$ are all primitives of $\sqrt{1-x^2}$...and this is precisely what Spivak determined using his $u$-substitution approach. The $u$-substitution approach just doesn't give attention to the constant term (i.e. $a=0$ in Spivak's solution).

As you can hopefully see from this post, injectivity / non-injectivity is a non-issue for the substitution theorem of integration. You just need to understand what is being asked.

S.C.
  • 4,984