10

When we substitute $x=\sin(t)$ into $$\int \sqrt{1-x^2}dx,$$ why we only take the "$+$" sign even though $\sqrt{1-\sin^2(t)}=\pm \cos(t)\;?$

EDIT: Thank you to @Cameron Williams for the suggested problem. I know for the definite integral, we need to discuss carefully according to the quadrant for + or -, and that's no ambiguity. But here I want to ask for the indefinite case, where there is no specified quadrant, then why we only take the "+" sign?

EDIT: Thank you to @EeveeTrainer for the suggested problem. But here it is not exactly to take square root on a number, but a function. $\sqrt{4}=2$ is not the same as $\sqrt{\cos^2(x)}=\cos(x)$. Because $\cos(x)$ might be negative, depends on the quadrant of $x$ previously specified. Is the underneath assumption to choose a quadrant such that both $\sin$ and $\cos$ are positive, even though there is no quadrant specified for an indefinite integral?

EDIT: Thank you to @finch's comment on the conventional interval chosen for $\sin(x)$ (or $\cos(x)$) so that they are invertible. For $\sin(x), ~~[-\frac{\pi}2, \frac{\pi}2];$ for $\cos(x), ~~[0, \pi].$ So, if I want to use substitute $$x=\sin(\theta)$$ into $$I_2=\int \sqrt{x^2}\sqrt{1-x^2} dx,$$ which interval should I choose? Do I choose $$[-\frac{\pi}2, \frac{\pi}2]\cap [0, \pi] ~?$$


ADDENDUM

Say, I choose the domain for $\theta $ as $$[-\frac{\pi}2, \frac{\pi}2].$$ Then the integral becomes $$I_2=\int \sqrt{\sin^2(\theta)}\sqrt{\cos^2(\theta)} \cos(\theta)~d\theta=\int |\sin(\theta)|\cos(\theta) \cos(\theta)d\theta$$

$$\begin{align} \text{If}~~~ \theta\in[-\frac{\pi}{2},0],~~I_2&=\frac{1}{3}\cos^3(\theta)+C=\frac{1}{3}(1-x^2)^{3/2}+C\\ \\ \text{If} ~~~\theta\in(0,\frac{\pi}{2}],~~I_2&=-\frac{1}{3}\cos^3(\theta)+C=-\frac{1}{3}(1-x^2)^{3/2}+C \end{align}$$

Why do we usually choose only the bottom solution?

ryang
  • 38,879
  • 14
  • 81
  • 179
MathFail
  • 21,128

5 Answers5

8

Assuming $t\in[\pi/2, 3\pi/2]$ is not a problem. Let $x=\sin t$, but $t = \color{red}{\pi-}\sin^{-1}x$, $$\begin{align*} \int\sqrt{1-x^2}dx &= \int\sqrt{1-\sin^2t}\cdot \cos t\ dt\\ &=\int-\cos^2t\ dt\\ &=\int-\frac{1+\cos2t}{2}dt\\ &=-\frac t2-\frac{\sin 2t}4+C\\ &=-\frac t2-\frac{\sin t\cos t}2+C\\ &= -\frac{\pi-\sin^{-1}x}2 -\frac{x\left(\color{red}-\sqrt{1-x^2}\right)}2+C\\ &= \frac{\sin^{-1}x + x\sqrt{1-x^2}}{2} + C' \end{align*}$$

Just be careful when representing $t$ and $\cos t$ in terms of $x$.


For the ADDENDUM "why do we usually only choose the bottom solution?" No, for example from WolframAlpha, the indefinite integral assuming $x$ is real also depends on the sign of $x$:

$$I_2 = -\frac{\left(1-x^2\right)^{3/2}}{3\operatorname {sgn}(x)} + C$$

which means when $x=\sin\theta$ and $\theta$ are both negative, this matches your first form of $I_2$.

peterwhy
  • 22,256
2

In the substitutions $x=\sin t$ and $x=\sin\theta,$ you don't have to restrict your values of $t$ or $\theta$ to any particular interval. You do need to make sure that whatever values of $t$ or $\theta$ you allow, the formulas you use are equivalent to the original integral.

