Optimal. Leaf size=20 \[ x \left (2+x \left (x-\log \left (\frac {4}{e^2}+e^x\right )\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.38, antiderivative size = 25, normalized size of antiderivative = 1.25, number of steps used = 12, number of rules used = 7, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.127, Rules used = {6742, 2184, 2190, 2531, 2282, 6589, 2532} \begin {gather*} x^3+2 x^2-x^2 \log \left (e^{x+2}+4\right )+2 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2184
Rule 2190
Rule 2282
Rule 2531
Rule 2532
Rule 6589
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {4 x^2}{4+e^{2+x}}+2 \left (1+2 x+x^2-x \log \left (4+e^{2+x}\right )\right )\right ) \, dx\\ &=2 \int \left (1+2 x+x^2-x \log \left (4+e^{2+x}\right )\right ) \, dx+4 \int \frac {x^2}{4+e^{2+x}} \, dx\\ &=2 x+2 x^2+x^3-2 \int x \log \left (4+e^{2+x}\right ) \, dx-\int \frac {e^{2+x} x^2}{4+e^{2+x}} \, dx\\ &=2 x+2 x^2+x^3-x^2 \log \left (4+e^{2+x}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] time = 0.11, size = 117, normalized size = 5.85 \begin {gather*} 2 \left (x+x^2+\frac {x^3}{3}-\frac {1}{2} x^2 \log \left (1+4 e^{-2-x}\right )+\frac {1}{2} x^2 \log \left (1+\frac {e^{2+x}}{4}\right )-\frac {1}{2} x^2 \log \left (4+e^{2+x}\right )+x \text {Li}_2\left (-4 e^{-2-x}\right )+x \text {Li}_2\left (-\frac {e^{2+x}}{4}\right )+\text {Li}_3\left (-4 e^{-2-x}\right )-\text {Li}_3\left (-\frac {e^{2+x}}{4}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 22, normalized size = 1.10 \begin {gather*} x^{3} - x^{2} \log \left ({\left (e^{\left (x + 2\right )} + 4\right )} e^{\left (-2\right )}\right ) + 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 24, normalized size = 1.20 \begin {gather*} x^{3} - x^{2} \log \left (e^{\left (x + 2\right )} + 4\right ) + 2 \, x^{2} + 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 23, normalized size = 1.15
method | result | size |
risch | \(x^{3}+2 x -x^{2} \ln \left (\left ({\mathrm e}^{2+x}+4\right ) {\mathrm e}^{-2}\right )\) | \(23\) |
norman | \(x^{3}+2 x -x^{2} \ln \left (\left ({\mathrm e}^{2} {\mathrm e}^{x}+4\right ) {\mathrm e}^{-2}\right )\) | \(26\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.81, size = 36, normalized size = 1.80 \begin {gather*} x^{3} + 2 \, x^{2} - {\left (x^{2} - 2\right )} \log \left (e^{\left (x + 2\right )} + 4\right ) + 2 \, x - 2 \, \log \left (e^{\left (x + 2\right )} + 4\right ) + 4 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.24, size = 20, normalized size = 1.00 \begin {gather*} 2\,x-x^2\,\ln \left (4\,{\mathrm {e}}^{-2}+{\mathrm {e}}^x\right )+x^3 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.17, size = 22, normalized size = 1.10 \begin {gather*} x^{3} - x^{2} \log {\left (\frac {e^{2} e^{x} + 4}{e^{2}} \right )} + 2 x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________