Integral $\sqrt{1+\frac{1}{4x}}$ $$\mathbf\int\sqrt{1+\frac{1}{4x}} \, dx$$
This integral came up while doing an arc length problem and out of curiosity I typed it into my TI 89 and got this output
$$\frac{-\ln(|x|)+2\ln(\sqrt\frac{4x+1}{x}-2)-2x\sqrt\frac{4x+1}{x}}{8}\ $$
How would one get this answer by integrating manually?

Assume $x>0.$ Let $u=\sqrt{x},$ then $u^{2}=x,$ $dx=2udu,$ and $1+\frac{1}{4x%
}=1+\frac{1}{4u^{2}}$
\begin{equation*}
\int \sqrt{1+\frac{1}{4x}}dx=\int \sqrt{1+\frac{1}{4u^{2}}}(2u)du=\int \sqrt{%
(2u)^{2}+1}du.
\end{equation*}
Now, substitution trigonometric, $2u=\tan \theta ,$ $du=\frac{1}{2}\sec
^{2}\theta d\theta ,$ and $\sqrt{(2u)^{2}+1}=\sec \theta ,$ hence
\begin{equation*}
\int \sqrt{(2u)^{2}+1}du=\int (\sec \theta )\frac{1}{2}\sec ^{2}\theta
d\theta =\frac{1}{2}\int \sec ^{3}\theta d\theta .
\end{equation*}
Then, we use the well-known integral
\begin{equation*}
\int \sec ^{3}\theta d\theta =\frac{1}{2}\sec \theta \tan \theta +\frac{1}{2}%
\ln \left\vert \sec \theta +\tan \theta \right\vert +2C
\end{equation*}
it follows that
\begin{eqnarray*}
\int \sqrt{1+\frac{1}{4x}}dx &=&\frac{1}{4}\sec \theta \tan \theta +\frac{1}{%
4}\ln \left\vert \sec \theta +\tan \theta \right\vert +C \\
&=&\frac{1}{4}(\sqrt{(2u)^{2}+1})(2u)+\frac{1}{4}\ln \left\vert \sqrt{%
(2u)^{2}+1}+2u\right\vert +C \\
&=&\frac{1}{2}u\sqrt{1+4u^{2}}+\frac{1}{4}\ln \left\vert \sqrt{(2u)^{2}+1}%
+2u\right\vert +C \\
&=&\frac{1}{2}\sqrt{x}\sqrt{1+4x}+\frac{1}{4}\ln \left\vert \sqrt{1+4x}+2%
\sqrt{x}\right\vert +C.\ \ \ \ \blacksquare 
\end{eqnarray*}
