3.4.88 \(\int \frac {-1+2 x+2 x^2}{(1-x+3 x^2) \sqrt {-x+x^4}} \, dx\) [388]

Optimal. Leaf size=32 \[ \sqrt {2} \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {-x+x^4}}{1+x+x^2}\right ) \]

[Out]

2^(1/2)*arctan(2^(1/2)*(x^4-x)^(1/2)/(x^2+x+1))

________________________________________________________________________________________

Rubi [F]
time = 1.69, 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 {-1+2 x+2 x^2}{\left (1-x+3 x^2\right ) \sqrt {-x+x^4}} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

(2*(1 - x)*x*Sqrt[(1 + x + x^2)/(1 - (1 + Sqrt[3])*x)^2]*EllipticF[ArcCos[(1 - (1 - Sqrt[3])*x)/(1 - (1 + Sqrt
[3])*x)], (2 + Sqrt[3])/4])/(3*3^(1/4)*Sqrt[-(((1 - x)*x)/(1 - (1 + Sqrt[3])*x)^2)]*Sqrt[-x + x^4]) - (2*(4 -
I*Sqrt[11])*Sqrt[x]*Sqrt[-1 + x^3]*Defer[Subst][Defer[Int][1/((Sqrt[1 - I*Sqrt[11]] - Sqrt[6]*x)*Sqrt[-1 + x^6
]), x], x, Sqrt[x]])/(3*Sqrt[1 - I*Sqrt[11]]*Sqrt[-x + x^4]) - (2*(4 + I*Sqrt[11])*Sqrt[x]*Sqrt[-1 + x^3]*Defe
r[Subst][Defer[Int][1/((Sqrt[1 + I*Sqrt[11]] - Sqrt[6]*x)*Sqrt[-1 + x^6]), x], x, Sqrt[x]])/(3*Sqrt[1 + I*Sqrt
[11]]*Sqrt[-x + x^4]) - (2*(4 - I*Sqrt[11])*Sqrt[x]*Sqrt[-1 + x^3]*Defer[Subst][Defer[Int][1/((Sqrt[1 - I*Sqrt
[11]] + Sqrt[6]*x)*Sqrt[-1 + x^6]), x], x, Sqrt[x]])/(3*Sqrt[1 - I*Sqrt[11]]*Sqrt[-x + x^4]) - (2*(4 + I*Sqrt[
11])*Sqrt[x]*Sqrt[-1 + x^3]*Defer[Subst][Defer[Int][1/((Sqrt[1 + I*Sqrt[11]] + Sqrt[6]*x)*Sqrt[-1 + x^6]), x],
 x, Sqrt[x]])/(3*Sqrt[1 + I*Sqrt[11]]*Sqrt[-x + x^4])

Rubi steps

