Integrate via substitution: $x^2\sqrt{x^2+1}\;dx$ I need to integrate the following using substitution:
$$
\int x^2\sqrt{x^2+1}\;dx
$$
My textbook has a similar example:
$$
\int \sqrt{x^2+1}\;x^5\;dx
$$
They integrate by splitting $x^5$ into $x^4\cdot x$ and then substituting with $u=x^2+1$:
$$
\int \sqrt{x^2+1}\;x^4\cdot x\;dx\\
=\frac{1}{2}\int \sqrt{u}\;(u-1)^2\;du\\
=\frac{1}{2}\int u^{\frac{1}{2}}(u^2-2u+1)\;du\\
=\frac{1}{2}\int u^{\frac{5}{2}}-2u^{\frac{3}{2}}+u^{\frac{1}{2}}\;du\\
=\frac{1}{7}u^{\frac{7}{2}}-\frac{2}{5}u^{\frac{5}{2}}+\frac{1}{3}u^{\frac{3}{2}}+C
$$
So far so good. But when I try this method on the given integral, I get the following:
$$
\int x^2\sqrt{x^2+1}\;dx\\
=\frac{1}{2}\int \sqrt{x^2+1}\;x\cdot x\;dx\\
=\frac{1}{2}\int \sqrt{u}\;\sqrt{u-1}\;du\;(u=x^2+1)\\
=\frac{1}{2}\int u^{\frac{1}{2}}(u-1)^\frac{1}{2}\;du
$$
Here is where it falls down. I can't expand the $(u-1)^\frac{1}{2}$ factor like the $(u-1)^2$ factor above was, because it results in an infinite series. I couldn't prove, but I think any even exponent for the $x$ factor outside the square root will cause an infinite series to result. Odd exponents for $x$ will work, since it will cause the $(u-1)$ term to have a positive integer exponent.
How should I proceed? I don't necessarily want an answer. I just want to know if I'm missing something obvious or if it is indeed above first year calculus level and probably a typo on the question.
 A: One way to proceed is:
\begin{align}
\int x^2 \sqrt{x^2+1} \, dx
&= \frac{1}{2} \int \sqrt{u} \sqrt{u-1} \, du  \qquad (u = x^2 + 1) \\
&= - \frac{1}{16} \int \frac{y^8 - 2 y^4 + 1}{y^5} \, dy \qquad (y = \sqrt{u} - \sqrt{u-1}) \\
&= - \frac{y^4}{64} + \frac{1}{64 y^4} + \frac{\log(y)}{8} + C.
\end{align}
Here, to change the integration variable from $u$ to $y$, one needs
\begin{equation}
  \frac{dy}{du} = \frac{1}{2} \left( \frac{1}{\sqrt{u}} - \frac{1}{\sqrt{u-1}} \right) = - \frac{y}{2 \sqrt{u} \sqrt{u-1}},
\end{equation}
and also the expression of $u$ in terms of $y$, which can be obtained by squaring the both sides of $\sqrt{u-1} = \sqrt{u}-y$ and then solving it for $\sqrt{u}$:
\begin{equation}
  u = \frac{(y^2+1)^2}{4y^2}.
\end{equation}
So, after the variable transformation from $u$ to $y$, one gets a factor $u(u-1)$, which is rewritten as
\begin{equation}
  u(u-1) = \frac{(y^2+1)^2(y^2-1)^2}{16 y^4}.
\end{equation}
Now, after performing the integration, one needs the following substitutions
\begin{equation}
  y = \sqrt{x^2 + 1} - x , \qquad
  y^4 - \frac{1}{y^4} = - 8 x (2 x^2 + 1) \sqrt{x^2 + 1},
\end{equation}
to get the final result in $x$:
\begin{equation}
\int x^2 \sqrt{x^2+1} \, dx
= \frac{1}{8} \left[
x (2x^2+1) \sqrt{x^2+1} + \log(\sqrt{x^2+1} - 1)
\right] + C.
\end{equation}
Note that one can rewrite the log term as:
\begin{equation}
  \log(\sqrt{x^2+1}-x) = - \log(\sqrt{x^2+1}+x) = - \sinh^{-1}(x).
