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

Optimal. Leaf size=74 \[ \frac {\sqrt {-x^4+x^2+2 x+1} \left (2 x^4+3 x^3+x^2-4 x-2\right )}{6 (x+1)^3}-\tan ^{-1}\left (\frac {\sqrt {-x^4+x^2+2 x+1}}{x^2+x+1}\right ) \]

________________________________________________________________________________________

Rubi [F]  time = 1.11, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \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 \end {gather*}

Verification is not applicable to the result.

[In]

Int[((1 + x + x^2)*(2*x + x^2)*Sqrt[1 + 2*x + x^2 - x^4])/(1 + x)^4,x]

[Out]

Defer[Int][Sqrt[1 + 2*x + x^2 - x^4]/(-1 - x), x] - Defer[Int][Sqrt[1 + 2*x + x^2 - x^4]/(1 + x)^4, x] + Defer
[Int][Sqrt[1 + 2*x + x^2 - x^4]/(1 + x)^3, x] - (64*Sqrt[1 + 2*x + x^2 - x^4]*Defer[Subst][Defer[Int][Sqrt[-24
0 - 128*x^2 + 256*x^4]/(2 - 4*x)^4, x], x, 1/2 + x^(-1)])/(Sqrt[-15 - 2*(1 + 2/x)^2 + (1 + 2/x)^4]*x^2)

Rubi steps