\begin {align*} \int \frac {-1+2 x+2 x^2}{\left (1-x+3 x^2\right ) \sqrt {-x+x^4}} \, dx &=\frac {\left (\sqrt {x} \sqrt {-1+x^3}\right ) \int \frac {-1+2 x+2 x^2}{\sqrt {x} \left (1-x+3 x^2\right ) \sqrt {-1+x^3}} \, dx}{\sqrt {-x+x^4}}\\ &=\frac {\left (\sqrt {x} \sqrt {-1+x^3}\right ) \int \left (\frac {2}{3 \sqrt {x} \sqrt {-1+x^3}}-\frac {5-8 x}{3 \sqrt {x} \left (1-x+3 x^2\right ) \sqrt {-1+x^3}}\right ) \, dx}{\sqrt {-x+x^4}}\\ &=-\frac {\left (\sqrt {x} \sqrt {-1+x^3}\right ) \int \frac {5-8 x}{\sqrt {x} \left (1-x+3 x^2\right ) \sqrt {-1+x^3}} \, dx}{3 \sqrt {-x+x^4}}+\frac {\left (2 \sqrt {x} \sqrt {-1+x^3}\right ) \int \frac {1}{\sqrt {x} \sqrt {-1+x^3}} \, dx}{3 \sqrt {-x+x^4}}\\ &=-\frac {\left (\sqrt {x} \sqrt {-1+x^3}\right ) \int \left (\frac {-8-2 i \sqrt {11}}{\sqrt {x} \left (-1-i \sqrt {11}+6 x\right ) \sqrt {-1+x^3}}+\frac {-8+2 i \sqrt {11}}{\sqrt {x} \left (-1+i \sqrt {11}+6 x\right ) \sqrt {-1+x^3}}\right ) \, dx}{3 \sqrt {-x+x^4}}+\frac {\left (4 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{3 \sqrt {-x+x^4}}\\ &=\frac {2 (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{3 \sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}+\frac {\left (2 \left (4-i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \int \frac {1}{\sqrt {x} \left (-1+i \sqrt {11}+6 x\right ) \sqrt {-1+x^3}} \, dx}{3 \sqrt {-x+x^4}}+\frac {\left (2 \left (4+i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \int \frac {1}{\sqrt {x} \left (-1-i \sqrt {11}+6 x\right ) \sqrt {-1+x^3}} \, dx}{3 \sqrt {-x+x^4}}\\ &=\frac {2 (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{3 \sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}+\frac {\left (4 \left (4-i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+i \sqrt {11}+6 x^2\right ) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{3 \sqrt {-x+x^4}}+\frac {\left (4 \left (4+i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (-1-i \sqrt {11}+6 x^2\right ) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{3 \sqrt {-x+x^4}}\\ &=\frac {2 (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{3 \sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}+\frac {\left (4 \left (4-i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \left (\frac {\sqrt {1-i \sqrt {11}}}{2 \left (-1+i \sqrt {11}\right ) \left (\sqrt {1-i \sqrt {11}}-\sqrt {6} x\right ) \sqrt {-1+x^6}}+\frac {\sqrt {1-i \sqrt {11}}}{2 \left (-1+i \sqrt {11}\right ) \left (\sqrt {1-i \sqrt {11}}+\sqrt {6} x\right ) \sqrt {-1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{3 \sqrt {-x+x^4}}+\frac {\left (4 \left (4+i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \left (\frac {\sqrt {1+i \sqrt {11}}}{2 \left (-1-i \sqrt {11}\right ) \left (\sqrt {1+i \sqrt {11}}-\sqrt {6} x\right ) \sqrt {-1+x^6}}+\frac {\sqrt {1+i \sqrt {11}}}{2 \left (-1-i \sqrt {11}\right ) \left (\sqrt {1+i \sqrt {11}}+\sqrt {6} x\right ) \sqrt {-1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{3 \sqrt {-x+x^4}}\\ &=\frac {2 (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{3 \sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}-\frac {\left (2 \left (4-i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {1-i \sqrt {11}}-\sqrt {6} x\right ) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{3 \sqrt {1-i \sqrt {11}} \sqrt {-x+x^4}}-\frac {\left (2 \left (4-i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {1-i \sqrt {11}}+\sqrt {6} x\right ) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{3 \sqrt {1-i \sqrt {11}} \sqrt {-x+x^4}}-\frac {\left (2 \left (4+i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {1+i \sqrt {11}}-\sqrt {6} x\right ) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{3 \sqrt {1+i \sqrt {11}} \sqrt {-x+x^4}}-\frac {\left (2 \left (4+i \sqrt {11}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {1+i \sqrt {11}}+\sqrt {6} x\right ) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{3 \sqrt {1+i \sqrt {11}} \sqrt {-x+x^4}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 20.01, size = 56, normalized size = 1.75 \begin {gather*} -\frac {\sqrt {2} \sqrt {-1+\frac {1}{x^3}} x^2 \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {-1+\frac {1}{x^3}}}{1+\frac {1}{x^2}+\frac {1}{x}}\right )}{\sqrt {x \left (-1+x^3\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-((Sqrt[2]*Sqrt[-1 + x^(-3)]*x^2*ArcTanh[(Sqrt[2]*Sqrt[-1 + x^(-3)])/(1 + x^(-2) + x^(-1))])/Sqrt[x*(-1 + x^3)
])

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 2.49, size = 828, normalized size = 25.88

method result size
trager \(-\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) x^{2}-3 \RootOf \left (\textit {\_Z}^{2}+2\right ) x -\RootOf \left (\textit {\_Z}^{2}+2\right )+4 \sqrt {x^{4}-x}}{3 x^{2}-x +1}\right )}{2}\) \(62\)
default \(\text {Expression too large to display}\) \(828\)
elliptic \(\text {Expression too large to display}\) \(828\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2+2*x-1)/(3*x^2-x+1)/(x^4-x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 28, normalized size = 0.88 \begin {gather*} \frac {1}{2} \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (x^{2} - 3 \, x - 1\right )}}{4 \, \sqrt {x^{4} - x}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*sqrt(2)*arctan(1/4*sqrt(2)*(x^2 - 3*x - 1)/sqrt(x^4 - x))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {2 x^{2} + 2 x - 1}{\sqrt {x \left (x - 1\right ) \left (x^{2} + x + 1\right )} \left (3 x^{2} - x + 1\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {2\,x^2+2\,x-1}{\sqrt {x^4-x}\,\left (3\,x^2-x+1\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________