Optimal. Leaf size=24 \[ e^x x \left (1+x-4 \left (\frac {5}{4}-\log \left (3+\frac {3}{x}\right )\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.64, antiderivative size = 43, normalized size of antiderivative = 1.79, number of steps used = 14, number of rules used = 7, integrand size = 92, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.076, Rules used = {6688, 6742, 2199, 2194, 2176, 2178, 2554} \begin {gather*} e^x x^2-4 e^x x-4 e^x \log \left (\frac {3}{x}+3\right )+4 e^x (x+1) \log \left (\frac {3}{x}+3\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2178
Rule 2194
Rule 2199
Rule 2554
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^x \left (-8-6 x-x^2+x^3+4 (1+x)^2 \log \left (3+\frac {3}{x}\right )\right )}{1+x} \, dx\\ &=\int \left (\frac {e^x \left (-8-6 x-x^2+x^3\right )}{1+x}+4 e^x (1+x) \log \left (3+\frac {3}{x}\right )\right ) \, dx\\ &=4 \int e^x (1+x) \log \left (3+\frac {3}{x}\right ) \, dx+\int \frac {e^x \left (-8-6 x-x^2+x^3\right )}{1+x} \, dx\\ &=-4 e^x \log \left (3+\frac {3}{x}\right )+4 e^x (1+x) \log \left (3+\frac {3}{x}\right )-4 \int \frac {e^x}{-1-x} \, dx+\int \left (-4 e^x-2 e^x x+e^x x^2-\frac {4 e^x}{1+x}\right ) \, dx\\ &=\frac {4 \text {Ei}(1+x)}{e}-4 e^x \log \left (3+\frac {3}{x}\right )+4 e^x (1+x) \log \left (3+\frac {3}{x}\right )-2 \int e^x x \, dx-4 \int e^x \, dx-4 \int \frac {e^x}{1+x} \, dx+\int e^x x^2 \, dx\\ &=-4 e^x-2 e^x x+e^x x^2-4 e^x \log \left (3+\frac {3}{x}\right )+4 e^x (1+x) \log \left (3+\frac {3}{x}\right )+2 \int e^x \, dx-2 \int e^x x \, dx\\ &=-2 e^x-4 e^x x+e^x x^2-4 e^x \log \left (3+\frac {3}{x}\right )+4 e^x (1+x) \log \left (3+\frac {3}{x}\right )+2 \int e^x \, dx\\ &=-4 e^x x+e^x x^2-4 e^x \log \left (3+\frac {3}{x}\right )+4 e^x (1+x) \log \left (3+\frac {3}{x}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 5.03, size = 18, normalized size = 0.75 \begin {gather*} e^x x \left (-4+x+4 \log \left (3+\frac {3}{x}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 23, normalized size = 0.96 \begin {gather*} e^{\left (x + \log \left (x^{2} + 4 \, x \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right ) - 4 \, x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.36, size = 22, normalized size = 0.92 \begin {gather*} e^{\left (x + \log \left (x^{2} + 4 \, x \log \left (\frac {3}{x} + 3\right ) - 4 \, x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.05, size = 0, normalized size = 0.00 \[\int \frac {\left (\left (4 x^{2}+8 x +4\right ) \ln \left (\frac {3 x +3}{x}\right )+x^{3}-x^{2}-6 x -8\right ) {\mathrm e}^{\ln \left (4 x \ln \left (\frac {3 x +3}{x}\right )+x^{2}-4 x \right )+x}}{\left (4 x^{2}+4 x \right ) \ln \left (\frac {3 x +3}{x}\right )+x^{3}-3 x^{2}-4 x}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.83, size = 29, normalized size = 1.21 \begin {gather*} 4 \, x e^{x} \log \left (x + 1\right ) + {\left (x^{2} + 4 \, x {\left (\log \relax (3) - 1\right )} - 4 \, x \log \relax (x)\right )} e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \frac {{\mathrm {e}}^{x+\ln \left (4\,x\,\ln \left (\frac {3\,x+3}{x}\right )-4\,x+x^2\right )}\,\left (6\,x-\ln \left (\frac {3\,x+3}{x}\right )\,\left (4\,x^2+8\,x+4\right )+x^2-x^3+8\right )}{4\,x-\ln \left (\frac {3\,x+3}{x}\right )\,\left (4\,x^2+4\,x\right )+3\,x^2-x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.42, size = 20, normalized size = 0.83 \begin {gather*} \left (x^{2} + 4 x \log {\left (\frac {3 x + 3}{x} \right )} - 4 x\right ) e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________