\begin {align*} \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 (2+x) \left (1+x+x^2\right ) \sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx\\ &=\int \left (\sqrt {1+2 x+x^2-x^4}+\frac {\sqrt {1+2 x+x^2-x^4}}{-1-x}-\frac {\sqrt {1+2 x+x^2-x^4}}{(1+x)^4}+\frac {\sqrt {1+2 x+x^2-x^4}}{(1+x)^3}\right ) \, dx\\ &=\int \sqrt {1+2 x+x^2-x^4} \, dx+\int \frac {\sqrt {1+2 x+x^2-x^4}}{-1-x} \, dx-\int \frac {\sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx+\int \frac {\sqrt {1+2 x+x^2-x^4}}{(1+x)^3} \, dx\\ &=-\left (16 \operatorname {Subst}\left (\int \frac {\sqrt {\frac {-240-128 x^2+256 x^4}{(2-4 x)^4}}}{(2-4 x)^2} \, dx,x,\frac {1}{2}+\frac {1}{x}\right )\right )+\int \frac {\sqrt {1+2 x+x^2-x^4}}{-1-x} \, dx-\int \frac {\sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx+\int \frac {\sqrt {1+2 x+x^2-x^4}}{(1+x)^3} \, dx\\ &=-\frac {\left (256 \sqrt {1+2 x+x^2-x^4}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {-240-128 x^2+256 x^4}}{(2-4 x)^4} \, dx,x,\frac {1}{2}+\frac {1}{x}\right )}{\sqrt {-240-128 \left (\frac {1}{2}+\frac {1}{x}\right )^2+256 \left (\frac {1}{2}+\frac {1}{x}\right )^4} x^2}+\int \frac {\sqrt {1+2 x+x^2-x^4}}{-1-x} \, dx-\int \frac {\sqrt {1+2 x+x^2-x^4}}{(1+x)^4} \, dx+\int \frac {\sqrt {1+2 x+x^2-x^4}}{(1+x)^3} \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 6.17, size = 1735, normalized size = 23.45

result too large to display

Warning: Unable to verify antiderivative.

[In]

Integrate[((1 + x + x^2)*(2*x + x^2)*Sqrt[1 + 2*x + x^2 - x^4])/(1 + x)^4,x]

[Out]

Sqrt[1 + 2*x + x^2 - x^4]*(-1/2 + x/3 + 1/(3*(1 + x)^3) - 5/(6*(1 + x)^2) + 2/(3*(1 + x))) + ((1 + x)*Sqrt[1 +
 2*x + x^2 - x^4]*(1/(2*Sqrt[1 + 2*x + x^2 - x^4]) + x/(2*Sqrt[1 + 2*x + x^2 - x^4]) - 1/(2*(1 + x)*Sqrt[1 + 2
*x + x^2 - x^4]))*((2*(-(-1)^(1/3) + (-1 - Sqrt[5])/2)*Sqrt[((-(-1)^(2/3) + (1 + Sqrt[5])/2)*((-1)^(1/3) + x))
/(((-1)^(1/3) + (1 + Sqrt[5])/2)*(-(-1)^(2/3) + x))]*(-(-1)^(2/3) + x)^2*Sqrt[(((-1)^(1/3) + (-1)^(2/3))*((-1
- Sqrt[5])/2 + x))/(((-1)^(1/3) + (1 + Sqrt[5])/2)*(-(-1)^(2/3) + x))]*Sqrt[(((-1)^(1/3) + (-1)^(2/3))*((-1 +
Sqrt[5])/2 + x))/(((-1)^(1/3) + (1 - Sqrt[5])/2)*(-(-1)^(2/3) + x))]*EllipticF[ArcSin[Sqrt[((-(-1)^(2/3) + (1
+ Sqrt[5])/2)*((-1)^(1/3) + x))/(((-1)^(1/3) + (1 + Sqrt[5])/2)*(-(-1)^(2/3) + x))]], ((-(-1)^(1/3) + (-1 - Sq
rt[5])/2)*((-1)^(2/3) + (-1 + Sqrt[5])/2))/(((-1)^(2/3) + (-1 - Sqrt[5])/2)*(-(-1)^(1/3) + (-1 + Sqrt[5])/2))]
)/(((-1)^(1/3) + (-1)^(2/3))*(-(-1)^(2/3) + (1 + Sqrt[5])/2)*Sqrt[1 + 2*x + x^2 - x^4]) + (2*(-(-1)^(1/3) + (-
1 - Sqrt[5])/2)*Sqrt[((-1 + 2*(-1)^(2/3) - Sqrt[5])*((-1)^(1/3) + x))/((1 + 2*(-1)^(1/3) + Sqrt[5])*((-1)^(2/3
) - x))]*(-(-1)^(2/3) + x)^2*Sqrt[(((-1)^(1/3) + (-1)^(2/3))*((-1 - Sqrt[5])/2 + x))/(((-1)^(1/3) + (1 + Sqrt[
5])/2)*(-(-1)^(2/3) + x))]*Sqrt[(((-1)^(1/3) + (-1)^(2/3))*((-1 + Sqrt[5])/2 + x))/(((-1)^(1/3) + (1 - Sqrt[5]
)/2)*(-(-1)^(2/3) + x))]*(-((-1)^(2/3)*EllipticF[ArcSin[Sqrt[((-1 + 2*(-1)^(2/3) - Sqrt[5])*((-1)^(1/3) + x))/
((1 + 2*(-1)^(1/3) + Sqrt[5])*((-1)^(2/3) - x))]], ((1 + 2*(-1)^(1/3) + Sqrt[5])*(-1 + 2*(-1)^(2/3) + Sqrt[5])
)/((1 + 2*(-1)^(1/3) - Sqrt[5])*(-1 + 2*(-1)^(2/3) - Sqrt[5]))]) + ((-1)^(1/3) + (-1)^(2/3))*EllipticPi[((-1)^
(1/3) + (1 + Sqrt[5])/2)/(-(-1)^(2/3) + (1 + Sqrt[5])/2), ArcSin[Sqrt[((-1 + 2*(-1)^(2/3) - Sqrt[5])*((-1)^(1/
3) + x))/((1 + 2*(-1)^(1/3) + Sqrt[5])*((-1)^(2/3) - x))]], ((1 + 2*(-1)^(1/3) + Sqrt[5])*(-1 + 2*(-1)^(2/3) +
 Sqrt[5]))/((1 + 2*(-1)^(1/3) - Sqrt[5])*(-1 + 2*(-1)^(2/3) - Sqrt[5]))]))/(((-1)^(1/3) + (-1)^(2/3))*((-1)^(2
/3) + (-1 - Sqrt[5])/2)*Sqrt[1 + 2*x + x^2 - x^4]) - (2*((-1)^(1/3) + (1 + Sqrt[5])/2)*Sqrt[((-1 + 2*(-1)^(2/3
) - Sqrt[5])*((-1)^(1/3) + x))/((1 + 2*(-1)^(1/3) + Sqrt[5])*((-1)^(2/3) - x))]*(-(-1)^(2/3) + x)^2*Sqrt[(((-1
)^(1/3) + (-1)^(2/3))*((-1 - Sqrt[5])/2 + x))/(((-1)^(1/3) + (1 + Sqrt[5])/2)*(-(-1)^(2/3) + x))]*Sqrt[(((-1)^
(1/3) + (-1)^(2/3))*((-1 + Sqrt[5])/2 + x))/(((-1)^(1/3) + (1 - Sqrt[5])/2)*(-(-1)^(2/3) + x))]*((-1 + (-1)^(1
/3))*EllipticF[ArcSin[Sqrt[((-1 + 2*(-1)^(2/3) - Sqrt[5])*((-1)^(1/3) + x))/((1 + 2*(-1)^(1/3) + Sqrt[5])*((-1
)^(2/3) - x))]], ((1 + 2*(-1)^(1/3) + Sqrt[5])*(-1 + 2*(-1)^(2/3) + Sqrt[5]))/((1 + 2*(-1)^(1/3) - Sqrt[5])*(-
1 + 2*(-1)^(2/3) - Sqrt[5]))] - ((-1)^(1/3) + (-1)^(2/3))*EllipticPi[((1 + (-1)^(2/3))*((-1)^(1/3) + (1 + Sqrt
[5])/2))/((1 - (-1)^(1/3))*(-(-1)^(2/3) + (1 + Sqrt[5])/2)), ArcSin[Sqrt[((-1 + 2*(-1)^(2/3) - Sqrt[5])*((-1)^
(1/3) + x))/((1 + 2*(-1)^(1/3) + Sqrt[5])*((-1)^(2/3) - x))]], ((1 + 2*(-1)^(1/3) + Sqrt[5])*(-1 + 2*(-1)^(2/3
) + Sqrt[5]))/((1 + 2*(-1)^(1/3) - Sqrt[5])*(-1 + 2*(-1)^(2/3) - Sqrt[5]))]))/((1 - (-1)^(1/3))*(-1 - (-1)^(2/
3))*((-1)^(1/3) + (-1)^(2/3))*((-1)^(2/3) + (-1 - Sqrt[5])/2)*Sqrt[1 + 2*x + x^2 - x^4])))/(x*(2 + x))

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 1.18, size = 74, normalized size = 1.00 \begin {gather*} \frac {\sqrt {-x^4+x^2+2 x+1} \left (2 x^4+3 x^3+x^2-4 x-2\right )}{6 (x+1)^3}-\tan ^{-1}\left (\frac {\sqrt {-x^4+x^2+2 x+1}}{x^2+x+1}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[((1 + x + x^2)*(2*x + x^2)*Sqrt[1 + 2*x + x^2 - x^4])/(1 + x)^4,x]

[Out]

(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)]

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 103, normalized size = 1.39 \begin {gather*} -\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 )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+x+1)*(x^2+2*x)*(-x^4+x^2+2*x+1)^(1/2)/(1+x)^4,x, algorithm="fricas")

