<s>[INST] Integrating $\int \frac {dx}{\sqrt{4x^{2}+1}}$ $\int \dfrac {dx}{\sqrt{4x^{2}+1}}$
I've been up to this one for quite a while already, and have tried several ways to integrate it, using substituion, with trigonometric as well as hyperbolic functions. I know(I think) I'm supposed to obtain:
$\dfrac {1}{2}\ln \left| 2\sqrt {x^2 +\dfrac {1}{4}}+2x\right|+c$
However, whatever idea I come up with to try to solve it, it seems I always obtain: 
$\dfrac {1}{2}\ln \left| x + \sqrt {x^2 + 1} \right| + c$
Thanks for reading, and hopefully answering too.
Cheers
Yann
 [/INST] Let $x = \frac{1}{2} \tan\theta$ so that $dx=\frac{1}{2}\sec^2\theta d\theta$. Then
$\begin{align*}
\int\frac{dx}{\sqrt{4x^2+1}} &= \frac{1}{2} \int \frac{\sec^2 \theta}{\sec\theta} d\theta \\
&= \frac{1}{2} \int\sec\theta d\theta \\
&= \frac{1}{2} \log|\sec\theta + \tan\theta| + C
\end{align*}$
for some real constant $C$. Note that we assumed $\tan\theta = 2x$, so $\sec\theta = \sqrt{4x^2 - 1}$. Hence,
$$\int\frac{dx}{\sqrt{4x^2+1}}= \frac{1}{2}\log|\sqrt{4x^2-1} + 2x| + C.$$
</s>