Optimal. Leaf size=31 \[ \frac {5}{2} x \left (-e^x-4 x+\frac {5}{1+3 x}-\log \left (2+x^2\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.64, antiderivative size = 45, normalized size of antiderivative = 1.45, number of steps used = 38, number of rules used = 11, integrand size = 104, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.106, Rules used = {6742, 2176, 2194, 710, 801, 635, 203, 260, 1629, 2448, 321} \begin {gather*} -10 x^2-\frac {5}{2} x \log \left (x^2+2\right )+\frac {5 e^x}{2}-\frac {5}{2} e^x (x+1)-\frac {25}{6 (3 x+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 260
Rule 321
Rule 635
Rule 710
Rule 801
Rule 1629
Rule 2176
Rule 2194
Rule 2448
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {5}{2} e^x (1+x)+\frac {25}{(1+3 x)^2 \left (2+x^2\right )}-\frac {40 x}{(1+3 x)^2 \left (2+x^2\right )}-\frac {465 x^2}{2 (1+3 x)^2 \left (2+x^2\right )}-\frac {410 x^3}{(1+3 x)^2 \left (2+x^2\right )}-\frac {165 x^4}{(1+3 x)^2 \left (2+x^2\right )}-\frac {180 x^5}{(1+3 x)^2 \left (2+x^2\right )}-\frac {5}{2} \log \left (2+x^2\right )\right ) \, dx\\ &=-\left (\frac {5}{2} \int e^x (1+x) \, dx\right )-\frac {5}{2} \int \log \left (2+x^2\right ) \, dx+25 \int \frac {1}{(1+3 x)^2 \left (2+x^2\right )} \, dx-40 \int \frac {x}{(1+3 x)^2 \left (2+x^2\right )} \, dx-165 \int \frac {x^4}{(1+3 x)^2 \left (2+x^2\right )} \, dx-180 \int \frac {x^5}{(1+3 x)^2 \left (2+x^2\right )} \, dx-\frac {465}{2} \int \frac {x^2}{(1+3 x)^2 \left (2+x^2\right )} \, dx-410 \int \frac {x^3}{(1+3 x)^2 \left (2+x^2\right )} \, dx\\ &=-\frac {5}{2} e^x (1+x)-\frac {75}{19 (1+3 x)}-\frac {5}{2} x \log \left (2+x^2\right )+\frac {25}{19} \int \frac {1-3 x}{(1+3 x) \left (2+x^2\right )} \, dx+\frac {5 \int e^x \, dx}{2}+5 \int \frac {x^2}{2+x^2} \, dx-40 \int \left (-\frac {3}{19 (1+3 x)^2}+\frac {51}{361 (1+3 x)}+\frac {12-17 x}{361 \left (2+x^2\right )}\right ) \, dx-165 \int \left (\frac {1}{9}+\frac {1}{171 (1+3 x)^2}-\frac {74}{3249 (1+3 x)}-\frac {4 (17+6 x)}{361 \left (2+x^2\right )}\right ) \, dx-180 \int \left (-\frac {2}{27}+\frac {x}{9}-\frac {1}{513 (1+3 x)^2}+\frac {31}{3249 (1+3 x)}-\frac {4 (-12+17 x)}{361 \left (2+x^2\right )}\right ) \, dx-\frac {465}{2} \int \left (\frac {1}{19 (1+3 x)^2}-\frac {36}{361 (1+3 x)}+\frac {2 (17+6 x)}{361 \left (2+x^2\right )}\right ) \, dx-410 \int \left (-\frac {1}{57 (1+3 x)^2}+\frac {55}{1083 (1+3 x)}+\frac {2 (-12+17 x)}{361 \left (2+x^2\right )}\right ) \, dx\\ &=\frac {5 e^x}{2}-10 x^2-\frac {5}{2} e^x (1+x)-\frac {25}{6 (1+3 x)}-\frac {150}{361} \log (1+3 x)-\frac {5}{2} x \log \left (2+x^2\right )-\frac {40}{361} \int \frac {12-17 x}{2+x^2} \, dx-\frac {465}{361} \int \frac {17+6 x}{2+x^2} \, dx+\frac {25}{19} \int \left (\frac {18}{19 (1+3 x)}+\frac {-17-6 x}{19 \left (2+x^2\right )}\right ) \, dx+\frac {660}{361} \int \frac {17+6 x}{2+x^2} \, dx+\frac {720}{361} \int \frac {-12+17 x}{2+x^2} \, dx-\frac {820}{361} \int \frac {-12+17 x}{2+x^2} \, dx-10 \int \frac {1}{2+x^2} \, dx\\ &=\frac {5 e^x}{2}-10 x^2-\frac {5}{2} e^x (1+x)-\frac {25}{6 (1+3 x)}-5 \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )-\frac {5}{2} x \log \left (2+x^2\right )+\frac {25}{361} \int \frac {-17-6 x}{2+x^2} \, dx-\frac {480}{361} \int \frac {1}{2+x^2} \, dx+\frac {680}{361} \int \frac {x}{2+x^2} \, dx-\frac {2790}{361} \int \frac {x}{2+x^2} \, dx+\frac {3960}{361} \int \frac {x}{2+x^2} \, dx-\frac {7905}{361} \int \frac {1}{2+x^2} \, dx-\frac {8640}{361} \int \frac {1}{2+x^2} \, dx+\frac {9840}{361} \int \frac {1}{2+x^2} \, dx+\frac {11220}{361} \int \frac {1}{2+x^2} \, dx+\frac {12240}{361} \int \frac {x}{2+x^2} \, dx-\frac {13940}{361} \int \frac {x}{2+x^2} \, dx\\ &=\frac {5 e^x}{2}-10 x^2-\frac {5}{2} e^x (1+x)-\frac {25}{6 (1+3 x)}-\frac {7905 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{361 \sqrt {2}}+\frac {4165}{361} \sqrt {2} \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )+\frac {75}{361} \log \left (2+x^2\right )-\frac {5}{2} x \log \left (2+x^2\right )-\frac {150}{361} \int \frac {x}{2+x^2} \, dx-\frac {425}{361} \int \frac {1}{2+x^2} \, dx\\ &=\frac {5 e^x}{2}-10 x^2-\frac {5}{2} e^x (1+x)-\frac {25}{6 (1+3 x)}-\frac {5}{2} x \log \left (2+x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 34, normalized size = 1.10 \begin {gather*} -\frac {5}{2} \left (e^x x+4 x^2+\frac {5}{3 (1+3 x)}+x \log \left (2+x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 47, normalized size = 1.52 \begin {gather*} -\frac {5 \, {\left (36 \, x^{3} + 12 \, x^{2} + 3 \, {\left (3 \, x^{2} + x\right )} e^{x} + 3 \, {\left (3 \, x^{2} + x\right )} \log \left (x^{2} + 2\right ) + 5\right )}}{6 \, {\left (3 \, x + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.20, size = 53, normalized size = 1.71 \begin {gather*} -\frac {5 \, {\left (36 \, x^{3} + 9 \, x^{2} e^{x} + 9 \, x^{2} \log \left (x^{2} + 2\right ) + 12 \, x^{2} + 3 \, x e^{x} + 3 \, x \log \left (x^{2} + 2\right ) + 5\right )}}{6 \, {\left (3 \, x + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 30, normalized size = 0.97
method | result | size |
default | \(-\frac {5 \,{\mathrm e}^{x} x}{2}-10 x^{2}-\frac {25}{6 \left (3 x +1\right )}-\frac {5 \ln \left (x^{2}+2\right ) x}{2}\) | \(30\) |
risch | \(-\frac {5 \ln \left (x^{2}+2\right ) x}{2}-\frac {5 \left (36 x^{3}+9 \,{\mathrm e}^{x} x^{2}+12 x^{2}+3 \,{\mathrm e}^{x} x +5\right )}{6 \left (3 x +1\right )}\) | \(44\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 29, normalized size = 0.94 \begin {gather*} -10 \, x^{2} - \frac {5}{2} \, x e^{x} - \frac {5}{2} \, x \log \left (x^{2} + 2\right ) - \frac {25}{6 \, {\left (3 \, x + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.36, size = 29, normalized size = 0.94 \begin {gather*} -\frac {25}{18\,\left (x+\frac {1}{3}\right )}-\frac {5\,x\,\ln \left (x^2+2\right )}{2}-\frac {5\,x\,{\mathrm {e}}^x}{2}-10\,x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.44, size = 32, normalized size = 1.03 \begin {gather*} - 10 x^{2} - \frac {5 x e^{x}}{2} - \frac {5 x \log {\left (x^{2} + 2 \right )}}{2} - \frac {25}{18 x + 6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________