Optimal. Leaf size=29 \[ -x+2 x^2+\frac {1}{4} \left (-e^x-3 \log ^2(x)\right )+\log (2+x) \]
________________________________________________________________________________________
Rubi [A] time = 0.32, antiderivative size = 28, normalized size of antiderivative = 0.97, number of steps used = 7, number of rules used = 5, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.106, Rules used = {1593, 6688, 2194, 698, 2301} \begin {gather*} 2 x^2-x-\frac {e^x}{4}-\frac {3 \log ^2(x)}{4}+\log (x+2) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 698
Rule 1593
Rule 2194
Rule 2301
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-4 x+28 x^2+16 x^3+e^x \left (-2 x-x^2\right )+(-12-6 x) \log (x)}{x (8+4 x)} \, dx\\ &=\int \left (-\frac {e^x}{4}+\frac {-1+7 x+4 x^2}{2+x}-\frac {3 \log (x)}{2 x}\right ) \, dx\\ &=-\frac {\int e^x \, dx}{4}-\frac {3}{2} \int \frac {\log (x)}{x} \, dx+\int \frac {-1+7 x+4 x^2}{2+x} \, dx\\ &=-\frac {e^x}{4}-\frac {3 \log ^2(x)}{4}+\int \left (-1+4 x+\frac {1}{2+x}\right ) \, dx\\ &=-\frac {e^x}{4}-x+2 x^2-\frac {3 \log ^2(x)}{4}+\log (2+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 32, normalized size = 1.10 \begin {gather*} -\frac {e^x}{4}-9 (2+x)+2 (2+x)^2-\frac {3 \log ^2(x)}{4}+\log (2+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.97, size = 23, normalized size = 0.79 \begin {gather*} 2 \, x^{2} - \frac {3}{4} \, \log \relax (x)^{2} - x - \frac {1}{4} \, e^{x} + \log \left (x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 23, normalized size = 0.79 \begin {gather*} 2 \, x^{2} - \frac {3}{4} \, \log \relax (x)^{2} - x - \frac {1}{4} \, e^{x} + \log \left (x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 24, normalized size = 0.83
method | result | size |
default | \(\ln \left (2+x \right )-x -\frac {{\mathrm e}^{x}}{4}-\frac {3 \ln \relax (x )^{2}}{4}+2 x^{2}\) | \(24\) |
norman | \(\ln \left (2+x \right )-x -\frac {{\mathrm e}^{x}}{4}-\frac {3 \ln \relax (x )^{2}}{4}+2 x^{2}\) | \(24\) |
risch | \(\ln \left (2+x \right )-x -\frac {{\mathrm e}^{x}}{4}-\frac {3 \ln \relax (x )^{2}}{4}+2 x^{2}\) | \(24\) |
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*} 2 \, x^{2} + \frac {1}{2} \, e^{\left (-2\right )} E_{1}\left (-x - 2\right ) - \frac {3}{4} \, \log \relax (x)^{2} - x - \frac {1}{4} \, \int \frac {x e^{x}}{x + 2}\,{d x} + \log \left (x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.72, size = 23, normalized size = 0.79 \begin {gather*} \ln \left (x+2\right )-x-\frac {{\mathrm {e}}^x}{4}-\frac {3\,{\ln \relax (x)}^2}{4}+2\,x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.36, size = 24, normalized size = 0.83 \begin {gather*} 2 x^{2} - x - \frac {e^{x}}{4} - \frac {3 \log {\relax (x )}^{2}}{4} + \log {\left (x + 2 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________