Optimal. Leaf size=34 \[ e^{x^2}-\log (x)-\frac {\log \left (\frac {(-5+x) \left (-x+x^2\right )}{e^2}\right )}{x+x^2} \]
________________________________________________________________________________________
Rubi [A] time = 1.85, antiderivative size = 51, normalized size of antiderivative = 1.50, number of steps used = 24, number of rules used = 10, integrand size = 117, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {6741, 6728, 2209, 72, 180, 148, 2528, 2525, 1628, 6742} \begin {gather*} e^{x^2}+\frac {2-\log \left (x \left (x^2-6 x+5\right )\right )}{x}-\frac {2-\log \left (x \left (x^2-6 x+5\right )\right )}{x+1}-\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 72
Rule 148
Rule 180
Rule 1628
Rule 2209
Rule 2525
Rule 2528
Rule 6728
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-5+2 x+5 x^2+3 x^3+4 x^4-x^5+e^{x^2} \left (10 x^3+8 x^4-12 x^5-8 x^6+2 x^7\right )+\left (5+4 x-11 x^2+2 x^3\right ) \log \left (\frac {5 x-6 x^2+x^3}{e^2}\right )}{x^2 (1+x)^2 \left (5-6 x+x^2\right )} \, dx\\ &=\int \left (2 e^{x^2} x+\frac {5}{(-5+x) (-1+x) (1+x)^2}-\frac {5}{(-5+x) (-1+x) x^2 (1+x)^2}+\frac {2}{(-5+x) (-1+x) x (1+x)^2}+\frac {3 x}{(-5+x) (-1+x) (1+x)^2}+\frac {4 x^2}{(-5+x) (-1+x) (1+x)^2}-\frac {x^3}{(-5+x) (-1+x) (1+x)^2}+\frac {(1+2 x) \left (-2+\log \left (x \left (5-6 x+x^2\right )\right )\right )}{x^2 (1+x)^2}\right ) \, dx\\ &=2 \int e^{x^2} x \, dx+2 \int \frac {1}{(-5+x) (-1+x) x (1+x)^2} \, dx+3 \int \frac {x}{(-5+x) (-1+x) (1+x)^2} \, dx+4 \int \frac {x^2}{(-5+x) (-1+x) (1+x)^2} \, dx+5 \int \frac {1}{(-5+x) (-1+x) (1+x)^2} \, dx-5 \int \frac {1}{(-5+x) (-1+x) x^2 (1+x)^2} \, dx-\int \frac {x^3}{(-5+x) (-1+x) (1+x)^2} \, dx+\int \frac {(1+2 x) \left (-2+\log \left (x \left (5-6 x+x^2\right )\right )\right )}{x^2 (1+x)^2} \, dx\\ &=e^{x^2}+2 \int \left (\frac {1}{720 (-5+x)}-\frac {1}{16 (-1+x)}+\frac {1}{5 x}-\frac {1}{12 (1+x)^2}-\frac {5}{36 (1+x)}\right ) \, dx+3 \int \left (\frac {5}{144 (-5+x)}-\frac {1}{16 (-1+x)}-\frac {1}{12 (1+x)^2}+\frac {1}{36 (1+x)}\right ) \, dx+4 \int \left (\frac {25}{144 (-5+x)}-\frac {1}{16 (-1+x)}+\frac {1}{12 (1+x)^2}-\frac {1}{9 (1+x)}\right ) \, dx+5 \int \left (\frac {1}{144 (-5+x)}-\frac {1}{16 (-1+x)}+\frac {1}{12 (1+x)^2}+\frac {1}{18 (1+x)}\right ) \, dx-5 \int \left (\frac {1}{3600 (-5+x)}-\frac {1}{16 (-1+x)}+\frac {1}{5 x^2}-\frac {4}{25 x}+\frac {1}{12 (1+x)^2}+\frac {2}{9 (1+x)}\right ) \, dx-\int \left (\frac {125}{144 (-5+x)}-\frac {1}{16 (-1+x)}-\frac {1}{12 (1+x)^2}+\frac {7}{36 (1+x)}\right ) \, dx+\int \left (\frac {-2+\log \left (x \left (5-6 x+x^2\right )\right )}{x^2}-\frac {-2+\log \left (x \left (5-6 x+x^2\right )\right )}{(1+x)^2}\right ) \, dx\\ &=e^{x^2}+\frac {1}{x}-\frac {1}{2} \log (1-x)-\frac {1}{30} \log (5-x)+\frac {6 \log (x)}{5}-\frac {5}{3} \log (1+x)+\int \frac {-2+\log \left (x \left (5-6 x+x^2\right )\right )}{x^2} \, dx-\int \frac {-2+\log \left (x \left (5-6 x+x^2\right )\right )}{(1+x)^2} \, dx\\ &=e^{x^2}+\frac {1}{x}-\frac {1}{2} \log (1-x)-\frac {1}{30} \log (5-x)+\frac {6 \log (x)}{5}-\frac {5}{3} \log (1+x)+\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{x}-\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{1+x}+\int \frac {5-12 x+3 x^2}{x^2 \left (5-6 x+x^2\right )} \, dx-\int \frac {5-12 x+3 x^2}{x \left (5-x-5 x^2+x^3\right )} \, dx\\ &=e^{x^2}+\frac {1}{x}-\frac {1}{2} \log (1-x)-\frac {1}{30} \log (5-x)+\frac {6 \log (x)}{5}-\frac {5}{3} \log (1+x)+\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{x}-\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{1+x}+\int \left (\frac {1}{5 (-5+x)}+\frac {1}{-1+x}+\frac {1}{x^2}-\frac {6}{5 x}\right ) \, dx-\int \left (\frac {1}{6 (-5+x)}+\frac {1}{2 (-1+x)}+\frac {1}{x}-\frac {5}{3 (1+x)}\right ) \, dx\\ &=e^{x^2}-\log (x)+\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{x}-\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{1+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 39, normalized size = 1.15 \begin {gather*} -\log (x)+\frac {2+e^{x^2} x (1+x)-\log \left (x \left (5-6 x+x^2\right )\right )}{x (1+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 46, normalized size = 1.35 \begin {gather*} \frac {{\left (x^{2} + x\right )} e^{\left (x^{2}\right )} - {\left (x^{2} + x\right )} \log \relax (x) - \log \left ({\left (x^{3} - 6 \, x^{2} + 5 \, x\right )} e^{\left (-2\right )}\right )}{x^{2} + x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 51, normalized size = 1.50 \begin {gather*} \frac {x^{2} e^{\left (x^{2}\right )} - x^{2} \log \relax (x) + x e^{\left (x^{2}\right )} - x \log \relax (x) - \log \left (x^{3} - 6 \, x^{2} + 5 \, x\right ) + 2}{x^{2} + x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.30, size = 173, normalized size = 5.09
method | result | size |
risch | \(-\frac {\ln \left (x^{2}-6 x +5\right )}{x \left (x +1\right )}-\frac {i \pi \,\mathrm {csgn}\left (i \left (x^{2}-6 x +5\right )\right ) \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right )^{2}-i \pi \,\mathrm {csgn}\left (i \left (x^{2}-6 x +5\right )\right ) \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right ) \mathrm {csgn}\left (i x \right )-4+i \pi \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right )^{3}+2 x^{2} \ln \relax (x )-2 x^{2} {\mathrm e}^{x^{2}}+2 x \ln \relax (x )-2 \,{\mathrm e}^{x^{2}} x +2 \ln \relax (x )}{2 \left (x +1\right ) x}\) | \(173\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 90, normalized size = 2.65 \begin {gather*} \frac {30 \, {\left (x^{2} + x\right )} e^{\left (x^{2}\right )} + 15 \, {\left (x^{2} + x - 2\right )} \log \left (x - 1\right ) + {\left (x^{2} + x - 30\right )} \log \left (x - 5\right ) - 30 \, x - 30 \, \log \relax (x) + 30}{30 \, {\left (x^{2} + x\right )}} + \frac {17 \, x + 12}{12 \, {\left (x^{2} + x\right )}} - \frac {5}{12 \, {\left (x + 1\right )}} - \frac {1}{2} \, \log \left (x - 1\right ) - \frac {1}{30} \, \log \left (x - 5\right ) - \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.36, size = 34, normalized size = 1.00 \begin {gather*} {\mathrm {e}}^{x^2}-\ln \relax (x)-\frac {\ln \left ({\mathrm {e}}^{-2}\,\left (x^3-6\,x^2+5\,x\right )\right )}{x^2+x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.53, size = 29, normalized size = 0.85 \begin {gather*} e^{x^{2}} - \log {\relax (x )} - \frac {\log {\left (\frac {x^{3} - 6 x^{2} + 5 x}{e^{2}} \right )}}{x^{2} + x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________