Optimal. Leaf size=28 \[ x \left ((4+x)^2+2 \left (\frac {2}{3}-4 \left (x+\frac {3 x}{3+e^x}\right )\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.69, antiderivative size = 21, normalized size of antiderivative = 0.75, number of steps used = 26, number of rules used = 12, integrand size = 54, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {6741, 12, 6742, 2184, 2190, 2279, 2391, 2531, 2282, 6589, 2185, 2191} \begin {gather*} x^3-\frac {24 x^2}{e^x+3}+\frac {52 x}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2184
Rule 2185
Rule 2190
Rule 2191
Rule 2279
Rule 2282
Rule 2391
Rule 2531
Rule 6589
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{3 \left (3+e^x\right )^2} \, dx\\ &=\frac {1}{3} \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{\left (3+e^x\right )^2} \, dx\\ &=\frac {1}{3} \int \left (52+\frac {72 (-2+x) x}{3+e^x}+9 x^2-\frac {216 x^2}{\left (3+e^x\right )^2}\right ) \, dx\\ &=\frac {52 x}{3}+x^3+24 \int \frac {(-2+x) x}{3+e^x} \, dx-72 \int \frac {x^2}{\left (3+e^x\right )^2} \, dx\\ &=\frac {52 x}{3}+x^3+24 \int \frac {e^x x^2}{\left (3+e^x\right )^2} \, dx-24 \int \frac {x^2}{3+e^x} \, dx+24 \int \left (-\frac {2 x}{3+e^x}+\frac {x^2}{3+e^x}\right ) \, dx\\ &=\frac {52 x}{3}-\frac {24 x^2}{3+e^x}-\frac {5 x^3}{3}+8 \int \frac {e^x x^2}{3+e^x} \, dx+24 \int \frac {x^2}{3+e^x} \, dx\\ &=\frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3+8 x^2 \log \left (1+\frac {e^x}{3}\right )-8 \int \frac {e^x x^2}{3+e^x} \, dx-16 \int x \log \left (1+\frac {e^x}{3}\right ) \, dx\\ &=\frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3+16 x \text {Li}_2\left (-\frac {e^x}{3}\right )+16 \int x \log \left (1+\frac {e^x}{3}\right ) \, dx-16 \int \text {Li}_2\left (-\frac {e^x}{3}\right ) \, dx\\ &=\frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3+16 \int \text {Li}_2\left (-\frac {e^x}{3}\right ) \, dx-16 \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {x}{3}\right )}{x} \, dx,x,e^x\right )\\ &=\frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3-16 \text {Li}_3\left (-\frac {e^x}{3}\right )+16 \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {x}{3}\right )}{x} \, dx,x,e^x\right )\\ &=\frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 25, normalized size = 0.89 \begin {gather*} \frac {1}{3} \left (52 x-\frac {72 x^2}{3+e^x}+3 x^3\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 34, normalized size = 1.21 \begin {gather*} \frac {9 \, x^{3} - 72 \, x^{2} + {\left (3 \, x^{3} + 52 \, x\right )} e^{x} + 156 \, x}{3 \, {\left (e^{x} + 3\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 34, normalized size = 1.21 \begin {gather*} \frac {3 \, x^{3} e^{x} + 9 \, x^{3} - 72 \, x^{2} + 52 \, x e^{x} + 156 \, x}{3 \, {\left (e^{x} + 3\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.13, size = 19, normalized size = 0.68
method | result | size |
risch | \(x^{3}+\frac {52 x}{3}-\frac {24 x^{2}}{3+{\mathrm e}^{x}}\) | \(19\) |
norman | \(\frac {{\mathrm e}^{x} x^{3}+52 x -24 x^{2}+3 x^{3}+\frac {52 \,{\mathrm e}^{x} x}{3}}{3+{\mathrm e}^{x}}\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.64, size = 37, normalized size = 1.32 \begin {gather*} \frac {52}{3} \, x + \frac {x^{3} e^{x} + 3 \, x^{3} - 24 \, x^{2} - 52}{e^{x} + 3} + \frac {52}{e^{x} + 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.09, size = 18, normalized size = 0.64 \begin {gather*} \frac {52\,x}{3}-\frac {24\,x^2}{{\mathrm {e}}^x+3}+x^3 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 17, normalized size = 0.61 \begin {gather*} x^{3} - \frac {24 x^{2}}{e^{x} + 3} + \frac {52 x}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________