# Determining $\int \frac{(x-1)\sqrt{x^4+2x^3-x^2+2x+1}}{x^2(x+1)}dx$

$$\int \frac{(x-1)\sqrt{x^4+2x^3-x^2+2x+1}}{x^2(x+1)}dx$$

Attempt:

Simplification of the root factor: $$\sqrt{x^4+2x^3-x^2+2x+1}=\frac{1}{x}\sqrt{\left(x^2+\frac{1}{x^2}\right)+2\left(x+\frac{1}{x}\right)-1}.$$

Arranging the rest of the factors as: $$\frac{x-1}{x^2(x+1)}=\frac{x^2-1}{x^2(x+1)^2}$$

Now I did the following substitution: let $(x+\frac{1}{x})=t$, so $(1-\frac{1}{x^2})dx=dt$

Arranging the integral: $$I=\int \frac{\sqrt{t^2+2t-3}}{t+2}dt.$$

But what to do next?

I tried integration by parts for this but couldn't simplify my result.

• Maybe Euler substitution? en.wikipedia.org/wiki/Euler_substitution Jul 9, 2015 at 7:53
• Maple finds it in terms of EllipticF and EllipticPi. Jul 9, 2015 at 7:57
• put $\frac{x-1}{x+1}=z$..I think it helps.. Jul 9, 2015 at 8:23
• I see where the square root comes from, $\frac{x^2-1}{x^2}dx=-dt$, but how does $x(x+1)^2$ (extra $x$ pulled from the square root) simplify to $-(t+2)$?
– Mike
Jul 9, 2015 at 9:34
• FriCAS answers it as $${{x \ {\log \left( {{{{\sqrt {{{{x} ^ {4}}+{2 \ {{x} ^ {3}}} -{{x} ^ {2}}+{2 \ x}+1}}} -{{x} ^ {2}} -x -1} \over x}} \right)}} -{x \ {\sqrt {3}} \ {\arctan \left( {{{3 \ {\sqrt {{{{x} ^ {4}}+{2 \ {{x} ^ {3}}} -{{x} ^ {2}}+{2 \ x}+1}}}} \over {{\left( {{x} ^ {2}}+{5 \ x}+1 \right)} \ {\sqrt {3}}}}} \right)}}+{\sqrt {{{{x} ^ {4}}+{2 \ {{x} ^ {3}}} -{{x} ^ {2}}+{2 \ x}+1}}}} \over x$$
– gar
Jul 9, 2015 at 9:39

Maybe it's not the most rapid way, but it seems work. We have, taking $u=t+1$ $$\int\frac{\sqrt{t^{2}+2t-3}}{t+2}dt=\int\frac{\sqrt{u^{2}-4}}{u+1}du$$ and taking $u=2\sec\left(v\right)$ we have $$=4\int\frac{\tan^{2}\left(v\right)\sec\left(v\right)}{2\sec\left(v\right)+1}dv=4\int\frac{\tan^{2}\left(v\right)}{\cos\left(v\right)+2}dv$$ using $\tan^{2}\left(v\right)=\sec^{2}\left(v\right)+1$. Now we can take $w=\tan\left(v/2\right)$ and get $$=32\int\frac{w^{2}}{w^{6}+w^{4}-5w^{2}+3}dw=32\int\frac{w^{2}}{\left(w^{2}-1\right)^{2}\left(w^{2}+3\right)}dw$$ and now using a boring partial fractions you can transform the integral in a tractable form.

• Maple answers $$\sqrt { \left( t+2 \right) ^{2}-2\,t-7}-\ln \left( t+1+\sqrt { \left( t+2 \right) ^{2}-2\,t-7} \right) -\sqrt {3}\arctan \left( \frac 1 6 \,{\frac { \left( -10-2\,t \right) \sqrt {3}}{\sqrt { \left( t+2 \right) ^{2}-2\,t-7}}} \right) .$$ Jul 9, 2015 at 8:45
• $$\frac{x^2}{\left(x^2-1\right)^2 \left(x^2+3\right)}=-\frac{3}{16 \left(x^2+3\right)}-\frac{1}{32 (x+1)}+\frac{1}{16 (x+1)^2}+\frac{1}{32 (x-1)}+\frac{1}{16 (x-1)^2}$$ Jul 9, 2015 at 9:14

$\bf{My\; Solution::}$ Given $$\displaystyle \int\frac{(x-1)\cdot \sqrt{x^4+2x^3-x^2+2x+1}}{x^2(x+1)}dx = \int\frac{(x^2-1)\cdot \sqrt{x^4+2x^3-x^2+2x+1}}{x^2(x^2+2x+1)}dx$$

Above we multiply both $\bf{N_{r}}$ and $\bf{D_{r}}$ by $(x+1).$

$$\displaystyle = \int\frac{\left(1-\frac {1}{x^2}\right)\cdot \sqrt{x^2\cdot \left(x^2+2x-1+\frac{2}{x}+\frac{1}{x^2}\right)}}{ \left(x+2+\frac{1}{x}\right)}dx$$

Now Let $\displaystyle \left(x+\frac{1}{x}\right) = t\;,$ Then $\displaystyle \left(1-\frac{1}{x^2}\right)dx = dt$

So Integral $$\displaystyle = \int\frac{\sqrt{t^2+2t-3}}{t+2}dt = \frac{t^2+2t-3}{(t+2)\sqrt{t^2+2t-3}}dt = \int\frac{t(t+2)-3}{(t+2)\sqrt{t^2+2t-3}}dt$$

So Integral $$\displaystyle = \underbrace{\int\frac{t}{\sqrt{t^2+2t-3}}dt}_{I} - \underbrace{\int\frac{3}{(t+2)}\cdot \frac{1}{\sqrt{t^2+2t-3}}dt}_{J}..........\color{\red}\checkmark.$$

So $$\displaystyle I = \int\frac{t}{\sqrt{t^2+2t-3}}dt = \int\frac{(t+1)-1}{\sqrt{(t-1)^2-2^2}} = \int\frac{(t-1)}{\sqrt{(t-1)^2-2^2}}-\int\frac{1}{\sqrt{(t-1)^2-2^2}}dt$$

Now Let $(t-1) = z\;\;,$ Then $dt = dz$

So $$\displaystyle I = \int\frac{z}{\sqrt{z^2-2^2}}dz-\int\frac{1}{\sqrt{z^2-2^2}}dz = \sqrt{z^2-4}-\ln \left|(t+1)+\sqrt{t^2+2t-3}\right|$$

Now $$\displaystyle J = 3\int\frac{1}{(t+2)\sqrt{t^2+2t-3}}dt = 3\int\frac{1}{(t+2)\sqrt{(t+2)^2-2(t+2)+1-4}}$$

Now Let $(t+2) = u\;,$ Then $dt = du$ and Integral $$\displaystyle = 3\int\frac{1}{u\sqrt{u^2-2u+1-4}}=3\int\frac{1}{u\sqrt{(u-1)^2-4}}du$$

Now $\displaystyle (u-1) = 2\sec \theta \;,$ Then $du= 2\sec \theta \cdot \tan \theta.$

Now after that You can Solve It.