[Out]

-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)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+x+1)*(x^2+2*x)*(-x^4+x^2+2*x+1)^(1/2)/(1+x)^4,x, algorithm="giac")

[Out]

integrate(sqrt(-x^4 + x^2 + 2*x + 1)*(x^2 + 2*x)*(x^2 + x + 1)/(x + 1)^4, x)

________________________________________________________________________________________

maple [C]  time = 0.54, size = 1431, normalized size = 19.34

result too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+x+1)*(x^2+2*x)*(-x^4+x^2+2*x+1)^(1/2)/(1+x)^4,x)

[Out]

1/3*x*(-x^4+x^2+2*x+1)^(1/2)-1/3*I*(-1-1/2*I*3^(1/2)-1/2*5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2))/(1-1/2*5^(1/2
)+1/2*I*3^(1/2))/(x+1/2-1/2*I*3^(1/2)))^(1/2)*(I*3^(1/2)*(x-1/2-1/2*5^(1/2))/(1+1/2*5^(1/2)+1/2*I*3^(1/2))/(x+
1/2-1/2*I*3^(1/2)))^(1/2)/(1+1/2*5^(1/2)-1/2*I*3^(1/2))*3^(1/2)/(-(x+1/2+1/2*I*3^(1/2))*(x+1/2-1/2*I*3^(1/2))*
(x-1/2+1/2*5^(1/2))*(x-1/2-1/2*5^(1/2)))^(1/2)*((-1/2+1/2*I*3^(1/2))*EllipticF(((1+1/2*5^(1/2)-1/2*I*3^(1/2))*
(x+1/2+1/2*I*3^(1/2))/(1+1/2*5^(1/2)+1/2*I*3^(1/2))/(x+1/2-1/2*I*3^(1/2)))^(1/2),((-1+1/2*I*3^(1/2)+1/2*5^(1/2
))*(-1-1/2*I*3^(1/2)-1/2*5^(1/2))/(-1-1/2*I*3^(1/2)+1/2*5^(1/2))/(-1+1/2*I*3^(1/2)-1/2*5^(1/2)))^(1/2))-I*3^(1
/2)*EllipticPi(((1+1/2*5^(1/2)-1/2*I*3^(1/2))*(x+1/2+1/2*I*3^(1/2))/(1+1/2*5^(1/2)+1/2*I*3^(1/2))/(x+1/2-1/2*I
*3^(1/2)))^(1/2),(1+1/2*5^(1/2)+1/2*I*3^(1/2))/(1+1/2*5^(1/2)-1/2*I*3^(1/2)),((-1+1/2*I*3^(1/2)+1/2*5^(1/2))*(
-1-1/2*I*3^(1/2)-1/2*5^(1/2))/(-1-1/2*I*3^(1/2)+1/2*5^(1/2))/(-1+1/2*I*3^(1/2)-1/2*5^(1/2)))^(1/2)))-1/2*(-x^4
+x^2+2*x+1)^(1/2)+1/3/(1+x)^3*(-x^4+x^2+2*x+1)^(1/2)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+x+1)*(x^2+2*x)*(-x^4+x^2+2*x+1)^(1/2)/(1+x)^4,x, algorithm="maxima")

[Out]

integrate(sqrt(-x^4 + x^2 + 2*x + 1)*(x^2 + 2*x)*(x^2 + x + 1)/(x + 1)^4, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \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 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x + x^2)*(x + x^2 + 1)*(2*x + x^2 - x^4 + 1)^(1/2))/(x + 1)^4,x)

[Out]

int(((2*x + x^2)*(x + x^2 + 1)*(2*x + x^2 - x^4 + 1)^(1/2))/(x + 1)^4, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \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 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+x+1)*(x**2+2*x)*(-x**4+x**2+2*x+1)**(1/2)/(1+x)**4,x)

[Out]

Integral(x*sqrt(-(x**2 - x - 1)*(x**2 + x + 1))*(x + 2)*(x**2 + x + 1)/(x + 1)**4, x)

________________________________________________________________________________________