Integrand size = 28, antiderivative size = 99 \[ \int \frac {3-x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=-\frac {1}{6} \sqrt {15+14 \sqrt {3}} \arctan \left (\frac {\sqrt {-3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right )-\frac {1}{6} \sqrt {-15+14 \sqrt {3}} \text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right ) \] Output:
-1/6*(15+14*3^(1/2))^(1/2)*arctan((-3+2*3^(1/2))^(1/2)*(x^3-1)^(1/2)/(x^2+ x+1))-1/6*(-15+14*3^(1/2))^(1/2)*arctanh((3+2*3^(1/2))^(1/2)*(x^3-1)^(1/2) /(x^2+x+1))
Time = 1.63 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00 \[ \int \frac {3-x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=-\frac {1}{6} \sqrt {15+14 \sqrt {3}} \arctan \left (\frac {\sqrt {-3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right )-\frac {1}{6} \sqrt {-15+14 \sqrt {3}} \text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} \sqrt {-1+x^3}}{1+x+x^2}\right ) \] Input:
Integrate[(3 - x + x^2)/((-2 - 2*x + x^2)*Sqrt[-1 + x^3]),x]
Output:
-1/6*(Sqrt[15 + 14*Sqrt[3]]*ArcTan[(Sqrt[-3 + 2*Sqrt[3]]*Sqrt[-1 + x^3])/( 1 + x + x^2)]) - (Sqrt[-15 + 14*Sqrt[3]]*ArcTanh[(Sqrt[3 + 2*Sqrt[3]]*Sqrt [-1 + x^3])/(1 + x + x^2)])/6
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 0.98 (sec) , antiderivative size = 457, normalized size of antiderivative = 4.62, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {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-x+3}{\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 {x+5}{\left (x^2-2 x-2\right ) \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 {14-5 \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 )}{2\ 3^{3/4} \sqrt {-\frac {1-x}{\left (-x-\sqrt {3}+1\right )^2}} \sqrt {x^3-1}}+\frac {\sqrt {38-21 \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 )}{2\ 3^{3/4} \sqrt {-\frac {1-x}{\left (-x-\sqrt {3}+1\right )^2}} \sqrt {x^3-1}}+\frac {1}{6} \sqrt {15+14 \sqrt {3}} \arctan \left (\frac {\sqrt {2 \sqrt {3}-3} (1-x)}{\sqrt {x^3-1}}\right )+\frac {1}{6} \sqrt {14 \sqrt {3}-15} \text {arctanh}\left (\frac {\sqrt {3+2 \sqrt {3}} (1-x)}{\sqrt {x^3-1}}\right )\) |
Input:
Int[(3 - x + x^2)/((-2 - 2*x + x^2)*Sqrt[-1 + x^3]),x]
Output:
(Sqrt[15 + 14*Sqrt[3]]*ArcTan[(Sqrt[-3 + 2*Sqrt[3]]*(1 - x))/Sqrt[-1 + x^3 ]])/6 + (Sqrt[-15 + 14*Sqrt[3]]*ArcTanh[(Sqrt[3 + 2*Sqrt[3]]*(1 - x))/Sqrt [-1 + x^3]])/6 + (Sqrt[38 - 21*Sqrt[3]]*(1 - x)*Sqrt[(1 + x + x^2)/(1 - Sq rt[3] - x)^2]*EllipticF[ArcSin[(1 + Sqrt[3] - x)/(1 - Sqrt[3] - x)], -7 + 4*Sqrt[3]])/(2*3^(3/4)*Sqrt[-((1 - x)/(1 - Sqrt[3] - x)^2)]*Sqrt[-1 + x^3] ) + (Sqrt[14 - 5*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]])/(2 *3^(3/4)*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[ArcSi n[(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])
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 = 3.43 (sec) , antiderivative size = 592, normalized size of antiderivative = 5.98
method | result | size |
trager | \(-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right ) \ln \left (-\frac {3888 \operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right ) \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{4} x^{2}+7776 x \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{4} \operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right )+8280 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right ) x^{2}+10512 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right ) x +44352 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2} \sqrt {x^{3}-1}+6048 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right )+4147 \operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right ) x^{2}+286 \operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right ) x +44352 \sqrt {x^{3}-1}+8008 \operatorname {RootOf}\left (\textit {\_Z}^{2}+36 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+30\right )}{{\left (36 x \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+29 x +28\right )}^{2}}\right )}{12}-\frac {\operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right ) \ln \left (\frac {-3888 x^{2} \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{5}-7776 x \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{5}+1800 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{3} x^{2}-2448 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{3} x +7392 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2} \sqrt {x^{3}-1}+6048 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{3}+53 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right ) x^{2}+3074 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right ) x -1232 \sqrt {x^{3}-1}-2968 \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )}{{\left (36 x \operatorname {RootOf}\left (432 \textit {\_Z}^{4}+360 \textit {\_Z}^{2}-121\right )^{2}+x -28\right )}^{2}}\right )}{2}\) | \(592\) |
default | \(\text {Expression too large to display}\) | \(1517\) |
elliptic | \(\text {Expression too large to display}\) | \(1726\) |
Input:
int((x^2-x+3)/(x^2-2*x-2)/(x^3-1)^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/12*RootOf(_Z^2+36*RootOf(432*_Z^4+360*_Z^2-121)^2+30)*ln(-(3888*RootOf( _Z^2+36*RootOf(432*_Z^4+360*_Z^2-121)^2+30)*RootOf(432*_Z^4+360*_Z^2-121)^ 4*x^2+7776*x*RootOf(432*_Z^4+360*_Z^2-121)^4*RootOf(_Z^2+36*RootOf(432*_Z^ 4+360*_Z^2-121)^2+30)+8280*RootOf(432*_Z^4+360*_Z^2-121)^2*RootOf(_Z^2+36* RootOf(432*_Z^4+360*_Z^2-121)^2+30)*x^2+10512*RootOf(432*_Z^4+360*_Z^2-121 )^2*RootOf(_Z^2+36*RootOf(432*_Z^4+360*_Z^2-121)^2+30)*x+44352*RootOf(432* _Z^4+360*_Z^2-121)^2*(x^3-1)^(1/2)+6048*RootOf(432*_Z^4+360*_Z^2-121)^2*Ro otOf(_Z^2+36*RootOf(432*_Z^4+360*_Z^2-121)^2+30)+4147*RootOf(_Z^2+36*RootO f(432*_Z^4+360*_Z^2-121)^2+30)*x^2+286*RootOf(_Z^2+36*RootOf(432*_Z^4+360* _Z^2-121)^2+30)*x+44352*(x^3-1)^(1/2)+8008*RootOf(_Z^2+36*RootOf(432*_Z^4+ 360*_Z^2-121)^2+30))/(36*x*RootOf(432*_Z^4+360*_Z^2-121)^2+29*x+28)^2)-1/2 *RootOf(432*_Z^4+360*_Z^2-121)*ln((-3888*x^2*RootOf(432*_Z^4+360*_Z^2-121) ^5-7776*x*RootOf(432*_Z^4+360*_Z^2-121)^5+1800*RootOf(432*_Z^4+360*_Z^2-12 1)^3*x^2-2448*RootOf(432*_Z^4+360*_Z^2-121)^3*x+7392*RootOf(432*_Z^4+360*_ Z^2-121)^2*(x^3-1)^(1/2)+6048*RootOf(432*_Z^4+360*_Z^2-121)^3+53*RootOf(43 2*_Z^4+360*_Z^2-121)*x^2+3074*RootOf(432*_Z^4+360*_Z^2-121)*x-1232*(x^3-1) ^(1/2)-2968*RootOf(432*_Z^4+360*_Z^2-121))/(36*x*RootOf(432*_Z^4+360*_Z^2- 121)^2+x-28)^2)
Leaf count of result is larger than twice the leaf count of optimal. 253 vs. \(2 (75) = 150\).
Time = 0.12 (sec) , antiderivative size = 253, normalized size of antiderivative = 2.56 \[ \int \frac {3-x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\frac {1}{12} \, \sqrt {14 \, \sqrt {3} + 15} \arctan \left (\frac {{\left (6 \, x^{2} + \sqrt {3} {\left (x^{2} - 8 \, x + 10\right )} + 18 \, x - 6\right )} \sqrt {14 \, \sqrt {3} + 15}}{66 \, \sqrt {x^{3} - 1}}\right ) - \frac {1}{24} \, \sqrt {14 \, \sqrt {3} - 15} \log \left (\frac {11 \, x^{4} + 22 \, x^{3} + 66 \, x^{2} + 2 \, \sqrt {x^{3} - 1} {\left (4 \, x^{2} + \sqrt {3} {\left (3 \, x^{2} + 2 \, x + 4\right )} + 10 \, x - 2\right )} \sqrt {14 \, \sqrt {3} - 15} + 44 \, \sqrt {3} {\left (x^{3} - 1\right )} - 44 \, x + 44}{x^{4} - 4 \, x^{3} + 8 \, x + 4}\right ) + \frac {1}{24} \, \sqrt {14 \, \sqrt {3} - 15} \log \left (\frac {11 \, x^{4} + 22 \, x^{3} + 66 \, x^{2} - 2 \, \sqrt {x^{3} - 1} {\left (4 \, x^{2} + \sqrt {3} {\left (3 \, x^{2} + 2 \, x + 4\right )} + 10 \, x - 2\right )} \sqrt {14 \, \sqrt {3} - 15} + 44 \, \sqrt {3} {\left (x^{3} - 1\right )} - 44 \, x + 44}{x^{4} - 4 \, x^{3} + 8 \, x + 4}\right ) \] Input:
integrate((x^2-x+3)/(x^2-2*x-2)/(x^3-1)^(1/2),x, algorithm="fricas")
Output:
1/12*sqrt(14*sqrt(3) + 15)*arctan(1/66*(6*x^2 + sqrt(3)*(x^2 - 8*x + 10) + 18*x - 6)*sqrt(14*sqrt(3) + 15)/sqrt(x^3 - 1)) - 1/24*sqrt(14*sqrt(3) - 1 5)*log((11*x^4 + 22*x^3 + 66*x^2 + 2*sqrt(x^3 - 1)*(4*x^2 + sqrt(3)*(3*x^2 + 2*x + 4) + 10*x - 2)*sqrt(14*sqrt(3) - 15) + 44*sqrt(3)*(x^3 - 1) - 44* x + 44)/(x^4 - 4*x^3 + 8*x + 4)) + 1/24*sqrt(14*sqrt(3) - 15)*log((11*x^4 + 22*x^3 + 66*x^2 - 2*sqrt(x^3 - 1)*(4*x^2 + sqrt(3)*(3*x^2 + 2*x + 4) + 1 0*x - 2)*sqrt(14*sqrt(3) - 15) + 44*sqrt(3)*(x^3 - 1) - 44*x + 44)/(x^4 - 4*x^3 + 8*x + 4))
\[ \int \frac {3-x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int \frac {x^{2} - x + 3}{\sqrt {\left (x - 1\right ) \left (x^{2} + x + 1\right )} \left (x^{2} - 2 x - 2\right )}\, dx \] Input:
integrate((x**2-x+3)/(x**2-2*x-2)/(x**3-1)**(1/2),x)
Output:
Integral((x**2 - x + 3)/(sqrt((x - 1)*(x**2 + x + 1))*(x**2 - 2*x - 2)), x )
\[ \int \frac {3-x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int { \frac {x^{2} - x + 3}{\sqrt {x^{3} - 1} {\left (x^{2} - 2 \, x - 2\right )}} \,d x } \] Input:
integrate((x^2-x+3)/(x^2-2*x-2)/(x^3-1)^(1/2),x, algorithm="maxima")
Output:
integrate((x^2 - x + 3)/(sqrt(x^3 - 1)*(x^2 - 2*x - 2)), x)
\[ \int \frac {3-x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=\int { \frac {x^{2} - x + 3}{\sqrt {x^{3} - 1} {\left (x^{2} - 2 \, x - 2\right )}} \,d x } \] Input:
integrate((x^2-x+3)/(x^2-2*x-2)/(x^3-1)^(1/2),x, algorithm="giac")
Output:
integrate((x^2 - x + 3)/(sqrt(x^3 - 1)*(x^2 - 2*x - 2)), x)
Time = 8.30 (sec) , antiderivative size = 505, normalized size of antiderivative = 5.10 \[ \int \frac {3-x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx =\text {Too large to display} \] Input:
int(-(x^2 - x + 3)/((x^3 - 1)^(1/2)*(2*x - x^2 + 2)),x)
Output:
(((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)*(3^(1/2) + 6)*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)) - (((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)*(3^(1/2) - 6)*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)*1 i)/2 - 1/2)*((3^(1/2)*1i)/2 + 1/2) - x*(((3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*1 i)/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)*ellipt icF(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 {3-x+x^2}{\left (-2-2 x+x^2\right ) \sqrt {-1+x^3}} \, dx=3 \left (\int \frac {\sqrt {x^{3}-1}}{x^{5}-2 x^{4}-2 x^{3}-x^{2}+2 x +2}d x \right )+\int \frac {\sqrt {x^{3}-1}\, x^{2}}{x^{5}-2 x^{4}-2 x^{3}-x^{2}+2 x +2}d x -\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-x+3)/(x^2-2*x-2)/(x^3-1)^(1/2),x)
Output:
3*int(sqrt(x**3 - 1)/(x**5 - 2*x**4 - 2*x**3 - x**2 + 2*x + 2),x) + int((s qrt(x**3 - 1)*x**2)/(x**5 - 2*x**4 - 2*x**3 - x**2 + 2*x + 2),x) - int((sq rt(x**3 - 1)*x)/(x**5 - 2*x**4 - 2*x**3 - x**2 + 2*x + 2),x)