Integrand size = 27, antiderivative size = 99 \[ \int \frac {2 x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\frac {1}{3} \sqrt {-3+2 \sqrt {3}} \arctan \left (\frac {\sqrt {-3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right )-\frac {1}{3} \sqrt {3+2 \sqrt {3}} \text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right ) \] Output:
1/3*(-3+2*3^(1/2))^(1/2)*arctan((-3+2*3^(1/2))^(1/2)*(x^3-1)^(1/2)/(x^2+x+ 1))-1/3*(3+2*3^(1/2))^(1/2)*arctanh((3+2*3^(1/2))^(1/2)*(x^3-1)^(1/2)/(x^2 +x+1))
Time = 1.39 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00 \[ \int \frac {2 x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\frac {1}{3} \sqrt {-3+2 \sqrt {3}} \arctan \left (\frac {\sqrt {-3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right )-\frac {1}{3} \sqrt {3+2 \sqrt {3}} \text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right ) \] Input:
Integrate[(2*x + x^2)/((-2 - 2*x + x^2)*Sqrt[-1 + x^3]),x]
Output:
(Sqrt[-3 + 2*Sqrt[3]]*ArcTan[(Sqrt[-3 + 2*Sqrt[3]]*Sqrt[-1 + x^3])/(1 + x + x^2)])/3 - (Sqrt[3 + 2*Sqrt[3]]*ArcTanh[(Sqrt[3 + 2*Sqrt[3]]*Sqrt[-1 + x ^3])/(1 + x + x^2)])/3
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 1.11 (sec) , antiderivative size = 450, normalized size of antiderivative = 4.55, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2027, 7279, 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}{\left (x^2-2 x-2\right ) \sqrt {x^3-1}} \, dx\) |
\(\Big \downarrow \) 2027 |
\(\displaystyle \int \frac {x (x+2)}{\left (x^2-2 x-2\right ) \sqrt {x^3-1}}dx\) |
\(\Big \downarrow \) 7279 |
\(\displaystyle \int \left (\frac {1}{\sqrt {x^3-1}}+\frac {2 (2 x+1)}{\left (x^2-2 x-2\right ) \sqrt {x^3-1}}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\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 )}{3^{3/4} \sqrt {-\frac {1-x}{\left (-x-\sqrt {3}+1\right )^2}} \sqrt {x^3-1}}-\frac {\left (2-\sqrt {3}\right )^{3/2} (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 )}{3^{3/4} \sqrt {-\frac {1-x}{\left (-x-\sqrt {3}+1\right )^2}} \sqrt {x^3-1}}-\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 {1}{3} \sqrt {2 \sqrt {3}-3} \arctan \left (\frac {\sqrt {2 \sqrt {3}-3} (1-x)}{\sqrt {x^3-1}}\right )+\frac {1}{3} \sqrt {3+2 \sqrt {3}} \text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} (1-x)}{\sqrt {x^3-1}}\right )\) |
Input:
Int[(2*x + x^2)/((-2 - 2*x + x^2)*Sqrt[-1 + x^3]),x]
Output:
-1/3*(Sqrt[-3 + 2*Sqrt[3]]*ArcTan[(Sqrt[-3 + 2*Sqrt[3]]*(1 - x))/Sqrt[-1 + x^3]]) + (Sqrt[3 + 2*Sqrt[3]]*ArcTanh[(Sqrt[3 + 2*Sqrt[3]]*(1 - x))/Sqrt[ -1 + x^3]])/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*S qrt[3]])/(3^(1/4)*Sqrt[-((1 - x)/(1 - Sqrt[3] - x)^2)]*Sqrt[-1 + x^3]) - ( (2 - Sqrt[3])^(3/2)*(1 - x)*Sqrt[(1 + x + x^2)/(1 - Sqrt[3] - x)^2]*Ellipt icF[ArcSin[(1 + Sqrt[3] - x)/(1 - Sqrt[3] - x)], -7 + 4*Sqrt[3]])/(3^(3/4) *Sqrt[-((1 - x)/(1 - Sqrt[3] - x)^2)]*Sqrt[-1 + x^3]) + (Sqrt[2 + Sqrt[3]] *(1 - x)*Sqrt[(1 + x + x^2)/(1 - Sqrt[3] - x)^2]*EllipticF[ArcSin[(1 + Sqr t[3] - x)/(1 - Sqrt[3] - x)], -7 + 4*Sqrt[3]])/(3^(3/4)*Sqrt[-((1 - x)/(1 - Sqrt[3] - x)^2)]*Sqrt[-1 + x^3])
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])
Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ {v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 2.68 (sec) , antiderivative size = 584, normalized size of antiderivative = 5.90
method | result | size |
trager | \(-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right ) \ln \left (\frac {243 \operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right ) \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{4} x^{2}+486 \operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right ) \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{4} x -18 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right ) x^{2}-252 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right ) x +216 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right )-\operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right ) x^{2}-144 \sqrt {x^{3}-1}\, \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-10 \operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right ) x +8 \operatorname {RootOf}\left (\textit {\_Z}^{2}+9 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-6\right )}{{\left (9 x \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-x +4\right )}^{2}}\right )}{6}-\frac {\operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right ) \ln \left (\frac {243 x^{2} \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{5}+486 x \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{5}-306 x^{2} \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{3}-396 x \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{3}+48 \sqrt {x^{3}-1}\, \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-216 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{3}+95 x^{2} \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )+38 x \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )-32 \sqrt {x^{3}-1}+152 \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )}{{\left (9 x \operatorname {RootOf}\left (27 \textit {\_Z}^{4}-18 \textit {\_Z}^{2}-1\right )^{2}-5 x -4\right )}^{2}}\right )}{2}\) | \(584\) |
default | \(\text {Expression too large to display}\) | \(1517\) |
elliptic | \(\text {Expression too large to display}\) | \(1726\) |
Input:
int((x^2+2*x)/(x^2-2*x-2)/(x^3-1)^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/6*RootOf(_Z^2+9*RootOf(27*_Z^4-18*_Z^2-1)^2-6)*ln((243*RootOf(_Z^2+9*Ro otOf(27*_Z^4-18*_Z^2-1)^2-6)*RootOf(27*_Z^4-18*_Z^2-1)^4*x^2+486*RootOf(_Z ^2+9*RootOf(27*_Z^4-18*_Z^2-1)^2-6)*RootOf(27*_Z^4-18*_Z^2-1)^4*x-18*RootO f(27*_Z^4-18*_Z^2-1)^2*RootOf(_Z^2+9*RootOf(27*_Z^4-18*_Z^2-1)^2-6)*x^2-25 2*RootOf(27*_Z^4-18*_Z^2-1)^2*RootOf(_Z^2+9*RootOf(27*_Z^4-18*_Z^2-1)^2-6) *x+216*RootOf(27*_Z^4-18*_Z^2-1)^2*RootOf(_Z^2+9*RootOf(27*_Z^4-18*_Z^2-1) ^2-6)-RootOf(_Z^2+9*RootOf(27*_Z^4-18*_Z^2-1)^2-6)*x^2-144*(x^3-1)^(1/2)*R ootOf(27*_Z^4-18*_Z^2-1)^2-10*RootOf(_Z^2+9*RootOf(27*_Z^4-18*_Z^2-1)^2-6) *x+8*RootOf(_Z^2+9*RootOf(27*_Z^4-18*_Z^2-1)^2-6))/(9*x*RootOf(27*_Z^4-18* _Z^2-1)^2-x+4)^2)-1/2*RootOf(27*_Z^4-18*_Z^2-1)*ln((243*x^2*RootOf(27*_Z^4 -18*_Z^2-1)^5+486*x*RootOf(27*_Z^4-18*_Z^2-1)^5-306*x^2*RootOf(27*_Z^4-18* _Z^2-1)^3-396*x*RootOf(27*_Z^4-18*_Z^2-1)^3+48*(x^3-1)^(1/2)*RootOf(27*_Z^ 4-18*_Z^2-1)^2-216*RootOf(27*_Z^4-18*_Z^2-1)^3+95*x^2*RootOf(27*_Z^4-18*_Z ^2-1)+38*x*RootOf(27*_Z^4-18*_Z^2-1)-32*(x^3-1)^(1/2)+152*RootOf(27*_Z^4-1 8*_Z^2-1))/(9*x*RootOf(27*_Z^4-18*_Z^2-1)^2-5*x-4)^2)
Leaf count of result is larger than twice the leaf count of optimal. 229 vs. \(2 (75) = 150\).
Time = 0.12 (sec) , antiderivative size = 229, normalized size of antiderivative = 2.31 \[ \int \frac {2 x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=-\frac {1}{6} \, \sqrt {2 \, \sqrt {3} - 3} \arctan \left (\frac {{\left (3 \, x^{2} + 2 \, \sqrt {3} {\left (x^{2} + x + 1\right )} + 6\right )} \sqrt {2 \, \sqrt {3} - 3}}{6 \, \sqrt {x^{3} - 1}}\right ) - \frac {1}{12} \, \sqrt {2 \, \sqrt {3} + 3} \log \left (\frac {x^{4} + 2 \, x^{3} + 6 \, x^{2} + 2 \, \sqrt {x^{3} - 1} {\left (x^{2} + 2 \, \sqrt {3} {\left (x - 1\right )} - 2 \, x + 4\right )} \sqrt {2 \, \sqrt {3} + 3} + 4 \, \sqrt {3} {\left (x^{3} - 1\right )} - 4 \, x + 4}{x^{4} - 4 \, x^{3} + 8 \, x + 4}\right ) + \frac {1}{12} \, \sqrt {2 \, \sqrt {3} + 3} \log \left (\frac {x^{4} + 2 \, x^{3} + 6 \, x^{2} - 2 \, \sqrt {x^{3} - 1} {\left (x^{2} + 2 \, \sqrt {3} {\left (x - 1\right )} - 2 \, x + 4\right )} \sqrt {2 \, \sqrt {3} + 3} + 4 \, \sqrt {3} {\left (x^{3} - 1\right )} - 4 \, x + 4}{x^{4} - 4 \, x^{3} + 8 \, x + 4}\right ) \] Input:
integrate((x^2+2*x)/(x^2-2*x-2)/(x^3-1)^(1/2),x, algorithm="fricas")
Output:
-1/6*sqrt(2*sqrt(3) - 3)*arctan(1/6*(3*x^2 + 2*sqrt(3)*(x^2 + x + 1) + 6)* sqrt(2*sqrt(3) - 3)/sqrt(x^3 - 1)) - 1/12*sqrt(2*sqrt(3) + 3)*log((x^4 + 2 *x^3 + 6*x^2 + 2*sqrt(x^3 - 1)*(x^2 + 2*sqrt(3)*(x - 1) - 2*x + 4)*sqrt(2* sqrt(3) + 3) + 4*sqrt(3)*(x^3 - 1) - 4*x + 4)/(x^4 - 4*x^3 + 8*x + 4)) + 1 /12*sqrt(2*sqrt(3) + 3)*log((x^4 + 2*x^3 + 6*x^2 - 2*sqrt(x^3 - 1)*(x^2 + 2*sqrt(3)*(x - 1) - 2*x + 4)*sqrt(2*sqrt(3) + 3) + 4*sqrt(3)*(x^3 - 1) - 4 *x + 4)/(x^4 - 4*x^3 + 8*x + 4))
\[ \int \frac {2 x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int \frac {x \left (x + 2\right )}{\sqrt {\left (x - 1\right ) \left (x^{2} + x + 1\right )} \left (x^{2} - 2 x - 2\right )}\, dx \] Input:
integrate((x**2+2*x)/(x**2-2*x-2)/(x**3-1)**(1/2),x)
Output:
Integral(x*(x + 2)/(sqrt((x - 1)*(x**2 + x + 1))*(x**2 - 2*x - 2)), x)
\[ \int \frac {2 x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int { \frac {x^{2} + 2 \, x}{\sqrt {x^{3} - 1} {\left (x^{2} - 2 \, x - 2\right )}} \,d x } \] Input:
integrate((x^2+2*x)/(x^2-2*x-2)/(x^3-1)^(1/2),x, algorithm="maxima")
Output:
integrate((x^2 + 2*x)/(sqrt(x^3 - 1)*(x^2 - 2*x - 2)), x)
\[ \int \frac {2 x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int { \frac {x^{2} + 2 \, x}{\sqrt {x^{3} - 1} {\left (x^{2} - 2 \, x - 2\right )}} \,d x } \] Input:
integrate((x^2+2*x)/(x^2-2*x-2)/(x^3-1)^(1/2),x, algorithm="giac")
Output:
integrate((x^2 + 2*x)/(sqrt(x^3 - 1)*(x^2 - 2*x - 2)), x)
Time = 10.42 (sec) , antiderivative size = 509, normalized size of antiderivative = 5.14 \[ \int \frac {2 x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx =\text {Too large to display} \] Input:
int(-(2*x + x^2)/((x^3 - 1)^(1/2)*(2*x - x^2 + 2)),x)
Output:
((4*3^(1/2) + 6)*((3^(1/2)*1i)/2 + 3/2)*(-(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)*((3^ (1/2)*1i)/2 + 3/2))/3, 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*(((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)) - ((4*3^(1/2) - 6)*((3^(1/2)*1i)/2 + 3/2)*(-(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)*ellipt icPi((3^(1/2)*((3^(1/2)*1i)/2 + 3/2))/3, 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*(((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)) - (2*((3^(1/2)*1i)/2 + 3/2)*(-(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)*el lipticF(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)
\[ \int \frac {2 x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int \frac {\sqrt {x^{3}-1}\, x^{2}}{x^{5}-2 x^{4}-2 x^{3}-x^{2}+2 x +2}d x +2 \left (\int \frac {\sqrt {x^{3}-1}\, x}{x^{5}-2 x^{4}-2 x^{3}-x^{2}+2 x +2}d x \right ) \] Input:
int((x^2+2*x)/(x^2-2*x-2)/(x^3-1)^(1/2),x)
Output:
int((sqrt(x**3 - 1)*x**2)/(x**5 - 2*x**4 - 2*x**3 - x**2 + 2*x + 2),x) + 2 *int((sqrt(x**3 - 1)*x)/(x**5 - 2*x**4 - 2*x**3 - x**2 + 2*x + 2),x)