Integral $\int\frac{dx}{x\sqrt{x^2+4}}$ While solving this:
$$
\begin{align}
\int\frac{dx}{x\sqrt{x^2+4}}
&=\int\frac{t(-1/t^2)dt}{\sqrt{(1/t)^2+4}}\tag{t=1/x}\\
&=\int\frac{(-1/t)dt}{(1/t)\sqrt{1+4t^2}}\\
&=-\frac12\int\frac{dt}{\sqrt{t^2+1/4}}\\
&=-\frac12\ln(t+\sqrt{t^2+1/4})+C\\
&=-\frac12\ln(1/x+\sqrt{1/x^2+1/4})+C\\
&=-\frac12\ln\left(\frac{2+\sqrt{4+x^2}}{2x}\right)+C\\
&=\color{green}{\frac12(\ln(x)-\ln(2+\sqrt{4+x^2}))}+C\tag{$\ln(2x)=\ln(x)+\ln2$}\\
\end{align}$$
I got this, but answer given in textbook is $\displaystyle\color{blue}{ \ln[(x+1/2)+\sqrt{x^2+x+1}]}+C$
I see no relation  between them, is my answer wrong? Along with answering this question please shed some light on this related issue which can happen with other integrals and etc.

You can see that your answer is correct and that the given answer is wrong because
$$\left(\frac 12\left(\ln (x)-\ln\left(2+\sqrt{4+x^2}\right)\right)\right)'=\frac{1}{x\sqrt{x^2+4}}$$
$$\left(\ln\left[(x+1/2)+\sqrt{x^2+x+1}\right]\right)'=\frac{1}{\sqrt{x^2+x+1}}$$