\end{equation}
A: Proceeding with your method
$\begin{align} \int x^2\sqrt{x^2+1}\;dx &=\int \sqrt{x^2+1}\;x\cdot x\;dx\\
&=\frac1{2}\int \sqrt{u}\;\sqrt{u-1}\;du\;\left( \text{ let $\begin{align} u&=x^2+1 \\  du&=2xdx\end{align}$}\right)\\
&=\frac1{2}\int \sqrt{u^2-u} \;du\\
&=\frac1{2} \int \sqrt{\left(u-\frac1{2}\right)^2-\left(\frac1{2}\right)^2} \;du \;\text{  (completing the square)} \\
&=\frac1{2}\left({\left(u-\frac1{2}\right)\over 2}{\sqrt{u^2-u}}-{\left(\frac1{2}\right)^2 \over 2}{ \ln \left|\left(u-\frac1{2}\right) +\sqrt{u^2-u}\right|} +C\right)\\
&\text{ (using $\int \sqrt{x^2-a^2} dx={x\over 2}{\sqrt{x^2-a^2}}-{a^2 \over 2}{ \ln |x+\sqrt{x^2-a^2}|} +C)$}\\
&={(2u-1)\over 8}{\sqrt{u^2-u}}-{\frac{ \ln |(2u-1) +2 \sqrt{u^2-u}|}{16}} +C'\\
&\text{ substituting $\left(\begin{align} u&=x^2+1 \\ 2u-1 &=2x^2 + 1 \\ \sqrt{u^2-u}&=\sqrt{(x^2 +1)^2-(x^2+1)}=\sqrt{x^4+x^2}\end{align}\right)$}
\\
&=\frac{{(2x^2 + 1)}{\sqrt{x^4+x^2}}}{8}-{\frac{ \ln |(2x^2+1) +2 \sqrt{x^4+x^2}|}{16}} +C'\\
&=\frac{{(2x^3 + x)}{\sqrt{x^2+1}}}{8}-{\frac{ \ln |(x^2+(x^2+1) +2x \sqrt{x^2+1}|}{16}} +C'\\
&=\frac{{(2x^3 + x)}{\sqrt{x^2+1}}}{8}-{\frac{ \ln |(x+\sqrt{x^2+1})^2|}{16}} +C'\\
&=\frac{{(2x^3 + x)}{\sqrt{x^2+1}}-\ln |x+\sqrt{x^2+1}|}{8} +C'
\end{align}$
A: As suggested in the comments we can use the substitution $x=\mbox{sinh}(u)$ and some other well known trig identities:
$1)$ $dx=(\mbox{sinh}(u))'du=\mbox{cosh}(u)du$
$2)$ $\mbox{cosh}^{2}(u)-\mbox{sinh}^{2}(u)=1$
$3)$ $\mbox{cosh}(u)=\frac{e^{u}+e^{-u}}{2}$
$4)$ $\mbox{arcsinh}(u)=\mbox{log}(u+\sqrt{1+u^{2}})$
$5)$ $\int \mbox{sinh}^{n}(u)du=\frac{\mbox{cosh}(u)\mbox{sinh}^{n-1}(u)}{n}-\frac{n-1}{n}\int \mbox{sinh}^{n-2}(u)du$
You can prove the last identity using integration by parts. So your integral becomes:
$\begin{align} \int x^{2}\sqrt{x^{2}+1}\;dx &=\int\mbox{sinh}^2(u)\sqrt{\mbox{sinh}^2(u)+1}\:\mbox{cosh}(u)\;du\\
&=\int \mbox{sinh}^{2}(u)\mbox{cosh}^{2}(u)\;du\\
&=\int \mbox{sinh}^{2}(u)(1+\mbox{sinh}^{2}(u))\;du\\
&=\int \mbox{sinh}^{2}(u)\;du\:+\:\int \mbox{sinh}^{4}(u)\;du\\
&=\int \mbox{sinh}^{2}(u)\;du\:+\:\begin{bmatrix}\frac{\mbox{cosh}(u)\mbox{sinh}^{3}(u)}{4}\;-\;\frac{3}{4}\int \mbox{sinh}^{2}(u)\;du\end{bmatrix}\\
&=\frac{1}{4}\int \mbox{sinh}^{2}(u)\;du\:+\:\frac{\mbox{cosh}(u)\mbox{sinh}^{3}(u)}{4}\\
&=\frac{1}{4}\begin{bmatrix} \frac{\mbox{cosh}(u)\mbox{sinh}(u)}{2}-\frac{1}{2} \int du \end{bmatrix}\:+\:\frac{\mbox{cosh}(u)\mbox{sinh}^{3}(u)}{4}\\
&=\bigstar
\end{align}$
Let's compute something useful: $u=\mbox{arcsinh}(x)=\mbox{log}(x+\sqrt{1+x^{2}})$.
So we have that:
$\mbox{sinh}(u)=\mbox{sinh}(\mbox{arcsinh}(x))=x$
$\begin{align} \mbox{cosh}(u)
&=\mbox{cosh}(\mbox{arcsinh}(x))\\
&=\frac{x+\sqrt{1+x^{2}}+\frac{1}{x+\sqrt{1+x^{2}}}}{2}\\
&=\frac{x^{2}+x\sqrt{1+x^{2}}+1}{x+\sqrt{1+x^{2}}}\\
&=\frac{x^{2}+x\sqrt{1+x^{2}}+1}{x+\sqrt{1+x^{2}}} \cdot \frac{\sqrt{1+x^{2}}-x}{\sqrt{1+x^{2}}-x}\\
&=...=\sqrt{1+x^{2}}
\end{align}$
So the integral becomes:
$\begin{align} \bigstar
&=\frac{\mbox{cosh}(u)\mbox{sinh}(u)-\mbox{arcsinh}(u)}{8}\:+\:\frac{\mbox{cosh}(u)\mbox{sinh}^{3}(u)}{4}+C\\
&=\frac{x\sqrt{1+x^{2}}\:-\:\mbox{log}(x+\sqrt{1+x^{2}})}{8}\:+\:\frac{x^{3}\sqrt{1+x^{2}}}{4}+C\\
&=\frac{(2x^{3}+x)\sqrt{1+x^{2}}\:-\:\mbox{log}(x+\sqrt{1+x^{2}})}{8}+C
\end{align}$
A: I have used the trigonometric substitution $x=tan\theta$ and proceeded to get the same answer as @Aman Kushwaha got via completing the square and @user773458 got via hyperbolic trig identies. Below is my steps for reference:
$$
\int (x^2-\sqrt{x^2 +1})dx \\
=\int tan^2\theta \sqrt{tan^2 \theta + 1}sec^2 \theta \;d\theta \\
=\int tan^2 \theta \sqrt{sec^2 \theta}sec^2 \theta \;d\theta \\
=\int tan^2 \theta sec^3 \theta \;d\theta \\
=\int sec^3 \theta(sec^2 \theta - 1) \; d\theta \\
=\int sec^5 \theta - sec^3 \theta \; d\theta \\
=\int sec^5 \theta \; d\theta - \int sec^3 \theta \; d\theta \\
=sec^3 \theta \; tan \theta \; - \; 3 \int sec^3 \theta \; tan^2 \theta \; d\theta - \Big(sec \theta \; tan \theta \; - \; \int sec \theta \; tan^2 \theta \; d\theta\Big) \\
\therefore 4 \int sec^3 \theta \; tan^2 \theta \; d\theta = sec^3 \theta \; tan \theta \; - \Big(sec \theta \; tan \theta \; - \; \int sec \theta \; tan^2 \theta \; d\theta\Big) \\
\therefore \int sec^3 \theta \; tan^2 \theta \; d\theta = \frac{1}{4} \; \bigg(sec^3 \theta \; tan \theta \; - \Big(sec \theta \; tan \theta \; - \; \int sec \theta(sec^2 \theta - 1)\; d\theta\Big)\bigg) \\
= \frac{1}{4} \; \bigg(sec^3 \theta \; tan \theta \; - \Big(sec \theta \; tan \theta \; - \; \int sec^3 \theta \; d\theta \; - \int sec \theta \; d\theta\Big)\bigg) \\
= \frac{1}{4}\big(sec^3 \theta \; tan \theta \; - \; \frac{1}{2}(\sec \theta \; tan \theta - \ln|sec \theta + tan \theta|)\big) + C\\
=\frac{1}{4}\big(\sqrt{tan^2 \theta + 1}(tan^2 \theta + 1)tan \theta \; - \; \frac{1}{2}(\sqrt{tan^2 \theta + 1}(tan \theta) - \ln | \sqrt{tan^2 \theta + 1} + tan \theta|)\big) + C\\
=\frac{1}{4}\big(\sqrt{x^2 + 1}(x^2 + 1)x \; - \; \frac{1}{2}(\sqrt{x^2 + 1}(x) - \ln | \sqrt{x^2 + 1} + x|)\big) + C\\
=\frac{(2x^3+2x)\sqrt{x^2 +1}-x\sqrt{x^2 + 1} - \ln|\sqrt{x^2 + 1} + x|}{8} + C \\
=\frac{(2x^3 + x)\sqrt{x^2 + 1} - \ln|\sqrt{x^2 + 1} + x|}{8} + C \\
$$
