Optimal. Leaf size=38 \[ \frac {5 \left (e^x-x-\frac {2 e^{-x}}{x \left (3+x-x^2\right )}-\log ^2(2)\right )}{x} \]
________________________________________________________________________________________
Rubi [C] time = 7.72, antiderivative size = 632, normalized size of antiderivative = 16.63, number of steps used = 95, number of rules used = 7, integrand size = 114, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {6688, 12, 6742, 2197, 2177, 2178, 6728} \begin {gather*} -\frac {10}{117} \left (39+7 \sqrt {13}\right ) e^{\frac {1}{2} \left (\sqrt {13}-1\right )} \text {Ei}\left (\frac {1}{2} \left (-2 x-\sqrt {13}+1\right )\right )+\frac {20}{117} \left (13+4 \sqrt {13}\right ) e^{\frac {1}{2} \left (\sqrt {13}-1\right )} \text {Ei}\left (\frac {1}{2} \left (-2 x-\sqrt {13}+1\right )\right )+\frac {5}{39} \left (13+\sqrt {13}\right ) e^{\frac {1}{2} \left (\sqrt {13}-1\right )} \text {Ei}\left (\frac {1}{2} \left (-2 x-\sqrt {13}+1\right )\right )+\frac {35}{117} \left (1-\sqrt {13}\right ) e^{\frac {1}{2} \left (\sqrt {13}-1\right )} \text {Ei}\left (\frac {1}{2} \left (-2 x-\sqrt {13}+1\right )\right )+\frac {10 e^{\frac {1}{2} \left (\sqrt {13}-1\right )} \text {Ei}\left (\frac {1}{2} \left (-2 x-\sqrt {13}+1\right )\right )}{9 \sqrt {13}}-\frac {100}{117} e^{\frac {1}{2} \left (\sqrt {13}-1\right )} \text {Ei}\left (\frac {1}{2} \left (-2 x-\sqrt {13}+1\right )\right )+\frac {35}{117} \left (1+\sqrt {13}\right ) e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (-2 x+\sqrt {13}+1\right )\right )+\frac {5}{39} \left (13-\sqrt {13}\right ) e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (-2 x+\sqrt {13}+1\right )\right )+\frac {20}{117} \left (13-4 \sqrt {13}\right ) e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (-2 x+\sqrt {13}+1\right )\right )-\frac {10}{117} \left (39-7 \sqrt {13}\right ) e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (-2 x+\sqrt {13}+1\right )\right )-\frac {10 e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (-2 x+\sqrt {13}+1\right )\right )}{9 \sqrt {13}}-\frac {100}{117} e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (-2 x+\sqrt {13}+1\right )\right )-\frac {10 e^{-x}}{3 x^2}-\frac {70 \left (1-\sqrt {13}\right ) e^{-x}}{117 \left (-2 x-\sqrt {13}+1\right )}+\frac {200 e^{-x}}{117 \left (-2 x-\sqrt {13}+1\right )}-\frac {70 \left (1+\sqrt {13}\right ) e^{-x}}{117 \left (-2 x+\sqrt {13}+1\right )}+\frac {200 e^{-x}}{117 \left (-2 x+\sqrt {13}+1\right )}+\frac {10 e^{-x}}{9 x}+\frac {5 e^x}{x}-\frac {5 \log ^2(2)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2177
Rule 2178
Rule 2197
Rule 6688
Rule 6728
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {5 e^{-x} \left (12+12 x-6 x^2-2 x^3+e^{2 x} (-1+x) x \left (3+x-x^2\right )^2+e^x x \left (3+x-x^2\right )^2 \log ^2(2)\right )}{x^3 \left (3+x-x^2\right )^2} \, dx\\ &=5 \int \frac {e^{-x} \left (12+12 x-6 x^2-2 x^3+e^{2 x} (-1+x) x \left (3+x-x^2\right )^2+e^x x \left (3+x-x^2\right )^2 \log ^2(2)\right )}{x^3 \left (3+x-x^2\right )^2} \, dx\\ &=5 \int \left (\frac {e^x (-1+x)}{x^2}-\frac {2 e^{-x}}{\left (-3-x+x^2\right )^2}+\frac {12 e^{-x}}{x^3 \left (-3-x+x^2\right )^2}+\frac {12 e^{-x}}{x^2 \left (-3-x+x^2\right )^2}-\frac {6 e^{-x}}{x \left (-3-x+x^2\right )^2}+\frac {\log ^2(2)}{x^2}\right ) \, dx\\ &=-\frac {5 \log ^2(2)}{x}+5 \int \frac {e^x (-1+x)}{x^2} \, dx-10 \int \frac {e^{-x}}{\left (-3-x+x^2\right )^2} \, dx-30 \int \frac {e^{-x}}{x \left (-3-x+x^2\right )^2} \, dx+60 \int \frac {e^{-x}}{x^3 \left (-3-x+x^2\right )^2} \, dx+60 \int \frac {e^{-x}}{x^2 \left (-3-x+x^2\right )^2} \, dx\\ &=\frac {5 e^x}{x}-\frac {5 \log ^2(2)}{x}-10 \int \left (\frac {4 e^{-x}}{13 \left (1+\sqrt {13}-2 x\right )^2}+\frac {4 e^{-x}}{13 \sqrt {13} \left (1+\sqrt {13}-2 x\right )}+\frac {4 e^{-x}}{13 \left (-1+\sqrt {13}+2 x\right )^2}+\frac {4 e^{-x}}{13 \sqrt {13} \left (-1+\sqrt {13}+2 x\right )}\right ) \, dx-30 \int \left (\frac {e^{-x}}{9 x}+\frac {e^{-x} (-1+x)}{3 \left (-3-x+x^2\right )^2}+\frac {e^{-x} (1-x)}{9 \left (-3-x+x^2\right )}\right ) \, dx+60 \int \left (\frac {e^{-x}}{9 x^3}-\frac {2 e^{-x}}{27 x^2}+\frac {e^{-x}}{9 x}+\frac {e^{-x} (-7+4 x)}{27 \left (-3-x+x^2\right )^2}+\frac {e^{-x} (5-3 x)}{27 \left (-3-x+x^2\right )}\right ) \, dx+60 \int \left (\frac {e^{-x}}{9 x^2}-\frac {2 e^{-x}}{27 x}+\frac {e^{-x} (4-x)}{9 \left (-3-x+x^2\right )^2}+\frac {e^{-x} (-5+2 x)}{27 \left (-3-x+x^2\right )}\right ) \, dx\\ &=\frac {5 e^x}{x}-\frac {5 \log ^2(2)}{x}+\frac {20}{9} \int \frac {e^{-x} (-7+4 x)}{\left (-3-x+x^2\right )^2} \, dx+\frac {20}{9} \int \frac {e^{-x} (5-3 x)}{-3-x+x^2} \, dx+\frac {20}{9} \int \frac {e^{-x} (-5+2 x)}{-3-x+x^2} \, dx-\frac {40}{13} \int \frac {e^{-x}}{\left (1+\sqrt {13}-2 x\right )^2} \, dx-\frac {40}{13} \int \frac {e^{-x}}{\left (-1+\sqrt {13}+2 x\right )^2} \, dx-\frac {10}{3} \int \frac {e^{-x}}{x} \, dx-\frac {10}{3} \int \frac {e^{-x} (1-x)}{-3-x+x^2} \, dx-\frac {40}{9} \int \frac {e^{-x}}{x^2} \, dx-\frac {40}{9} \int \frac {e^{-x}}{x} \, dx+\frac {20}{3} \int \frac {e^{-x}}{x^3} \, dx+\frac {20}{3} \int \frac {e^{-x}}{x^2} \, dx+\frac {20}{3} \int \frac {e^{-x}}{x} \, dx+\frac {20}{3} \int \frac {e^{-x} (4-x)}{\left (-3-x+x^2\right )^2} \, dx-10 \int \frac {e^{-x} (-1+x)}{\left (-3-x+x^2\right )^2} \, dx-\frac {40 \int \frac {e^{-x}}{1+\sqrt {13}-2 x} \, dx}{13 \sqrt {13}}-\frac {40 \int \frac {e^{-x}}{-1+\sqrt {13}+2 x} \, dx}{13 \sqrt {13}}\\ &=-\frac {20 e^{-x}}{13 \left (1-\sqrt {13}-2 x\right )}-\frac {20 e^{-x}}{13 \left (1+\sqrt {13}-2 x\right )}-\frac {10 e^{-x}}{3 x^2}-\frac {20 e^{-x}}{9 x}+\frac {5 e^x}{x}-\frac {20 e^{\frac {1}{2} \left (-1+\sqrt {13}\right )} \text {Ei}\left (\frac {1}{2} \left (1-\sqrt {13}-2 x\right )\right )}{13 \sqrt {13}}+\frac {20 e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (1+\sqrt {13}-2 x\right )\right )}{13 \sqrt {13}}-\frac {10 \text {Ei}(-x)}{9}-\frac {5 \log ^2(2)}{x}-\frac {20}{13} \int \frac {e^{-x}}{1+\sqrt {13}-2 x} \, dx+\frac {20}{13} \int \frac {e^{-x}}{-1+\sqrt {13}+2 x} \, dx+\frac {20}{9} \int \left (\frac {\left (-3+\frac {7}{\sqrt {13}}\right ) e^{-x}}{-1-\sqrt {13}+2 x}+\frac {\left (-3-\frac {7}{\sqrt {13}}\right ) e^{-x}}{-1+\sqrt {13}+2 x}\right ) \, dx+\frac {20}{9} \int \left (\frac {\left (2-\frac {8}{\sqrt {13}}\right ) e^{-x}}{-1-\sqrt {13}+2 x}+\frac {\left (2+\frac {8}{\sqrt {13}}\right ) e^{-x}}{-1+\sqrt {13}+2 x}\right ) \, dx+\frac {20}{9} \int \left (-\frac {7 e^{-x}}{\left (-3-x+x^2\right )^2}+\frac {4 e^{-x} x}{\left (-3-x+x^2\right )^2}\right ) \, dx-\frac {10}{3} \int \frac {e^{-x}}{x^2} \, dx-\frac {10}{3} \int \left (\frac {\left (-1+\frac {1}{\sqrt {13}}\right ) e^{-x}}{-1-\sqrt {13}+2 x}+\frac {\left (-1-\frac {1}{\sqrt {13}}\right ) e^{-x}}{-1+\sqrt {13}+2 x}\right ) \, dx+\frac {40}{9} \int \frac {e^{-x}}{x} \, dx-\frac {20}{3} \int \frac {e^{-x}}{x} \, dx+\frac {20}{3} \int \left (\frac {4 e^{-x}}{\left (-3-x+x^2\right )^2}-\frac {e^{-x} x}{\left (-3-x+x^2\right )^2}\right ) \, dx-10 \int \left (-\frac {e^{-x}}{\left (-3-x+x^2\right )^2}+\frac {e^{-x} x}{\left (-3-x+x^2\right )^2}\right ) \, dx\\ &=-\frac {20 e^{-x}}{13 \left (1-\sqrt {13}-2 x\right )}-\frac {20 e^{-x}}{13 \left (1+\sqrt {13}-2 x\right )}-\frac {10 e^{-x}}{3 x^2}+\frac {10 e^{-x}}{9 x}+\frac {5 e^x}{x}+\frac {10}{13} e^{\frac {1}{2} \left (-1+\sqrt {13}\right )} \text {Ei}\left (\frac {1}{2} \left (1-\sqrt {13}-2 x\right )\right )-\frac {20 e^{\frac {1}{2} \left (-1+\sqrt {13}\right )} \text {Ei}\left (\frac {1}{2} \left (1-\sqrt {13}-2 x\right )\right )}{13 \sqrt {13}}+\frac {10}{13} e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (1+\sqrt {13}-2 x\right )\right )+\frac {20 e^{-\frac {1}{2}-\frac {\sqrt {13}}{2}} \text {Ei}\left (\frac {1}{2} \left (1+\sqrt {13}-2 x\right )\right )}{13 \sqrt {13}}-\frac {10 \text {Ei}(-x)}{3}-\frac {5 \log ^2(2)}{x}+\frac {10}{3} \int \frac {e^{-x}}{x} \, dx-\frac {20}{3} \int \frac {e^{-x} x}{\left (-3-x+x^2\right )^2} \, dx+\frac {80}{9} \int \frac {e^{-x} x}{\left (-3-x+x^2\right )^2} \, dx+10 \int \frac {e^{-x}}{\left (-3-x+x^2\right )^2} \, dx-10 \int \frac {e^{-x} x}{\left (-3-x+x^2\right )^2} \, dx-\frac {140}{9} \int \frac {e^{-x}}{\left (-3-x+x^2\right )^2} \, dx+\frac {80}{3} \int \frac {e^{-x}}{\left (-3-x+x^2\right )^2} \, dx-\frac {1}{117} \left (20 \left (39-7 \sqrt {13}\right )\right ) \int \frac {e^{-x}}{-1-\sqrt {13}+2 x} \, dx+\frac {1}{117} \left (40 \left (13-4 \sqrt {13}\right )\right ) \int \frac {e^{-x}}{-1-\sqrt {13}+2 x} \, dx+\frac {1}{39} \left (10 \left (13-\sqrt {13}\right )\right ) \int \frac {e^{-x}}{-1-\sqrt {13}+2 x} \, dx+\frac {1}{39} \left (10 \left (13+\sqrt {13}\right )\right ) \int \frac {e^{-x}}{-1+\sqrt {13}+2 x} \, dx+\frac {1}{117} \left (40 \left (13+4 \sqrt {13}\right )\right ) \int \frac {e^{-x}}{-1+\sqrt {13}+2 x} \, dx-\frac {1}{117} \left (20 \left (39+7 \sqrt {13}\right )\right ) \int \frac {e^{-x}}{-1+\sqrt {13}+2 x} \, dx\\ &=\text {Rest of rules removed due to large latex content} \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 2.48, size = 35, normalized size = 0.92 \begin {gather*} \frac {5 \left (e^x x+\frac {2 e^{-x}}{-3-x+x^2}-x \log ^2(2)\right )}{x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.74, size = 61, normalized size = 1.61 \begin {gather*} -\frac {5 \, {\left ({\left (x^{3} - x^{2} - 3 \, x\right )} e^{x} \log \relax (2)^{2} - {\left (x^{3} - x^{2} - 3 \, x\right )} e^{\left (2 \, x\right )} - 2\right )} e^{\left (-x\right )}}{x^{4} - x^{3} - 3 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 67, normalized size = 1.76 \begin {gather*} -\frac {5 \, {\left (x^{3} \log \relax (2)^{2} - x^{3} e^{x} - x^{2} \log \relax (2)^{2} + x^{2} e^{x} - 3 \, x \log \relax (2)^{2} + 3 \, x e^{x} - 2 \, e^{\left (-x\right )}\right )}}{x^{4} - x^{3} - 3 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 37, normalized size = 0.97
method | result | size |
risch | \(-\frac {5 \ln \relax (2)^{2}}{x}+\frac {5 \,{\mathrm e}^{x}}{x}+\frac {10 \,{\mathrm e}^{-x}}{x^{2} \left (x^{2}-x -3\right )}\) | \(37\) |
norman | \(\frac {\left (10-5 \,{\mathrm e}^{x} \ln \relax (2)^{2} x^{3}+5 \,{\mathrm e}^{x} \ln \relax (2)^{2} x^{2}-15 x \,{\mathrm e}^{2 x}-5 \,{\mathrm e}^{2 x} x^{2}+5 \,{\mathrm e}^{2 x} x^{3}+15 x \ln \relax (2)^{2} {\mathrm e}^{x}\right ) {\mathrm e}^{-x}}{x^{2} \left (x^{2}-x -3\right )}\) | \(77\) |
default | \(\frac {10 \,{\mathrm e}^{-x} \left (37 x^{3}-64 x^{2}-78 x +39\right )}{39 x^{2} \left (x^{2}-x -3\right )}-\frac {5 \ln \relax (2)^{2}}{x}-\frac {20 \,{\mathrm e}^{-x} \left (20 x^{2}-23 x -39\right )}{39 \left (x^{2}-x -3\right ) x}-\frac {10 \,{\mathrm e}^{-x} \left (x -7\right )}{13 \left (x^{2}-x -3\right )}+\frac {10 \,{\mathrm e}^{-x} \left (2 x -1\right )}{13 \left (x^{2}-x -3\right )}+\frac {5 \,{\mathrm e}^{x} \left (20 x^{2}-23 x -39\right )}{13 \left (x^{2}-x -3\right ) x}+\frac {5 \,{\mathrm e}^{x} \left (x -7\right )}{13 \left (x^{2}-x -3\right )}-\frac {55 \,{\mathrm e}^{x} \left (2 x -1\right )}{13 \left (x^{2}-x -3\right )}+\frac {15 \,{\mathrm e}^{x} \left (x +6\right )}{13 \left (x^{2}-x -3\right )}+\frac {15 \,{\mathrm e}^{x} \left (7 x +3\right )}{13 \left (x^{2}-x -3\right )}-\frac {5 \,{\mathrm e}^{x} \left (10 x +21\right )}{13 \left (x^{2}-x -3\right )}\) | \(232\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 65, normalized size = 1.71 \begin {gather*} -\frac {5 \, {\left (x^{3} \log \relax (2)^{2} - x^{2} \log \relax (2)^{2} - 3 \, x \log \relax (2)^{2} - {\left (x^{3} - x^{2} - 3 \, x\right )} e^{x} - 2 \, e^{\left (-x\right )}\right )}}{x^{4} - x^{3} - 3 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.77, size = 39, normalized size = 1.03 \begin {gather*} \frac {5\,{\mathrm {e}}^x}{x}-\frac {5\,{\ln \relax (2)}^2}{x}-\frac {10\,{\mathrm {e}}^{-x}}{-x^4+x^3+3\,x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.21, size = 44, normalized size = 1.16 \begin {gather*} \frac {10 x e^{- x} + \left (5 x^{4} - 5 x^{3} - 15 x^{2}\right ) e^{x}}{x^{5} - x^{4} - 3 x^{3}} - \frac {5 \log {\relax (2 )}^{2}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________