I've got an indefinite integral:
$$\int \frac{dx}{x\sqrt {x^2+1}}$$
Using trig substitution this is what I've got
Let $x = \tan{z}$ so $\mathrm dx = \sec^2{z}$
$$\begin{align} \\ \int \frac{1}{\tan{z} \sqrt{\tan^2{z} + 1}}\sec^2{z}\;\mathrm dz &= \int \frac{1}{\tan{z}\sqrt{\sec^2{z}}} \sec^2{z}\;\mathrm dz \\ &= \int \frac{1}{\tan{z}\sec{z}}\sec^2{z} \;\mathrm dz \\ &= \int\frac{1}{\tan{z}}\sec{z} \;\mathrm dz \\ &= \int \frac{\sec{z}}{\tan{z}}\;\mathrm dz \\ &= \int \csc{z} \;\mathrm dz \\ &= -\log{\left(\big|\csc{z} + \cot{z}\,\big|\right)} + C \\ \end{align}$$
So now my questions are:
- Is this correct?
- Should I give it back to the $x$, considering that $z=\arctan{x}$
I'll be glad if someone can help me.