Optimal. Leaf size=27 \[ -9-\frac {e^x}{2}+e^{-4-x-\frac {4}{\log (x (3+x))}}+x \]
________________________________________________________________________________________
Rubi [A] time = 3.84, antiderivative size = 26, normalized size of antiderivative = 0.96, number of steps used = 7, number of rules used = 5, integrand size = 110, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {1593, 6741, 6742, 2194, 6706} \begin {gather*} x-\frac {e^x}{2}+e^{-x-\frac {4}{\log (x (x+3))}-4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 2194
Rule 6706
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\left (3 x+x^2+\frac {1}{2} e^x \left (-3 x-x^2\right )\right ) \log ^2\left (3 x+x^2\right )+\exp \left (\frac {-4+(-4-x) \log \left (3 x+x^2\right )}{\log \left (3 x+x^2\right )}\right ) \left (12+8 x+\left (-3 x-x^2\right ) \log ^2\left (3 x+x^2\right )\right )}{x (3+x) \log ^2\left (3 x+x^2\right )} \, dx\\ &=\int \frac {\left (3 x+x^2+\frac {1}{2} e^x \left (-3 x-x^2\right )\right ) \log ^2\left (3 x+x^2\right )+\exp \left (\frac {-4+(-4-x) \log \left (3 x+x^2\right )}{\log \left (3 x+x^2\right )}\right ) \left (12+8 x+\left (-3 x-x^2\right ) \log ^2\left (3 x+x^2\right )\right )}{x (3+x) \log ^2(x (3+x))} \, dx\\ &=\int \left (\frac {1}{2} \left (2-e^x\right )-\frac {e^{-4-x-\frac {4}{\log (x (3+x))}} \left (-12-8 x+3 x \log ^2(x (3+x))+x^2 \log ^2(x (3+x))\right )}{x (3+x) \log ^2(x (3+x))}\right ) \, dx\\ &=\frac {1}{2} \int \left (2-e^x\right ) \, dx-\int \frac {e^{-4-x-\frac {4}{\log (x (3+x))}} \left (-12-8 x+3 x \log ^2(x (3+x))+x^2 \log ^2(x (3+x))\right )}{x (3+x) \log ^2(x (3+x))} \, dx\\ &=e^{-4-x-\frac {4}{\log (x (3+x))}}+x-\frac {\int e^x \, dx}{2}\\ &=-\frac {e^x}{2}+e^{-4-x-\frac {4}{\log (x (3+x))}}+x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 32, normalized size = 1.19 \begin {gather*} \frac {1}{2} \left (-e^x+2 e^{-4-x-\frac {4}{\log (x (3+x))}}+2 x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 38, normalized size = 1.41 \begin {gather*} x - e^{\left (x - \log \relax (2)\right )} + e^{\left (-\frac {{\left (x + 4\right )} \log \left (x^{2} + 3 \, x\right ) + 4}{\log \left (x^{2} + 3 \, x\right )}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 3.02, size = 41, normalized size = 1.52 \begin {gather*} x - \frac {1}{2} \, e^{x} + e^{\left (-\frac {x \log \left (x^{2} + 3 \, x\right ) + 4 \, \log \left (x^{2} + 3 \, x\right ) + 4}{\log \left (x^{2} + 3 \, x\right )}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.60, size = 40, normalized size = 1.48
method | result | size |
default | \(x +{\mathrm e}^{\frac {\left (-x -4\right ) \ln \left (x^{2}+3 x \right )-4}{\ln \left (x^{2}+3 x \right )}}-{\mathrm e}^{x -\ln \relax (2)}\) | \(40\) |
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*} x + \frac {2 \, x e^{\left (-x - \frac {4}{\log \left (x + 3\right ) + \log \relax (x)}\right )}}{2 \, x e^{4} + 3 \, e^{4}} + \frac {3 \, e^{\left (-x - \frac {4}{\log \left (x + 3\right ) + \log \relax (x)}\right )}}{2 \, x e^{4} + 3 \, e^{4}} - \frac {1}{2} \, e^{x} - \int e^{\left (-x - \frac {4}{\log \left (x + 3\right ) + \log \relax (x)} - 4\right )}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.60, size = 26, normalized size = 0.96 \begin {gather*} x-\frac {{\mathrm {e}}^x}{2}+{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-4}\,{\mathrm {e}}^{-\frac {4}{\ln \left (x^2+3\,x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.88, size = 31, normalized size = 1.15 \begin {gather*} x - \frac {e^{x}}{2} + e^{\frac {\left (- x - 4\right ) \log {\left (x^{2} + 3 x \right )} - 4}{\log {\left (x^{2} + 3 x \right )}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________