Integrand size = 27, antiderivative size = 21 \[ \int \frac {-2-2 x+x^2}{\left (2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=-2 \arctan \left (\frac {\sqrt {-1+x^3}}{1+x+x^2}\right ) \] Output:
-2*arctan((x^3-1)^(1/2)/(x^2+x+1))
Time = 1.12 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00 \[ \int \frac {-2-2 x+x^2}{\left (2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=-2 \arctan \left (\frac {\sqrt {-1+x^3}}{1+x+x^2}\right ) \] Input:
Integrate[(-2 - 2*x + x^2)/((2*x + x^2)*Sqrt[-1 + x^3]),x]
Output:
-2*ArcTan[Sqrt[-1 + x^3]/(1 + x + x^2)]
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 0.84 (sec) , antiderivative size = 402, normalized size of antiderivative = 19.14, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2026, 7293, 2009}
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 {x^2-2 x-2}{\left (x^2+2 x\right ) \sqrt {x^3-1}} \, dx\) |
\(\Big \downarrow \) 2026 |
\(\displaystyle \int \frac {x^2-2 x-2}{x (x+2) \sqrt {x^3-1}}dx\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \int \left (-\frac {1}{x \sqrt {x^3-1}}-\frac {3}{(x+2) \sqrt {x^3-1}}+\frac {1}{\sqrt {x^3-1}}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 \sqrt {2-\sqrt {3}} (1-x) \sqrt {\frac {x^2+x+1}{\left (-x-\sqrt {3}+1\right )^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {-x+\sqrt {3}+1}{-x-\sqrt {3}+1}\right ),-7+4 \sqrt {3}\right )}{\sqrt [4]{3} \sqrt {-\frac {1-x}{\left (-x-\sqrt {3}+1\right )^2}} \sqrt {x^3-1}}+\frac {\sqrt [4]{3} \sqrt {2 \left (7-4 \sqrt {3}\right )} (1-x) \sqrt {\frac {x^2+x+1}{\left (-x-\sqrt {3}+1\right )^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {-x+\sqrt {3}+1}{-x-\sqrt {3}+1}\right ),-7+4 \sqrt {3}\right )}{\sqrt {-\frac {1-x}{\left (-x-\sqrt {3}+1\right )^2}} \sqrt {x^3-1}}+\frac {\sqrt {2 \left (7-4 \sqrt {3}\right )} (1-x) \sqrt {\frac {x^2+x+1}{\left (-x-\sqrt {3}+1\right )^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {-x+\sqrt {3}+1}{-x-\sqrt {3}+1}\right ),-7+4 \sqrt {3}\right )}{\sqrt [4]{3} \sqrt {-\frac {1-x}{\left (-x-\sqrt {3}+1\right )^2}} \sqrt {x^3-1}}+\frac {2}{3} \arctan \left (\frac {(1-x)^2}{3 \sqrt {x^3-1}}\right )-\frac {2}{3} \arctan \left (\sqrt {x^3-1}\right )\) |
Input:
Int[(-2 - 2*x + x^2)/((2*x + x^2)*Sqrt[-1 + x^3]),x]
Output:
(2*ArcTan[(1 - x)^2/(3*Sqrt[-1 + x^3])])/3 - (2*ArcTan[Sqrt[-1 + x^3]])/3 + (Sqrt[2*(7 - 4*Sqrt[3])]*(1 - x)*Sqrt[(1 + x + x^2)/(1 - Sqrt[3] - x)^2] *EllipticF[ArcSin[(1 + Sqrt[3] - x)/(1 - Sqrt[3] - x)], -7 + 4*Sqrt[3]])/( 3^(1/4)*Sqrt[-((1 - x)/(1 - Sqrt[3] - x)^2)]*Sqrt[-1 + x^3]) + (3^(1/4)*Sq rt[2*(7 - 4*Sqrt[3])]*(1 - x)*Sqrt[(1 + x + x^2)/(1 - Sqrt[3] - x)^2]*Elli pticF[ArcSin[(1 + Sqrt[3] - x)/(1 - Sqrt[3] - x)], -7 + 4*Sqrt[3]])/(Sqrt[ -((1 - x)/(1 - Sqrt[3] - x)^2)]*Sqrt[-1 + x^3]) - (2*Sqrt[2 - Sqrt[3]]*(1 - x)*Sqrt[(1 + x + x^2)/(1 - Sqrt[3] - x)^2]*EllipticF[ArcSin[(1 + Sqrt[3] - x)/(1 - Sqrt[3] - x)], -7 + 4*Sqrt[3]])/(3^(1/4)*Sqrt[-((1 - x)/(1 - Sq rt[3] - x)^2)]*Sqrt[-1 + x^3])
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p *r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ erQ[p] && !MonomialQ[Px, x] && (ILtQ[p, 0] || !PolyQ[u, x])
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.28 (sec) , antiderivative size = 47, normalized size of antiderivative = 2.24
method | result | size |
trager | \(\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{2}+2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )-2 \sqrt {x^{3}-1}}{x \left (2+x \right )}\right )\) | \(47\) |
default | \(\frac {2 \left (-\frac {3}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {-1+x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x +\frac {1}{2}-\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}}\, \operatorname {EllipticF}\left (\sqrt {\frac {-1+x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{\sqrt {x^{3}-1}}-\frac {2 \arctan \left (\sqrt {x^{3}-1}\right )}{3}-\frac {2 \left (-\frac {3}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {-1+x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x +\frac {1}{2}-\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {-1+x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \frac {1}{2}+\frac {i \sqrt {3}}{6}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{\sqrt {x^{3}-1}}\) | \(250\) |
elliptic | \(-\frac {3 \sqrt {-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{3+i \sqrt {3}}+\frac {i \sqrt {3}}{3+i \sqrt {3}}}\, \operatorname {EllipticF}\left (\sqrt {\frac {-1+x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{\sqrt {x^{3}-1}}-\frac {i \sqrt {-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{3+i \sqrt {3}}+\frac {i \sqrt {3}}{3+i \sqrt {3}}}\, \operatorname {EllipticF}\left (\sqrt {\frac {-1+x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right ) \sqrt {3}}{\sqrt {x^{3}-1}}-\frac {2 \arctan \left (\sqrt {x^{3}-1}\right )}{3}+\frac {3 \sqrt {-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{3+i \sqrt {3}}+\frac {i \sqrt {3}}{3+i \sqrt {3}}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {-1+x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \frac {1}{2}+\frac {i \sqrt {3}}{6}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right )}{\sqrt {x^{3}-1}}+\frac {i \sqrt {-\frac {1}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\, \sqrt {\frac {x}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}+\frac {1}{3-i \sqrt {3}}-\frac {i \sqrt {3}}{2 \left (\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\, \sqrt {\frac {x}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}+\frac {1}{3+i \sqrt {3}}+\frac {i \sqrt {3}}{3+i \sqrt {3}}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {-1+x}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}}, \frac {1}{2}+\frac {i \sqrt {3}}{6}, \sqrt {\frac {\frac {3}{2}+\frac {i \sqrt {3}}{2}}{\frac {3}{2}-\frac {i \sqrt {3}}{2}}}\right ) \sqrt {3}}{\sqrt {x^{3}-1}}\) | \(676\) |
Input:
int((x^2-2*x-2)/(x^2+2*x)/(x^3-1)^(1/2),x,method=_RETURNVERBOSE)
Output:
RootOf(_Z^2+1)*ln(-(RootOf(_Z^2+1)*x^2+2*RootOf(_Z^2+1)-2*(x^3-1)^(1/2))/x /(2+x))
Time = 0.09 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {-2-2 x+x^2}{\left (2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=-\arctan \left (\frac {2 \, \sqrt {x^{3} - 1}}{x^{2} + 2}\right ) \] Input:
integrate((x^2-2*x-2)/(x^2+2*x)/(x^3-1)^(1/2),x, algorithm="fricas")
Output:
-arctan(2*sqrt(x^3 - 1)/(x^2 + 2))
\[ \int \frac {-2-2 x+x^2}{\left (2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int \frac {x^{2} - 2 x - 2}{x \sqrt {\left (x - 1\right ) \left (x^{2} + x + 1\right )} \left (x + 2\right )}\, dx \] Input:
integrate((x**2-2*x-2)/(x**2+2*x)/(x**3-1)**(1/2),x)
Output:
Integral((x**2 - 2*x - 2)/(x*sqrt((x - 1)*(x**2 + x + 1))*(x + 2)), x)
\[ \int \frac {-2-2 x+x^2}{\left (2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int { \frac {x^{2} - 2 \, x - 2}{\sqrt {x^{3} - 1} {\left (x^{2} + 2 \, x\right )}} \,d x } \] Input:
integrate((x^2-2*x-2)/(x^2+2*x)/(x^3-1)^(1/2),x, algorithm="maxima")
Output:
integrate((x^2 - 2*x - 2)/(sqrt(x^3 - 1)*(x^2 + 2*x)), x)
\[ \int \frac {-2-2 x+x^2}{\left (2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int { \frac {x^{2} - 2 \, x - 2}{\sqrt {x^{3} - 1} {\left (x^{2} + 2 \, x\right )}} \,d x } \] Input:
integrate((x^2-2*x-2)/(x^2+2*x)/(x^3-1)^(1/2),x, algorithm="giac")
Output:
integrate((x^2 - 2*x - 2)/(sqrt(x^3 - 1)*(x^2 + 2*x)), x)
Time = 7.44 (sec) , antiderivative size = 252, normalized size of antiderivative = 12.00 \[ \int \frac {-2-2 x+x^2}{\left (2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\frac {\left (3+\sqrt {3}\,1{}\mathrm {i}\right )\,\sqrt {-\frac {x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {-\frac {x-1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\left (-\mathrm {F}\left (\mathrm {asin}\left (\sqrt {-\frac {x-1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )+\Pi \left (\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2};\mathrm {asin}\left (\sqrt {-\frac {x-1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )+\Pi \left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{6};\mathrm {asin}\left (\sqrt {-\frac {x-1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )\right )}{\sqrt {x^3+\left (-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )-1\right )\,x+\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )}} \] Input:
int(-(2*x - x^2 + 2)/((2*x + x^2)*(x^3 - 1)^(1/2)),x)
Output:
((3^(1/2)*1i + 3)*(-(x - (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 - 3/2))^(1/ 2)*((x + (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 + 3/2))^(1/2)*(-(x - 1)/((3 ^(1/2)*1i)/2 + 3/2))^(1/2)*(ellipticPi((3^(1/2)*1i)/2 + 3/2, asin((-(x - 1 )/((3^(1/2)*1i)/2 + 3/2))^(1/2)), -((3^(1/2)*1i)/2 + 3/2)/((3^(1/2)*1i)/2 - 3/2)) - ellipticF(asin((-(x - 1)/((3^(1/2)*1i)/2 + 3/2))^(1/2)), -((3^(1 /2)*1i)/2 + 3/2)/((3^(1/2)*1i)/2 - 3/2)) + ellipticPi((3^(1/2)*1i)/6 + 1/2 , asin((-(x - 1)/((3^(1/2)*1i)/2 + 3/2))^(1/2)), -((3^(1/2)*1i)/2 + 3/2)/( (3^(1/2)*1i)/2 - 3/2))))/(((3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*1i)/2 + 1/2) - x*(((3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*1i)/2 + 1/2) + 1) + x^3)^(1/2)
Time = 0.20 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.43 \[ \int \frac {-2-2 x+x^2}{\left (2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\mathit {atan} \left (\frac {\sqrt {x^{3}-1}\, x^{2}+2 \sqrt {x^{3}-1}}{2 x^{3}-2}\right ) \] Input:
int((x^2-2*x-2)/(x^2+2*x)/(x^3-1)^(1/2),x)
Output:
atan((sqrt(x**3 - 1)*x**2 + 2*sqrt(x**3 - 1))/(2*x**3 - 2))