Integrating $\sqrt{x^2+a^2}$ I'm trying to integrate this function wrt $x$, substituting $x = a \tan \theta$
$$ \int \sqrt{x^2+a^2} dx = a^2 \int \frac {d\theta}{\cos^3\theta} = $$
$$= a^2 \cdot \frac 12 \left( \tan\theta \sec\theta + \ln\lvert \tan\theta + \sec\theta \rvert  \right) = \frac 12 \left( x \sqrt{a^2 + x^2} + a^2 \ln \left| \frac x a + \frac{\sqrt{a^2+x^2}}{a} \right| \right)$$
But WolframAlpha says it should be 
$$= \frac 12 \left( x \sqrt{a^2 + x^2} + a^2 \ln \left| x + \sqrt{a^2+x^2} \right| \right)$$
What am I doing wrong?

$$\frac 12 \left( x \sqrt{a^2 + x^2} + a^2 \ln \left| \frac x a + \frac{\sqrt{a^2+x^2}}{a} \right| \right)\\=\frac 12 \left( x \sqrt{a^2 + x^2} + a^2 \ln \left| x + \sqrt{a^2+x^2} \right| \right)-\frac{a^2\ln|a|}{2} $$
and
$$\frac 12 \left( x \sqrt{a^2 + x^2} + a^2 \ln \left| x + \sqrt{a^2+x^2} \right| \right)$$
are different by a constant, so nothing is wrong!
