Optimal. Leaf size=29 \[ 3 e^{-4-x} x \left (1-\log \left (\left (-5+\frac {-2+x}{x}-x\right )^2\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.89, antiderivative size = 64, normalized size of antiderivative = 2.21, number of steps used = 20, number of rules used = 6, integrand size = 72, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {6728, 2194, 2176, 2178, 2554, 12} \begin {gather*} -3 e^{-x-4} \log \left (\frac {\left (x^2+4 x+2\right )^2}{x^2}\right )+3 e^{-x-4} (1-x) \log \left (\frac {\left (x^2+4 x+2\right )^2}{x^2}\right )+3 e^{-x-4} x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2178
Rule 2194
Rule 2554
Rule 6728
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {3 e^{-4-x} \left (-6-2 x+5 x^2+x^3\right )}{2+4 x+x^2}+3 e^{-4-x} (-1+x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )\right ) \, dx\\ &=-\left (3 \int \frac {e^{-4-x} \left (-6-2 x+5 x^2+x^3\right )}{2+4 x+x^2} \, dx\right )+3 \int e^{-4-x} (-1+x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right ) \, dx\\ &=-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-3 \int \frac {2 e^{-4-x} \left (2-x^2\right )}{2+4 x+x^2} \, dx-3 \int \left (e^{-4-x}+e^{-4-x} x-\frac {8 e^{-4-x} (1+x)}{2+4 x+x^2}\right ) \, dx\\ &=-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-3 \int e^{-4-x} \, dx-3 \int e^{-4-x} x \, dx-6 \int \frac {e^{-4-x} \left (2-x^2\right )}{2+4 x+x^2} \, dx+24 \int \frac {e^{-4-x} (1+x)}{2+4 x+x^2} \, dx\\ &=3 e^{-4-x}+3 e^{-4-x} x-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-3 \int e^{-4-x} \, dx-6 \int \left (-e^{-4-x}+\frac {4 e^{-4-x} (1+x)}{2+4 x+x^2}\right ) \, dx+24 \int \left (\frac {\left (1-\frac {1}{\sqrt {2}}\right ) e^{-4-x}}{4-2 \sqrt {2}+2 x}+\frac {\left (1+\frac {1}{\sqrt {2}}\right ) e^{-4-x}}{4+2 \sqrt {2}+2 x}\right ) \, dx\\ &=6 e^{-4-x}+3 e^{-4-x} x-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+6 \int e^{-4-x} \, dx-24 \int \frac {e^{-4-x} (1+x)}{2+4 x+x^2} \, dx+\left (12 \left (2-\sqrt {2}\right )\right ) \int \frac {e^{-4-x}}{4-2 \sqrt {2}+2 x} \, dx+\left (12 \left (2+\sqrt {2}\right )\right ) \int \frac {e^{-4-x}}{4+2 \sqrt {2}+2 x} \, dx\\ &=3 e^{-4-x} x+6 \left (2+\sqrt {2}\right ) e^{-2+\sqrt {2}} \text {Ei}\left (-2-\sqrt {2}-x\right )+6 \left (2-\sqrt {2}\right ) e^{-2-\sqrt {2}} \text {Ei}\left (-2+\sqrt {2}-x\right )-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-24 \int \left (\frac {\left (1-\frac {1}{\sqrt {2}}\right ) e^{-4-x}}{4-2 \sqrt {2}+2 x}+\frac {\left (1+\frac {1}{\sqrt {2}}\right ) e^{-4-x}}{4+2 \sqrt {2}+2 x}\right ) \, dx\\ &=3 e^{-4-x} x+6 \left (2+\sqrt {2}\right ) e^{-2+\sqrt {2}} \text {Ei}\left (-2-\sqrt {2}-x\right )+6 \left (2-\sqrt {2}\right ) e^{-2-\sqrt {2}} \text {Ei}\left (-2+\sqrt {2}-x\right )-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-\left (12 \left (2-\sqrt {2}\right )\right ) \int \frac {e^{-4-x}}{4-2 \sqrt {2}+2 x} \, dx-\left (12 \left (2+\sqrt {2}\right )\right ) \int \frac {e^{-4-x}}{4+2 \sqrt {2}+2 x} \, dx\\ &=3 e^{-4-x} x-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.29, size = 27, normalized size = 0.93 \begin {gather*} -3 e^{-4-x} x \left (-1+\log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.78, size = 42, normalized size = 1.45 \begin {gather*} -3 \, x e^{\left (-x - 4\right )} \log \left (\frac {x^{4} + 8 \, x^{3} + 20 \, x^{2} + 16 \, x + 4}{x^{2}}\right ) + 3 \, x e^{\left (-x - 4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.28, size = 41, normalized size = 1.41 \begin {gather*} -3 \, {\left (x e^{\left (-x\right )} \log \left (\frac {x^{4} + 8 \, x^{3} + 20 \, x^{2} + 16 \, x + 4}{x^{2}}\right ) - x e^{\left (-x\right )}\right )} e^{\left (-4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.40, size = 44, normalized size = 1.52
method | result | size |
norman | \(\left (3 x \,{\mathrm e}^{-4}-3 x \,{\mathrm e}^{-4} \ln \left (\frac {x^{4}+8 x^{3}+20 x^{2}+16 x +4}{x^{2}}\right )\right ) {\mathrm e}^{-x}\) | \(44\) |
risch | \(-6 \ln \left (x^{2}+4 x +2\right ) x \,{\mathrm e}^{-x -4}+\frac {3 \left (-i \pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )+2 i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-i \pi \mathrm {csgn}\left (i x^{2}\right )^{3}+i \pi \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+4 x +2\right )^{2}}{x^{2}}\right )-i \pi \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+4 x +2\right )^{2}}{x^{2}}\right )^{2}+i \pi \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )\right )^{2} \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right )-2 i \pi \,\mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )\right ) \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right )^{2}+i \pi \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right )^{3}-i \pi \,\mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+4 x +2\right )^{2}}{x^{2}}\right )^{2}+i \pi \mathrm {csgn}\left (\frac {i \left (x^{2}+4 x +2\right )^{2}}{x^{2}}\right )^{3}+4 \ln \relax (x )+2\right ) x \,{\mathrm e}^{-x -4}}{2}\) | \(300\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.39, size = 34, normalized size = 1.17 \begin {gather*} -3 \, {\left (2 \, x e^{\left (-x\right )} \log \left (x^{2} + 4 \, x + 2\right ) - {\left (2 \, x \log \relax (x) + x\right )} e^{\left (-x\right )}\right )} e^{\left (-4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.54, size = 34, normalized size = 1.17 \begin {gather*} -3\,x\,{\mathrm {e}}^{-x-4}\,\left (\ln \left (\frac {x^4+8\,x^3+20\,x^2+16\,x+4}{x^2}\right )-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.71, size = 36, normalized size = 1.24 \begin {gather*} \frac {\left (- 3 x \log {\left (\frac {x^{4} + 8 x^{3} + 20 x^{2} + 16 x + 4}{x^{2}} \right )} + 3 x\right ) e^{- x}}{e^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________