Optimal. Leaf size=25 \[ \frac {16 (e-x)^2 \left (-e^{2 x^2}+x\right )^4}{x^4} \]
________________________________________________________________________________________
Rubi [B] time = 0.42, antiderivative size = 122, normalized size of antiderivative = 4.88, number of steps used = 6, number of rules used = 2, integrand size = 184, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.011, Rules used = {14, 2288} \begin {gather*} -\frac {64 e^{2 x^2} \left (e x^2-x^3\right ) (e-x)}{x^3}+\frac {16 e^{8 x^2} \left (e x^2-x^3\right ) (e-x)}{x^6}-\frac {64 e^{6 x^2} \left (e x^2-x^3\right ) (e-x)}{x^5}+\frac {96 e^{4 x^2} \left (e x^2-x^3\right ) (e-x)}{x^4}+16 (e-x)^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2288
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-32 (e-x)-\frac {64 e^{6 x^2} (e-x) \left (-3 e+x+12 e x^2-12 x^3\right )}{x^4}+\frac {32 e^{8 x^2} (e-x) \left (-2 e+x+8 e x^2-8 x^3\right )}{x^5}+\frac {192 e^{4 x^2} (e-x) \left (-e+4 e x^2-4 x^3\right )}{x^3}-\frac {64 e^{2 x^2} (e-x) \left (-e-x+4 e x^2-4 x^3\right )}{x^2}\right ) \, dx\\ &=16 (e-x)^2+32 \int \frac {e^{8 x^2} (e-x) \left (-2 e+x+8 e x^2-8 x^3\right )}{x^5} \, dx-64 \int \frac {e^{6 x^2} (e-x) \left (-3 e+x+12 e x^2-12 x^3\right )}{x^4} \, dx-64 \int \frac {e^{2 x^2} (e-x) \left (-e-x+4 e x^2-4 x^3\right )}{x^2} \, dx+192 \int \frac {e^{4 x^2} (e-x) \left (-e+4 e x^2-4 x^3\right )}{x^3} \, dx\\ &=16 (e-x)^2+\frac {16 e^{8 x^2} (e-x) \left (e x^2-x^3\right )}{x^6}-\frac {64 e^{6 x^2} (e-x) \left (e x^2-x^3\right )}{x^5}+\frac {96 e^{4 x^2} (e-x) \left (e x^2-x^3\right )}{x^4}-\frac {64 e^{2 x^2} (e-x) \left (e x^2-x^3\right )}{x^3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.51, size = 170, normalized size = 6.80 \begin {gather*} 32 \left (3 e^{4 x^2}+4 e^{1+2 x^2}+\frac {e^{2+8 x^2}}{2 x^4}-\frac {2 e^{2+6 x^2}}{x^3}-\frac {e^{1+8 x^2}}{x^3}+\frac {e^{8 x^2}}{2 x^2}+\frac {3 e^{2+4 x^2}}{x^2}+\frac {4 e^{1+6 x^2}}{x^2}-\frac {2 e^{6 x^2}}{x}-\frac {2 e^{2+2 x^2}}{x}-\frac {6 e^{1+4 x^2}}{x}-e x-2 e^{2 x^2} x+\frac {x^2}{2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.03, size = 107, normalized size = 4.28 \begin {gather*} \frac {16 \, {\left (x^{6} - 2 \, x^{5} e + {\left (x^{2} - 2 \, x e + e^{2}\right )} e^{\left (8 \, x^{2}\right )} - 4 \, {\left (x^{3} - 2 \, x^{2} e + x e^{2}\right )} e^{\left (6 \, x^{2}\right )} + 6 \, {\left (x^{4} - 2 \, x^{3} e + x^{2} e^{2}\right )} e^{\left (4 \, x^{2}\right )} - 4 \, {\left (x^{5} - 2 \, x^{4} e + x^{3} e^{2}\right )} e^{\left (2 \, x^{2}\right )}\right )}}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.21, size = 154, normalized size = 6.16 \begin {gather*} \frac {16 \, {\left (x^{6} - 2 \, x^{5} e - 4 \, x^{5} e^{\left (2 \, x^{2}\right )} + 6 \, x^{4} e^{\left (4 \, x^{2}\right )} + 8 \, x^{4} e^{\left (2 \, x^{2} + 1\right )} - 4 \, x^{3} e^{\left (6 \, x^{2}\right )} - 12 \, x^{3} e^{\left (4 \, x^{2} + 1\right )} - 4 \, x^{3} e^{\left (2 \, x^{2} + 2\right )} + x^{2} e^{\left (8 \, x^{2}\right )} + 8 \, x^{2} e^{\left (6 \, x^{2} + 1\right )} + 6 \, x^{2} e^{\left (4 \, x^{2} + 2\right )} - 2 \, x e^{\left (8 \, x^{2} + 1\right )} - 4 \, x e^{\left (6 \, x^{2} + 2\right )} + e^{\left (8 \, x^{2} + 2\right )}\right )}}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.09, size = 100, normalized size = 4.00
method | result | size |
risch | \(-32 x \,{\mathrm e}+16 x^{2}+\frac {16 \left ({\mathrm e}^{2}-2 x \,{\mathrm e}+x^{2}\right ) {\mathrm e}^{8 x^{2}}}{x^{4}}-\frac {64 \left ({\mathrm e}^{2}-2 x \,{\mathrm e}+x^{2}\right ) {\mathrm e}^{6 x^{2}}}{x^{3}}+\frac {96 \left ({\mathrm e}^{2}-2 x \,{\mathrm e}+x^{2}\right ) {\mathrm e}^{4 x^{2}}}{x^{2}}-\frac {64 \left ({\mathrm e}^{2}-2 x \,{\mathrm e}+x^{2}\right ) {\mathrm e}^{2 x^{2}}}{x}\) | \(100\) |
default | \(16 x^{2}+\frac {16 \,{\mathrm e}^{8 x^{2}}}{x^{2}}-\frac {64 \,{\mathrm e}^{6 x^{2}}}{x}+96 \,{\mathrm e}^{4 x^{2}}-64 x \,{\mathrm e}^{2 x^{2}}-384 \,{\mathrm e} \sqrt {\pi }\, \erfi \left (2 x \right )-64 \,{\mathrm e}^{2} \sqrt {2}\, \sqrt {\pi }\, \erfi \left (\sqrt {2}\, x \right )-64 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{8 x^{2}}}{4 x^{4}}-\frac {2 \,{\mathrm e}^{8 x^{2}}}{x^{2}}-16 \expIntegralEi \left (1, -8 x^{2}\right )\right )+96 \,{\mathrm e} \left (-\frac {{\mathrm e}^{8 x^{2}}}{3 x^{3}}-\frac {16 \,{\mathrm e}^{8 x^{2}}}{3 x}+\frac {32 \sqrt {2}\, \sqrt {\pi }\, \erfi \left (2 \sqrt {2}\, x \right )}{3}\right )+192 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{6 x^{2}}}{3 x^{3}}-\frac {4 \,{\mathrm e}^{6 x^{2}}}{x}+4 \sqrt {6}\, \sqrt {\pi }\, \erfi \left (\sqrt {6}\, x \right )\right )-256 \,{\mathrm e} \left (-\frac {{\mathrm e}^{6 x^{2}}}{2 x^{2}}-3 \expIntegralEi \left (1, -6 x^{2}\right )\right )-192 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{4 x^{2}}}{2 x^{2}}-2 \expIntegralEi \left (1, -4 x^{2}\right )\right )+256 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{8 x^{2}}}{2 x^{2}}-4 \expIntegralEi \left (1, -8 x^{2}\right )\right )+192 \,{\mathrm e} \left (-\frac {{\mathrm e}^{4 x^{2}}}{x}+2 \sqrt {\pi }\, \erfi \left (2 x \right )\right )-512 \,{\mathrm e} \left (-\frac {{\mathrm e}^{8 x^{2}}}{x}+2 \sqrt {2}\, \sqrt {\pi }\, \erfi \left (2 \sqrt {2}\, x \right )\right )+64 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{2 x^{2}}}{x}+\sqrt {2}\, \sqrt {\pi }\, \erfi \left (\sqrt {2}\, x \right )\right )-768 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{6 x^{2}}}{x}+\sqrt {6}\, \sqrt {\pi }\, \erfi \left (\sqrt {6}\, x \right )\right )-768 \,{\mathrm e} \expIntegralEi \left (1, -6 x^{2}\right )-384 \,{\mathrm e}^{2} \expIntegralEi \left (1, -4 x^{2}\right )+128 \,{\mathrm e} \,{\mathrm e}^{2 x^{2}}-32 x \,{\mathrm e}\) | \(434\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.55, size = 325, normalized size = 13.00 \begin {gather*} 64 i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (i \, \sqrt {2} x\right ) e^{2} + 384 i \, \sqrt {\pi } \operatorname {erf}\left (2 i \, x\right ) e + 16 \, x^{2} + 64 i \, \sqrt {6} \sqrt {\pi } \operatorname {erf}\left (i \, \sqrt {6} x\right ) + 384 \, {\rm Ei}\left (4 \, x^{2}\right ) e^{2} - 32 \, x e + 768 \, {\rm Ei}\left (6 \, x^{2}\right ) e - 64 \, x e^{\left (2 \, x^{2}\right )} - \frac {32 \, \sqrt {2} \sqrt {-x^{2}} e^{2} \Gamma \left (-\frac {1}{2}, -2 \, x^{2}\right )}{x} + \frac {384 \, \sqrt {6} \sqrt {-x^{2}} e^{2} \Gamma \left (-\frac {1}{2}, -6 \, x^{2}\right )}{x} + \frac {512 \, \sqrt {2} \sqrt {-x^{2}} e \Gamma \left (-\frac {1}{2}, -8 \, x^{2}\right )}{x} - 384 \, e^{2} \Gamma \left (-1, -4 \, x^{2}\right ) - 768 \, e \Gamma \left (-1, -6 \, x^{2}\right ) + 1024 \, e^{2} \Gamma \left (-1, -8 \, x^{2}\right ) + 2048 \, e^{2} \Gamma \left (-2, -8 \, x^{2}\right ) - \frac {192 \, \sqrt {-x^{2}} e \Gamma \left (-\frac {1}{2}, -4 \, x^{2}\right )}{x} - \frac {32 \, \sqrt {6} \sqrt {-x^{2}} \Gamma \left (-\frac {1}{2}, -6 \, x^{2}\right )}{x} - \frac {576 \, \sqrt {6} \left (-x^{2}\right )^{\frac {3}{2}} e^{2} \Gamma \left (-\frac {3}{2}, -6 \, x^{2}\right )}{x^{3}} - \frac {768 \, \sqrt {2} \left (-x^{2}\right )^{\frac {3}{2}} e \Gamma \left (-\frac {3}{2}, -8 \, x^{2}\right )}{x^{3}} + 128 \, {\rm Ei}\left (8 \, x^{2}\right ) + 96 \, e^{\left (4 \, x^{2}\right )} + 128 \, e^{\left (2 \, x^{2} + 1\right )} - 128 \, \Gamma \left (-1, -8 \, x^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.47, size = 151, normalized size = 6.04 \begin {gather*} 96\,{\mathrm {e}}^{4\,x^2}-32\,x\,\mathrm {e}+128\,\mathrm {e}\,{\mathrm {e}}^{2\,x^2}-64\,x\,{\mathrm {e}}^{2\,x^2}-\frac {64\,{\mathrm {e}}^{6\,x^2}}{x}+\frac {16\,{\mathrm {e}}^{8\,x^2}}{x^2}+16\,x^2-\frac {64\,{\mathrm {e}}^2\,{\mathrm {e}}^{2\,x^2}}{x}-\frac {192\,\mathrm {e}\,{\mathrm {e}}^{4\,x^2}}{x}+\frac {96\,{\mathrm {e}}^2\,{\mathrm {e}}^{4\,x^2}}{x^2}+\frac {128\,\mathrm {e}\,{\mathrm {e}}^{6\,x^2}}{x^2}-\frac {64\,{\mathrm {e}}^2\,{\mathrm {e}}^{6\,x^2}}{x^3}-\frac {32\,\mathrm {e}\,{\mathrm {e}}^{8\,x^2}}{x^3}+\frac {16\,{\mathrm {e}}^2\,{\mathrm {e}}^{8\,x^2}}{x^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.43, size = 129, normalized size = 5.16 \begin {gather*} 16 x^{2} - 32 e x + \frac {\left (16 x^{8} - 32 e x^{7} + 16 x^{6} e^{2}\right ) e^{8 x^{2}} + \left (- 64 x^{9} + 128 e x^{8} - 64 x^{7} e^{2}\right ) e^{6 x^{2}} + \left (96 x^{10} - 192 e x^{9} + 96 x^{8} e^{2}\right ) e^{4 x^{2}} + \left (- 64 x^{11} + 128 e x^{10} - 64 x^{9} e^{2}\right ) e^{2 x^{2}}}{x^{10}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________