Optimal. Leaf size=16 \[ x \left (x-\log \left (e^2+2 x\right )\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.35, antiderivative size = 55, normalized size of antiderivative = 3.44, number of steps used = 18, number of rules used = 12, integrand size = 71, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.169, Rules used = {6, 6688, 6742, 77, 2418, 2389, 2295, 2395, 43, 2390, 2301, 2296} \begin {gather*} x^3-2 x^2 \log \left (2 x+e^2\right )+\frac {1}{2} \left (2 x+e^2\right ) \log ^2\left (2 x+e^2\right )-\frac {1}{2} e^2 \log ^2\left (2 x+e^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 43
Rule 77
Rule 2295
Rule 2296
Rule 2301
Rule 2389
Rule 2390
Rule 2395
Rule 2418
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\left (-4+3 e^2\right ) x^2+6 x^3+\left (4 x-4 e^2 x-8 x^2\right ) \log \left (e^2+2 x\right )+\left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )}{e^2+2 x} \, dx\\ &=\int \frac {\left (x-\log \left (e^2+2 x\right )\right ) \left (x \left (-4+3 e^2+6 x\right )-\left (e^2+2 x\right ) \log \left (e^2+2 x\right )\right )}{e^2+2 x} \, dx\\ &=\int \left (\frac {x^2 \left (-4+3 e^2+6 x\right )}{e^2+2 x}-\frac {4 x \left (-1+e^2+2 x\right ) \log \left (e^2+2 x\right )}{e^2+2 x}+\log ^2\left (e^2+2 x\right )\right ) \, dx\\ &=-\left (4 \int \frac {x \left (-1+e^2+2 x\right ) \log \left (e^2+2 x\right )}{e^2+2 x} \, dx\right )+\int \frac {x^2 \left (-4+3 e^2+6 x\right )}{e^2+2 x} \, dx+\int \log ^2\left (e^2+2 x\right ) \, dx\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \log ^2(x) \, dx,x,e^2+2 x\right )-4 \int \left (-\frac {1}{2} \log \left (e^2+2 x\right )+x \log \left (e^2+2 x\right )+\frac {e^2 \log \left (e^2+2 x\right )}{2 \left (e^2+2 x\right )}\right ) \, dx+\int \left (e^2-2 x+3 x^2-\frac {e^4}{e^2+2 x}\right ) \, dx\\ &=e^2 x-x^2+x^3-\frac {1}{2} e^4 \log \left (e^2+2 x\right )+\frac {1}{2} \left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )+2 \int \log \left (e^2+2 x\right ) \, dx-4 \int x \log \left (e^2+2 x\right ) \, dx-\left (2 e^2\right ) \int \frac {\log \left (e^2+2 x\right )}{e^2+2 x} \, dx-\operatorname {Subst}\left (\int \log (x) \, dx,x,e^2+2 x\right )\\ &=2 x+e^2 x-x^2+x^3-\frac {1}{2} e^4 \log \left (e^2+2 x\right )-2 x^2 \log \left (e^2+2 x\right )-\left (e^2+2 x\right ) \log \left (e^2+2 x\right )+\frac {1}{2} \left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )+4 \int \frac {x^2}{e^2+2 x} \, dx-e^2 \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,e^2+2 x\right )+\operatorname {Subst}\left (\int \log (x) \, dx,x,e^2+2 x\right )\\ &=e^2 x-x^2+x^3-\frac {1}{2} e^4 \log \left (e^2+2 x\right )-2 x^2 \log \left (e^2+2 x\right )-\frac {1}{2} e^2 \log ^2\left (e^2+2 x\right )+\frac {1}{2} \left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )+4 \int \left (-\frac {e^2}{4}+\frac {x}{2}+\frac {e^4}{4 \left (e^2+2 x\right )}\right ) \, dx\\ &=x^3-2 x^2 \log \left (e^2+2 x\right )-\frac {1}{2} e^2 \log ^2\left (e^2+2 x\right )+\frac {1}{2} \left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 29, normalized size = 1.81 \begin {gather*} x^3-2 x^2 \log \left (e^2+2 x\right )+x \log ^2\left (e^2+2 x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 27, normalized size = 1.69 \begin {gather*} x^{3} - 2 \, x^{2} \log \left (2 \, x + e^{2}\right ) + x \log \left (2 \, x + e^{2}\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.63, size = 27, normalized size = 1.69 \begin {gather*} x^{3} - 2 \, x^{2} \log \left (2 \, x + e^{2}\right ) + x \log \left (2 \, x + e^{2}\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.40, size = 28, normalized size = 1.75
method | result | size |
norman | \(x^{3}+\ln \left ({\mathrm e}^{2}+2 x \right )^{2} x -2 x^{2} \ln \left ({\mathrm e}^{2}+2 x \right )\) | \(28\) |
risch | \(x^{3}+\ln \left ({\mathrm e}^{2}+2 x \right )^{2} x -2 x^{2} \ln \left ({\mathrm e}^{2}+2 x \right )\) | \(28\) |
derivativedivides | \(\frac {3 \,{\mathrm e}^{4} \left ({\mathrm e}^{2}+2 x \right )}{8}+{\mathrm e}^{2} \left (\ln \left ({\mathrm e}^{2}+2 x \right ) \left ({\mathrm e}^{2}+2 x \right )-{\mathrm e}^{2}-2 x \right )-\frac {3 \,{\mathrm e}^{2} \left ({\mathrm e}^{2}+2 x \right )^{2}}{8}+\frac {\left ({\mathrm e}^{2}+2 x \right ) \ln \left ({\mathrm e}^{2}+2 x \right )^{2}}{2}-\frac {\ln \left ({\mathrm e}^{2}+2 x \right ) \left ({\mathrm e}^{2}+2 x \right )^{2}}{2}+\frac {\left ({\mathrm e}^{2}+2 x \right )^{3}}{8}-\frac {{\mathrm e}^{4} \ln \left ({\mathrm e}^{2}+2 x \right )}{2}-\frac {\ln \left ({\mathrm e}^{2}+2 x \right )^{2} {\mathrm e}^{2}}{2}+{\mathrm e}^{2} \left ({\mathrm e}^{2}+2 x \right )\) | \(130\) |
default | \(\frac {3 \,{\mathrm e}^{4} \left ({\mathrm e}^{2}+2 x \right )}{8}+{\mathrm e}^{2} \left (\ln \left ({\mathrm e}^{2}+2 x \right ) \left ({\mathrm e}^{2}+2 x \right )-{\mathrm e}^{2}-2 x \right )-\frac {3 \,{\mathrm e}^{2} \left ({\mathrm e}^{2}+2 x \right )^{2}}{8}+\frac {\left ({\mathrm e}^{2}+2 x \right ) \ln \left ({\mathrm e}^{2}+2 x \right )^{2}}{2}-\frac {\ln \left ({\mathrm e}^{2}+2 x \right ) \left ({\mathrm e}^{2}+2 x \right )^{2}}{2}+\frac {\left ({\mathrm e}^{2}+2 x \right )^{3}}{8}-\frac {{\mathrm e}^{4} \ln \left ({\mathrm e}^{2}+2 x \right )}{2}-\frac {\ln \left ({\mathrm e}^{2}+2 x \right )^{2} {\mathrm e}^{2}}{2}+{\mathrm e}^{2} \left ({\mathrm e}^{2}+2 x \right )\) | \(130\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.62, size = 242, normalized size = 15.12 \begin {gather*} x^{3} - \frac {3}{4} \, x^{2} e^{2} + {\left (e^{2} \log \left (2 \, x + e^{2}\right ) - 2 \, x\right )} e^{2} \log \left (2 \, x + e^{2}\right ) + \frac {1}{2} \, e^{4} \log \left (2 \, x + e^{2}\right )^{2} + \frac {1}{2} \, e^{2} \log \left (2 \, x + e^{2}\right )^{2} + \frac {1}{2} \, {\left (\log \left (2 \, x + e^{2}\right )^{2} - 2 \, \log \left (2 \, x + e^{2}\right ) + 2\right )} {\left (2 \, x + e^{2}\right )} + \frac {3}{4} \, x e^{4} - \frac {1}{2} \, {\left (e^{2} \log \left (2 \, x + e^{2}\right )^{2} + 2 \, e^{2} \log \left (2 \, x + e^{2}\right ) - 4 \, x\right )} e^{2} + \frac {3}{8} \, {\left (2 \, x^{2} - 2 \, x e^{2} + e^{4} \log \left (2 \, x + e^{2}\right )\right )} e^{2} - 2 \, x e^{2} - {\left (2 \, x^{2} - 2 \, x e^{2} + e^{4} \log \left (2 \, x + e^{2}\right )\right )} \log \left (2 \, x + e^{2}\right ) - {\left (e^{2} \log \left (2 \, x + e^{2}\right ) - 2 \, x\right )} \log \left (2 \, x + e^{2}\right ) - \frac {3}{8} \, e^{6} \log \left (2 \, x + e^{2}\right ) + e^{4} \log \left (2 \, x + e^{2}\right ) + e^{2} \log \left (2 \, x + e^{2}\right ) - 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.38, size = 15, normalized size = 0.94 \begin {gather*} x\,{\left (x-\ln \left (2\,x+{\mathrm {e}}^2\right )\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.16, size = 27, normalized size = 1.69 \begin {gather*} x^{3} - 2 x^{2} \log {\left (2 x + e^{2} \right )} + x \log {\left (2 x + e^{2} \right )}^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________