Optimal. Leaf size=31 \[ x (1+x) \left (\frac {4+x}{x}-\frac {1}{3} \log \left (x \left (-e^{x+x^2}+x\right )\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 2.22, antiderivative size = 49, normalized size of antiderivative = 1.58, number of steps
used = 18, number of rules used = 6, integrand size = 84, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {6873, 12,
6874, 2628, 2631, 14} \begin {gather*} x^2-\frac {1}{3} x^2 \log \left (x^2-e^{x^2+x} x\right )-\frac {1}{3} x \log \left (x^2-e^{x^2+x} x\right )+5 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2628
Rule 2631
Rule 6873
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-13 x-4 x^2+e^{x+x^2} \left (14+4 x-3 x^2-2 x^3\right )+\left (e^{x+x^2} (-1-2 x)+x+2 x^2\right ) \log \left (-e^{x+x^2} x+x^2\right )}{3 \left (e^{x+x^2}-x\right )} \, dx\\ &=\frac {1}{3} \int \frac {-13 x-4 x^2+e^{x+x^2} \left (14+4 x-3 x^2-2 x^3\right )+\left (e^{x+x^2} (-1-2 x)+x+2 x^2\right ) \log \left (-e^{x+x^2} x+x^2\right )}{e^{x+x^2}-x} \, dx\\ &=\frac {1}{3} \int \left (14+4 x-3 x^2-2 x^3-\frac {x (1+x)^2 (-1+2 x)}{e^{x+x^2}-x}-\log \left (-e^{x+x^2} x+x^2\right )-2 x \log \left (-e^{x+x^2} x+x^2\right )\right ) \, dx\\ &=\frac {14 x}{3}+\frac {2 x^2}{3}-\frac {x^3}{3}-\frac {x^4}{6}-\frac {1}{3} \int \frac {x (1+x)^2 (-1+2 x)}{e^{x+x^2}-x} \, dx-\frac {1}{3} \int \log \left (-e^{x+x^2} x+x^2\right ) \, dx-\frac {2}{3} \int x \log \left (-e^{x+x^2} x+x^2\right ) \, dx\\ &=\frac {14 x}{3}+\frac {2 x^2}{3}-\frac {x^3}{3}-\frac {x^4}{6}-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} \int \left (-\frac {x}{e^{x+x^2}-x}+\frac {3 x^3}{e^{x+x^2}-x}+\frac {2 x^4}{e^{x+x^2}-x}\right ) \, dx+\frac {1}{3} \int \frac {-2 x+e^{x+x^2} \left (1+x+2 x^2\right )}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \frac {x \left (-2 x+e^{x+x^2} \left (1+x+2 x^2\right )\right )}{e^{x+x^2}-x} \, dx\\ &=\frac {14 x}{3}+\frac {2 x^2}{3}-\frac {x^3}{3}-\frac {x^4}{6}-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )+\frac {1}{3} \int \frac {x}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \left (1+x+2 x^2+\frac {x \left (-1+x+2 x^2\right )}{e^{x+x^2}-x}\right ) \, dx+\frac {1}{3} \int \left (\frac {x^2 \left (-1+x+2 x^2\right )}{e^{x+x^2}-x}+x \left (1+x+2 x^2\right )\right ) \, dx-\frac {2}{3} \int \frac {x^4}{e^{x+x^2}-x} \, dx-\int \frac {x^3}{e^{x+x^2}-x} \, dx\\ &=5 x+\frac {5 x^2}{6}-\frac {x^3}{9}-\frac {x^4}{6}-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )+\frac {1}{3} \int \frac {x}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \frac {x \left (-1+x+2 x^2\right )}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \frac {x^2 \left (-1+x+2 x^2\right )}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int x \left (1+x+2 x^2\right ) \, dx-\frac {2}{3} \int \frac {x^4}{e^{x+x^2}-x} \, dx-\int \frac {x^3}{e^{x+x^2}-x} \, dx\\ &=5 x+\frac {5 x^2}{6}-\frac {x^3}{9}-\frac {x^4}{6}-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )+\frac {1}{3} \int \frac {x}{e^{x+x^2}-x} \, dx+\frac {1}{3} \int \left (x+x^2+2 x^3\right ) \, dx+\frac {1}{3} \int \left (-\frac {x}{e^{x+x^2}-x}+\frac {x^2}{e^{x+x^2}-x}+\frac {2 x^3}{e^{x+x^2}-x}\right ) \, dx+\frac {1}{3} \int \left (-\frac {x^2}{e^{x+x^2}-x}+\frac {x^3}{e^{x+x^2}-x}+\frac {2 x^4}{e^{x+x^2}-x}\right ) \, dx-\frac {2}{3} \int \frac {x^4}{e^{x+x^2}-x} \, dx-\int \frac {x^3}{e^{x+x^2}-x} \, dx\\ &=5 x+x^2-\frac {1}{3} x \log \left (-e^{x+x^2} x+x^2\right )-\frac {1}{3} x^2 \log \left (-e^{x+x^2} x+x^2\right )+\frac {1}{3} \int \frac {x^3}{e^{x+x^2}-x} \, dx+\frac {2}{3} \int \frac {x^3}{e^{x+x^2}-x} \, dx-\int \frac {x^3}{e^{x+x^2}-x} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 33, normalized size = 1.06 \begin {gather*} \frac {1}{3} \left (15 x+3 x^2-x (1+x) \log \left (x \left (-e^{x+x^2}+x\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.28, size = 44, normalized size = 1.42
method | result | size |
norman | \(x^{2}+5 x -\frac {\ln \left (-x \,{\mathrm e}^{x^{2}+x}+x^{2}\right ) x}{3}-\frac {\ln \left (-x \,{\mathrm e}^{x^{2}+x}+x^{2}\right ) x^{2}}{3}\) | \(44\) |
risch | \(\left (-\frac {1}{3} x^{2}-\frac {1}{3} x \right ) \ln \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )-\frac {x^{2} \ln \left (x \right )}{3}-\frac {x \ln \left (x \right )}{3}+\frac {i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right ) \mathrm {csgn}\left (i x \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right )}{6}-\frac {i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right )^{2}}{6}-\frac {i \pi \,x^{2} \mathrm {csgn}\left (i \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right ) \mathrm {csgn}\left (i x \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right )^{2}}{6}+\frac {i \pi \,x^{2} \mathrm {csgn}\left (i x \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right )^{3}}{6}+\frac {i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right ) \mathrm {csgn}\left (i x \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right )}{6}-\frac {i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right )^{2}}{6}-\frac {i \pi x \,\mathrm {csgn}\left (i \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right ) \mathrm {csgn}\left (i x \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right )^{2}}{6}+\frac {i \pi x \mathrm {csgn}\left (i x \left (-{\mathrm e}^{\left (x +1\right ) x}+x \right )\right )^{3}}{6}+x^{2}+5 x\) | \(297\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 34, normalized size = 1.10 \begin {gather*} x^{2} - \frac {1}{3} \, {\left (x^{2} + x\right )} \log \left (x - e^{\left (x^{2} + x\right )}\right ) - \frac {1}{3} \, {\left (x^{2} + x\right )} \log \left (x\right ) + 5 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 28, normalized size = 0.90 \begin {gather*} x^{2} - \frac {1}{3} \, {\left (x^{2} + x\right )} \log \left (x^{2} - x e^{\left (x^{2} + x\right )}\right ) + 5 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.19, size = 29, normalized size = 0.94 \begin {gather*} x^{2} + 5 x + \left (- \frac {x^{2}}{3} - \frac {x}{3}\right ) \log {\left (x^{2} - x e^{x^{2} + x} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 43, normalized size = 1.39 \begin {gather*} -\frac {1}{3} \, x^{2} \log \left (x^{2} - x e^{\left (x^{2} + x\right )}\right ) + x^{2} - \frac {1}{3} \, x \log \left (x^{2} - x e^{\left (x^{2} + x\right )}\right ) + 5 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.41, size = 32, normalized size = 1.03 \begin {gather*} 5\,x-\ln \left (x^2-x\,{\mathrm {e}}^{x^2}\,{\mathrm {e}}^x\right )\,\left (\frac {x^2}{3}+\frac {x}{3}\right )+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________