Trigonometric Substitution Absolute value issue Evaluate $ \, \displaystyle \int _{0}^{4} \frac{1}{(2x+8)\, \sqrt{x(x+8)}}\, dx. $
$My\ work:-$
by completing the square and substitution i.e. $\displaystyle \left(\begin{array}{rl}x+4 & = 4\sec (\theta )\\ dx & = 4\sec \theta \tan \theta \,  d\theta \end{array}\right) \qquad$  $\Rightarrow \displaystyle \int \frac{4\sec \theta \tan \theta \,  d\theta }{2(4\sec (\theta ))( |4\tan (\theta )|) }$   $\Rightarrow \displaystyle \frac{1}{8} \int \frac{\tan \theta \,  d\theta }{|\tan (\theta )|}$   now because my limits are positive so $sec\ \theta \geq 0\ $ and $sec\ \theta\ $ is positive in $\ Ist\ $ and $\ IVth\ $ Quadrant.  At this stage i have 2 options either i consider $\ Ist\ $ Quadrant and take postive $|tan\ \theta|\ =\ tan\ \theta\ $ or i consider $\ IVth\ $ Quadrant where $\ |tan\ \theta|\ = -tan\ \theta$   So when in 1st quadrant i.e. $\ |tan\ \theta|\ = tan\ \theta ,$ $\ 0\ \geq\ \theta\ \geq\ \pi/2\ $ i get
$\Rightarrow \displaystyle \frac{1}{8} \theta +C$  $\Rightarrow \displaystyle \frac{1}{8} \mathrm{arcsec}\left(\frac{x+4}{4}\right)+C$  $\Rightarrow \displaystyle \left. \frac{1}{8} \mathrm{arcsec}\left(\frac{x+4}{4}\right)\, \right|_{x=0}^{x=4}$  $\Rightarrow \displaystyle  \frac{1}{8} \left(\mathrm{arcsec}(2)-\mathrm{arcsec}(1)\right)$
 Now if i consider 4th quadrant i.e. $\ |tan\ \theta|\ = -tan\ \theta ,$ $\ 3 \pi /2 \ \geq\ \theta\ \geq\ 2\pi\ $ i get $\Rightarrow \displaystyle -\frac{1}{8} \theta +C$  $\Rightarrow \displaystyle -\frac{1}{8} \mathrm{arcsec}\left(\frac{x+4}{4}\right)+C$  $\Rightarrow \displaystyle \left. -\frac{1}{8} \mathrm{arcsec}\left(\frac{x+4}{4}\right)\, \right|_{x=0}^{x=4}$  $\Rightarrow \displaystyle  -\frac{1}{8} \left(\mathrm{arcsec}(2)-\mathrm{arcsec}(1)\right)$  So i am getting positive value in 1st case whereas in 4th quadrant my answer is Negative. Why is so ? am i making some mistake when considering 4th quadrant ? or both are acceptable answer ?  also in MIT lecture they said whatever acceptable  quadrant you choose you'll get the same answer. so why i m getting Negative answer ?
 A: If $\theta$ lies in 4th quadrant, you need to consider the values of $\text{arcsec}$  in fourth quadrant(as the inverse trig functions are multivalued).
$\text{arcsec }(2) = \theta_1 \Rightarrow \theta_1 = \dfrac{5\pi}3$
$\text{arcsec} (1) = \theta_2 \Rightarrow \theta_2 = 2\pi$
So, $-\dfrac{1}{8}(\theta_1-\theta_2) = -\dfrac{1}{8}\left(\dfrac{-\pi}{3}\right) = \dfrac{\pi}{24}$
This is same as the result from 1st quadrant. $\dfrac18(\text{arcsec }(2)-\text{arcsec }(1)) = \dfrac18\left(\dfrac\pi3-0\right) = \dfrac{\pi}{24}$
A: HINT
I propose another way to tackle this integral so that you can compare both methods.
Notice that $x(x+8) = x^{2} + 8x = (x + 4)^{2} - 16$.
Hence, if we make the substitution $4\cosh(z) = x + 4$, we arrive at
\begin{align*}
\int\frac{\mathrm{d}x}{(2x+8)\sqrt{x(x+8)}} & = \int\frac{4\sinh(z)}{8\cosh(z)\sqrt{16\cosh^{2}(z) - 16}}\mathrm{d}z\\\\
& = \frac{1}{8}\int\frac{\mathrm{d}z}{\cosh(z)}\\\\
& = \frac{1}{8}\int\frac{\cosh(z)}{\cosh^{2}(z)}\mathrm{d}z\\\\
& = \frac{1}{8}\int\frac{\cosh(z)}{\sinh^{2}(z) + 1}\mathrm{d}z
\end{align*}
where the absolute value was omitted because the function $\sinh(z)$ is positive whenever $z\geq 0$.
In the last expression, we can make the change of variable $w = \sinh(z)$, whence it results that
\begin{align*}
\int\frac{\mathrm{d}x}{(2x+8)\sqrt{x(x+8)}} = \frac{\arctan(w)}{8} + c
\end{align*}
Now it remains to apply the integration limits.
Can you take it from here?
