Optimal. Leaf size=27 \[ 2 x \left (2+\frac {4 x}{3}-x \left (e^{-x} x+\log (x (3+x))\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.48, antiderivative size = 32, normalized size of antiderivative = 1.19, number of steps used = 17, number of rules used = 8, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {6688, 2196, 2176, 2194, 698, 2495, 30, 43} \begin {gather*} -2 e^{-x} x^3+\frac {8 x^2}{3}-2 x^2 \log (x (x+3))+4 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 43
Rule 698
Rule 2176
Rule 2194
Rule 2196
Rule 2495
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (2 e^{-x} (-3+x) x^2+\frac {36+42 x+4 x^2}{9+3 x}-4 x \log (x (3+x))\right ) \, dx\\ &=2 \int e^{-x} (-3+x) x^2 \, dx-4 \int x \log (x (3+x)) \, dx+\int \frac {36+42 x+4 x^2}{9+3 x} \, dx\\ &=-2 x^2 \log (x (3+x))+2 \int x \, dx+2 \int \frac {x^2}{3+x} \, dx+2 \int \left (-3 e^{-x} x^2+e^{-x} x^3\right ) \, dx+\int \left (10+\frac {4 x}{3}-\frac {18}{3+x}\right ) \, dx\\ &=10 x+\frac {5 x^2}{3}-18 \log (3+x)-2 x^2 \log (x (3+x))+2 \int e^{-x} x^3 \, dx+2 \int \left (-3+x+\frac {9}{3+x}\right ) \, dx-6 \int e^{-x} x^2 \, dx\\ &=4 x+\frac {8 x^2}{3}+6 e^{-x} x^2-2 e^{-x} x^3-2 x^2 \log (x (3+x))+6 \int e^{-x} x^2 \, dx-12 \int e^{-x} x \, dx\\ &=4 x+12 e^{-x} x+\frac {8 x^2}{3}-2 e^{-x} x^3-2 x^2 \log (x (3+x))-12 \int e^{-x} \, dx+12 \int e^{-x} x \, dx\\ &=12 e^{-x}+4 x+\frac {8 x^2}{3}-2 e^{-x} x^3-2 x^2 \log (x (3+x))+12 \int e^{-x} \, dx\\ &=4 x+\frac {8 x^2}{3}-2 e^{-x} x^3-2 x^2 \log (x (3+x))\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 37, normalized size = 1.37 \begin {gather*} 24+4 x+\frac {8 x^2}{3}-2 e^{-x} x^3-\log (387420489)-2 x^2 \log (x (3+x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 40, normalized size = 1.48 \begin {gather*} -\frac {2}{3} \, {\left (3 \, x^{2} e^{x} \log \left (x^{2} + 3 \, x\right ) + 3 \, x^{3} - 2 \, {\left (2 \, x^{2} + 3 \, x\right )} e^{x}\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 31, normalized size = 1.15 \begin {gather*} -2 \, x^{3} e^{\left (-x\right )} - 2 \, x^{2} \log \left (x^{2} + 3 \, x\right ) + \frac {8}{3} \, x^{2} + 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.34, size = 32, normalized size = 1.19
method | result | size |
default | \(-2 x^{2} \ln \left (x^{2}+3 x \right )+\frac {8 x^{2}}{3}+4 x -2 x^{3} {\mathrm e}^{-x}\) | \(32\) |
norman | \(\left (-2 x^{3}+4 \,{\mathrm e}^{x} x +\frac {8 \,{\mathrm e}^{x} x^{2}}{3}-2 \,{\mathrm e}^{x} \ln \left (x^{2}+3 x \right ) x^{2}\right ) {\mathrm e}^{-x}\) | \(39\) |
risch | \(-2 \ln \left (3+x \right ) x^{2}-\frac {x \left (-3 i \pi x \mathrm {csgn}\left (i x \left (3+x \right )\right )^{3} {\mathrm e}^{x}+3 i \pi x \mathrm {csgn}\left (i x \left (3+x \right )\right )^{2} \mathrm {csgn}\left (i x \right ) {\mathrm e}^{x}+3 i \pi x \mathrm {csgn}\left (i x \left (3+x \right )\right )^{2} \mathrm {csgn}\left (i \left (3+x \right )\right ) {\mathrm e}^{x}-3 i \pi x \,\mathrm {csgn}\left (i x \left (3+x \right )\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (3+x \right )\right ) {\mathrm e}^{x}+6 x \,{\mathrm e}^{x} \ln \relax (x )+6 x^{2}-8 \,{\mathrm e}^{x} x -12 \,{\mathrm e}^{x}\right ) {\mathrm e}^{-x}}{3}\) | \(130\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 34, normalized size = 1.26 \begin {gather*} -2 \, x^{3} e^{\left (-x\right )} - 2 \, x^{2} \log \left (x + 3\right ) - 2 \, x^{2} \log \relax (x) + \frac {8}{3} \, x^{2} + 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.42, size = 31, normalized size = 1.15 \begin {gather*} 4\,x-2\,x^3\,{\mathrm {e}}^{-x}-2\,x^2\,\ln \left (x^2+3\,x\right )+\frac {8\,x^2}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.38, size = 31, normalized size = 1.15 \begin {gather*} - 2 x^{3} e^{- x} - 2 x^{2} \log {\left (x^{2} + 3 x \right )} + \frac {8 x^{2}}{3} + 4 x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________