# Dealing with absolute values after trigonometric substitution in $\int \frac{\sqrt{1+x^2}}{x} \text{ d}x$.

I was doing this integral and wondered if the signum function would be a viable method for approaching such an integral. I can't seem to find any other way to help integrate the $|\sec \theta|$ term in the numerator of the integrand.

\begin{aligned} \int \dfrac{\sqrt{x^2 + 1}}{x} \text{ d}x \ \ & \overset{x=\tan \theta}= \int \dfrac{\sqrt{\sec^2 \theta} \sec^2 \theta}{\tan \theta} \text{ d}\theta \\ & \ \ = \int \dfrac{|\sec \theta| \sec^2 \theta}{\tan \theta} \text{ d}\theta \\ & \ \ = \int \dfrac{\text{sgn} (\sec \theta) \sec^3 \theta}{\tan \theta} \text{ d}\theta \\ & \ \ = \text{sgn} (\sqrt{1+x^2}) \left( - \log \left| \dfrac{\sqrt{1+x^2} + 1}{x} \right| + \sqrt{1+x^2} \right) + \mathcal{C} \end{aligned}

It's clear that $\text{sgn} (\sqrt{1+x^2}) = 1$ since the sign of the argument of that function is always positive and the signum function extracts the sign. So I'd leave the integral as: \begin{aligned} \int \dfrac{\sqrt{x^2 + 1}}{x} \text{ d}x = \log \left| x \right| - \log \left( \sqrt{1+x^2} + 1 \right) + \sqrt{1+x^2} + \mathcal{C} \end{aligned}

Would that be ok?

Also, apparently Wolfram has suggested that my final result should have $x$ as opposed to $|x|$ in the argument of the first logarithm. Why is that?

Any help would be greatly appreciated!

• The actual substitution you're using is $\theta=\arctan x$, so $-\frac{\pi}{2}<\theta<\frac{\pi}{2}$ and therefore $\sec\theta\ge0$. – user84413 Aug 9 '14 at 23:33
• Note: $\sin(\tan^{-1}(x)) = \frac{x}{\sqrt{1+x^2}}$ – Jonathan H Aug 9 '14 at 23:34
• wolfram gives $\log x$ instead of $\log |x|$, don't know if you're wrong – RE60K Aug 9 '14 at 23:48
• I edited the title. "Need help" is redundant; it's clear that you need help because you are posting a question. Also, displayed math in titles breaks layout of question lists. – user147263 Aug 12 '14 at 13:24

$x = \sinh u$
$$S = \int \frac{\sqrt{1+x^2}}{x}\mathbb{d}x = \int \frac{\cosh^2 u}{\sinh u }\mathbb{d}u = \int \Big\{\mathbb{csch}\ u +\sinh u \Big\}\mathbb{d}u \\ =-\ln\Big(\mathbb{csch}\ u +\mathbb{coth}\ u\Big)+\cosh u + C\\$$
$$\cosh \sinh^{-1} x = \frac{1}{2}\bigg\{x+\sqrt{x^2+1} + \frac{1}{x+\sqrt{x^2+1}}\bigg\} = \sqrt{1+x^2}$$
$$S= \ln x +\sqrt{1+x^2} -\ln\Big(1+\sqrt{x^2+1}\Big)+C$$
Clearly it's simply a convenience to have $|x|$.