Optimal. Leaf size=24 \[ x^2 \left (1+e^{2-x}+x-(-2+x) x+\log (x)\right )^2 \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(112\) vs. \(2(24)=48\).
time = 0.28, antiderivative size = 112, normalized size of antiderivative = 4.67, number of steps
used = 34, number of rules used = 8, integrand size = 109, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {1607, 2227,
2207, 2225, 2634, 14, 2342, 2341} \begin {gather*} x^6-6 x^5-2 e^{2-x} x^4+7 x^4-2 x^4 \log (x)+6 e^{2-x} x^3+6 x^3+6 x^3 \log (x)+e^{4-2 x} x^2+2 e^{2-x} x^2+x^2+x^2 \log ^2(x)+2 e^{2-x} x^2 \log (x)+2 x^2 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 1607
Rule 2207
Rule 2225
Rule 2227
Rule 2341
Rule 2342
Rule 2634
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=2 x^2+8 x^3+\frac {13 x^4}{2}-6 x^5+x^6+2 \int x \log ^2(x) \, dx+\int e^{4-2 x} \left (2 x-2 x^2\right ) \, dx+\int e^{2-x} \left (6 x+16 x^2-14 x^3+2 x^4\right ) \, dx+\int \left (6 x+18 x^2-8 x^3+e^{2-x} \left (4 x-2 x^2\right )\right ) \log (x) \, dx\\ &=2 x^2+8 x^3+\frac {13 x^4}{2}-6 x^5+x^6+3 x^2 \log (x)+2 e^{2-x} x^2 \log (x)+6 x^3 \log (x)-2 x^4 \log (x)+x^2 \log ^2(x)-2 \int x \log (x) \, dx+\int e^{4-2 x} (2-2 x) x \, dx-\int x \left (3+2 e^{2-x}+6 x-2 x^2\right ) \, dx+\int \left (6 e^{2-x} x+16 e^{2-x} x^2-14 e^{2-x} x^3+2 e^{2-x} x^4\right ) \, dx\\ &=\frac {5 x^2}{2}+8 x^3+\frac {13 x^4}{2}-6 x^5+x^6+2 x^2 \log (x)+2 e^{2-x} x^2 \log (x)+6 x^3 \log (x)-2 x^4 \log (x)+x^2 \log ^2(x)+2 \int e^{2-x} x^4 \, dx+6 \int e^{2-x} x \, dx-14 \int e^{2-x} x^3 \, dx+16 \int e^{2-x} x^2 \, dx+\int \left (2 e^{4-2 x} x-2 e^{4-2 x} x^2\right ) \, dx-\int \left (2 e^{2-x} x-x \left (-3-6 x+2 x^2\right )\right ) \, dx\\ &=-6 e^{2-x} x+\frac {5 x^2}{2}-16 e^{2-x} x^2+8 x^3+14 e^{2-x} x^3+\frac {13 x^4}{2}-2 e^{2-x} x^4-6 x^5+x^6+2 x^2 \log (x)+2 e^{2-x} x^2 \log (x)+6 x^3 \log (x)-2 x^4 \log (x)+x^2 \log ^2(x)+2 \int e^{4-2 x} x \, dx-2 \int e^{2-x} x \, dx-2 \int e^{4-2 x} x^2 \, dx+6 \int e^{2-x} \, dx+8 \int e^{2-x} x^3 \, dx+32 \int e^{2-x} x \, dx-42 \int e^{2-x} x^2 \, dx+\int x \left (-3-6 x+2 x^2\right ) \, dx\\ &=-6 e^{2-x}-e^{4-2 x} x-36 e^{2-x} x+\frac {5 x^2}{2}+e^{4-2 x} x^2+26 e^{2-x} x^2+8 x^3+6 e^{2-x} x^3+\frac {13 x^4}{2}-2 e^{2-x} x^4-6 x^5+x^6+2 x^2 \log (x)+2 e^{2-x} x^2 \log (x)+6 x^3 \log (x)-2 x^4 \log (x)+x^2 \log ^2(x)-2 \int e^{2-x} \, dx-2 \int e^{4-2 x} x \, dx+24 \int e^{2-x} x^2 \, dx+32 \int e^{2-x} \, dx-84 \int e^{2-x} x \, dx+\int e^{4-2 x} \, dx+\int \left (-3 x-6 x^2+2 x^3\right ) \, dx\\ &=-\frac {1}{2} e^{4-2 x}-36 e^{2-x}+48 e^{2-x} x+x^2+e^{4-2 x} x^2+2 e^{2-x} x^2+6 x^3+6 e^{2-x} x^3+7 x^4-2 e^{2-x} x^4-6 x^5+x^6+2 x^2 \log (x)+2 e^{2-x} x^2 \log (x)+6 x^3 \log (x)-2 x^4 \log (x)+x^2 \log ^2(x)+48 \int e^{2-x} x \, dx-84 \int e^{2-x} \, dx-\int e^{4-2 x} \, dx\\ &=48 e^{2-x}+x^2+e^{4-2 x} x^2+2 e^{2-x} x^2+6 x^3+6 e^{2-x} x^3+7 x^4-2 e^{2-x} x^4-6 x^5+x^6+2 x^2 \log (x)+2 e^{2-x} x^2 \log (x)+6 x^3 \log (x)-2 x^4 \log (x)+x^2 \log ^2(x)+48 \int e^{2-x} \, dx\\ &=x^2+e^{4-2 x} x^2+2 e^{2-x} x^2+6 x^3+6 e^{2-x} x^3+7 x^4-2 e^{2-x} x^4-6 x^5+x^6+2 x^2 \log (x)+2 e^{2-x} x^2 \log (x)+6 x^3 \log (x)-2 x^4 \log (x)+x^2 \log ^2(x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 35, normalized size = 1.46 \begin {gather*} e^{-2 x} x^2 \left (e^2+e^x \left (1+3 x-x^2\right )+e^x \log (x)\right )^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(180\) vs.
\(2(23)=46\).
time = 0.15, size = 181, normalized size = 7.54
method | result | size |
risch | \(x^{6}-2 x^{4} \ln \left (x \right )-2 \,{\mathrm e}^{2-x} x^{4}-6 x^{5}+x^{2} \ln \left (x \right )^{2}+2 \ln \left (x \right ) {\mathrm e}^{2-x} x^{2}+6 x^{3} \ln \left (x \right )+{\mathrm e}^{4-2 x} x^{2}+6 x^{3} {\mathrm e}^{2-x}+7 x^{4}+2 x^{2} \ln \left (x \right )+2 x^{2} {\mathrm e}^{2-x}+6 x^{3}+x^{2}\) | \(108\) |
default | \(-2 x^{4} \ln \left (x \right )+7 x^{4}+6 x^{3} \ln \left (x \right )+6 x^{3}+2 x^{2} \ln \left (x \right )+x^{2}+2 x \,{\mathrm e}^{2-x}+2 \ln \left (x \right ) {\mathrm e}^{2-x} x^{2}+20 \,{\mathrm e}^{2-x}+4 \,{\mathrm e}^{4-2 x}+\left (2-x \right )^{2} {\mathrm e}^{4-2 x}-4 \,{\mathrm e}^{4-2 x} \left (2-x \right )-2 \,{\mathrm e}^{2-x} \left (2-x \right )^{4}+10 \,{\mathrm e}^{2-x} \left (2-x \right )^{3}-10 \,{\mathrm e}^{2-x} \left (2-x \right )^{2}-14 \,{\mathrm e}^{2-x} \left (2-x \right )-6 x^{5}+x^{6}+x^{2} \ln \left (x \right )^{2}\) | \(181\) |
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. 128 vs.
\(2 (28) = 56\).
time = 0.26, size = 128, normalized size = 5.33 \begin {gather*} x^{6} - 6 \, x^{5} + 7 \, x^{4} + \frac {1}{2} \, {\left (2 \, \log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 1\right )} x^{2} + 6 \, x^{3} + x^{2} e^{\left (-2 \, x + 4\right )} + \frac {1}{2} \, x^{2} - 2 \, {\left (x^{4} e^{2} - 3 \, x^{3} e^{2} - x^{2} e^{2} + x e^{2} + e^{2}\right )} e^{\left (-x\right )} + 2 \, {\left (x e^{2} + e^{2}\right )} e^{\left (-x\right )} - {\left (2 \, x^{4} - 6 \, x^{3} - 2 \, x^{2} e^{\left (-x + 2\right )} - 3 \, x^{2}\right )} \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 91 vs.
\(2 (28) = 56\).
time = 0.35, size = 91, normalized size = 3.79 \begin {gather*} x^{6} - 6 \, x^{5} + 7 \, x^{4} + x^{2} \log \left (x\right )^{2} + 6 \, x^{3} + x^{2} e^{\left (-2 \, x + 4\right )} + x^{2} - 2 \, {\left (x^{4} - 3 \, x^{3} - x^{2}\right )} e^{\left (-x + 2\right )} - 2 \, {\left (x^{4} - 3 \, x^{3} - x^{2} e^{\left (-x + 2\right )} - x^{2}\right )} \log \left (x\right ) \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. 87 vs.
\(2 (20) = 40\).
time = 0.16, size = 87, normalized size = 3.62 \begin {gather*} x^{6} - 6 x^{5} + 7 x^{4} + 6 x^{3} + x^{2} e^{4 - 2 x} + x^{2} \log {\left (x \right )}^{2} + x^{2} + \left (- 2 x^{4} + 6 x^{3} + 2 x^{2}\right ) \log {\left (x \right )} + \left (- 2 x^{4} + 6 x^{3} + 2 x^{2} \log {\left (x \right )} + 2 x^{2}\right ) e^{2 - x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 113 vs.
\(2 (28) = 56\).
time = 0.40, size = 113, normalized size = 4.71 \begin {gather*} x^{6} - 6 \, x^{5} + 7 \, x^{4} + x^{2} \log \left (x\right )^{2} + 6 \, x^{3} + x^{2} e^{\left (-2 \, x + 4\right )} - x^{2} \log \left (x\right ) + x^{2} - 2 \, {\left (x^{4} - 3 \, x^{3} - x^{2} + x + 1\right )} e^{\left (-x + 2\right )} + 2 \, {\left (x + 1\right )} e^{\left (-x + 2\right )} - {\left (2 \, x^{4} - 6 \, x^{3} - 2 \, x^{2} e^{\left (-x + 2\right )} - 3 \, x^{2}\right )} \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.74, size = 107, normalized size = 4.46 \begin {gather*} 2\,x^2\,\ln \left (x\right )+6\,x^3\,\ln \left (x\right )-2\,x^4\,\ln \left (x\right )+x^2\,{\ln \left (x\right )}^2+2\,x^2\,{\mathrm {e}}^{2-x}+6\,x^3\,{\mathrm {e}}^{2-x}-2\,x^4\,{\mathrm {e}}^{2-x}+x^2\,{\mathrm {e}}^{4-2\,x}+x^2+6\,x^3+7\,x^4-6\,x^5+x^6+2\,x^2\,{\mathrm {e}}^{2-x}\,\ln \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________