2

I've posted a similar question Confusion in finding derivative of $\sqrt{\frac{1-\cos(2x)}{1 + \cos(2x)}}$.


Consider the following integral: $$\int\sqrt{1 - x^2}\ dx.$$ Putting $x = \sin(\theta):$ $$=\int\sqrt{1 - \sin^2\theta}\ \cos\theta\ d\theta$$ $$=\int\sqrt{\cos^2\theta}\ \cos\theta\ d\theta\tag{1}$$ $$=\int\ \cos\theta\cos\theta\ d\theta\tag{2}$$ $$=\int\cos^2\theta\ d\theta$$ $$...$$ $$...$$ $$...$$


From step $(1)$ to $(2)$, I don't understand why we take $\sqrt{f^2(x)} = f(x)$ instead of $\sqrt{f^2(x)} =|f(x)|.$ I've seen many such examples like the above, where we ignore the negative values (mainly in substitutions in integration, differentiation, and inverse trigonometric functions).

  • 3
    You can write $\sqrt{f^2(x)} = f(x)$ only when you know beforehand that $f (x)\geq 0$. – Kavi Rama Murthy May 13 '22 at 07:44
  • Ohh so that means whenever we use the substitution method, we assume that $f(x)$ is positive? @KaviRamaMurthy –  May 13 '22 at 07:46
  • The line tagged (2) in your posting is not implied by the line tagged (1), for the very reason behind the comment of @KaviRamaMurthy. – user2661923 May 13 '22 at 07:47
  • 1
    No, it means that when you use the substitution method, new students are often careless. – user2661923 May 13 '22 at 07:48
  • @user2661923 Is it implied by the substitution "Putting $x = \sin(\theta)$"? –  May 13 '22 at 07:49
  • @Yooo No, it isn't. You are invalidly assuming that when $\theta$ is chosen, that $\cos(\theta) \geq 0.$ – user2661923 May 13 '22 at 07:52
  • @Yooo If instead, you specified that $x = \sin(\theta)$ and $\cos(\theta) \geq 0$, or you had a specific range of integration, then that would be potentially different. But as the posting stands, the assumption is not valid. – user2661923 May 13 '22 at 07:54
  • 1
    I think the following link https://en.m.wikipedia.org/wiki/Trigonometric_substitution it's useful, see the examples @Yooo – A. P. May 13 '22 at 08:02
  • 1
    @Yooo There are a variety of valid ways of handling it. That is one way. Another is to specify that $\theta$ is restricted to a specific range (i.e. $0 \leq \theta \leq \pi/2$ or $-\pi/2 \leq \theta < \pi/2$). An alternative way of handling it is to make no specification as to the sign of $\cos(\theta)$, and instead, deduce that $~\displaystyle \sqrt{\cos^2(\theta)} = |\cos(\theta)|.$ – user2661923 May 13 '22 at 08:02
  • 1
    @Yooo Another valid alternative, is to define something called the sign function for non-zero real numbers $x$, where $~\displaystyle \text{sign}(x) = \frac{|x|}{x},~$ which will compute to either $+1$ or $-1$. Then, for $\cos(\theta) \neq 0$, you could infer that $~\displaystyle \sqrt{\cos^2(\theta)} = \cos(\theta) \times \text{sign}[\cos(\theta)].$ – user2661923 May 13 '22 at 08:07

1 Answers1

2

$$\int\sqrt{1 - x^2}\,\mathrm dx.$$ Putting $x = \sin(\theta):$ \begin{align}&\implies\int\sqrt{\cos^2\theta}\ \cos\theta\,\mathrm d\theta\tag{1}\\ &\implies\int\ \cos\theta\cos\theta\,\mathrm d\theta\tag{2}\\ &\implies\int\cos^2\theta\,\mathrm d\theta\end{align} why we take $\sqrt{f^2(x)} = f(x)$ instead of $\sqrt{f^2(x)} =|f(x)|.$

  1. The above is an implicit substitution of the form $x=h(\theta),$ which requires $h$ to be invertible.

    The author has tacitly restricted $\sin\theta$ to its principal domain so that $h$ has domain $$\left[-\frac\pi2,\frac\pi2\right].$$

    Thus, $\cos\theta\ge0;$ so, $\sqrt{\cos^2\theta}=|\cos\theta|$ simply equals $\cos\theta.$

  2. A nitpick: the implication symbol $\implies$ connects statements like $x^2+3x=7,$ and is not interchangeable with the symbol $=,$ which connects expressions like $x^2+3x.$

  3. As a contrast, this solution opts for the alternative substitution $\displaystyle x=\sin\alpha\quad\left(\alpha\in\left[\frac\pi2,\frac{3\pi}2\right]\right):$ \begin{align}&\int\sqrt{1 - x^2}\, \mathrm dx\\ \\={}&\int\sqrt{\cos^2\alpha}\ \cos\alpha\, \mathrm d\alpha\\ \\= {}&\int\ (-\cos\alpha)\cos\alpha\, \mathrm d\alpha\\ \\= {}&\int(-\cos^2\alpha)\, \mathrm d\alpha.\end{align} It nonetheless gives the same answer (the negative sign appears as this substitution function is decreasing, which flips the integration limits relative to the previous substitution): \begin{align}&\int_{-1}^{1}\sqrt{1 - x^2}\, \mathrm dx \\= {}&\int_{\color{red}{3\pi/2}}^{\color{red}{\pi/2}}(\color{red}-\cos^2\ \color{red}{ \alpha})\, \mathrm d \color{red}{\alpha} \\= {}&\int_{\pi/2}^{3\pi/2}\cos^2\alpha\, \mathrm d\alpha \\= {}&\int_{\pi/2}^{3\pi/2}\cos^2\theta\, \mathrm d\theta.\end{align}

enter image description here

ryang
  • 38,879
  • 14
  • 81
  • 179
  • Thanks for helping me with my silly question, Sir! :-) –  Jun 15 '22 at 17:17
  • 2
    It's not a silly question! – ryang Jun 15 '22 at 17:18
  • Btw what's the problem with this? It's not a substitution. And my book always assumes $\sqrt{f^2(x)} = f(x)$. –  Jun 15 '22 at 17:20
  • 2
    In the future, do avoid making question edits that render answers less meaningful. I nitpicked about the implication symbol because I noticed the same in one of your previous posts. Let me take a look... – ryang Jun 15 '22 at 17:24
  • 1
    There isn't a problem there: I agree with your analysis (except for the careless suggestion that the function is differentiable at $0)$ and with the accepted answer. – ryang Jun 15 '22 at 17:31
  • 1
    Ohh... Thanks for checking! Actually, I don't have any good teacher who could teach me these tiny mistakes. They simply say "It's a typo" and I unwillingly have to accept that without understanding. –  Jun 15 '22 at 17:37
  • 1
    Anyhow, when dealing with nonnegative functions, it isn't wrong to assert that $\sqrt{f^2(x)} \equiv f(x).$ – ryang Jun 15 '22 at 17:37