Optimal. Leaf size=27 \[ \frac {1}{4} \left (x-e^{2+x} \left (e^x+x\right )\right ) (3-x-\log (x)) \]
________________________________________________________________________________________
Rubi [B] time = 0.43, antiderivative size = 103, normalized size of antiderivative = 3.81, number of steps used = 25, number of rules used = 9, integrand size = 72, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 14, 2295, 6742, 2194, 2176, 2554, 2199, 2178} \begin {gather*} \frac {1}{4} e^{x+2} x^2-\frac {x^2}{4}-\frac {3}{4} e^{x+2} x+\frac {1}{4} e^{2 x+2} x+\frac {3 x}{4}-\frac {3}{4} e^{2 x+2}-\frac {1}{4} x \log (x)-\frac {1}{4} e^{x+2} \log (x)+\frac {1}{4} e^{2 x+2} \log (x)+\frac {1}{4} e^{x+2} (x+1) \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2176
Rule 2178
Rule 2194
Rule 2199
Rule 2295
Rule 2554
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{4} \int \frac {2 x-2 x^2+e^{2+x} \left (-2 x-x^2+x^3+e^x \left (1-5 x+2 x^2\right )\right )+\left (-x+e^{2+x} \left (x+2 e^x x+x^2\right )\right ) \log (x)}{x} \, dx\\ &=\frac {1}{4} \int \left (2-2 x-\log (x)+e^{2+x} (1+x) (-2+x+\log (x))+\frac {e^{2+2 x} \left (1-5 x+2 x^2+2 x \log (x)\right )}{x}\right ) \, dx\\ &=\frac {x}{2}-\frac {x^2}{4}-\frac {1}{4} \int \log (x) \, dx+\frac {1}{4} \int e^{2+x} (1+x) (-2+x+\log (x)) \, dx+\frac {1}{4} \int \frac {e^{2+2 x} \left (1-5 x+2 x^2+2 x \log (x)\right )}{x} \, dx\\ &=\frac {3 x}{4}-\frac {x^2}{4}-\frac {1}{4} x \log (x)+\frac {1}{4} \int \left (\frac {e^{2+2 x} \left (1-5 x+2 x^2\right )}{x}+2 e^{2+2 x} \log (x)\right ) \, dx+\frac {1}{4} \int \left (-2 e^{2+x}-e^{2+x} x+e^{2+x} x^2+e^{2+x} (1+x) \log (x)\right ) \, dx\\ &=\frac {3 x}{4}-\frac {x^2}{4}-\frac {1}{4} x \log (x)-\frac {1}{4} \int e^{2+x} x \, dx+\frac {1}{4} \int e^{2+x} x^2 \, dx+\frac {1}{4} \int \frac {e^{2+2 x} \left (1-5 x+2 x^2\right )}{x} \, dx+\frac {1}{4} \int e^{2+x} (1+x) \log (x) \, dx-\frac {1}{2} \int e^{2+x} \, dx+\frac {1}{2} \int e^{2+2 x} \log (x) \, dx\\ &=-\frac {e^{2+x}}{2}+\frac {3 x}{4}-\frac {1}{4} e^{2+x} x-\frac {x^2}{4}+\frac {1}{4} e^{2+x} x^2-\frac {1}{4} e^{2+x} \log (x)+\frac {1}{4} e^{2+2 x} \log (x)-\frac {1}{4} x \log (x)+\frac {1}{4} e^{2+x} (1+x) \log (x)+\frac {1}{4} \int \left (-5 e^{2+2 x}+\frac {e^{2+2 x}}{x}+2 e^{2+2 x} x\right ) \, dx-\frac {1}{2} \int \frac {e^{2+2 x}}{2 x} \, dx-\frac {1}{2} \int e^{2+x} x \, dx\\ &=-\frac {e^{2+x}}{2}+\frac {3 x}{4}-\frac {3}{4} e^{2+x} x-\frac {x^2}{4}+\frac {1}{4} e^{2+x} x^2-\frac {1}{4} e^{2+x} \log (x)+\frac {1}{4} e^{2+2 x} \log (x)-\frac {1}{4} x \log (x)+\frac {1}{4} e^{2+x} (1+x) \log (x)+\frac {1}{2} \int e^{2+x} \, dx+\frac {1}{2} \int e^{2+2 x} x \, dx-\frac {5}{4} \int e^{2+2 x} \, dx\\ &=-\frac {5}{8} e^{2+2 x}+\frac {3 x}{4}-\frac {3}{4} e^{2+x} x+\frac {1}{4} e^{2+2 x} x-\frac {x^2}{4}+\frac {1}{4} e^{2+x} x^2-\frac {1}{4} e^{2+x} \log (x)+\frac {1}{4} e^{2+2 x} \log (x)-\frac {1}{4} x \log (x)+\frac {1}{4} e^{2+x} (1+x) \log (x)-\frac {1}{4} \int e^{2+2 x} \, dx\\ &=-\frac {3}{4} e^{2+2 x}+\frac {3 x}{4}-\frac {3}{4} e^{2+x} x+\frac {1}{4} e^{2+2 x} x-\frac {x^2}{4}+\frac {1}{4} e^{2+x} x^2-\frac {1}{4} e^{2+x} \log (x)+\frac {1}{4} e^{2+2 x} \log (x)-\frac {1}{4} x \log (x)+\frac {1}{4} e^{2+x} (1+x) \log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.19, size = 27, normalized size = 1.00 \begin {gather*} \frac {1}{4} \left (e^{2+2 x}-x+e^{2+x} x\right ) (-3+x+\log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.54, size = 62, normalized size = 2.30 \begin {gather*} -\frac {1}{4} \, {\left ({\left (x^{2} - 3 \, x\right )} e^{2} - {\left (x - 3\right )} e^{\left (2 \, x + 4\right )} - {\left (x^{2} - 3 \, x\right )} e^{\left (x + 4\right )} + {\left (x e^{2} - x e^{\left (x + 4\right )} - e^{\left (2 \, x + 4\right )}\right )} \log \relax (x)\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.24, size = 66, normalized size = 2.44 \begin {gather*} \frac {1}{4} \, x^{2} e^{\left (x + 2\right )} + \frac {1}{4} \, x e^{\left (x + 2\right )} \log \relax (x) - \frac {1}{4} \, x^{2} + \frac {1}{4} \, x e^{\left (2 \, x + 2\right )} - \frac {3}{4} \, x e^{\left (x + 2\right )} - \frac {1}{4} \, x \log \relax (x) + \frac {1}{4} \, e^{\left (2 \, x + 2\right )} \log \relax (x) + \frac {3}{4} \, x - \frac {3}{4} \, e^{\left (2 \, x + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.08, size = 63, normalized size = 2.33
method | result | size |
risch | \(\frac {\left (x \,{\mathrm e}^{2+x}+{\mathrm e}^{2 x +2}-x \right ) \ln \relax (x )}{4}+\frac {x^{2} {\mathrm e}^{2+x}}{4}+\frac {x \,{\mathrm e}^{2 x +2}}{4}-\frac {3 x \,{\mathrm e}^{2+x}}{4}-\frac {3 \,{\mathrm e}^{2 x +2}}{4}-\frac {x^{2}}{4}+\frac {3 x}{4}\) | \(63\) |
default | \(\frac {3 x}{4}+\frac {x^{2} {\mathrm e}^{2+x}}{4}+\frac {\ln \relax (x ) {\mathrm e}^{2+x} x}{4}-\frac {3 x \,{\mathrm e}^{2+x}}{4}+\frac {x \,{\mathrm e}^{2} {\mathrm e}^{2 x}}{4}+\frac {{\mathrm e}^{2} {\mathrm e}^{2 x} \ln \relax (x )}{4}-\frac {3 \,{\mathrm e}^{2} {\mathrm e}^{2 x}}{4}-\frac {x^{2}}{4}-\frac {x \ln \relax (x )}{4}\) | \(67\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {1}{4} \, {\left (x e^{2} - e^{2}\right )} e^{x} \log \relax (x) - \frac {1}{4} \, x^{2} + \frac {1}{4} \, {\rm Ei}\left (2 \, x\right ) e^{2} - \frac {1}{4} \, {\rm Ei}\relax (x) e^{2} + \frac {1}{8} \, {\left (2 \, x e^{2} - e^{2}\right )} e^{\left (2 \, x\right )} + \frac {1}{4} \, {\left (x^{2} e^{2} - 2 \, x e^{2} + 2 \, e^{2}\right )} e^{x} - \frac {1}{4} \, {\left (x e^{2} - e^{2}\right )} e^{x} - \frac {1}{4} \, x \log \relax (x) + \frac {1}{4} \, e^{\left (2 \, x + 2\right )} \log \relax (x) + \frac {1}{4} \, e^{\left (x + 2\right )} \log \relax (x) + \frac {3}{4} \, x - \frac {5}{8} \, e^{\left (2 \, x + 2\right )} - \frac {1}{2} \, e^{\left (x + 2\right )} - \frac {1}{4} \, \int \frac {{\left (x e^{2} - e^{2}\right )} e^{x}}{x}\,{d x} - \frac {1}{4} \, \int \frac {e^{\left (2 \, x + 2\right )}}{x}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.32, size = 66, normalized size = 2.44 \begin {gather*} \frac {3\,x}{4}-\frac {3\,{\mathrm {e}}^{2\,x+2}}{4}-\frac {3\,x\,{\mathrm {e}}^{x+2}}{4}+\frac {x\,{\mathrm {e}}^{2\,x+2}}{4}+\frac {x^2\,{\mathrm {e}}^{x+2}}{4}-\frac {x\,\ln \relax (x)}{4}-\frac {x^2}{4}+\frac {{\mathrm {e}}^{2\,x+2}\,\ln \relax (x)}{4}+\frac {x\,{\mathrm {e}}^{x+2}\,\ln \relax (x)}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.50, size = 73, normalized size = 2.70 \begin {gather*} - \frac {x^{2}}{4} - \frac {x \log {\relax (x )}}{4} + \frac {3 x}{4} + \frac {\left (4 x e^{2} + 4 e^{2} \log {\relax (x )} - 12 e^{2}\right ) e^{2 x}}{16} + \frac {\left (4 x^{2} e^{2} + 4 x e^{2} \log {\relax (x )} - 12 x e^{2}\right ) e^{x}}{16} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________