[Math] Integral $\int \sqrt{1+x^2}dx$

calculusindefinite-integralsintegration

I was trying to do this integral
$$\int \sqrt{1+x^2}dx$$
I saw this question and its' use of hyperbolic functions. I did it with binomial differential method since the given integral is in a form of $\int x^m(a+bx^n)^p\,dx$ and I spent a lot of time on it so I would like to see if it can be done this way and where did I go wrong.
$$\int(1+x^2)^\frac{1}{2}dx$$
$m=0$, $n=2$, $p=\frac{1}{2}$

Because $\frac{m+1}{n}+p \in \mathbb Z$ I used substitution $x^{-2}+1=t^2$.
From there I got:
$$-\frac{dx}{x^3}=t\,dt$$
$$x=\frac{1}{\sqrt {t^2-1}}$$
$$t=\frac{\sqrt{1+x^2}}{x}$$

I expanded the original with $x^4$:
$$\int \frac{x^4\sqrt{1+x^2}dx}{x^4}=\int \left(\frac{1}{\sqrt{t^2-1}}\right)^4t(-tdt)=\int\frac{-t^2dt}{(t^2-1)^2}$$

Now I used partial integration:
$u=t$,
$du=dt$,
$dv=\frac{-tdt}{(t^2-1)^2}$,
$v=\frac{1}{2(t^2-1)}$

Then
$$\begin{align}
\int\frac{-t^2dt}{(t^2-1)^2}
&=\frac{t}{2(t^2-1)}-\frac{1}{2}\int \frac{dt}{t^2-1}= \\
&=\frac{t}{2(t^2-1)}-\frac{1}{2}\frac{1}{2}\ln\frac{t-1}{t+1}= \\
&=\frac{\frac{\sqrt{1+x^2}}{x}}{2\left(\left(\frac{\sqrt{1+x^2}}{x}\right)^2-1\right)}-\frac{1}{4}\ln\frac{\frac{\sqrt{1+x^2}}{x}-1}{\frac{\sqrt{1+x^2}}{x}+1}= \\
&=\frac{x\sqrt{1+x^2}}{2}-\frac{1}{4}\ln\frac{\sqrt{1+x^2}-x}{\sqrt{1+x^2}+x}=\\
&=\frac{x\sqrt{1+x^2}}{2}-\frac{1}{4}\ln\frac{\sqrt{1+x^2}-x}{\sqrt{1+x^2}+x}\cdot\frac{\sqrt{1+x^2}-x}{\sqrt{1+x^2}-x}=\\
&=\frac{x\sqrt{1+x^2}}{2}-\frac{1}{4}\ln(\sqrt{1+x^2}-x)^2=\\
&=\frac{x\sqrt{1+x^2}}{2}-\frac{1}{2}\ln(\sqrt{1+x^2}-x)+C
\end{align}$$

The solution is
$$\frac{x\sqrt{1+x^2}}{2}+\frac{1}{2}\ln(x+\sqrt{1+x^2})+C$$
My solution looks very similar, so where did I go wrong?

Best Answer

Solutions are same. Observe that $\sqrt{1+x^2}-x=\frac{1+x^2-x^2}{\sqrt{1+x^2}+x}=\frac{1}{\sqrt{1+x^2}+x}$.

Related Question