Optimal. Leaf size=24 \[ \left (\frac {e^{2 x}}{x^2}-\left (1-e^{x^2}\right ) x\right )^4 \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(163\) vs. \(2(24)=48\).
time = 1.00, antiderivative size = 163, normalized size of antiderivative = 6.79, number of steps
used = 19, number of rules used = 9, integrand size = 292, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.031, Rules used = {14, 2258,
2243, 2240, 6874, 2228, 2207, 2225, 2326} \begin {gather*} \frac {e^{8 x}}{x^8}-\frac {4 e^{6 x}}{x^5}+x^4+\frac {6 e^{4 x}}{x^2}+\frac {4 e^{3 x^2} \left (e^{2 x} x^2-x^5\right )}{x}+e^{4 x^2} x^4+\frac {6 e^{2 x^2} \left (x^8-2 e^{2 x} x^5+e^{4 x} x^2\right )}{x^4}+\frac {4 e^{x^2} \left (e^{2 x}-x^3\right )^2 \left (e^{2 x} x^2-x^5\right )}{x^7}+2 e^{2 x}-2 e^{2 x} (2 x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2207
Rule 2225
Rule 2228
Rule 2240
Rule 2243
Rule 2258
Rule 2326
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (4 e^{4 x^2} x^3 \left (1+2 x^2\right )+\frac {4 \left (-e^{2 x}+x^3\right )^3 \left (2 e^{2 x}-2 e^{2 x} x+x^3\right )}{x^9}+4 e^{3 x^2} \left (e^{2 x}+2 e^{2 x} x+6 e^{2 x} x^2-4 x^3-6 x^5\right )-\frac {4 e^{x^2} \left (-e^{2 x}+x^3\right )^2 \left (5 e^{2 x}-6 e^{2 x} x-2 e^{2 x} x^2+4 x^3+2 x^5\right )}{x^6}+\frac {12 e^{2 x^2} \left (-e^{4 x}+2 e^{4 x} x+2 e^{4 x} x^2-e^{2 x} x^3-2 e^{2 x} x^4-4 e^{2 x} x^5+2 x^6+2 x^8\right )}{x^3}\right ) \, dx\\ &=4 \int e^{4 x^2} x^3 \left (1+2 x^2\right ) \, dx+4 \int \frac {\left (-e^{2 x}+x^3\right )^3 \left (2 e^{2 x}-2 e^{2 x} x+x^3\right )}{x^9} \, dx+4 \int e^{3 x^2} \left (e^{2 x}+2 e^{2 x} x+6 e^{2 x} x^2-4 x^3-6 x^5\right ) \, dx-4 \int \frac {e^{x^2} \left (-e^{2 x}+x^3\right )^2 \left (5 e^{2 x}-6 e^{2 x} x-2 e^{2 x} x^2+4 x^3+2 x^5\right )}{x^6} \, dx+12 \int \frac {e^{2 x^2} \left (-e^{4 x}+2 e^{4 x} x+2 e^{4 x} x^2-e^{2 x} x^3-2 e^{2 x} x^4-4 e^{2 x} x^5+2 x^6+2 x^8\right )}{x^3} \, dx\\ &=\frac {4 e^{3 x^2} \left (e^{2 x} x^2-x^5\right )}{x}+\frac {4 e^{x^2} \left (e^{2 x}-x^3\right )^2 \left (e^{2 x} x^2-x^5\right )}{x^7}+\frac {6 e^{2 x^2} \left (e^{4 x} x^2-2 e^{2 x} x^5+x^8\right )}{x^4}+4 \int \left (e^{4 x^2} x^3+2 e^{4 x^2} x^5\right ) \, dx+4 \int \left (\frac {2 e^{8 x} (-1+x)}{x^9}+x^3+\frac {3 e^{4 x} (-1+2 x)}{x^3}-e^{2 x} (1+2 x)-\frac {e^{6 x} (-5+6 x)}{x^6}\right ) \, dx\\ &=x^4+\frac {4 e^{3 x^2} \left (e^{2 x} x^2-x^5\right )}{x}+\frac {4 e^{x^2} \left (e^{2 x}-x^3\right )^2 \left (e^{2 x} x^2-x^5\right )}{x^7}+\frac {6 e^{2 x^2} \left (e^{4 x} x^2-2 e^{2 x} x^5+x^8\right )}{x^4}+4 \int e^{4 x^2} x^3 \, dx-4 \int e^{2 x} (1+2 x) \, dx-4 \int \frac {e^{6 x} (-5+6 x)}{x^6} \, dx+8 \int \frac {e^{8 x} (-1+x)}{x^9} \, dx+8 \int e^{4 x^2} x^5 \, dx+12 \int \frac {e^{4 x} (-1+2 x)}{x^3} \, dx\\ &=\frac {e^{8 x}}{x^8}-\frac {4 e^{6 x}}{x^5}+\frac {6 e^{4 x}}{x^2}+\frac {1}{2} e^{4 x^2} x^2+x^4+e^{4 x^2} x^4-2 e^{2 x} (1+2 x)+\frac {4 e^{3 x^2} \left (e^{2 x} x^2-x^5\right )}{x}+\frac {4 e^{x^2} \left (e^{2 x}-x^3\right )^2 \left (e^{2 x} x^2-x^5\right )}{x^7}+\frac {6 e^{2 x^2} \left (e^{4 x} x^2-2 e^{2 x} x^5+x^8\right )}{x^4}+4 \int e^{2 x} \, dx-4 \int e^{4 x^2} x^3 \, dx-\int e^{4 x^2} x \, dx\\ &=2 e^{2 x}-\frac {e^{4 x^2}}{8}+\frac {e^{8 x}}{x^8}-\frac {4 e^{6 x}}{x^5}+\frac {6 e^{4 x}}{x^2}+x^4+e^{4 x^2} x^4-2 e^{2 x} (1+2 x)+\frac {4 e^{3 x^2} \left (e^{2 x} x^2-x^5\right )}{x}+\frac {4 e^{x^2} \left (e^{2 x}-x^3\right )^2 \left (e^{2 x} x^2-x^5\right )}{x^7}+\frac {6 e^{2 x^2} \left (e^{4 x} x^2-2 e^{2 x} x^5+x^8\right )}{x^4}+\int e^{4 x^2} x \, dx\\ &=2 e^{2 x}+\frac {e^{8 x}}{x^8}-\frac {4 e^{6 x}}{x^5}+\frac {6 e^{4 x}}{x^2}+x^4+e^{4 x^2} x^4-2 e^{2 x} (1+2 x)+\frac {4 e^{3 x^2} \left (e^{2 x} x^2-x^5\right )}{x}+\frac {4 e^{x^2} \left (e^{2 x}-x^3\right )^2 \left (e^{2 x} x^2-x^5\right )}{x^7}+\frac {6 e^{2 x^2} \left (e^{4 x} x^2-2 e^{2 x} x^5+x^8\right )}{x^4}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 2.79, size = 26, normalized size = 1.08 \begin {gather*} \frac {\left (e^{2 x}-x^3+e^{x^2} x^3\right )^4}{x^8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(151\) vs.
\(2(23)=46\).
time = 0.18, size = 152, normalized size = 6.33
method | result | size |
risch | \(x^{4} {\mathrm e}^{4 x^{2}}+\frac {{\mathrm e}^{8 x}}{x^{8}}-4 x^{4} {\mathrm e}^{3 x^{2}}+6 x^{4} {\mathrm e}^{2 x^{2}}-4 x^{4} {\mathrm e}^{x^{2}}+x^{4}+\frac {\left (4 \,{\mathrm e}^{x^{2}} x -4 x \right ) {\mathrm e}^{6 x}}{x^{6}}+\frac {\left (6 x^{2} {\mathrm e}^{2 x^{2}}-12 x^{2} {\mathrm e}^{x^{2}}+6 x^{2}\right ) {\mathrm e}^{4 x}}{x^{4}}+\frac {\left (4 x^{3} {\mathrm e}^{3 x^{2}}-12 x^{3} {\mathrm e}^{2 x^{2}}+12 x^{3} {\mathrm e}^{x^{2}}-4 x^{3}\right ) {\mathrm e}^{2 x}}{x^{2}}\) | \(152\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.37, size = 385, normalized size = 16.04 \begin {gather*} x^{4} - 6 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + i\right ) e^{\left (-1\right )} - 12 \, {\left (\frac {{\left (x + 1\right )}^{3} \Gamma \left (\frac {3}{2}, -{\left (x + 1\right )}^{2}\right )}{\left (-{\left (x + 1\right )}^{2}\right )^{\frac {3}{2}}} - \frac {\sqrt {\pi } {\left (x + 1\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x + 1\right )}^{2}}} + 2 \, e^{\left ({\left (x + 1\right )}^{2}\right )}\right )} e^{\left (-1\right )} - 12 \, {\left (\frac {\sqrt {\pi } {\left (x + 1\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x + 1\right )}^{2}}} - e^{\left ({\left (x + 1\right )}^{2}\right )}\right )} e^{\left (-1\right )} + \frac {1}{8} \, {\left (8 \, x^{4} - 4 \, x^{2} + 1\right )} e^{\left (4 \, x^{2}\right )} + \frac {1}{8} \, {\left (4 \, x^{2} - 1\right )} e^{\left (4 \, x^{2}\right )} - \frac {4}{9} \, {\left (9 \, x^{4} - 6 \, x^{2} + 2\right )} e^{\left (3 \, x^{2}\right )} - \frac {8}{9} \, {\left (3 \, x^{2} - 1\right )} e^{\left (3 \, x^{2}\right )} + 3 \, {\left (2 \, x^{4} - 2 \, x^{2} + 1\right )} e^{\left (2 \, x^{2}\right )} + 3 \, {\left (2 \, x^{2} - 1\right )} e^{\left (2 \, x^{2}\right )} - 4 \, {\left (x^{4} - 2 \, x^{2} + 2\right )} e^{\left (x^{2}\right )} - 8 \, {\left (x^{2} - 1\right )} e^{\left (x^{2}\right )} - 2 \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} + \frac {2 \, {\left (2 \, x^{6} e^{\left (3 \, x^{2} + 2 \, x\right )} - 3 \, {\left (2 \, x^{6} e^{\left (2 \, x\right )} - x^{3} e^{\left (4 \, x\right )}\right )} e^{\left (2 \, x^{2}\right )} - 2 \, {\left (3 \, x^{3} e^{\left (4 \, x\right )} - e^{\left (6 \, x\right )}\right )} e^{\left (x^{2}\right )}\right )}}{x^{5}} - 2 \, e^{\left (2 \, x\right )} + 96 \, \Gamma \left (-1, -4 \, x\right ) + 192 \, \Gamma \left (-2, -4 \, x\right ) + 31104 \, \Gamma \left (-4, -6 \, x\right ) + 155520 \, \Gamma \left (-5, -6 \, x\right ) + 16777216 \, \Gamma \left (-7, -8 \, x\right ) + 134217728 \, \Gamma \left (-8, -8 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 156 vs.
\(2 (20) = 40\).
time = 0.44, size = 156, normalized size = 6.50 \begin {gather*} x^{4} e^{\left (4 \, x^{2}\right )} - 4 \, x^{4} e^{\left (3 \, x^{2}\right )} + 6 \, x^{4} e^{\left (2 \, x^{2}\right )} - 4 \, x^{4} e^{\left (x^{2}\right )} + x^{4} + 4 \, {\left (x e^{\left (x^{2}\right )} - x\right )} e^{\left (6 \, x - 6 \, \log \left (x\right )\right )} + 6 \, {\left (x^{2} e^{\left (2 \, x^{2}\right )} - 2 \, x^{2} e^{\left (x^{2}\right )} + x^{2}\right )} e^{\left (4 \, x - 4 \, \log \left (x\right )\right )} + 4 \, {\left (x^{3} e^{\left (3 \, x^{2}\right )} - 3 \, x^{3} e^{\left (2 \, x^{2}\right )} + 3 \, x^{3} e^{\left (x^{2}\right )} - x^{3}\right )} e^{\left (2 \, x - 2 \, \log \left (x\right )\right )} + e^{\left (8 \, x - 8 \, \log \left (x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 153 vs.
\(2 (17) = 34\).
time = 0.32, size = 153, normalized size = 6.38 \begin {gather*} x^{4} + \frac {x^{11} e^{4 x^{2}} + \left (- 4 x^{11} + 4 x^{8} e^{2 x}\right ) e^{3 x^{2}} + \left (6 x^{11} - 12 x^{8} e^{2 x} + 6 x^{5} e^{4 x}\right ) e^{2 x^{2}} + \left (- 4 x^{11} + 12 x^{8} e^{2 x} - 12 x^{5} e^{4 x} + 4 x^{2} e^{6 x}\right ) e^{x^{2}}}{x^{7}} + \frac {- 4 x^{16} e^{2 x} + 6 x^{13} e^{4 x} - 4 x^{10} e^{6 x} + x^{7} e^{8 x}}{x^{15}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 164 vs.
\(2 (20) = 40\).
time = 0.41, size = 164, normalized size = 6.83 \begin {gather*} \frac {x^{12} e^{\left (4 \, x^{2}\right )} - 4 \, x^{12} e^{\left (3 \, x^{2}\right )} + 6 \, x^{12} e^{\left (2 \, x^{2}\right )} - 4 \, x^{12} e^{\left (x^{2}\right )} + x^{12} + 4 \, x^{9} e^{\left (3 \, x^{2} + 2 \, x\right )} - 12 \, x^{9} e^{\left (2 \, x^{2} + 2 \, x\right )} + 12 \, x^{9} e^{\left (x^{2} + 2 \, x\right )} - 4 \, x^{9} e^{\left (2 \, x\right )} + 6 \, x^{6} e^{\left (2 \, x^{2} + 4 \, x\right )} - 12 \, x^{6} e^{\left (x^{2} + 4 \, x\right )} + 6 \, x^{6} e^{\left (4 \, x\right )} + 4 \, x^{3} e^{\left (x^{2} + 6 \, x\right )} - 4 \, x^{3} e^{\left (6 \, x\right )} + e^{\left (8 \, x\right )}}{x^{8}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.76, size = 156, normalized size = 6.50 \begin {gather*} \frac {6\,{\mathrm {e}}^{2\,x^2+4\,x}}{x^2}-4\,x\,{\mathrm {e}}^{2\,x}+12\,x\,{\mathrm {e}}^{x^2+2\,x}+\frac {6\,{\mathrm {e}}^{4\,x}}{x^2}-\frac {4\,{\mathrm {e}}^{6\,x}}{x^5}+\frac {{\mathrm {e}}^{8\,x}}{x^8}-4\,x^4\,{\mathrm {e}}^{x^2}-12\,x\,{\mathrm {e}}^{2\,x^2+2\,x}+4\,x\,{\mathrm {e}}^{3\,x^2+2\,x}-\frac {12\,{\mathrm {e}}^{x^2+4\,x}}{x^2}+\frac {4\,{\mathrm {e}}^{x^2+6\,x}}{x^5}+6\,x^4\,{\mathrm {e}}^{2\,x^2}-4\,x^4\,{\mathrm {e}}^{3\,x^2}+x^4\,{\mathrm {e}}^{4\,x^2}+x^4 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________