Integrand size = 35, antiderivative size = 307 \[ \int \frac {x^3 \left (5+x+3 x^2+2 x^3\right )}{2+x+5 x^2+x^3+2 x^4} \, dx=-\frac {1}{28} \left (35-9 i \sqrt {7}\right ) x-\frac {1}{28} \left (35+9 i \sqrt {7}\right ) x+\frac {1}{28} \left (7-5 i \sqrt {7}\right ) x^2+\frac {1}{28} \left (7+5 i \sqrt {7}\right ) x^2+\frac {1}{42} \left (7-5 i \sqrt {7}\right ) x^3+\frac {1}{42} \left (7+5 i \sqrt {7}\right ) x^3+\frac {11 \left (9 i+5 \sqrt {7}\right ) \arctan \left (\frac {1-i \sqrt {7}+8 x}{\sqrt {2 \left (35+i \sqrt {7}\right )}}\right )}{4 \sqrt {14 \left (35+i \sqrt {7}\right )}}-\frac {11 \left (9 i-5 \sqrt {7}\right ) \arctan \left (\frac {1+i \sqrt {7}+8 x}{\sqrt {2 \left (35-i \sqrt {7}\right )}}\right )}{4 \sqrt {14 \left (35-i \sqrt {7}\right )}}+\frac {3}{112} \left (7-11 i \sqrt {7}\right ) \log \left (4+\left (1-i \sqrt {7}\right ) x+4 x^2\right )+\frac {3}{112} \left (7+11 i \sqrt {7}\right ) \log \left (4+\left (1+i \sqrt {7}\right ) x+4 x^2\right ) \]
1/28*x^2*(7-5*I*7^(1/2))+1/42*x^3*(7-5*I*7^(1/2))+1/28*x^2*(7+5*I*7^(1/2)) +1/42*x^3*(7+5*I*7^(1/2))-1/28*x*(35-9*I*7^(1/2))-1/28*x*(35+9*I*7^(1/2))+ 3/112*ln(4+4*x^2+x*(1-I*7^(1/2)))*(7-11*I*7^(1/2))+3/112*ln(4+4*x^2+x*(1+I *7^(1/2)))*(7+11*I*7^(1/2))-11/4*arctan((1+8*x+I*7^(1/2))/(70-2*I*7^(1/2)) ^(1/2))*(9*I-5*7^(1/2))/(490-14*I*7^(1/2))^(1/2)+11/4*arctan((1+8*x-I*7^(1 /2))/(70+2*I*7^(1/2))^(1/2))*(9*I+5*7^(1/2))/(490+14*I*7^(1/2))^(1/2)
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.01 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.36 \[ \int \frac {x^3 \left (5+x+3 x^2+2 x^3\right )}{2+x+5 x^2+x^3+2 x^4} \, dx=\frac {1}{6} \left (x \left (-15+3 x+2 x^2\right )+3 \text {RootSum}\left [2+\text {$\#$1}+5 \text {$\#$1}^2+\text {$\#$1}^3+2 \text {$\#$1}^4\&,\frac {10 \log (x-\text {$\#$1})+\log (x-\text {$\#$1}) \text {$\#$1}+19 \log (x-\text {$\#$1}) \text {$\#$1}^2+3 \log (x-\text {$\#$1}) \text {$\#$1}^3}{1+10 \text {$\#$1}+3 \text {$\#$1}^2+8 \text {$\#$1}^3}\&\right ]\right ) \]
(x*(-15 + 3*x + 2*x^2) + 3*RootSum[2 + #1 + 5*#1^2 + #1^3 + 2*#1^4 & , (10 *Log[x - #1] + Log[x - #1]*#1 + 19*Log[x - #1]*#1^2 + 3*Log[x - #1]*#1^3)/ (1 + 10*#1 + 3*#1^2 + 8*#1^3) & ])/6
Time = 0.73 (sec) , antiderivative size = 228, normalized size of antiderivative = 0.74, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.057, Rules used = {2492, 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^3 \left (2 x^3+3 x^2+x+5\right )}{2 x^4+x^3+5 x^2+x+2} \, dx\) |
\(\Big \downarrow \) 2492 |
\(\displaystyle \frac {1}{2} \int \left (2 x^2+2 x+\frac {3 \left (7 i-11 \sqrt {7}\right ) x+2 \left (35 i+9 \sqrt {7}\right )}{7 \left (4 i x^2+\left (i-\sqrt {7}\right ) x+4 i\right )}+\frac {3 \left (7 i+11 \sqrt {7}\right ) x+2 \left (35 i-9 \sqrt {7}\right )}{7 \left (4 i x^2+\left (i+\sqrt {7}\right ) x+4 i\right )}-5\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \left (-\frac {11 \left (9+5 i \sqrt {7}\right ) \text {arctanh}\left (\frac {8 i x-\sqrt {7}+i}{\sqrt {2 \left (35-i \sqrt {7}\right )}}\right )}{2 \sqrt {14 \left (35-i \sqrt {7}\right )}}+\frac {11 \left (9-5 i \sqrt {7}\right ) \text {arctanh}\left (\frac {8 i x+\sqrt {7}+i}{\sqrt {2 \left (35+i \sqrt {7}\right )}}\right )}{2 \sqrt {14 \left (35+i \sqrt {7}\right )}}+\frac {2 x^3}{3}+x^2+\frac {3}{56} \left (7+11 i \sqrt {7}\right ) \log \left (4 i x^2+\left (-\sqrt {7}+i\right ) x+4 i\right )+\frac {3}{56} \left (7-11 i \sqrt {7}\right ) \log \left (4 i x^2+\left (\sqrt {7}+i\right ) x+4 i\right )-5 x\right )\) |
(-5*x + x^2 + (2*x^3)/3 - (11*(9 + (5*I)*Sqrt[7])*ArcTanh[(I - Sqrt[7] + ( 8*I)*x)/Sqrt[2*(35 - I*Sqrt[7])]])/(2*Sqrt[14*(35 - I*Sqrt[7])]) + (11*(9 - (5*I)*Sqrt[7])*ArcTanh[(I + Sqrt[7] + (8*I)*x)/Sqrt[2*(35 + I*Sqrt[7])]] )/(2*Sqrt[14*(35 + I*Sqrt[7])]) + (3*(7 + (11*I)*Sqrt[7])*Log[4*I + (I - S qrt[7])*x + (4*I)*x^2])/56 + (3*(7 - (11*I)*Sqrt[7])*Log[4*I + (I + Sqrt[7 ])*x + (4*I)*x^2])/56)/2
3.3.50.3.1 Defintions of rubi rules used
Int[(Px_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2 + (d_.)*(x_)^3 + (e_.)*(x_)^4) ^(p_), x_Symbol] :> Simp[e^p Int[ExpandIntegrand[Px*(b/d + ((d + Sqrt[e*( (b^2 - 4*a*c)/a) + 8*a*d*(e/b)])/(2*e))*x + x^2)^p*(b/d + ((d - Sqrt[e*((b^ 2 - 4*a*c)/a) + 8*a*d*(e/b)])/(2*e))*x + x^2)^p, x], x], x] /; FreeQ[{a, b, c, d, e}, x] && PolyQ[Px, x] && ILtQ[p, 0] && EqQ[a*d^2 - b^2*e, 0]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.05 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.24
method | result | size |
default | \(\frac {x^{3}}{3}+\frac {x^{2}}{2}-\frac {5 x}{2}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )}{\sum }\frac {\left (3 \textit {\_R}^{3}+19 \textit {\_R}^{2}+\textit {\_R} +10\right ) \ln \left (x -\textit {\_R} \right )}{8 \textit {\_R}^{3}+3 \textit {\_R}^{2}+10 \textit {\_R} +1}\right )}{2}\) | \(74\) |
risch | \(\frac {x^{3}}{3}+\frac {x^{2}}{2}-\frac {5 x}{2}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (2 \textit {\_Z}^{4}+\textit {\_Z}^{3}+5 \textit {\_Z}^{2}+\textit {\_Z} +2\right )}{\sum }\frac {\left (3 \textit {\_R}^{3}+19 \textit {\_R}^{2}+\textit {\_R} +10\right ) \ln \left (x -\textit {\_R} \right )}{8 \textit {\_R}^{3}+3 \textit {\_R}^{2}+10 \textit {\_R} +1}\right )}{2}\) | \(74\) |
1/3*x^3+1/2*x^2-5/2*x+1/2*sum((3*_R^3+19*_R^2+_R+10)/(8*_R^3+3*_R^2+10*_R+ 1)*ln(x-_R),_R=RootOf(2*_Z^4+_Z^3+5*_Z^2+_Z+2))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1202 vs. \(2 (199) = 398\).
Time = 1.06 (sec) , antiderivative size = 1202, normalized size of antiderivative = 3.92 \[ \int \frac {x^3 \left (5+x+3 x^2+2 x^3\right )}{2+x+5 x^2+x^3+2 x^4} \, dx=\text {Too large to display} \]
1/3*x^3 + 1/2*x^2 - 1/112*(-33*I*sqrt(7) + 56*sqrt(2101/1568*I*sqrt(7) - 5 5/32) - 21)*log(23324*(33/112*I*sqrt(7) - 1/2*sqrt(2101/1568*I*sqrt(7) - 5 5/32) + 3/16)^3 - 23765*(33/112*I*sqrt(7) - 1/2*sqrt(2101/1568*I*sqrt(7) - 55/32) + 3/16)^2 + 7744*x + 19470*I*sqrt(7) - 33040*sqrt(2101/1568*I*sqrt (7) - 55/32) + 38950) - 1/112*(33*I*sqrt(7) + 56*sqrt(-2101/1568*I*sqrt(7) - 55/32) - 21)*log(-23324*(33/112*I*sqrt(7) - 1/2*sqrt(2101/1568*I*sqrt(7 ) - 55/32) + 3/16)^3 + 49/4*(-33/112*I*sqrt(7) - 1/2*sqrt(-2101/1568*I*sqr t(7) - 55/32) + 3/16)^2*(-561*I*sqrt(7) + 952*sqrt(2101/1568*I*sqrt(7) - 5 5/32) - 869) + 1/256*(53312*(33/112*I*sqrt(7) - 1/2*sqrt(2101/1568*I*sqrt( 7) - 55/32) + 3/16)^2 - 11781*I*sqrt(7) + 19992*sqrt(2101/1568*I*sqrt(7) - 55/32) - 36681)*(33*I*sqrt(7) + 56*sqrt(-2101/1568*I*sqrt(7) - 55/32) - 2 1) + 17493*(33/112*I*sqrt(7) - 1/2*sqrt(2101/1568*I*sqrt(7) - 55/32) + 3/1 6)^2 + 7744*x - 15708*I*sqrt(7) + 26656*sqrt(2101/1568*I*sqrt(7) - 55/32) - 29132) + 1/112*(2*sqrt(7)*sqrt(-336*(33/112*I*sqrt(7) - 1/2*sqrt(2101/15 68*I*sqrt(7) - 55/32) + 3/16)^2 - 336*(-33/112*I*sqrt(7) - 1/2*sqrt(-2101/ 1568*I*sqrt(7) - 55/32) + 3/16)^2 - 1/56*(33*I*sqrt(7) + 56*sqrt(-2101/156 8*I*sqrt(7) - 55/32) - 21)*(-33*I*sqrt(7) + 56*sqrt(2101/1568*I*sqrt(7) - 55/32) + 63) + 99/2*I*sqrt(7) - 84*sqrt(2101/1568*I*sqrt(7) - 55/32) - 185 9/2) + 28*sqrt(2101/1568*I*sqrt(7) - 55/32) + 28*sqrt(-2101/1568*I*sqrt(7) - 55/32) + 21)*log(-49/4*(-33/112*I*sqrt(7) - 1/2*sqrt(-2101/1568*I*sq...
Time = 0.58 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.20 \[ \int \frac {x^3 \left (5+x+3 x^2+2 x^3\right )}{2+x+5 x^2+x^3+2 x^4} \, dx=\frac {x^{3}}{3} + \frac {x^{2}}{2} - \frac {5 x}{2} + \operatorname {RootSum} {\left (1372 t^{4} - 1029 t^{3} + 3136 t^{2} + 2688 t + 512, \left ( t \mapsto t \log {\left (\frac {5831 t^{3}}{1936} - \frac {23765 t^{2}}{7744} + \frac {2065 t}{242} + x + \frac {415}{121} \right )} \right )\right )} \]
x**3/3 + x**2/2 - 5*x/2 + RootSum(1372*_t**4 - 1029*_t**3 + 3136*_t**2 + 2 688*_t + 512, Lambda(_t, _t*log(5831*_t**3/1936 - 23765*_t**2/7744 + 2065* _t/242 + x + 415/121)))
\[ \int \frac {x^3 \left (5+x+3 x^2+2 x^3\right )}{2+x+5 x^2+x^3+2 x^4} \, dx=\int { \frac {{\left (2 \, x^{3} + 3 \, x^{2} + x + 5\right )} x^{3}}{2 \, x^{4} + x^{3} + 5 \, x^{2} + x + 2} \,d x } \]
1/3*x^3 + 1/2*x^2 - 5/2*x + 1/2*integrate((3*x^3 + 19*x^2 + x + 10)/(2*x^4 + x^3 + 5*x^2 + x + 2), x)
\[ \int \frac {x^3 \left (5+x+3 x^2+2 x^3\right )}{2+x+5 x^2+x^3+2 x^4} \, dx=\int { \frac {{\left (2 \, x^{3} + 3 \, x^{2} + x + 5\right )} x^{3}}{2 \, x^{4} + x^{3} + 5 \, x^{2} + x + 2} \,d x } \]
Time = 9.86 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.42 \[ \int \frac {x^3 \left (5+x+3 x^2+2 x^3\right )}{2+x+5 x^2+x^3+2 x^4} \, dx=\left (\sum _{k=1}^4\ln \left (-29\,x+\mathrm {root}\left (z^4-\frac {3\,z^3}{4}+\frac {16\,z^2}{7}+\frac {96\,z}{49}+\frac {128}{343},z,k\right )\,\left (-\frac {289\,x}{4}+\mathrm {root}\left (z^4-\frac {3\,z^3}{4}+\frac {16\,z^2}{7}+\frac {96\,z}{49}+\frac {128}{343},z,k\right )\,\left (\frac {581\,x}{16}-\mathrm {root}\left (z^4-\frac {3\,z^3}{4}+\frac {16\,z^2}{7}+\frac {96\,z}{49}+\frac {128}{343},z,k\right )\,\left (\frac {147\,x}{4}-\frac {49}{16}\right )+\frac {1141}{64}\right )+\frac {47}{4}\right )+7\right )\,\mathrm {root}\left (z^4-\frac {3\,z^3}{4}+\frac {16\,z^2}{7}+\frac {96\,z}{49}+\frac {128}{343},z,k\right )\right )-\frac {5\,x}{2}+\frac {x^2}{2}+\frac {x^3}{3} \]
symsum(log(root(z^4 - (3*z^3)/4 + (16*z^2)/7 + (96*z)/49 + 128/343, z, k)* (root(z^4 - (3*z^3)/4 + (16*z^2)/7 + (96*z)/49 + 128/343, z, k)*((581*x)/1 6 - root(z^4 - (3*z^3)/4 + (16*z^2)/7 + (96*z)/49 + 128/343, z, k)*((147*x )/4 - 49/16) + 1141/64) - (289*x)/4 + 47/4) - 29*x + 7)*root(z^4 - (3*z^3) /4 + (16*z^2)/7 + (96*z)/49 + 128/343, z, k), k, 1, 4) - (5*x)/2 + x^2/2 + x^3/3