Optimal. Leaf size=16 \[ x \left (x-\log \left (e^2+2 x\right )\right )^2 \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(55\) vs. \(2(16)=32\).
time = 0.22, 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, 6820,
6874, 78, 2465, 2436, 2332, 2442, 45, 2437, 2338, 2333} \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 45
Rule 78
Rule 2332
Rule 2333
Rule 2338
Rule 2436
Rule 2437
Rule 2442
Rule 2465
Rule 6820
Rule 6874
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} \text {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-\text {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 \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,e^2+2 x\right )+\text {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 [B] Leaf count is larger than twice the leaf count of optimal. \(36\) vs. \(2(16)=32\).
time = 0.08, size = 36, normalized size = 2.25 \begin {gather*} \frac {e^6}{8}+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]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(129\) vs.
\(2(15)=30\).
time = 0.43, size = 130, normalized size = 8.12
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] Leaf count of result is larger than twice the leaf count of optimal. 242 vs.
\(2 (15) = 30\).
time = 0.27, 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]
________________________________________________________________________________________
Fricas [A]
time = 0.33, 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]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 27 vs.
\(2 (12) = 24\).
time = 0.07, 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.42, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________