Optimal. Leaf size=29 \[ -2+\frac {1}{3} \left (5+e^x x\right ) \log \left (2+x+\left (6-e^2\right ) x (3+x)\right ) \]
________________________________________________________________________________________
Rubi [B] time = 2.65, antiderivative size = 91, normalized size of antiderivative = 3.14, number of steps used = 22, number of rules used = 10, integrand size = 125, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {6741, 6728, 628, 6688, 6742, 2194, 2270, 2178, 2176, 2554} \begin {gather*} -\frac {1}{3} e^x \log \left (\left (6-e^2\right ) x^2+\left (19-3 e^2\right ) x+2\right )+\frac {1}{3} e^x (x+1) \log \left (\left (6-e^2\right ) x^2+\left (19-3 e^2\right ) x+2\right )+\frac {5}{3} \log \left (\left (6-e^2\right ) x^2+\left (19-3 e^2\right ) x+2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 628
Rule 2176
Rule 2178
Rule 2194
Rule 2270
Rule 2554
Rule 6688
Rule 6728
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {95+60 x-e^2 (15+10 x)-e^x \left (-19 x-12 x^2+e^2 \left (3 x+2 x^2\right )\right )-e^x \left (-2-21 x-25 x^2-6 x^3+e^2 \left (3 x+4 x^2+x^3\right )\right ) \log \left (2+19 x+6 x^2+e^2 \left (-3 x-x^2\right )\right )}{6+3 \left (19-3 e^2\right ) x+3 \left (6-e^2\right ) x^2} \, dx\\ &=\int \left (\frac {5 \left (19-3 e^2+2 \left (6-e^2\right ) x\right )}{3 \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )}+\frac {e^x \left (19 \left (1-\frac {3 e^2}{19}\right ) x+12 \left (1-\frac {e^2}{6}\right ) x^2+2 \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )+21 \left (1-\frac {e^2}{7}\right ) x \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )+25 \left (1-\frac {4 e^2}{25}\right ) x^2 \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )+6 \left (1-\frac {e^2}{6}\right ) x^3 \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )\right )}{3 \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )}\right ) \, dx\\ &=\frac {1}{3} \int \frac {e^x \left (19 \left (1-\frac {3 e^2}{19}\right ) x+12 \left (1-\frac {e^2}{6}\right ) x^2+2 \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )+21 \left (1-\frac {e^2}{7}\right ) x \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )+25 \left (1-\frac {4 e^2}{25}\right ) x^2 \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )+6 \left (1-\frac {e^2}{6}\right ) x^3 \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )\right )}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2} \, dx+\frac {5}{3} \int \frac {19-3 e^2+2 \left (6-e^2\right ) x}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2} \, dx\\ &=\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} \int e^x \left (\frac {x \left (-19-12 x+e^2 (3+2 x)\right )}{-2+\left (-19+3 e^2\right ) x+\left (-6+e^2\right ) x^2}+(1+x) \log \left (2+19 x+6 x^2-e^2 x (3+x)\right )\right ) \, dx\\ &=\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} \int \left (\frac {e^x x \left (19-3 e^2+2 \left (6-e^2\right ) x\right )}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2}+e^x (1+x) \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )\right ) \, dx\\ &=\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} \int \frac {e^x x \left (19-3 e^2+2 \left (6-e^2\right ) x\right )}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2} \, dx+\frac {1}{3} \int e^x (1+x) \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right ) \, dx\\ &=\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )-\frac {1}{3} e^x \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} e^x (1+x) \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )-\frac {1}{3} \int \frac {e^x x \left (19-3 e^2+2 \left (6-e^2\right ) x\right )}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2} \, dx+\frac {1}{3} \int \left (2 e^x-\frac {e^x \left (4+\left (19-3 e^2\right ) x\right )}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2}\right ) \, dx\\ &=\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )-\frac {1}{3} e^x \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} e^x (1+x) \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )-\frac {1}{3} \int \frac {e^x \left (4+\left (19-3 e^2\right ) x\right )}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2} \, dx-\frac {1}{3} \int \left (2 e^x-\frac {e^x \left (4+\left (19-3 e^2\right ) x\right )}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2}\right ) \, dx+\frac {2 \int e^x \, dx}{3}\\ &=\frac {2 e^x}{3}+\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )-\frac {1}{3} e^x \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} e^x (1+x) \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} \int \frac {e^x \left (4+\left (19-3 e^2\right ) x\right )}{2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2} \, dx-\frac {1}{3} \int \left (\frac {e^x \left (19-3 e^2-\sqrt {313-106 e^2+9 e^4}\right )}{19-3 e^2-\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x}+\frac {e^x \left (19-3 e^2+\sqrt {313-106 e^2+9 e^4}\right )}{19-3 e^2+\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x}\right ) \, dx-\frac {2 \int e^x \, dx}{3}\\ &=\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )-\frac {1}{3} e^x \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} e^x (1+x) \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} \int \left (\frac {e^x \left (19-3 e^2-\sqrt {313-106 e^2+9 e^4}\right )}{19-3 e^2-\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x}+\frac {e^x \left (19-3 e^2+\sqrt {313-106 e^2+9 e^4}\right )}{19-3 e^2+\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x}\right ) \, dx-\frac {1}{3} \left (19-3 e^2-\sqrt {313-106 e^2+9 e^4}\right ) \int \frac {e^x}{19-3 e^2-\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x} \, dx-\frac {1}{3} \left (19-3 e^2+\sqrt {313-106 e^2+9 e^4}\right ) \int \frac {e^x}{19-3 e^2+\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x} \, dx\\ &=-\frac {\exp \left (-\frac {19-3 e^2-\sqrt {313-106 e^2+9 e^4}}{2 \left (6-e^2\right )}\right ) \left (19-3 e^2-\sqrt {313-106 e^2+9 e^4}\right ) \text {Ei}\left (\frac {19-3 e^2-\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x}{2 \left (6-e^2\right )}\right )}{6 \left (6-e^2\right )}-\frac {\exp \left (-\frac {19-3 e^2+\sqrt {313-106 e^2+9 e^4}}{2 \left (6-e^2\right )}\right ) \left (19-3 e^2+\sqrt {313-106 e^2+9 e^4}\right ) \text {Ei}\left (\frac {19-3 e^2+\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x}{2 \left (6-e^2\right )}\right )}{6 \left (6-e^2\right )}+\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )-\frac {1}{3} e^x \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} e^x (1+x) \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} \left (19-3 e^2-\sqrt {313-106 e^2+9 e^4}\right ) \int \frac {e^x}{19-3 e^2-\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x} \, dx+\frac {1}{3} \left (19-3 e^2+\sqrt {313-106 e^2+9 e^4}\right ) \int \frac {e^x}{19-3 e^2+\sqrt {313-106 e^2+9 e^4}+2 \left (6-e^2\right ) x} \, dx\\ &=\frac {5}{3} \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )-\frac {1}{3} e^x \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )+\frac {1}{3} e^x (1+x) \log \left (2+\left (19-3 e^2\right ) x+\left (6-e^2\right ) x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 33, normalized size = 1.14 \begin {gather*} \frac {1}{3} \left (5+e^x x\right ) \log \left (2+\left (19-3 e^2\right ) x-\left (-6+e^2\right ) x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 30, normalized size = 1.03 \begin {gather*} \frac {1}{3} \, {\left (x e^{x} + 5\right )} \log \left (6 \, x^{2} - {\left (x^{2} + 3 \, x\right )} e^{2} + 19 \, x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.27, size = 53, normalized size = 1.83 \begin {gather*} \frac {1}{3} \, x e^{x} \log \left (-x^{2} e^{2} + 6 \, x^{2} - 3 \, x e^{2} + 19 \, x + 2\right ) + \frac {5}{3} \, \log \left (x^{2} e^{2} - 6 \, x^{2} + 3 \, x e^{2} - 19 \, x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.42, size = 51, normalized size = 1.76
method | result | size |
risch | \(\frac {{\mathrm e}^{x} x \ln \left (\left (-x^{2}-3 x \right ) {\mathrm e}^{2}+6 x^{2}+19 x +2\right )}{3}+\frac {5 \ln \left (\left ({\mathrm e}^{2}-6\right ) x^{2}+\left (3 \,{\mathrm e}^{2}-19\right ) x -2\right )}{3}\) | \(51\) |
default | \(\frac {{\mathrm e}^{x} x \ln \left (\left (-x^{2}-3 x \right ) {\mathrm e}^{2}+6 x^{2}+19 x +2\right )}{3}+\frac {5 \ln \left (x^{2} {\mathrm e}^{2}+3 \,{\mathrm e}^{2} x -6 x^{2}-19 x -2\right )}{3}\) | \(54\) |
norman | \(\frac {5 \ln \left (\left (-x^{2}-3 x \right ) {\mathrm e}^{2}+6 x^{2}+19 x +2\right )}{3}+\frac {{\mathrm e}^{x} x \ln \left (\left (-x^{2}-3 x \right ) {\mathrm e}^{2}+6 x^{2}+19 x +2\right )}{3}\) | \(55\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 391, normalized size = 13.48 \begin {gather*} \frac {1}{3} \, x e^{x} \log \left (-x^{2} {\left (e^{2} - 6\right )} - x {\left (3 \, e^{2} - 19\right )} + 2\right ) - \frac {5}{3} \, {\left (\frac {{\left (3 \, e^{2} - 19\right )} \log \left (\frac {2 \, x {\left (e^{2} - 6\right )} - \sqrt {9 \, e^{4} - 106 \, e^{2} + 313} + 3 \, e^{2} - 19}{2 \, x {\left (e^{2} - 6\right )} + \sqrt {9 \, e^{4} - 106 \, e^{2} + 313} + 3 \, e^{2} - 19}\right )}{\sqrt {9 \, e^{4} - 106 \, e^{2} + 313} {\left (e^{2} - 6\right )}} - \frac {\log \left (x^{2} {\left (e^{2} - 6\right )} + x {\left (3 \, e^{2} - 19\right )} - 2\right )}{e^{2} - 6}\right )} e^{2} + \frac {5 \, e^{2} \log \left (\frac {2 \, x {\left (e^{2} - 6\right )} - \sqrt {9 \, e^{4} - 106 \, e^{2} + 313} + 3 \, e^{2} - 19}{2 \, x {\left (e^{2} - 6\right )} + \sqrt {9 \, e^{4} - 106 \, e^{2} + 313} + 3 \, e^{2} - 19}\right )}{\sqrt {9 \, e^{4} - 106 \, e^{2} + 313}} - \frac {95 \, \log \left (\frac {2 \, x {\left (e^{2} - 6\right )} - \sqrt {9 \, e^{4} - 106 \, e^{2} + 313} + 3 \, e^{2} - 19}{2 \, x {\left (e^{2} - 6\right )} + \sqrt {9 \, e^{4} - 106 \, e^{2} + 313} + 3 \, e^{2} - 19}\right )}{3 \, \sqrt {9 \, e^{4} - 106 \, e^{2} + 313}} + \frac {10 \, {\left (3 \, e^{2} - 19\right )} \log \left (\frac {2 \, x {\left (e^{2} - 6\right )} - \sqrt {9 \, e^{4} - 106 \, e^{2} + 313} + 3 \, e^{2} - 19}{2 \, x {\left (e^{2} - 6\right )} + \sqrt {9 \, e^{4} - 106 \, e^{2} + 313} + 3 \, e^{2} - 19}\right )}{\sqrt {9 \, e^{4} - 106 \, e^{2} + 313} {\left (e^{2} - 6\right )}} - \frac {10 \, \log \left (x^{2} {\left (e^{2} - 6\right )} + x {\left (3 \, e^{2} - 19\right )} - 2\right )}{e^{2} - 6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.81, size = 49, normalized size = 1.69 \begin {gather*} \frac {5\,\ln \left (\left ({\mathrm {e}}^2-6\right )\,x^2+\left (3\,{\mathrm {e}}^2-19\right )\,x-2\right )}{3}+\frac {x\,{\mathrm {e}}^x\,\ln \left (19\,x-{\mathrm {e}}^2\,\left (x^2+3\,x\right )+6\,x^2+2\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 5.05, size = 53, normalized size = 1.83 \begin {gather*} \frac {x e^{x} \log {\left (6 x^{2} + 19 x + \left (- x^{2} - 3 x\right ) e^{2} + 2 \right )}}{3} + \frac {5 \log {\left (x^{2} \left (-6 + e^{2}\right ) + x \left (-19 + 3 e^{2}\right ) - 2 \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________