For the substitution $x=\sin t$ in $$ I_1 = \int \sqrt{1-x^2} \,\mathrm dx, $$ it is convenient to let $-\frac\pi2 \leq t \leq \frac\pi2$ because this is a very familiar part of the domain of the sine function and it covers all the values of $x$ at which the integral could possibly be evaluated (since we must have $1 - x^2 \geq 0$). But it is not necessary to do that. In order to use any real number as $t,$ you just have to recognize that in general, $$ \sqrt{1 - \sin^2 t} = \lvert \cos t \rvert, $$ and remember that you cannot just write $\cos t$ on the right-hand side because $\cos t$ is negative for many real values of $t.$ You end up with

$$ I_1 = \int \lvert \cos t \rvert \cos t\,\mathrm dt = \begin{cases} \int \cos^2 t\,\mathrm dt & \cos t = \sqrt{1 - x^2} \geq 0, \\ -\int \cos^2 t\,\mathrm dt & \cos t = -\sqrt{1 - x^2} \leq 0. \\ \end{cases} $$

You can choose either case for $\cos t$ ($\geq0$ or $\leq0$), just as long as you remember which case you chose and make the correct reverse substitution at the end. You'll get the same result either way, as you can confirm yourself. There's no need to be concerned with which quadrant $t$ is in, only with how to deal with the absolute value sign that taking a square root of a square requires.


It is similar for $$ I_2=\int \sqrt{x^2}\sqrt{1-x^2} \,\mathrm dx. $$ It is a fact that $$ \sqrt{\sin^2 \theta} \sqrt{\cos^2 \theta} = \lvert \sin \theta \rvert \lvert \cos\theta \rvert = \lvert \sin \theta \cos\theta \rvert,$$ so $$ I_2 = \int \lvert \sin \theta \cos\theta \rvert \cos\theta\,\mathrm d\theta = \begin{cases} \int \sin\theta \cos^2\theta\,\mathrm dt & \sin\theta\cos\theta = x\cos\theta \geq 0, \\ -\int \sin\theta\cos^2\theta\,\mathrm dt & \sin\theta\cos\theta = x\cos\theta \leq 0. \\ \end{cases} $$ That is, you use the first case when $x$ and $\cos\theta$ have the same sign, but use the second case when $x$ and $\cos\theta$ have opposite signs. That is, for the first case you can replace $\cos\theta$ by $(\operatorname{sgn}x)\sqrt{1 - x^2}$ (same sign as $x$) and in the second case you can replace $\cos\theta$ by $-(\operatorname{sgn}x)\sqrt{1 - x^2}$ (sign opposite to $x$). The final result will be the same either way, as you can verify.

Again, up to this point we have no need to be concerned about quadrants or intervals, only about the correct use of absolute value when taking the square root of a square. There is an extra complication in this case, however, because the naïve substitutions for $\cos\theta$ above do not match at $x = 0.$ If you want a single antiderivative that is continuous for $-1 \leq x \leq 1$ you have to play some additional games with the integration constant.

David K
  • 98,388
  • Thank you, I have updated my question, why usually we only take the bottom solution? – MathFail Jul 26 '22 at 13:15
  • Do you want to find an antiderivative for every value of $x$ in $(-1,1)$ or only for the positive values of $x$? If you only want positive values then you must make $\sin\theta>0$ and so you must discard $\theta\in(-\pi/2,0).$ If you want positive and negative $x$ you must work out both halves of the solution. – David K Jul 26 '22 at 14:04
  • I see, thank you! – MathFail Jul 26 '22 at 14:31
1

I'm not sure if this answers your question on that last integral you mentioned, but the domain of $f(x) = \sqrt{\sin^{2}\left(x\right)}\sqrt{1-\sin^{2}x}$ is $\mathbb{R}$, and you can plot that on Desmos to check. Indefinite integrals are defined on the interval that the function is defined. There's no need to choose a set like $\left[-\frac{\pi}{2},\frac{\pi}{2}\right] \cap [0,\pi]$ because $f(x)$ is defined everywhere on $\mathbb{R}$. You can if you want to though because after all, the definition of an indefinite integral of a function $f(x)$ on an interval $I$ is that (1) $f(x)$ is a function with the mapping $f: I \to \mathbb{R}$, (2) there exists an antiderivative $F: I \to \mathbb{R}$, and (3) that antiderivative is an indefinite integral of $f(x)$. So if we pretend $\left[-\frac{\pi}{2},\frac{\pi}{2}\right] \cap [0,\pi] = I$, then we can still take the indefinite integral of $f(x) = \sqrt{\sin^{2}\left(x\right)}\sqrt{1-\sin^{2}x}$ is $\mathbb{R}$ since by the definition above, $x \in I$.

