The question is to find the $\int\frac{1}{x^{2}+4} dx$ 

When I first solved this I thought that the answer was $\frac{1}{2x} ln(x^2 +4)$

However I was told that the answer was $\frac{1}{2} tan^{-1}(\frac{x}{2})+c$

I dont understand how they came to this answer. Can somebody explain it to me?