Integrand size = 40, antiderivative size = 18 \[ \int e^{2+3 x+x^2} \left (5+17 x+13 x^2+2 x^3+e^x \left (1+4 x+2 x^2\right )\right ) \, dx=e^{1+x+(1+x)^2} x \left (5+e^x+x\right ) \]
[Out]
Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(18)=36\).
Time = 0.29 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.83, number of steps used = 24, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {6874, 2266, 2235, 2272, 2273, 2326} \[ \int e^{2+3 x+x^2} \left (5+17 x+13 x^2+2 x^3+e^x \left (1+4 x+2 x^2\right )\right ) \, dx=e^{x^2+3 x+2} x^2+5 e^{x^2+3 x+2} x+\frac {e^{x^2+4 x+2} \left (x^2+2 x\right )}{x+2} \]
[In]
[Out]
Rule 2235
Rule 2266
Rule 2272
Rule 2273
Rule 2326
Rule 6874
Rubi steps \begin{align*} \text {integral}& = \int \left (5 e^{2+3 x+x^2}+17 e^{2+3 x+x^2} x+13 e^{2+3 x+x^2} x^2+2 e^{2+3 x+x^2} x^3+e^{2+4 x+x^2} \left (1+4 x+2 x^2\right )\right ) \, dx \\ & = 2 \int e^{2+3 x+x^2} x^3 \, dx+5 \int e^{2+3 x+x^2} \, dx+13 \int e^{2+3 x+x^2} x^2 \, dx+17 \int e^{2+3 x+x^2} x \, dx+\int e^{2+4 x+x^2} \left (1+4 x+2 x^2\right ) \, dx \\ & = \frac {17}{2} e^{2+3 x+x^2}+\frac {13}{2} e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}-2 \int e^{2+3 x+x^2} x \, dx-3 \int e^{2+3 x+x^2} x^2 \, dx-\frac {13}{2} \int e^{2+3 x+x^2} \, dx-\frac {39}{2} \int e^{2+3 x+x^2} x \, dx-\frac {51}{2} \int e^{2+3 x+x^2} \, dx+\frac {5 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{\sqrt [4]{e}} \\ & = -\frac {9}{4} e^{2+3 x+x^2}+5 e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}+\frac {5 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (3+2 x)\right )}{2 \sqrt [4]{e}}+\frac {3}{2} \int e^{2+3 x+x^2} \, dx+3 \int e^{2+3 x+x^2} \, dx+\frac {9}{2} \int e^{2+3 x+x^2} x \, dx+\frac {117}{4} \int e^{2+3 x+x^2} \, dx-\frac {13 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{2 \sqrt [4]{e}}-\frac {51 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{2 \sqrt [4]{e}} \\ & = 5 e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}-\frac {27 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (3+2 x)\right )}{2 \sqrt [4]{e}}-\frac {27}{4} \int e^{2+3 x+x^2} \, dx+\frac {3 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{2 \sqrt [4]{e}}+\frac {3 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{\sqrt [4]{e}}+\frac {117 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{4 \sqrt [4]{e}} \\ & = 5 e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}+\frac {27 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (3+2 x)\right )}{8 \sqrt [4]{e}}-\frac {27 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{4 \sqrt [4]{e}} \\ & = 5 e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x} \\ \end{align*}
Time = 1.42 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int e^{2+3 x+x^2} \left (5+17 x+13 x^2+2 x^3+e^x \left (1+4 x+2 x^2\right )\right ) \, dx=e^{2+3 x+x^2} x \left (5+e^x+x\right ) \]
[In]
[Out]
Time = 0.09 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.17
method | result | size |
risch | \(\left (x^{2}+{\mathrm e}^{x} x +5 x \right ) {\mathrm e}^{\left (2+x \right ) \left (1+x \right )}\) | \(21\) |
norman | \(x^{2} {\mathrm e}^{x^{2}+3 x +2}+{\mathrm e}^{x} x \,{\mathrm e}^{x^{2}+3 x +2}+5 x \,{\mathrm e}^{x^{2}+3 x +2}\) | \(40\) |
parallelrisch | \(x^{2} {\mathrm e}^{x^{2}+3 x +2}+{\mathrm e}^{x} x \,{\mathrm e}^{x^{2}+3 x +2}+5 x \,{\mathrm e}^{x^{2}+3 x +2}\) | \(40\) |
default | \(-\frac {i {\mathrm e}^{2} \sqrt {\pi }\, {\mathrm e}^{-4} \operatorname {erf}\left (i x +2 i\right )}{2}-\frac {5 i {\mathrm e}^{2} \sqrt {\pi }\, {\mathrm e}^{-\frac {9}{4}} \operatorname {erf}\left (i x +\frac {3}{2} i\right )}{2}+17 \,{\mathrm e}^{2} \left (\frac {{\mathrm e}^{x^{2}+3 x}}{2}+\frac {3 i \sqrt {\pi }\, {\mathrm e}^{-\frac {9}{4}} \operatorname {erf}\left (i x +\frac {3}{2} i\right )}{4}\right )+13 \,{\mathrm e}^{2} \left (\frac {x \,{\mathrm e}^{x^{2}+3 x}}{2}-\frac {3 \,{\mathrm e}^{x^{2}+3 x}}{4}-\frac {7 i \sqrt {\pi }\, {\mathrm e}^{-\frac {9}{4}} \operatorname {erf}\left (i x +\frac {3}{2} i\right )}{8}\right )+2 \,{\mathrm e}^{2} \left (\frac {x^{2} {\mathrm e}^{x^{2}+3 x}}{2}-\frac {3 x \,{\mathrm e}^{x^{2}+3 x}}{4}+\frac {5 \,{\mathrm e}^{x^{2}+3 x}}{8}+\frac {9 i \sqrt {\pi }\, {\mathrm e}^{-\frac {9}{4}} \operatorname {erf}\left (i x +\frac {3}{2} i\right )}{16}\right )+4 \,{\mathrm e}^{2} \left (\frac {{\mathrm e}^{x^{2}+4 x}}{2}+i \sqrt {\pi }\, {\mathrm e}^{-4} \operatorname {erf}\left (i x +2 i\right )\right )+2 \,{\mathrm e}^{2} \left (\frac {x \,{\mathrm e}^{x^{2}+4 x}}{2}-{\mathrm e}^{x^{2}+4 x}-\frac {7 i \sqrt {\pi }\, {\mathrm e}^{-4} \operatorname {erf}\left (i x +2 i\right )}{4}\right )\) | \(239\) |
parts | \(-\frac {i {\mathrm e}^{2} \sqrt {\pi }\, {\mathrm e}^{-4} \operatorname {erf}\left (i x +2 i\right )}{2}-\frac {5 i {\mathrm e}^{2} \sqrt {\pi }\, {\mathrm e}^{-\frac {9}{4}} \operatorname {erf}\left (i x +\frac {3}{2} i\right )}{2}+17 \,{\mathrm e}^{2} \left (\frac {{\mathrm e}^{x^{2}+3 x}}{2}+\frac {3 i \sqrt {\pi }\, {\mathrm e}^{-\frac {9}{4}} \operatorname {erf}\left (i x +\frac {3}{2} i\right )}{4}\right )+13 \,{\mathrm e}^{2} \left (\frac {x \,{\mathrm e}^{x^{2}+3 x}}{2}-\frac {3 \,{\mathrm e}^{x^{2}+3 x}}{4}-\frac {7 i \sqrt {\pi }\, {\mathrm e}^{-\frac {9}{4}} \operatorname {erf}\left (i x +\frac {3}{2} i\right )}{8}\right )+2 \,{\mathrm e}^{2} \left (\frac {x^{2} {\mathrm e}^{x^{2}+3 x}}{2}-\frac {3 x \,{\mathrm e}^{x^{2}+3 x}}{4}+\frac {5 \,{\mathrm e}^{x^{2}+3 x}}{8}+\frac {9 i \sqrt {\pi }\, {\mathrm e}^{-\frac {9}{4}} \operatorname {erf}\left (i x +\frac {3}{2} i\right )}{16}\right )+4 \,{\mathrm e}^{2} \left (\frac {{\mathrm e}^{x^{2}+4 x}}{2}+i \sqrt {\pi }\, {\mathrm e}^{-4} \operatorname {erf}\left (i x +2 i\right )\right )+2 \,{\mathrm e}^{2} \left (\frac {x \,{\mathrm e}^{x^{2}+4 x}}{2}-{\mathrm e}^{x^{2}+4 x}-\frac {7 i \sqrt {\pi }\, {\mathrm e}^{-4} \operatorname {erf}\left (i x +2 i\right )}{4}\right )\) | \(239\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.17 \[ \int e^{2+3 x+x^2} \left (5+17 x+13 x^2+2 x^3+e^x \left (1+4 x+2 x^2\right )\right ) \, dx={\left (x^{2} + x e^{x} + 5 \, x\right )} e^{\left (x^{2} + 3 \, x + 2\right )} \]
[In]
[Out]
Time = 0.10 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.11 \[ \int e^{2+3 x+x^2} \left (5+17 x+13 x^2+2 x^3+e^x \left (1+4 x+2 x^2\right )\right ) \, dx=\left (x^{2} + x e^{x} + 5 x\right ) e^{x^{2} + 3 x + 2} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 0.28 (sec) , antiderivative size = 372, normalized size of antiderivative = 20.67 \[ \int e^{2+3 x+x^2} \left (5+17 x+13 x^2+2 x^3+e^x \left (1+4 x+2 x^2\right )\right ) \, dx=-\frac {5}{2} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + \frac {3}{2} i\right ) e^{\left (-\frac {1}{4}\right )} - \frac {1}{2} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + 2 i\right ) e^{\left (-2\right )} + \frac {1}{8} \, {\left (\frac {36 \, {\left (2 \, x + 3\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )}{\left (-{\left (2 \, x + 3\right )}^{2}\right )^{\frac {3}{2}}} - \frac {27 \, \sqrt {\pi } {\left (2 \, x + 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x + 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 3\right )}^{2}}} + 54 \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )} - 8 \, \Gamma \left (2, -\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )\right )} e^{\left (-\frac {1}{4}\right )} - \frac {13}{8} \, {\left (\frac {4 \, {\left (2 \, x + 3\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )}{\left (-{\left (2 \, x + 3\right )}^{2}\right )^{\frac {3}{2}}} - \frac {9 \, \sqrt {\pi } {\left (2 \, x + 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x + 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 3\right )}^{2}}} + 12 \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{4}\right )} - \frac {17}{4} \, {\left (\frac {3 \, \sqrt {\pi } {\left (2 \, x + 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x + 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 3\right )}^{2}}} - 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{4}\right )} - {\left (\frac {{\left (x + 2\right )}^{3} \Gamma \left (\frac {3}{2}, -{\left (x + 2\right )}^{2}\right )}{\left (-{\left (x + 2\right )}^{2}\right )^{\frac {3}{2}}} - \frac {4 \, \sqrt {\pi } {\left (x + 2\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x + 2\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x + 2\right )}^{2}}} + 4 \, e^{\left ({\left (x + 2\right )}^{2}\right )}\right )} e^{\left (-2\right )} - 2 \, {\left (\frac {2 \, \sqrt {\pi } {\left (x + 2\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x + 2\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x + 2\right )}^{2}}} - e^{\left ({\left (x + 2\right )}^{2}\right )}\right )} e^{\left (-2\right )} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (16) = 32\).
Time = 0.28 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.94 \[ \int e^{2+3 x+x^2} \left (5+17 x+13 x^2+2 x^3+e^x \left (1+4 x+2 x^2\right )\right ) \, dx=x e^{\left (x^{2} + 4 \, x + 2\right )} + \frac {1}{4} \, {\left ({\left (2 \, x + 3\right )}^{2} + 8 \, x - 9\right )} e^{\left (x^{2} + 3 \, x + 2\right )} \]
[In]
[Out]
Time = 11.07 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89 \[ \int e^{2+3 x+x^2} \left (5+17 x+13 x^2+2 x^3+e^x \left (1+4 x+2 x^2\right )\right ) \, dx=x\,{\mathrm {e}}^{x^2+3\,x+2}\,\left (x+{\mathrm {e}}^x+5\right ) \]
[In]
[Out]