In case you're wondering, "how does the domain of an indefinite integral affect my calculations?" In a calculus class like AP Calculus or Calculus 1, students should already know the domains of the functions they are differentiating/integrating because they had already learned that in a pre-calculus or algebra class. An indefinite integral is just a notation for the collection of all antiderivatives. But that doesn't mean we can't just ignore domains because every function, by definition, has a domain (and a codomain too). An indefinite integral by definition is a function, so it has a domain. When calculus students find the indefinite integral of a function $f(x)$, they're already supposed to assume $x$ lives in the domain of both $f(x)$ and what the indefinite integral of $f(x)$ is equal to.

Does that answer your questions?

Accelerator
  • 4,923
  • Sorry, there is a typo, and I have edited it. What I have confusion is the domain when we use trig-sub, and consider on which domain the inversed function exists. – MathFail Jul 24 '22 at 13:53
1

I put my comment as an answer to continue here the discussion on this line of reasoning.

We need to take into account the fact that we want the function to be invertible. In the case of $x = sint$ therefore we consider $t \in [-\pi/2,\pi/2]$.

As already pointed out in other answers, other choices of the interval lead with minor adustments to the same results. To avoid confusion, as in most cases the mathematician have agreed on a convention: to take always that interval to invert the sine. Is it compulsaory? No. But why should I change it?

For the integral you proposed, which I believe you meant to write $x$ instead of $sin(x)$, you don't even need the substitution. If we have the integral $$ \int \sqrt{x^2} \sqrt{1-x^2}dx $$ we can just use this substitution $t = x^2$. In cases where you can't decide on the sign you just leave the modulus and try to work from there. Maybe it is a sign that another approach could be better.

finch
  • 1,611
  • 4
  • 7
  • Yes, sorry for the typo, I have edited. Yes, I know for simple case, I don't need trig-sub. I just want to use an example to illustrate what is domain should I choose in this case, assume I use trig-sub. – MathFail Jul 24 '22 at 13:51
1

if I want to substitute $$x=\sin(\theta)$$ into $$I_2=\int \sqrt{x^2}\sqrt{1-x^2} \,\mathrm dx,$$ do I choose $$[-\frac{\pi}2, \frac{\pi}2]\cap [0, \pi] ~?$$

Because your above substitution is an implicit substitution (the introduced variable is an argument of some function in, rather than the subject of, the substitution), that substitution function must be invertible.

In your example, it is most convenient to restrict $\sin$ to its principal domain, i.e., $$\left[-\frac{\pi}2, \frac{\pi}2\right],$$ but choosing something like $$\left[\frac{\pi}2, \frac{3\pi}2\right]$$ is also valid and give the same result.

ryang
  • 38,879
  • 14
  • 81
  • 179
  • P.S. Point #5 of my second link is pertinent to your Question. – ryang Jul 24 '22 at 16:22
  • I have read that part, but my question is about indefinite integral, that link is about the definite integral, there is no ambiguity for definite integral, because the lower and upper limits are fixed, so we can carefully justify the sign on that interval. Here I want to ask about the indefinite integral. – MathFail Jul 26 '22 at 14:28
  • The idea is the same, but more general if the integration is indefinite. Hasn't David K's answer addressed this query anyway? – ryang Jul 26 '22 at 14:35
  • Yes, so for indefinite case, I should keep both solutions, right? (like in my updated part) – MathFail Jul 26 '22 at 14:36
  • Yep, as long as you have delineated the cases correctly. – ryang Jul 26 '22 at 14:39
  • 1
    ok, I understand now, thank you! – MathFail Jul 26 '22 at 14:41