# How to integrate $\int \sqrt{x^2+a^2}dx$

$a$ is a parameter. I have no idea where to start

• Do you know a trigonometric function that you might multiply by $a$ and substitute for $x$? The idea is to get a square under the square root. May 15, 2013 at 18:10
• May 15, 2013 at 18:12

I will give you a proof of how they can get the formula above. As a heads up, it is quite difficult and long, so most people use the formula usually written in the back of the text, but I was able to prove it so here goes.

The idea is to, of course, do trig-substitution. Since $$\sqrt{a^2+x^2}$$ suggests that $$x=a\tan(\theta)$$ would be a good one because the expression simplifies to $$a\sec(\theta)$$

We can also observe that $$dx$$ will become $$\sec^2(\theta)d\theta$$. Therefore$$\int \sqrt{a^2+x^2}dx = a^2\int \sec^3(\theta)d\theta$$

Now there are two big things that we are going to do. One is to do integration by parts to simplify this expression so that it looks a little better, and later we need to be able to integrate $$\int \sec(\theta)d\theta$$.

So the first step is this. It is well known and natural to let $$u=\sec(\theta)$$ and $$dv=\sec^2(\theta)d\theta$$ because the latter integrates to simply, $$\tan(\theta)$$.

Letting $$A = \int \sec^3(\theta)d\theta$$,you will get the following $$A = \sec(\theta)\tan(\theta) - \int{\sec(\theta)\tan^2(\theta)d\theta}$$

$$=\sec(\theta)\tan(\theta) - \int{\sec(\theta)d\theta - \int\sec^3(\theta)d\theta}$$

therefore,$$2A = \sec(\theta)\tan(\theta)-\int \sec(\theta)d\theta$$

Dividing both sides give you $$A = 1/2[\sec(\theta)\tan(\theta)-\int \sec(\theta)d\theta]$$

I hope you see now why all we need to be able to do is to integrate $$\sec(\theta)$$.

The chance that you know how is rather high because you are solving this particular problem, but let's just go through it for the hell of it.

This is a very common trick in integration using trig, but remember the fact that $$\sec^2(\theta)$$ and $$\sec(\theta)\tan(\theta)$$ are derivatives of $$\tan(\theta)$$ and $$\sec(\theta)$$, respectively. So this is what we do.

$$\int \sec(\theta)d\theta = \int {{\sec(\theta)(\sec(\theta)+\tan(\theta))} \over {\sec(\theta)+\tan(\theta)}} d\theta$$

Letting $$w = \sec(\theta)+\tan(\theta)$$,

$$= \int {dw \over w} = \ln|w|$$

So, long story short,

$$\int \sqrt{a^2+x^2}dx = a^2/2[\sec(\theta)\tan(\theta) - \ln|\sec(\theta)+\tan(\theta)|]$$

$$= \dfrac{1}{2} \left({x\sqrt{a^2+x^2}} + {{a^2\ln \left|{x+\sqrt{a^2+x^2} \over a}\right|}}\right) + C$$

• We can also observe that $d\theta$ will become $\sec^2(\theta)d\theta$. <--- This should be $\mathrm{d}x$ becoming $a \sec^2 \theta \mathrm{d}\theta$ May 15, 2013 at 20:25

Since $\sinh^2(x)+1 =\cosh^2(x)$, this suggests letting $x = a \sinh(y)$.

$dx = a \cosh(y)$ and $x^2+a^2 = a^2(\sinh^2(y)+1) = a^2 \cosh^2(y)$, so $a \cosh(y) = \sqrt{x^2+a^2}$.

\begin{align} \int{\sqrt{x^2+a^2}}dx &=\int a^2 \cosh^2(y) dy\\ &= a^2 \int (e^{2y}+2+e^{-2y})\,dy/4\\ &= (a^2/4) (e^{2y}/2 + 2y - e^{-2y}/2)\\ &=(a^2/4)(\sinh(2y)+2y)\\ &=(a^2/4)(2\sinh(y)\cosh(y)+2y)\\ &=(a^2/2)((x/a) (1/a)\sqrt{x^2+a^2}+\sinh^{-1}(x/a))\\ &=(x \sqrt{x^2+a^2})/2+(a^2/2)\sinh^{-1}(x/a) \end{align}

I'll leave it at this - you can find $\sinh^{-1}$.

Integrating by parts

$$I=\int \sqrt{x^2+a^2}\cdot1dx$$

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

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

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

Put $x=a\tan \theta$ in

$$\int\frac{dx}{\sqrt{x^2+a^2}}$$

Substitue $x=a \sinh t$, so $t=\text{arcsinh} \frac{x}{a}$ $dx=a\cosh t dt$ and $x^2+a^2=a^2(1+\sinh^2t)$. Your integral becomes $$\int|a|\cosh t a\cosh t dt=a|a|\int \cosh^2tdt.$$

Use the identity $\cosh^2t=\frac{1}{2}(1+\cosh2t)$ to get $$\frac{a|a|}{2} \int(1+\cosh2t)dt=\frac{a|a|}{2} \left(t+\frac{\sinh 2t}{2} \right)+C$$

If we go back to $x$, we get: $$\frac{a|a|}{2} \left(\text{arcsinh }\frac{x}{a}+\frac{\sinh2 \text{arcsinh } \frac{x}{a} }{2} \right) .$$

This can be further simplified using the identities $\sinh 2t=2\sinh t \cosh t$ and $\cosh \text{arcsinh t}=\sqrt{1+t^2}$

Another standard method: Applying the Euler substitution $$\sqrt{x^2 + a^2} = -x + t$$ transforms the integral to $$\frac{1}{8} \int \frac{(t^2 + a^2)^2 \,dt}{t^3},$$ and the substitution $$t^2 = u, 2 t \,dt = du$$ transforms the integral to $$\frac{1}{8} \int \frac{(u + a^2)^2 \,du}{u^2} = \frac{1}{8} \int \left(1 + \frac{2 a}{u} + \frac{a^2}{u^2}\right) \,du = \frac{u}{8} + \frac{a^2}{4} \log u - \frac{a^4}{8 u} + C.$$ Now, back-substitute $$u = t^2 = (\sqrt{x^2 + a^2} - a)^2$$.