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} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.28, 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 = {6873, 6860,
2240, 84, 186, 153, 2608, 2605, 1642, 6874} \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 84
Rule 153
Rule 186
Rule 1642
Rule 2240
Rule 2605
Rule 2608
Rule 6860
Rule 6873
Rule 6874
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.09, 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]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.82, 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 x \right ) \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 )+i \pi \,\mathrm {csgn}\left (i x \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 )^{2}-4-i \pi \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right )^{3}+2 x^{2} \ln \left (x \right )-2 x^{2} {\mathrm e}^{x^{2}}+2 x \ln \left (x \right )-2 \,{\mathrm e}^{x^{2}} x +2 \ln \left (x \right )}{2 \left (x +1\right ) x}\) | \(173\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 90 vs.
\(2 (32) = 64\).
time = 0.31, 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 \left (x\right ) + 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 \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, 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 \left (x\right ) - \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]
________________________________________________________________________________________
Sympy [A]
time = 0.22, size = 29, normalized size = 0.85 \begin {gather*} e^{x^{2}} - \log {\left (x \right )} - \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]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 51, normalized size = 1.50 \begin {gather*} \frac {x^{2} e^{\left (x^{2}\right )} - x^{2} \log \left (x\right ) + x e^{\left (x^{2}\right )} - x \log \left (x\right ) - \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]
________________________________________________________________________________________
Mupad [B]
time = 4.36, size = 34, normalized size = 1.00 \begin {gather*} {\mathrm {e}}^{x^2}-\ln \left (x\right )-\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]
________________________________________________________________________________________