# Integral of $\int{\sqrt{x^2+a}}dx$

Give integral I = $\int{\sqrt{x^2+a}}dx$

Using the U substitution, solution of integral is as follows.

u = $\sqrt{x^2+a}$
du= $\frac{x}{\sqrt{x^2+a}}$
dv = dx
v = x

I am trying to understand how the give steps below have been simplified

I = $x\times\sqrt{x^2+a}$ -$\int{\frac{x^2}{\sqrt{x^2+a}}}dx$ =

= $x\times\sqrt{x^2+a}$ -$\int{\frac{(x^2+a)-a}{\sqrt{x^2+a}}}dx$=

= $x\times\sqrt{x^2+a}$ - $\int{\sqrt{x^2+a}}dx$ + $a\times\int{\frac{1}{\sqrt{x^2+a}}}dx$=

= $x\times\sqrt{x^2+a}-I$ + $a\times\ln{|x+\sqrt{x^2+a}|}$

I was trying to make sense of following steps but i couldn't, how can we simplify the following part of integral from $\int{\frac{(x^2+a)-a}{\sqrt{x^2+a}}}dx$ to $\int{\sqrt{x^2+a}}dx$ + $a\times\int{\frac{1}{\sqrt{x^2+a}}}dx$

• Let $x=\sqrt a\tan(x)$ and see what happens. Commented Aug 24, 2017 at 13:33
• Welcome to MSE. Please use MathJax. Commented Aug 24, 2017 at 13:35
• @Math-fun And if $a<0$? Commented Aug 24, 2017 at 13:36
• @JoséCarlosSantos I think the OP is using MathJax. Not quite the way you or I would, but they are trying quite hard IMHO. Commented Aug 24, 2017 at 13:37
• @JyrkiLahtonen Thank you, but does the $\tan$ substitution make a problem if $a<0$? (though OP could also use a hyperbolic substition) of course there other ways to tackle the problem ;-) Commented Aug 24, 2017 at 13:45

$$-\int \frac{(x^2+a)-a}{\sqrt{x^2+a}}\;dx = -\int \left(\frac{x^2+a}{\sqrt{x^2+a}} - \frac{a}{\sqrt{x^2+a}}\right)\;dx = -\int \left(\sqrt{x^2+a} - \frac{a}{\sqrt{x^2+a}}\right)\;dx = -\int \sqrt{x^2 + a}\;dx + a\int \frac{1}{\sqrt{x^2+a}}\;dx$$
• I see what i have missed , simply by multiplying the first integral with $\frac{\sqrt{x^2+a}}{\sqrt{x^2+a}}$. i appreciate