\(\int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx\) [286]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [F(-1)]
Sympy [A] (verification not implemented)
Maxima [F]
Giac [F]
Mupad [B] (verification not implemented)
Reduce [F]

Optimal result

Integrand size = 30, antiderivative size = 437 \[ \int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx=\frac {\left (297 \sqrt [3]{-6}+158 (-2)^{2/3}+12\ 3^{2/3}\right ) \arctan \left (\frac {3 (-2)^{2/3} \sqrt [3]{3}+2 x}{\sqrt {6 \left (4+3 \sqrt [3]{-2} 3^{2/3}\right )}}\right )}{486 \sqrt [6]{3} \sqrt {8+9 i \sqrt [3]{2} \sqrt [6]{3}+3 \sqrt [3]{2} 3^{2/3}}}+\frac {(-1)^{2/3} \left (6 (-6)^{2/3}+297 \sqrt [3]{-3}+158 \sqrt [3]{2}\right ) \arctan \left (\frac {\sqrt [6]{2} \left (3 \sqrt [3]{-3}-\sqrt [3]{2} x\right )}{\sqrt {3 \left (4-3 (-3)^{2/3} \sqrt [3]{2}\right )}}\right )}{162 \sqrt [6]{6} \left (1+\sqrt [3]{-1}\right )^2 \sqrt {4-3 (-3)^{2/3} \sqrt [3]{2}}}-\frac {\left (158 \sqrt [3]{2}-297 \sqrt [3]{3}+6\ 6^{2/3}\right ) \text {arctanh}\left (\frac {\sqrt [6]{2} \left (3 \sqrt [3]{3}+\sqrt [3]{2} x\right )}{\sqrt {3 \left (-4+3 \sqrt [3]{2} 3^{2/3}\right )}}\right )}{486 \sqrt [6]{6} \sqrt {-4+3 \sqrt [3]{2} 3^{2/3}}}-\frac {\left (21 (-3)^{2/3}+2\ 2^{2/3}\right ) \log \left (6-3 \sqrt [3]{-3} 2^{2/3} x+x^2\right )}{108 \sqrt [3]{6} \left (1+\sqrt [3]{-1}\right )^2}+\frac {\left (21 (-6)^{2/3}-4 \sqrt [3]{-2}\right ) \log \left (6+3 (-2)^{2/3} \sqrt [3]{3} x+x^2\right )}{648 \sqrt [3]{3}}+\frac {\left (2\ 2^{2/3}+21\ 3^{2/3}\right ) \log \left (6+3\ 2^{2/3} \sqrt [3]{3} x+x^2\right )}{324 \sqrt [3]{6}} \] Output:

