Question about arcsec, trig sub and absolute value of $|x|$.

85 Views Asked by At

$\newcommand{\arcsec}{\operatorname{arcsec}}$I was solving this integral recently when I was comparing my answer to another answer in desmos and mine was slightly off but I fixed it by wrapping part of it in an absolute value and I couldn’t possible figure out where it was supposed to have come from and I am stumped.

Given this integral $\large\int \frac{\sqrt{x^2-4}}{x}\;\Bbb dx$ I preformed the substitution $\large x=2\sec(\theta)$. Giving me this:

$\large \int \frac{\sqrt{2^2\sec^2(\theta)-2^2}}{2\sec(\theta)}\cdot2\sec(\theta)\tan(\theta)\;\Bbb d\theta$ and simplified it to. $\large 2\int\tan^2(\theta)\;\Bbb d\theta$. Then I solved it by using the $\sec$ identity:$$2\left(\int\sec^2(\theta)-\int1\;\Bbb d\theta\right)=2\big(\tan(\theta)-\theta\big)$$

To undo my substitution I use the Pythagorean theorem on my original substitution:$$\large x=2\sec(\theta), \qquad \frac{x}{2}=\sec(\theta)=\frac{\text{hyp.}}{\text{adj.}}, \qquad \tan(\theta)=\frac{\sqrt{x^2-4}}{2}$$ Aswell as solving for $\theta$:$$\frac{x}{2}=\sec(\theta), \qquad \arcsec\left(\frac{x}{2}\right)=\arcsec\big(\sec(\theta)\big), \qquad \arcsec\left(\frac{x}{2}\right)=\theta$$ My final solved integral is:$$\sqrt{x^2-4}-2\arcsec\left(\frac{x}{2}\right)+C$$

When I was comparing it to an the answer I got from integral calculator the answers where similar but differed slightly. Here they are in desmos. Desmos Picture. By adding an absolute value around the $x$ in the arcsec the functions became equal. I’m not sure what is going on or if I made an error along the line but I am very curious to hear what you all have to say.

1

There are 1 best solutions below

0
On BEST ANSWER

The substitution $x=2\sec(\theta)$ will have $0\leq\theta\lt\frac{\pi}{2}$ when $x\gt 0$, and $\frac{\pi}{2}\lt\theta\leq\pi$ when $x\lt 0$. In the former case, you have $\tan(\theta)\geq 0$; in the latter you have $\tan(\theta)\leq 0$.

Your substitution is fine, but your simplification ignores that fact. You have $$\begin{align*} \left(\frac{\sqrt{2^2\sec^2(\theta)-2^2}}{2\sec(\theta)}\right)2\sec(\theta)\tan(\theta) &= \left(2\sqrt{\sec^2\theta-1}\right)\tan(\theta)\\ &=2\left(\sqrt{\tan^2\theta}\right)\tan(\theta)\\ &=\left\{\begin{array}{ll} 2\tan^2\theta&\text{if }0\leq\theta\lt\frac{\pi}{2}\\ -2\tan^2\theta&\text{if }\frac{\pi}{2}\lt\theta\leq \pi \end{array}\right. \end{align*}$$ So you are missing an absolute value sign in the integral. Once that is taken into account, you will find that your answer and the one from the calculator agree, since they have the same derivative wherever they are defined (and hence differ by a constant).