Optimal. Leaf size=22 \[ \left (x+e^x x\right )^2-\left (4+\log \left (\frac {x}{3}\right )\right )^2 \]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 37, normalized size of antiderivative = 1.68, number of steps used = 21, number of rules used = 5, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {14, 2196, 2176, 2194, 2301} \begin {gather*} 2 e^x x^2+e^{2 x} x^2+x^2-\log ^2(x)-2 (4-\log (3)) \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2176
Rule 2194
Rule 2196
Rule 2301
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (2 e^{2 x} x (1+x)+2 e^x x (2+x)+\frac {2 \left (x^2-4 \left (1-\frac {\log (3)}{4}\right )-\log (x)\right )}{x}\right ) \, dx\\ &=2 \int e^{2 x} x (1+x) \, dx+2 \int e^x x (2+x) \, dx+2 \int \frac {x^2-4 \left (1-\frac {\log (3)}{4}\right )-\log (x)}{x} \, dx\\ &=2 \int \left (2 e^x x+e^x x^2\right ) \, dx+2 \int \left (e^{2 x} x+e^{2 x} x^2\right ) \, dx+2 \int \left (\frac {-4+x^2+\log (3)}{x}-\frac {\log (x)}{x}\right ) \, dx\\ &=2 \int e^{2 x} x \, dx+2 \int e^x x^2 \, dx+2 \int e^{2 x} x^2 \, dx+2 \int \frac {-4+x^2+\log (3)}{x} \, dx-2 \int \frac {\log (x)}{x} \, dx+4 \int e^x x \, dx\\ &=4 e^x x+e^{2 x} x+2 e^x x^2+e^{2 x} x^2-\log ^2(x)-2 \int e^{2 x} x \, dx+2 \int \left (x+\frac {-4+\log (3)}{x}\right ) \, dx-4 \int e^x \, dx-4 \int e^x x \, dx-\int e^{2 x} \, dx\\ &=-4 e^x-\frac {e^{2 x}}{2}+x^2+2 e^x x^2+e^{2 x} x^2-2 (4-\log (3)) \log (x)-\log ^2(x)+4 \int e^x \, dx+\int e^{2 x} \, dx\\ &=x^2+2 e^x x^2+e^{2 x} x^2-2 (4-\log (3)) \log (x)-\log ^2(x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 31, normalized size = 1.41 \begin {gather*} -16+\left (1+e^x\right )^2 x^2-8 \log \left (\frac {x}{3}\right )-\log ^2\left (\frac {x}{3}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.92, size = 55, normalized size = 2.50 \begin {gather*} x^{4} e^{\left (2 \, x - 2 \, \log \relax (3) - 2 \, \log \left (\frac {1}{3} \, x\right )\right )} + 2 \, x^{3} e^{\left (x - \log \relax (3) - \log \left (\frac {1}{3} \, x\right )\right )} + x^{2} - \log \left (\frac {1}{3} \, x\right )^{2} - 8 \, \log \left (\frac {1}{3} \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 35, normalized size = 1.59 \begin {gather*} x^{2} e^{\left (2 \, x\right )} + 2 \, x^{2} e^{x} + x^{2} + 2 \, \log \relax (3) \log \relax (x) - \log \relax (x)^{2} - 8 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 32, normalized size = 1.45
method | result | size |
default | \(x^{2}-8 \ln \relax (x )-\ln \left (\frac {x}{3}\right )^{2}+2 \,{\mathrm e}^{x} x^{2}+{\mathrm e}^{2 x} x^{2}\) | \(32\) |
risch | \(-\ln \relax (x )^{2}+x^{2}+2 \ln \relax (3) \ln \relax (x )-8 \ln \relax (x )+{\mathrm e}^{2 x} x^{2}+2 \,{\mathrm e}^{x} x^{2}\) | \(36\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.38, size = 62, normalized size = 2.82 \begin {gather*} x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} + \frac {1}{2} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 4 \, {\left (x - 1\right )} e^{x} - \log \left (\frac {1}{3} \, x\right )^{2} - 8 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.69, size = 34, normalized size = 1.55 \begin {gather*} 2\,x^2\,{\mathrm {e}}^x-8\,\ln \relax (x)-{\left (\ln \relax (3)-\ln \relax (x)\right )}^2+x^2\,{\mathrm {e}}^{2\,x}+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.32, size = 31, normalized size = 1.41 \begin {gather*} x^{2} e^{2 x} + 2 x^{2} e^{x} + x^{2} - \log {\left (\frac {x}{3} \right )}^{2} - 8 \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________