Optimal. Leaf size=25 \[ \left (5-\frac {1+e^{x^2}}{3 \left (1+\frac {1}{e^4}\right )}+2 x\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.11, antiderivative size = 129, normalized size of antiderivative = 5.16, number of steps used = 9, number of rules used = 5, integrand size = 85, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {12, 2209, 2226, 2204, 2212} \begin {gather*} \frac {4 x^2}{\left (1+e^4\right )^2}-\frac {4 e^{x^2+4} x}{3 \left (1+e^4\right )}-\frac {2 \left (15+14 e^4\right ) e^{x^2+4}}{9 \left (1+e^4\right )^2}+\frac {e^{2 x^2+8}}{9 \left (1+e^4\right )^2}+\frac {20 x}{\left (1+e^4\right )^2}+\frac {4 e^8 (3 x+7)^2}{9 \left (1+e^4\right )^2}+\frac {e^4 (12 x+29)^2}{18 \left (1+e^4\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2204
Rule 2209
Rule 2212
Rule 2226
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \left (180+72 x+4 e^{8+2 x^2} x+e^8 (168+72 x)+e^4 (348+144 x)+e^{x^2} \left (e^4 \left (-12-60 x-24 x^2\right )+e^8 \left (-12-56 x-24 x^2\right )\right )\right ) \, dx}{9 \left (1+e^4\right )^2}\\ &=\frac {20 x}{\left (1+e^4\right )^2}+\frac {4 x^2}{\left (1+e^4\right )^2}+\frac {4 e^8 (7+3 x)^2}{9 \left (1+e^4\right )^2}+\frac {e^4 (29+12 x)^2}{18 \left (1+e^4\right )^2}+\frac {\int e^{x^2} \left (e^4 \left (-12-60 x-24 x^2\right )+e^8 \left (-12-56 x-24 x^2\right )\right ) \, dx}{9 \left (1+e^4\right )^2}+\frac {4 \int e^{8+2 x^2} x \, dx}{9 \left (1+e^4\right )^2}\\ &=\frac {e^{8+2 x^2}}{9 \left (1+e^4\right )^2}+\frac {20 x}{\left (1+e^4\right )^2}+\frac {4 x^2}{\left (1+e^4\right )^2}+\frac {4 e^8 (7+3 x)^2}{9 \left (1+e^4\right )^2}+\frac {e^4 (29+12 x)^2}{18 \left (1+e^4\right )^2}+\frac {\int \left (-12 e^{x^2} \left (e^4+e^8\right )-4 e^{4+x^2} \left (15+14 e^4\right ) x-24 e^{x^2} \left (e^4+e^8\right ) x^2\right ) \, dx}{9 \left (1+e^4\right )^2}\\ &=\frac {e^{8+2 x^2}}{9 \left (1+e^4\right )^2}+\frac {20 x}{\left (1+e^4\right )^2}+\frac {4 x^2}{\left (1+e^4\right )^2}+\frac {4 e^8 (7+3 x)^2}{9 \left (1+e^4\right )^2}+\frac {e^4 (29+12 x)^2}{18 \left (1+e^4\right )^2}-\frac {\left (4 e^4\right ) \int e^{x^2} \, dx}{3 \left (1+e^4\right )}-\frac {\left (8 e^4\right ) \int e^{x^2} x^2 \, dx}{3 \left (1+e^4\right )}-\frac {\left (4 \left (15+14 e^4\right )\right ) \int e^{4+x^2} x \, dx}{9 \left (1+e^4\right )^2}\\ &=\frac {e^{8+2 x^2}}{9 \left (1+e^4\right )^2}-\frac {2 e^{4+x^2} \left (15+14 e^4\right )}{9 \left (1+e^4\right )^2}+\frac {20 x}{\left (1+e^4\right )^2}-\frac {4 e^{4+x^2} x}{3 \left (1+e^4\right )}+\frac {4 x^2}{\left (1+e^4\right )^2}+\frac {4 e^8 (7+3 x)^2}{9 \left (1+e^4\right )^2}+\frac {e^4 (29+12 x)^2}{18 \left (1+e^4\right )^2}-\frac {2 e^4 \sqrt {\pi } \text {erfi}(x)}{3 \left (1+e^4\right )}+\frac {\left (4 e^4\right ) \int e^{x^2} \, dx}{3 \left (1+e^4\right )}\\ &=\frac {e^{8+2 x^2}}{9 \left (1+e^4\right )^2}-\frac {2 e^{4+x^2} \left (15+14 e^4\right )}{9 \left (1+e^4\right )^2}+\frac {20 x}{\left (1+e^4\right )^2}-\frac {4 e^{4+x^2} x}{3 \left (1+e^4\right )}+\frac {4 x^2}{\left (1+e^4\right )^2}+\frac {4 e^8 (7+3 x)^2}{9 \left (1+e^4\right )^2}+\frac {e^4 (29+12 x)^2}{18 \left (1+e^4\right )^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.06, size = 101, normalized size = 4.04 \begin {gather*} \frac {4 \left (-\frac {15}{2} e^{4+x^2}-7 e^{8+x^2}+\frac {1}{4} e^{8+2 x^2}+45 x+87 e^4 x+42 e^8 x-3 e^{4+x^2} x-3 e^{8+x^2} x+9 x^2+18 e^4 x^2+9 e^8 x^2\right )}{9 \left (1+e^4\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.64, size = 80, normalized size = 3.20 \begin {gather*} \frac {36 \, x^{2} + 12 \, {\left (3 \, x^{2} + 14 \, x\right )} e^{8} + 12 \, {\left (6 \, x^{2} + 29 \, x\right )} e^{4} - 2 \, {\left (2 \, {\left (3 \, x + 7\right )} e^{8} + 3 \, {\left (2 \, x + 5\right )} e^{4}\right )} e^{\left (x^{2}\right )} + 180 \, x + e^{\left (2 \, x^{2} + 8\right )}}{9 \, {\left (e^{8} + 2 \, e^{4} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 81, normalized size = 3.24 \begin {gather*} \frac {36 \, x^{2} + 12 \, {\left (3 \, x^{2} + 14 \, x\right )} e^{8} + 12 \, {\left (6 \, x^{2} + 29 \, x\right )} e^{4} - 4 \, {\left (3 \, x + 7\right )} e^{\left (x^{2} + 8\right )} - 6 \, {\left (2 \, x + 5\right )} e^{\left (x^{2} + 4\right )} + 180 \, x + e^{\left (2 \, x^{2} + 8\right )}}{9 \, {\left (e^{8} + 2 \, e^{4} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.05, size = 74, normalized size = 2.96
method | result | size |
norman | \(\frac {\left (4 \,{\mathrm e}^{4}+4\right ) x^{2}+\left (\frac {56 \,{\mathrm e}^{4}}{3}+20\right ) x -\frac {4 x \,{\mathrm e}^{4} {\mathrm e}^{x^{2}}}{3}+\frac {{\mathrm e}^{8} {\mathrm e}^{2 x^{2}}}{9 \,{\mathrm e}^{4}+9}-\frac {2 \left (14 \,{\mathrm e}^{4}+15\right ) {\mathrm e}^{4} {\mathrm e}^{x^{2}}}{9 \left ({\mathrm e}^{4}+1\right )}}{{\mathrm e}^{4}+1}\) | \(74\) |
default | \(\frac {180 x +{\mathrm e}^{8} \left (36 x^{2}+168 x \right )+{\mathrm e}^{4} \left (72 x^{2}+348 x \right )-6 \,{\mathrm e}^{4} \sqrt {\pi }\, \erfi \relax (x )-6 \,{\mathrm e}^{8} \sqrt {\pi }\, \erfi \relax (x )-30 \,{\mathrm e}^{4} {\mathrm e}^{x^{2}}-28 \,{\mathrm e}^{8} {\mathrm e}^{x^{2}}-24 \,{\mathrm e}^{4} \left (\frac {{\mathrm e}^{x^{2}} x}{2}-\frac {\sqrt {\pi }\, \erfi \relax (x )}{4}\right )-24 \,{\mathrm e}^{8} \left (\frac {{\mathrm e}^{x^{2}} x}{2}-\frac {\sqrt {\pi }\, \erfi \relax (x )}{4}\right )+36 x^{2}+{\mathrm e}^{8} {\mathrm e}^{2 x^{2}}}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}\) | \(139\) |
risch | \(\frac {36 x^{2} {\mathrm e}^{8}}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}+\frac {{\mathrm e}^{2 x^{2}+8}}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}+\frac {168 x \,{\mathrm e}^{8}}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}+\frac {72 x^{2} {\mathrm e}^{4}}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}+\frac {348 x \,{\mathrm e}^{4}}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}+\frac {36 x^{2}}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}+\frac {180 x}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}+\frac {\left (-12 x \,{\mathrm e}^{8}-28 \,{\mathrm e}^{8}-12 x \,{\mathrm e}^{4}-30 \,{\mathrm e}^{4}\right ) {\mathrm e}^{x^{2}}}{9 \,{\mathrm e}^{8}+18 \,{\mathrm e}^{4}+9}\) | \(163\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.40, size = 78, normalized size = 3.12 \begin {gather*} \frac {36 \, x^{2} + 12 \, {\left (3 \, x^{2} + 14 \, x\right )} e^{8} + 12 \, {\left (6 \, x^{2} + 29 \, x\right )} e^{4} - 2 \, {\left (6 \, x {\left (e^{8} + e^{4}\right )} + 14 \, e^{8} + 15 \, e^{4}\right )} e^{\left (x^{2}\right )} + 180 \, x + e^{\left (2 \, x^{2} + 8\right )}}{9 \, {\left (e^{8} + 2 \, e^{4} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.58, size = 73, normalized size = 2.92 \begin {gather*} \frac {{\mathrm {e}}^{2\,x^2+8}+36\,x^2\,{\left ({\mathrm {e}}^4+1\right )}^2-{\mathrm {e}}^{x^2}\,\left (30\,{\mathrm {e}}^4+28\,{\mathrm {e}}^8\right )+x\,\left (348\,{\mathrm {e}}^4+168\,{\mathrm {e}}^8+180\right )-12\,x\,{\mathrm {e}}^{x^2+4}\,\left ({\mathrm {e}}^4+1\right )}{18\,{\mathrm {e}}^4+9\,{\mathrm {e}}^8+9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.25, size = 117, normalized size = 4.68 \begin {gather*} 4 x^{2} + \frac {x \left (60 + 56 e^{4}\right )}{3 + 3 e^{4}} + \frac {\left (- 108 x e^{16} - 324 x e^{12} - 324 x e^{8} - 108 x e^{4} - 252 e^{16} - 774 e^{12} - 792 e^{8} - 270 e^{4}\right ) e^{x^{2}} + \left (9 e^{8} + 18 e^{12} + 9 e^{16}\right ) e^{2 x^{2}}}{81 + 324 e^{4} + 486 e^{8} + 324 e^{12} + 81 e^{16}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________