Integrand size = 36, antiderivative size = 74 \[ \int \frac {\left (1+x+x^2\right ) \left (2 x+x^2\right ) \sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx=\frac {\sqrt {1+2 x+x^2-x^4} \left (-2-4 x+x^2+3 x^3+2 x^4\right )}{6 (1+x)^3}-\arctan \left (\frac {\sqrt {1+2 x+x^2-x^4}}{1+x+x^2}\right ) \]
1/6*(-x^4+x^2+2*x+1)^(1/2)*(2*x^4+3*x^3+x^2-4*x-2)/(1+x)^3-arctan((-x^4+x^ 2+2*x+1)^(1/2)/(x^2+x+1))
Time = 0.75 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00 \[ \int \frac {\left (1+x+x^2\right ) \left (2 x+x^2\right ) \sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx=\frac {\sqrt {1+2 x+x^2-x^4} \left (-2-4 x+x^2+3 x^3+2 x^4\right )}{6 (1+x)^3}-\arctan \left (\frac {\sqrt {1+2 x+x^2-x^4}}{1+x+x^2}\right ) \]
(Sqrt[1 + 2*x + x^2 - x^4]*(-2 - 4*x + x^2 + 3*x^3 + 2*x^4))/(6*(1 + x)^3) - ArcTan[Sqrt[1 + 2*x + x^2 - x^4]/(1 + x + x^2)]
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (x^2+x+1\right ) \left (x^2+2 x\right ) \sqrt {-x^4+x^2+2 x+1}}{(x+1)^4} \, dx\) |
\(\Big \downarrow \) 2027 |
\(\displaystyle \int \frac {x (x+2) \left (x^2+x+1\right ) \sqrt {-x^4+x^2+2 x+1}}{(x+1)^4}dx\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \int \left (\frac {\sqrt {-x^4+x^2+2 x+1}}{-x-1}+\frac {\sqrt {-x^4+x^2+2 x+1}}{(x+1)^3}-\frac {\sqrt {-x^4+x^2+2 x+1}}{(x+1)^4}+\sqrt {-x^4+x^2+2 x+1}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {64 \sqrt {-x^4+x^2+2 x+1} \text {Subst}\left (\int \frac {\sqrt {256 x^4-128 x^2-240}}{(2-4 x)^4}dx,x,\frac {1}{x}+\frac {1}{2}\right )}{\sqrt {\left (\frac {2}{x}+1\right )^4-2 \left (\frac {2}{x}+1\right )^2-15} x^2}+\int \frac {\sqrt {-x^4+x^2+2 x+1}}{-x-1}dx-\int \frac {\sqrt {-x^4+x^2+2 x+1}}{(x+1)^4}dx+\int \frac {\sqrt {-x^4+x^2+2 x+1}}{(x+1)^3}dx\) |
3.10.73.3.1 Defintions of rubi rules used
Int[(Fx_.)*((a_.)*(x_)^(r_.) + (b_.)*(x_)^(s_.))^(p_.), x_Symbol] :> Int[x^ (p*r)*(a + b*x^(s - r))^p*Fx, x] /; FreeQ[{a, b, r, s}, x] && IntegerQ[p] & & PosQ[s - r] && !(EqQ[p, 1] && EqQ[u, 1])
Time = 7.99 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.08
method | result | size |
default | \(\frac {\left (2 x^{5}+3 x^{4}+x^{3}-4 x^{2}-2 x \right ) \sqrt {\frac {-x^{4}+x^{2}+2 x +1}{x^{2}}}+3 \left (1+x \right )^{3} \arctan \left (\frac {x}{\sqrt {\frac {-x^{4}+x^{2}+2 x +1}{x^{2}}}}\right )}{6 \left (1+x \right )^{3}}\) | \(80\) |
pseudoelliptic | \(\frac {\left (2 x^{5}+3 x^{4}+x^{3}-4 x^{2}-2 x \right ) \sqrt {\frac {-x^{4}+x^{2}+2 x +1}{x^{2}}}+3 \left (1+x \right )^{3} \arctan \left (\frac {x}{\sqrt {\frac {-x^{4}+x^{2}+2 x +1}{x^{2}}}}\right )}{6 \left (1+x \right )^{3}}\) | \(80\) |
trager | \(\frac {\sqrt {-x^{4}+x^{2}+2 x +1}\, \left (2 x^{4}+3 x^{3}+x^{2}-4 x -2\right )}{6 \left (1+x \right )^{3}}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \sqrt {-x^{4}+x^{2}+2 x +1}+x^{2}}{1+x}\right )}{2}\) | \(83\) |
risch | \(-\frac {2 x^{8}+3 x^{7}-x^{6}-11 x^{5}-11 x^{4}-x^{3}+9 x^{2}+8 x +2}{6 \left (1+x \right )^{3} \sqrt {-x^{4}+x^{2}+2 x +1}}+\frac {\arctan \left (\frac {x}{\sqrt {\frac {-x^{4}+x^{2}+2 x +1}{x^{2}}}}\right )}{2}\) | \(88\) |
elliptic | \(\text {Expression too large to display}\) | \(1431\) |
1/6*((2*x^5+3*x^4+x^3-4*x^2-2*x)*((-x^4+x^2+2*x+1)/x^2)^(1/2)+3*(1+x)^3*ar ctan(1/((-x^4+x^2+2*x+1)/x^2)^(1/2)*x))/(1+x)^3
Time = 0.28 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.39 \[ \int \frac {\left (1+x+x^2\right ) \left (2 x+x^2\right ) \sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx=-\frac {3 \, {\left (x^{3} + 3 \, x^{2} + 3 \, x + 1\right )} \arctan \left (\frac {\sqrt {-x^{4} + x^{2} + 2 \, x + 1} x^{2}}{x^{4} - x^{2} - 2 \, x - 1}\right ) - {\left (2 \, x^{4} + 3 \, x^{3} + x^{2} - 4 \, x - 2\right )} \sqrt {-x^{4} + x^{2} + 2 \, x + 1}}{6 \, {\left (x^{3} + 3 \, x^{2} + 3 \, x + 1\right )}} \]
-1/6*(3*(x^3 + 3*x^2 + 3*x + 1)*arctan(sqrt(-x^4 + x^2 + 2*x + 1)*x^2/(x^4 - x^2 - 2*x - 1)) - (2*x^4 + 3*x^3 + x^2 - 4*x - 2)*sqrt(-x^4 + x^2 + 2*x + 1))/(x^3 + 3*x^2 + 3*x + 1)
\[ \int \frac {\left (1+x+x^2\right ) \left (2 x+x^2\right ) \sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx=\int \frac {x \sqrt {- \left (x^{2} - x - 1\right ) \left (x^{2} + x + 1\right )} \left (x + 2\right ) \left (x^{2} + x + 1\right )}{\left (x + 1\right )^{4}}\, dx \]
\[ \int \frac {\left (1+x+x^2\right ) \left (2 x+x^2\right ) \sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx=\int { \frac {\sqrt {-x^{4} + x^{2} + 2 \, x + 1} {\left (x^{2} + 2 \, x\right )} {\left (x^{2} + x + 1\right )}}{{\left (x + 1\right )}^{4}} \,d x } \]
\[ \int \frac {\left (1+x+x^2\right ) \left (2 x+x^2\right ) \sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx=\int { \frac {\sqrt {-x^{4} + x^{2} + 2 \, x + 1} {\left (x^{2} + 2 \, x\right )} {\left (x^{2} + x + 1\right )}}{{\left (x + 1\right )}^{4}} \,d x } \]
Timed out. \[ \int \frac {\left (1+x+x^2\right ) \left (2 x+x^2\right ) \sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx=\int \frac {\left (x^2+2\,x\right )\,\left (x^2+x+1\right )\,\sqrt {-x^4+x^2+2\,x+1}}{{\left (x+1\right )}^4} \,d x \]