Optimal. Leaf size=25 \[ 3 x+\left (5+\frac {4+e^{x^2}}{-x+x^3}\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 2.87, antiderivative size = 258, normalized size of antiderivative = 10.32, number of steps used = 55, number of rules used = 16, integrand size = 108, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {6741, 6742, 199, 207, 266, 44, 290, 325, 288, 321, 2177, 2178, 2220, 2204, 2214, 2210} \begin {gather*} -\frac {609 x}{8 \left (1-x^2\right )}-\frac {23 x}{2 \left (1-x^2\right )^2}+\frac {e^{x^2}}{1-x}+\frac {11 e^{x^2}}{x+1}+\frac {e^{2 x^2}}{1-x^2}+\frac {16}{1-x^2}+\frac {2 e^{x^2}}{(1-x)^2}+\frac {2 e^{x^2}}{(x+1)^2}+\frac {e^{2 x^2}}{\left (1-x^2\right )^2}+\frac {16}{\left (1-x^2\right )^2}-\frac {10 e^{x^2}}{x}+\frac {25}{\left (1-x^2\right ) x}+\frac {10}{\left (1-x^2\right )^2 x}+\frac {8 e^{x^2}}{x^2}+\frac {e^{2 x^2}}{x^2}+\frac {16}{x^2}-\frac {3 x^5}{4 \left (1-x^2\right )^2}+\frac {15 x^3}{8 \left (1-x^2\right )}+\frac {9 x^3}{4 \left (1-x^2\right )^2}+\frac {45 x}{8}-\frac {75}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 199
Rule 207
Rule 266
Rule 288
Rule 290
Rule 321
Rule 325
Rule 2177
Rule 2178
Rule 2204
Rule 2210
Rule 2214
Rule 2220
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-32+40 x+96 x^2-157 x^3+111 x^5+9 x^7-3 x^9-e^{2 x^2} \left (2-10 x^2+4 x^4\right )-e^{x^2} \left (16-10 x-64 x^2+60 x^3+16 x^4-70 x^5+20 x^7\right )}{x^3 \left (1-x^2\right )^3} \, dx\\ &=\int \left (\frac {157}{\left (-1+x^2\right )^3}+\frac {32}{x^3 \left (-1+x^2\right )^3}-\frac {40}{x^2 \left (-1+x^2\right )^3}-\frac {96}{x \left (-1+x^2\right )^3}-\frac {111 x^2}{\left (-1+x^2\right )^3}-\frac {9 x^4}{\left (-1+x^2\right )^3}+\frac {3 x^6}{\left (-1+x^2\right )^3}+\frac {2 e^{2 x^2} \left (1-5 x^2+2 x^4\right )}{x^3 \left (-1+x^2\right )^3}+\frac {2 e^{x^2} \left (8-5 x-32 x^2+30 x^3+8 x^4-35 x^5+10 x^7\right )}{x^3 \left (-1+x^2\right )^3}\right ) \, dx\\ &=2 \int \frac {e^{2 x^2} \left (1-5 x^2+2 x^4\right )}{x^3 \left (-1+x^2\right )^3} \, dx+2 \int \frac {e^{x^2} \left (8-5 x-32 x^2+30 x^3+8 x^4-35 x^5+10 x^7\right )}{x^3 \left (-1+x^2\right )^3} \, dx+3 \int \frac {x^6}{\left (-1+x^2\right )^3} \, dx-9 \int \frac {x^4}{\left (-1+x^2\right )^3} \, dx+32 \int \frac {1}{x^3 \left (-1+x^2\right )^3} \, dx-40 \int \frac {1}{x^2 \left (-1+x^2\right )^3} \, dx-96 \int \frac {1}{x \left (-1+x^2\right )^3} \, dx-111 \int \frac {x^2}{\left (-1+x^2\right )^3} \, dx+157 \int \frac {1}{\left (-1+x^2\right )^3} \, dx\\ &=\frac {10}{x \left (1-x^2\right )^2}-\frac {23 x}{2 \left (1-x^2\right )^2}+\frac {9 x^3}{4 \left (1-x^2\right )^2}-\frac {3 x^5}{4 \left (1-x^2\right )^2}+2 \int \left (-\frac {2 e^{x^2}}{(-1+x)^3}+\frac {5 e^{x^2}}{2 (-1+x)^2}+\frac {e^{x^2}}{-1+x}-\frac {8 e^{x^2}}{x^3}+\frac {5 e^{x^2}}{x^2}+\frac {8 e^{x^2}}{x}-\frac {2 e^{x^2}}{(1+x)^3}-\frac {15 e^{x^2}}{2 (1+x)^2}-\frac {9 e^{x^2}}{1+x}\right ) \, dx+\frac {15}{4} \int \frac {x^4}{\left (-1+x^2\right )^2} \, dx-\frac {27}{4} \int \frac {x^2}{\left (-1+x^2\right )^2} \, dx+16 \operatorname {Subst}\left (\int \frac {1}{(-1+x)^3 x^2} \, dx,x,x^2\right )-\frac {111}{4} \int \frac {1}{\left (-1+x^2\right )^2} \, dx-48 \operatorname {Subst}\left (\int \frac {1}{(-1+x)^3 x} \, dx,x,x^2\right )+50 \int \frac {1}{x^2 \left (-1+x^2\right )^2} \, dx-\frac {471}{4} \int \frac {1}{\left (-1+x^2\right )^2} \, dx+\operatorname {Subst}\left (\int \frac {e^{2 x} \left (1-5 x+2 x^2\right )}{(-1+x)^3 x^2} \, dx,x,x^2\right )\\ &=\frac {10}{x \left (1-x^2\right )^2}-\frac {23 x}{2 \left (1-x^2\right )^2}+\frac {9 x^3}{4 \left (1-x^2\right )^2}-\frac {3 x^5}{4 \left (1-x^2\right )^2}+\frac {25}{x \left (1-x^2\right )}-\frac {609 x}{8 \left (1-x^2\right )}+\frac {15 x^3}{8 \left (1-x^2\right )}+2 \int \frac {e^{x^2}}{-1+x} \, dx-\frac {27}{8} \int \frac {1}{-1+x^2} \, dx-4 \int \frac {e^{x^2}}{(-1+x)^3} \, dx-4 \int \frac {e^{x^2}}{(1+x)^3} \, dx+5 \int \frac {e^{x^2}}{(-1+x)^2} \, dx+\frac {45}{8} \int \frac {x^2}{-1+x^2} \, dx+10 \int \frac {e^{x^2}}{x^2} \, dx+\frac {111}{8} \int \frac {1}{-1+x^2} \, dx-15 \int \frac {e^{x^2}}{(1+x)^2} \, dx-16 \int \frac {e^{x^2}}{x^3} \, dx+16 \int \frac {e^{x^2}}{x} \, dx+16 \operatorname {Subst}\left (\int \left (\frac {1}{(-1+x)^3}-\frac {2}{(-1+x)^2}+\frac {3}{-1+x}-\frac {1}{x^2}-\frac {3}{x}\right ) \, dx,x,x^2\right )-18 \int \frac {e^{x^2}}{1+x} \, dx-48 \operatorname {Subst}\left (\int \left (\frac {1}{(-1+x)^3}-\frac {1}{(-1+x)^2}+\frac {1}{-1+x}-\frac {1}{x}\right ) \, dx,x,x^2\right )+\frac {471}{8} \int \frac {1}{-1+x^2} \, dx-75 \int \frac {1}{x^2 \left (-1+x^2\right )} \, dx+\operatorname {Subst}\left (\int \left (-\frac {2 e^{2 x}}{(-1+x)^3}+\frac {3 e^{2 x}}{(-1+x)^2}-\frac {2 e^{2 x}}{-1+x}-\frac {e^{2 x}}{x^2}+\frac {2 e^{2 x}}{x}\right ) \, dx,x,x^2\right )\\ &=\frac {2 e^{x^2}}{(1-x)^2}+\frac {5 e^{x^2}}{1-x}+\frac {16}{x^2}+\frac {8 e^{x^2}}{x^2}-\frac {75}{x}-\frac {10 e^{x^2}}{x}+\frac {45 x}{8}+\frac {2 e^{x^2}}{(1+x)^2}+\frac {15 e^{x^2}}{1+x}+\frac {16}{\left (1-x^2\right )^2}+\frac {10}{x \left (1-x^2\right )^2}-\frac {23 x}{2 \left (1-x^2\right )^2}+\frac {9 x^3}{4 \left (1-x^2\right )^2}-\frac {3 x^5}{4 \left (1-x^2\right )^2}+\frac {16}{1-x^2}+\frac {25}{x \left (1-x^2\right )}-\frac {609 x}{8 \left (1-x^2\right )}+\frac {15 x^3}{8 \left (1-x^2\right )}-\frac {555}{8} \tanh ^{-1}(x)+8 \text {Ei}\left (x^2\right )+2 \int \frac {e^{x^2}}{-1+x} \, dx-2 \operatorname {Subst}\left (\int \frac {e^{2 x}}{(-1+x)^3} \, dx,x,x^2\right )-2 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-1+x} \, dx,x,x^2\right )+2 \operatorname {Subst}\left (\int \frac {e^{2 x}}{x} \, dx,x,x^2\right )+3 \operatorname {Subst}\left (\int \frac {e^{2 x}}{(-1+x)^2} \, dx,x,x^2\right )-4 \int \frac {e^{x^2}}{(-1+x)^2} \, dx-4 \int \frac {e^{x^2}}{-1+x} \, dx+4 \int \frac {e^{x^2}}{(1+x)^2} \, dx-4 \int \frac {e^{x^2}}{1+x} \, dx+\frac {45}{8} \int \frac {1}{-1+x^2} \, dx+10 \int e^{x^2} \, dx+10 \int \frac {e^{x^2}}{-1+x} \, dx-16 \int \frac {e^{x^2}}{x} \, dx-18 \int \frac {e^{x^2}}{1+x} \, dx+20 \int e^{x^2} \, dx-30 \int e^{x^2} \, dx+30 \int \frac {e^{x^2}}{1+x} \, dx-75 \int \frac {1}{-1+x^2} \, dx-\operatorname {Subst}\left (\int \frac {e^{2 x}}{x^2} \, dx,x,x^2\right )\\ &=\frac {2 e^{x^2}}{(1-x)^2}+\frac {e^{x^2}}{1-x}+\frac {16}{x^2}+\frac {8 e^{x^2}}{x^2}+\frac {e^{2 x^2}}{x^2}-\frac {75}{x}-\frac {10 e^{x^2}}{x}+\frac {45 x}{8}+\frac {2 e^{x^2}}{(1+x)^2}+\frac {11 e^{x^2}}{1+x}+\frac {16}{\left (1-x^2\right )^2}+\frac {e^{2 x^2}}{\left (1-x^2\right )^2}+\frac {10}{x \left (1-x^2\right )^2}-\frac {23 x}{2 \left (1-x^2\right )^2}+\frac {9 x^3}{4 \left (1-x^2\right )^2}-\frac {3 x^5}{4 \left (1-x^2\right )^2}+\frac {16}{1-x^2}+\frac {3 e^{2 x^2}}{1-x^2}+\frac {25}{x \left (1-x^2\right )}-\frac {609 x}{8 \left (1-x^2\right )}+\frac {15 x^3}{8 \left (1-x^2\right )}+2 \text {Ei}\left (2 x^2\right )-2 e^2 \text {Ei}\left (-2 \left (1-x^2\right )\right )+2 \int \frac {e^{x^2}}{-1+x} \, dx-2 \operatorname {Subst}\left (\int \frac {e^{2 x}}{(-1+x)^2} \, dx,x,x^2\right )-2 \operatorname {Subst}\left (\int \frac {e^{2 x}}{x} \, dx,x,x^2\right )-4 \int \frac {e^{x^2}}{-1+x} \, dx-4 \int \frac {e^{x^2}}{1+x} \, dx+6 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-1+x} \, dx,x,x^2\right )-8 \int \frac {e^{x^2}}{-1+x} \, dx-8 \int \frac {e^{x^2}}{1+x} \, dx+10 \int \frac {e^{x^2}}{-1+x} \, dx-18 \int \frac {e^{x^2}}{1+x} \, dx+30 \int \frac {e^{x^2}}{1+x} \, dx\\ &=\frac {2 e^{x^2}}{(1-x)^2}+\frac {e^{x^2}}{1-x}+\frac {16}{x^2}+\frac {8 e^{x^2}}{x^2}+\frac {e^{2 x^2}}{x^2}-\frac {75}{x}-\frac {10 e^{x^2}}{x}+\frac {45 x}{8}+\frac {2 e^{x^2}}{(1+x)^2}+\frac {11 e^{x^2}}{1+x}+\frac {16}{\left (1-x^2\right )^2}+\frac {e^{2 x^2}}{\left (1-x^2\right )^2}+\frac {10}{x \left (1-x^2\right )^2}-\frac {23 x}{2 \left (1-x^2\right )^2}+\frac {9 x^3}{4 \left (1-x^2\right )^2}-\frac {3 x^5}{4 \left (1-x^2\right )^2}+\frac {16}{1-x^2}+\frac {e^{2 x^2}}{1-x^2}+\frac {25}{x \left (1-x^2\right )}-\frac {609 x}{8 \left (1-x^2\right )}+\frac {15 x^3}{8 \left (1-x^2\right )}+4 e^2 \text {Ei}\left (-2 \left (1-x^2\right )\right )+2 \int \frac {e^{x^2}}{-1+x} \, dx-4 \int \frac {e^{x^2}}{-1+x} \, dx-4 \int \frac {e^{x^2}}{1+x} \, dx-4 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-1+x} \, dx,x,x^2\right )-8 \int \frac {e^{x^2}}{-1+x} \, dx-8 \int \frac {e^{x^2}}{1+x} \, dx+10 \int \frac {e^{x^2}}{-1+x} \, dx-18 \int \frac {e^{x^2}}{1+x} \, dx+30 \int \frac {e^{x^2}}{1+x} \, dx\\ &=\frac {2 e^{x^2}}{(1-x)^2}+\frac {e^{x^2}}{1-x}+\frac {16}{x^2}+\frac {8 e^{x^2}}{x^2}+\frac {e^{2 x^2}}{x^2}-\frac {75}{x}-\frac {10 e^{x^2}}{x}+\frac {45 x}{8}+\frac {2 e^{x^2}}{(1+x)^2}+\frac {11 e^{x^2}}{1+x}+\frac {16}{\left (1-x^2\right )^2}+\frac {e^{2 x^2}}{\left (1-x^2\right )^2}+\frac {10}{x \left (1-x^2\right )^2}-\frac {23 x}{2 \left (1-x^2\right )^2}+\frac {9 x^3}{4 \left (1-x^2\right )^2}-\frac {3 x^5}{4 \left (1-x^2\right )^2}+\frac {16}{1-x^2}+\frac {e^{2 x^2}}{1-x^2}+\frac {25}{x \left (1-x^2\right )}-\frac {609 x}{8 \left (1-x^2\right )}+\frac {15 x^3}{8 \left (1-x^2\right )}+2 \int \frac {e^{x^2}}{-1+x} \, dx-4 \int \frac {e^{x^2}}{-1+x} \, dx-4 \int \frac {e^{x^2}}{1+x} \, dx-8 \int \frac {e^{x^2}}{-1+x} \, dx-8 \int \frac {e^{x^2}}{1+x} \, dx+10 \int \frac {e^{x^2}}{-1+x} \, dx-18 \int \frac {e^{x^2}}{1+x} \, dx+30 \int \frac {e^{x^2}}{1+x} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.06, size = 55, normalized size = 2.20 \begin {gather*} \frac {16+e^{2 x^2}-40 x+43 x^3-6 x^5+3 x^7+2 e^{x^2} \left (4-5 x+5 x^3\right )}{x^2 \left (-1+x^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.90, size = 57, normalized size = 2.28 \begin {gather*} \frac {3 \, x^{7} - 6 \, x^{5} + 43 \, x^{3} + 2 \, {\left (5 \, x^{3} - 5 \, x + 4\right )} e^{\left (x^{2}\right )} - 40 \, x + e^{\left (2 \, x^{2}\right )} + 16}{x^{6} - 2 \, x^{4} + x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.41, size = 63, normalized size = 2.52 \begin {gather*} \frac {3 \, x^{7} - 6 \, x^{5} + 10 \, x^{3} e^{\left (x^{2}\right )} + 43 \, x^{3} - 10 \, x e^{\left (x^{2}\right )} - 40 \, x + e^{\left (2 \, x^{2}\right )} + 8 \, e^{\left (x^{2}\right )} + 16}{x^{6} - 2 \, x^{4} + x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.48, size = 60, normalized size = 2.40
method | result | size |
norman | \(\frac {16+{\mathrm e}^{2 x^{2}}-40 x +43 x^{3}-6 x^{5}+3 x^{7}+10 x^{3} {\mathrm e}^{x^{2}}-10 \,{\mathrm e}^{x^{2}} x +8 \,{\mathrm e}^{x^{2}}}{x^{2} \left (x^{2}-1\right )^{2}}\) | \(60\) |
risch | \(3 x +\frac {40 x^{3}-40 x +16}{x^{2} \left (x^{4}-2 x^{2}+1\right )}+\frac {{\mathrm e}^{2 x^{2}}}{x^{2} \left (x^{2}-1\right )^{2}}+\frac {2 \left (5 x^{3}-5 x +4\right ) {\mathrm e}^{x^{2}}}{x^{2} \left (x^{2}-1\right )^{2}}\) | \(74\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.55, size = 205, normalized size = 8.20 \begin {gather*} 3 \, x - \frac {5 \, {\left (15 \, x^{4} - 25 \, x^{2} + 8\right )}}{x^{5} - 2 \, x^{3} + x} + \frac {8 \, {\left (6 \, x^{4} - 9 \, x^{2} + 2\right )}}{x^{6} - 2 \, x^{4} + x^{2}} - \frac {3 \, {\left (9 \, x^{3} - 7 \, x\right )}}{8 \, {\left (x^{4} - 2 \, x^{2} + 1\right )}} + \frac {9 \, {\left (5 \, x^{3} - 3 \, x\right )}}{8 \, {\left (x^{4} - 2 \, x^{2} + 1\right )}} + \frac {157 \, {\left (3 \, x^{3} - 5 \, x\right )}}{8 \, {\left (x^{4} - 2 \, x^{2} + 1\right )}} + \frac {111 \, {\left (x^{3} + x\right )}}{8 \, {\left (x^{4} - 2 \, x^{2} + 1\right )}} - \frac {24 \, {\left (2 \, x^{2} - 3\right )}}{x^{4} - 2 \, x^{2} + 1} + \frac {2 \, {\left (5 \, x^{3} - 5 \, x + 4\right )} e^{\left (x^{2}\right )} + e^{\left (2 \, x^{2}\right )}}{x^{6} - 2 \, x^{4} + x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.25, size = 52, normalized size = 2.08 \begin {gather*} 3\,x+\frac {8\,{\mathrm {e}}^{x^2}+{\mathrm {e}}^{2\,x^2}+x^3\,\left (10\,{\mathrm {e}}^{x^2}+40\right )-x\,\left (10\,{\mathrm {e}}^{x^2}+40\right )+16}{x^2\,{\left (x^2-1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.24, size = 105, normalized size = 4.20 \begin {gather*} 3 x + \frac {\left (x^{6} - 2 x^{4} + x^{2}\right ) e^{2 x^{2}} + \left (10 x^{9} - 30 x^{7} + 8 x^{6} + 30 x^{5} - 16 x^{4} - 10 x^{3} + 8 x^{2}\right ) e^{x^{2}}}{x^{12} - 4 x^{10} + 6 x^{8} - 4 x^{6} + x^{4}} + \frac {40 x^{3} - 40 x + 16}{x^{6} - 2 x^{4} + x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________