Optimal. Leaf size=24 \[ x^2 \left (1+e^{2-x}+x-(-2+x) x+\log (x)\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.43, 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 = {1593, 2196, 2176, 2194, 2554, 14, 2305, 2304} \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 1593
Rule 2176
Rule 2194
Rule 2196
Rule 2304
Rule 2305
Rule 2554
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.11, 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]
________________________________________________________________________________________
fricas [B] time = 0.92, size = 91, normalized size = 3.79 \begin {gather*} x^{6} - 6 \, x^{5} + 7 \, x^{4} + x^{2} \log \relax (x)^{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 \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.22, size = 113, normalized size = 4.71 \begin {gather*} x^{6} - 6 \, x^{5} + 7 \, x^{4} + x^{2} \log \relax (x)^{2} + 6 \, x^{3} + x^{2} e^{\left (-2 \, x + 4\right )} - x^{2} \log \relax (x) + 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 \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 108, normalized size = 4.50
method | result | size |
risch | \(x^{6}-2 x^{4} \ln \relax (x )-2 \,{\mathrm e}^{2-x} x^{4}-6 x^{5}+x^{2} \ln \relax (x )^{2}+2 \ln \relax (x ) {\mathrm e}^{2-x} x^{2}+6 x^{3} \ln \relax (x )+{\mathrm e}^{4-2 x} x^{2}+6 x^{3} {\mathrm e}^{2-x}+7 x^{4}+2 x^{2} \ln \relax (x )+2 x^{2} {\mathrm e}^{2-x}+6 x^{3}+x^{2}\) | \(108\) |
default | \(-2 x^{4} \ln \relax (x )+7 x^{4}+6 x^{3} \ln \relax (x )+6 x^{3}+2 x^{2} \ln \relax (x )+x^{2}+2 x \,{\mathrm e}^{2-x}+2 \ln \relax (x ) {\mathrm e}^{2-x} x^{2}+20 \,{\mathrm e}^{2-x}+4 \,{\mathrm e}^{4-2 x}-4 \left (2-x \right ) {\mathrm e}^{4-2 x}+{\mathrm e}^{4-2 x} \left (2-x \right )^{2}-2 \,{\mathrm e}^{2-x} \left (2-x \right )^{4}+10 \left (2-x \right )^{3} {\mathrm e}^{2-x}-10 \left (2-x \right )^{2} {\mathrm e}^{2-x}-14 \,{\mathrm e}^{2-x} \left (2-x \right )-6 x^{5}+x^{6}+x^{2} \ln \relax (x )^{2}\) | \(181\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.45, size = 128, normalized size = 5.33 \begin {gather*} x^{6} - 6 \, x^{5} + 7 \, x^{4} + \frac {1}{2} \, {\left (2 \, \log \relax (x)^{2} - 2 \, \log \relax (x) + 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 \relax (x) \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 \relax (x)+6\,x^3\,\ln \relax (x)-2\,x^4\,\ln \relax (x)+x^2\,{\ln \relax (x)}^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 \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.41, 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 {\relax (x )}^{2} + x^{2} + \left (- 2 x^{4} + 6 x^{3} + 2 x^{2}\right ) \log {\relax (x )} + \left (- 2 x^{4} + 6 x^{3} + 2 x^{2} \log {\relax (x )} + 2 x^{2}\right ) e^{2 - x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________