1/1458*(297*(-6)^(1/3)+158*(-2)^(2/3)+12*3^(2/3))*arctan((3*(-2)^(2/3)*3^( 
1/3)+2*x)/(24+18*(-2)^(1/3)*3^(2/3))^(1/2))*3^(5/6)/(8+9*I*2^(1/3)*3^(1/6) 
+3*2^(1/3)*3^(2/3))^(1/2)+1/972*(-1)^(2/3)*(6*(-6)^(2/3)+297*(-3)^(1/3)+15 
8*2^(1/3))*arctan(2^(1/6)*(3*(-3)^(1/3)-2^(1/3)*x)/(12-9*(-3)^(2/3)*2^(1/3 
))^(1/2))*6^(5/6)/(1+(-1)^(1/3))^2/(4-3*(-3)^(2/3)*2^(1/3))^(1/2)-1/2916*( 
158*2^(1/3)-297*3^(1/3)+6*6^(2/3))*arctanh(2^(1/6)*(3*3^(1/3)+2^(1/3)*x)/( 
-12+9*2^(1/3)*3^(2/3))^(1/2))*6^(5/6)/(-4+3*2^(1/3)*3^(2/3))^(1/2)-1/648*( 
21*(-3)^(2/3)+2*2^(2/3))*ln(6-3*(-3)^(1/3)*2^(2/3)*x+x^2)*6^(2/3)/(1+(-1)^ 
(1/3))^2+1/1944*(21*(-6)^(2/3)-4*(-2)^(1/3))*ln(6+3*(-2)^(2/3)*3^(1/3)*x+x 
^2)*3^(2/3)+1/1944*(2*2^(2/3)+21*3^(2/3))*ln(6+3*2^(2/3)*3^(1/3)*x+x^2)*6^ 
(2/3)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.03 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.20 \[ \int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx=\frac {81}{2} \text {RootSum}\left [125128+64608 \text {$\#$1}-39612 \text {$\#$1}^2+7292 \text {$\#$1}^3+222 \text {$\#$1}^4-12 \text {$\#$1}^5+\text {$\#$1}^6\&,\frac {\log (2+3 x-\text {$\#$1}) \text {$\#$1}^3}{10768-13204 \text {$\#$1}+3646 \text {$\#$1}^2+148 \text {$\#$1}^3-10 \text {$\#$1}^4+\text {$\#$1}^5}\&\right ] \] Input:

Integrate[(2 + 3*x)^3/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6),x]
 

Output:

(81*RootSum[125128 + 64608*#1 - 39612*#1^2 + 7292*#1^3 + 222*#1^4 - 12*#1^ 
5 + #1^6 & , (Log[2 + 3*x - #1]*#1^3)/(10768 - 13204*#1 + 3646*#1^2 + 148* 
#1^3 - 10*#1^4 + #1^5) & ])/2
 

Rubi [A] (verified)

Time = 2.34 (sec) , antiderivative size = 449, normalized size of antiderivative = 1.03, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2466, 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 {(3 x+2)^3}{x^6+18 x^4+324 x^3+108 x^2+216} \, dx\)

\(\Big \downarrow \) 2466

\(\displaystyle 1259712 \int \left (-\frac {(-1)^{2/3} \left (\left (63-2 \sqrt [3]{-3} 2^{2/3}\right ) x+2 \left (79+6 (-3)^{2/3} \sqrt [3]{2}+27 \sqrt [3]{-3} 2^{2/3}\right )\right )}{68024448 \sqrt [3]{2} 3^{2/3} \left (1+\sqrt [3]{-1}\right )^2 \left (x^2-3 \sqrt [3]{-3} 2^{2/3} x+6\right )}+\frac {(-1)^{2/3} \left (\left (63+2 (-2)^{2/3} \sqrt [3]{3}\right ) x+2 \left (79-27 (-2)^{2/3} \sqrt [3]{3}-6 \sqrt [3]{-2} 3^{2/3}\right )\right )}{204073344 \sqrt [3]{2} 3^{2/3} \left (x^2+3 (-2)^{2/3} \sqrt [3]{3} x+6\right )}+\frac {6^{2/3} \left (2\ 2^{2/3}+21\ 3^{2/3}\right ) x+2 \left (36+79\ 2^{2/3} \sqrt [3]{3}-54 \sqrt [3]{2} 3^{2/3}\right )}{1224440064 \left (x^2+3\ 2^{2/3} \sqrt [3]{3} x+6\right )}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle 1259712 \left (\frac {(-1)^{2/3} \left (316-297 (-2)^{2/3} \sqrt [3]{3}-12 \sqrt [3]{-2} 3^{2/3}\right ) \arctan \left (\frac {2 x+3 (-2)^{2/3} \sqrt [3]{3}}{\sqrt {6 \left (4+3 \sqrt [3]{-2} 3^{2/3}\right )}}\right )}{612220032\ 2^{5/6} \sqrt [6]{3} \sqrt {4+3 \sqrt [3]{-2} 3^{2/3}}}+\frac {(-1)^{2/3} \left (6 (-6)^{2/3}+297 \sqrt [3]{-3}+158 \sqrt [3]{2}\right ) \arctan \left (\frac {\sqrt [6]{2} \left (3 \sqrt [3]{-3}-\sqrt [3]{2} x\right )}{\sqrt {3 \left (4-3 (-3)^{2/3} \sqrt [3]{2}\right )}}\right )}{204073344 \sqrt [6]{6} \left (1+\sqrt [3]{-1}\right )^2 \sqrt {4-3 (-3)^{2/3} \sqrt [3]{2}}}-\frac {\left (158 \sqrt [3]{2}-297 \sqrt [3]{3}+6\ 6^{2/3}\right ) \text {arctanh}\left (\frac {\sqrt [6]{2} \left (\sqrt [3]{2} x+3 \sqrt [3]{3}\right )}{\sqrt {3 \left (3 \sqrt [3]{2} 3^{2/3}-4\right )}}\right )}{612220032 \sqrt [6]{6} \sqrt {3 \sqrt [3]{2} 3^{2/3}-4}}-\frac {\left (63 (-1)^{2/3} \sqrt [3]{2}+4 \sqrt [3]{3}\right ) \log \left (x^2-3 \sqrt [3]{-3} 2^{2/3} x+6\right )}{136048896\ 6^{2/3} \left (1+\sqrt [3]{-1}\right )^2}+\frac {(-1)^{2/3} \left (2 (-2)^{2/3}+21\ 3^{2/3}\right ) \log \left (x^2+3 (-2)^{2/3} \sqrt [3]{3} x+6\right )}{408146688 \sqrt [3]{6}}+\frac {\left (2\ 2^{2/3}+21\ 3^{2/3}\right ) \log \left (x^2+3\ 2^{2/3} \sqrt [3]{3} x+6\right )}{408146688 \sqrt [3]{6}}\right )\)

Input:

Int[(2 + 3*x)^3/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6),x]
 

Output:

1259712*(((-1)^(2/3)*(316 - 297*(-2)^(2/3)*3^(1/3) - 12*(-2)^(1/3)*3^(2/3) 
)*ArcTan[(3*(-2)^(2/3)*3^(1/3) + 2*x)/Sqrt[6*(4 + 3*(-2)^(1/3)*3^(2/3))]]) 
/(612220032*2^(5/6)*3^(1/6)*Sqrt[4 + 3*(-2)^(1/3)*3^(2/3)]) + ((-1)^(2/3)* 
(6*(-6)^(2/3) + 297*(-3)^(1/3) + 158*2^(1/3))*ArcTan[(2^(1/6)*(3*(-3)^(1/3 
) - 2^(1/3)*x))/Sqrt[3*(4 - 3*(-3)^(2/3)*2^(1/3))]])/(204073344*6^(1/6)*(1 
 + (-1)^(1/3))^2*Sqrt[4 - 3*(-3)^(2/3)*2^(1/3)]) - ((158*2^(1/3) - 297*3^( 
1/3) + 6*6^(2/3))*ArcTanh[(2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/Sqrt[3*(-4 + 3 
*2^(1/3)*3^(2/3))]])/(612220032*6^(1/6)*Sqrt[-4 + 3*2^(1/3)*3^(2/3)]) - (( 
63*(-1)^(2/3)*2^(1/3) + 4*3^(1/3))*Log[6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2])/ 
(136048896*6^(2/3)*(1 + (-1)^(1/3))^2) + ((-1)^(2/3)*(2*(-2)^(2/3) + 21*3^ 
(2/3))*Log[6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2])/(408146688*6^(1/3)) + ((2*2^ 
(2/3) + 21*3^(2/3))*Log[6 + 3*2^(2/3)*3^(1/3)*x + x^2])/(408146688*6^(1/3) 
))
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2466
Int[(u_.)*(Q6_)^(p_), x_Symbol] :> With[{a = Coeff[Q6, x, 0], b = Coeff[Q6, 
 x, 2], c = Coeff[Q6, x, 3], d = Coeff[Q6, x, 4], e = Coeff[Q6, x, 6]}, Sim 
p[1/(3^(3*p)*a^(2*p))   Int[ExpandIntegrand[u*(3*a + 3*Rt[a, 3]^2*Rt[c, 3]* 
x + b*x^2)^p*(3*a - 3*(-1)^(1/3)*Rt[a, 3]^2*Rt[c, 3]*x + b*x^2)^p*(3*a + 3* 
(-1)^(2/3)*Rt[a, 3]^2*Rt[c, 3]*x + b*x^2)^p, x], x], x] /; EqQ[b^2 - 3*a*d, 
 0] && EqQ[b^3 - 27*a^2*e, 0]] /; ILtQ[p, 0] && PolyQ[Q6, x, 6] && EqQ[Coef 
f[Q6, x, 1], 0] && EqQ[Coeff[Q6, x, 5], 0] && RationalFunctionQ[u, x]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.17 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.16

method result size
default \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{6}+18 \textit {\_Z}^{4}+324 \textit {\_Z}^{3}+108 \textit {\_Z}^{2}+216\right )}{\sum }\frac {\left (27 \textit {\_R}^{3}+54 \textit {\_R}^{2}+36 \textit {\_R} +8\right ) \ln \left (x -\textit {\_R} \right )}{\textit {\_R}^{5}+12 \textit {\_R}^{3}+162 \textit {\_R}^{2}+36 \textit {\_R}}\right )}{6}\) \(68\)
risch \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{6}+18 \textit {\_Z}^{4}+324 \textit {\_Z}^{3}+108 \textit {\_Z}^{2}+216\right )}{\sum }\frac {\left (27 \textit {\_R}^{3}+54 \textit {\_R}^{2}+36 \textit {\_R} +8\right ) \ln \left (x -\textit {\_R} \right )}{\textit {\_R}^{5}+12 \textit {\_R}^{3}+162 \textit {\_R}^{2}+36 \textit {\_R}}\right )}{6}\) \(68\)

Input:

int((2+3*x)^3/(x^6+18*x^4+324*x^3+108*x^2+216),x,method=_RETURNVERBOSE)
 

Output:

1/6*sum((27*_R^3+54*_R^2+36*_R+8)/(_R^5+12*_R^3+162*_R^2+36*_R)*ln(x-_R),_ 
R=RootOf(_Z^6+18*_Z^4+324*_Z^3+108*_Z^2+216))
 

Fricas [F(-1)]

Timed out. \[ \int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx=\text {Timed out} \] Input:

integrate((2+3*x)^3/(x^6+18*x^4+324*x^3+108*x^2+216),x, algorithm="fricas" 
)
 

Output:

Timed out
 

Sympy [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.15 \[ \int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx=\operatorname {RootSum} {\left (66728492347347362304 t^{6} - 1457878672952003520 t^{4} - 314926577855066016 t^{3} + 56707791944836392 t^{2} - 2072881129241808 t - 3826428019721, \left ( t \mapsto t \log {\left (- \frac {2996459005882230993967462856612309614913664000 t^{5}}{24149354047666879671477078857336613502051} - \frac {22007269209016237436715701957319757221395328 t^{4}}{24149354047666879671477078857336613502051} + \frac {81117847403442138269983662552341850714924480 t^{3}}{24149354047666879671477078857336613502051} + \frac {15514735570255880082526639018859911997121600 t^{2}}{24149354047666879671477078857336613502051} - \frac {134937888689894711332515799739123991094092 t}{1857642619051298436267467604410508730927} + x + \frac {21670774544285125054338536642513993968044}{24149354047666879671477078857336613502051} \right )} \right )\right )} \] Input:

integrate((2+3*x)**3/(x**6+18*x**4+324*x**3+108*x**2+216),x)
 

Output:

RootSum(66728492347347362304*_t**6 - 1457878672952003520*_t**4 - 314926577 
855066016*_t**3 + 56707791944836392*_t**2 - 2072881129241808*_t - 38264280 
19721, Lambda(_t, _t*log(-2996459005882230993967462856612309614913664000*_ 
t**5/24149354047666879671477078857336613502051 - 2200726920901623743671570 
1957319757221395328*_t**4/24149354047666879671477078857336613502051 + 8111 
7847403442138269983662552341850714924480*_t**3/241493540476668796714770788 
57336613502051 + 15514735570255880082526639018859911997121600*_t**2/241493 
54047666879671477078857336613502051 - 134937888689894711332515799739123991 
094092*_t/1857642619051298436267467604410508730927 + x + 21670774544285125 
054338536642513993968044/24149354047666879671477078857336613502051)))
 

Maxima [F]

\[ \int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx=\int { \frac {{\left (3 \, x + 2\right )}^{3}}{x^{6} + 18 \, x^{4} + 324 \, x^{3} + 108 \, x^{2} + 216} \,d x } \] Input:

integrate((2+3*x)^3/(x^6+18*x^4+324*x^3+108*x^2+216),x, algorithm="maxima" 
)
 

Output:

integrate((3*x + 2)^3/(x^6 + 18*x^4 + 324*x^3 + 108*x^2 + 216), x)
 

Giac [F]

\[ \int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx=\int { \frac {{\left (3 \, x + 2\right )}^{3}}{x^{6} + 18 \, x^{4} + 324 \, x^{3} + 108 \, x^{2} + 216} \,d x } \] Input:

integrate((2+3*x)^3/(x^6+18*x^4+324*x^3+108*x^2+216),x, algorithm="giac")
 

Output:

integrate((3*x + 2)^3/(x^6 + 18*x^4 + 324*x^3 + 108*x^2 + 216), x)
                                                                                    
                                                                                    
 

Mupad [B] (verification not implemented)

Time = 22.45 (sec) , antiderivative size = 338, normalized size of antiderivative = 0.77 \[ \int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx =\text {Too large to display} \] Input:

int((3*x + 2)^3/(108*x^2 + 324*x^3 + 18*x^4 + x^6 + 216),x)
 

Output:

symsum(log(23112246375*x - 1060028634492*root(z^6 - (26885*z^4)/1230552 - 
(25402517*z^3)/5382434448 + (1482023821*z^2)/1743908761152 - (59238715399* 
z)/1906964230319712 - 3826428019721/66728492347347362304, z, k) - 21273515 
2480*root(z^6 - (26885*z^4)/1230552 - (25402517*z^3)/5382434448 + (1482023 
821*z^2)/1743908761152 - (59238715399*z)/1906964230319712 - 3826428019721/ 
66728492347347362304, z, k)*x - 317857955976*root(z^6 - (26885*z^4)/123055 
2 - (25402517*z^3)/5382434448 + (1482023821*z^2)/1743908761152 - (59238715 
399*z)/1906964230319712 - 3826428019721/66728492347347362304, z, k)^2*x + 
2097976012992*root(z^6 - (26885*z^4)/1230552 - (25402517*z^3)/5382434448 + 
 (1482023821*z^2)/1743908761152 - (59238715399*z)/1906964230319712 - 38264 
28019721/66728492347347362304, z, k)^3*x + 27299197336896*root(z^6 - (2688 
5*z^4)/1230552 - (25402517*z^3)/5382434448 + (1482023821*z^2)/174390876115 
2 - (59238715399*z)/1906964230319712 - 3826428019721/66728492347347362304, 
 z, k)^4*x - 72301961339136*root(z^6 - (26885*z^4)/1230552 - (25402517*z^3 
)/5382434448 + (1482023821*z^2)/1743908761152 - (59238715399*z)/1906964230 
319712 - 3826428019721/66728492347347362304, z, k)^5*x + 9560202531264*roo 
t(z^6 - (26885*z^4)/1230552 - (25402517*z^3)/5382434448 + (1482023821*z^2) 
/1743908761152 - (59238715399*z)/1906964230319712 - 3826428019721/66728492 
347347362304, z, k)^2 + 33332166587232*root(z^6 - (26885*z^4)/1230552 - (2 
5402517*z^3)/5382434448 + (1482023821*z^2)/1743908761152 - (59238715399...
 

Reduce [F]

\[ \int \frac {(2+3 x)^3}{216+108 x^2+324 x^3+18 x^4+x^6} \, dx=27 \left (\int \frac {x^{3}}{x^{6}+18 x^{4}+324 x^{3}+108 x^{2}+216}d x \right )+54 \left (\int \frac {x^{2}}{x^{6}+18 x^{4}+324 x^{3}+108 x^{2}+216}d x \right )+36 \left (\int \frac {x}{x^{6}+18 x^{4}+324 x^{3}+108 x^{2}+216}d x \right )+8 \left (\int \frac {1}{x^{6}+18 x^{4}+324 x^{3}+108 x^{2}+216}d x \right ) \] Input:

int((2+3*x)^3/(x^6+18*x^4+324*x^3+108*x^2+216),x)
 

Output:

27*int(x**3/(x**6 + 18*x**4 + 324*x**3 + 108*x**2 + 216),x) + 54*int(x**2/ 
(x**6 + 18*x**4 + 324*x**3 + 108*x**2 + 216),x) + 36*int(x/(x**6 + 18*x**4 
 + 324*x**3 + 108*x**2 + 216),x) + 8*int(1/(x**6 + 18*x**4 + 324*x**3 + 10 
8*x**2 + 216),x)