Integrand size = 56, antiderivative size = 26 \[ \int e^{-4-x} \left (-9 e^2+e^{2 x}-4 e^{x+x^2} x+3 e^{1+x^2} (-2+4 x)+e^{2 x^2} (-1+4 x)\right ) \, dx=2+e^{-4-x} \left (3 e-e^x+e^{x^2}\right )^2 \]
[Out]
Time = 0.40 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.85, number of steps used = 14, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {6873, 6874, 2225, 2268, 2266, 2235, 2240, 2272} \[ \int e^{-4-x} \left (-9 e^2+e^{2 x}-4 e^{x+x^2} x+3 e^{1+x^2} (-2+4 x)+e^{2 x^2} (-1+4 x)\right ) \, dx=-2 e^{x^2-4}+6 e^{x^2-x-3}+e^{2 x^2-x-4}+9 e^{-x-2}+e^{x-4} \]
[In]
[Out]
Rule 2225
Rule 2235
Rule 2240
Rule 2266
Rule 2268
Rule 2272
Rule 6873
Rule 6874
Rubi steps \begin{align*} \text {integral}& = \int e^{-4-x} \left (3 e-e^x+e^{x^2}\right ) \left (-3 e-e^x-e^{x^2}+4 e^{x^2} x\right ) \, dx \\ & = \int \left (-9 e^{-2-x}+e^{-4+x}+e^{-4-x+2 x^2} (-1+4 x)+2 e^{-4-x+x^2} \left (-3 e+6 e x-2 e^x x\right )\right ) \, dx \\ & = 2 \int e^{-4-x+x^2} \left (-3 e+6 e x-2 e^x x\right ) \, dx-9 \int e^{-2-x} \, dx+\int e^{-4+x} \, dx+\int e^{-4-x+2 x^2} (-1+4 x) \, dx \\ & = 9 e^{-2-x}+e^{-4+x}+e^{-4-x+2 x^2}+2 \int \left (-3 e^{-3-x+x^2}-2 e^{-4+x^2} x+6 e^{-3-x+x^2} x\right ) \, dx \\ & = 9 e^{-2-x}+e^{-4+x}+e^{-4-x+2 x^2}-4 \int e^{-4+x^2} x \, dx-6 \int e^{-3-x+x^2} \, dx+12 \int e^{-3-x+x^2} x \, dx \\ & = 9 e^{-2-x}+e^{-4+x}-2 e^{-4+x^2}+6 e^{-3-x+x^2}+e^{-4-x+2 x^2}+6 \int e^{-3-x+x^2} \, dx-\frac {6 \int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{e^{13/4}} \\ & = 9 e^{-2-x}+e^{-4+x}-2 e^{-4+x^2}+6 e^{-3-x+x^2}+e^{-4-x+2 x^2}-\frac {3 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-1+2 x)\right )}{e^{13/4}}+\frac {6 \int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{e^{13/4}} \\ & = 9 e^{-2-x}+e^{-4+x}-2 e^{-4+x^2}+6 e^{-3-x+x^2}+e^{-4-x+2 x^2} \\ \end{align*}
Time = 0.47 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.69 \[ \int e^{-4-x} \left (-9 e^2+e^{2 x}-4 e^{x+x^2} x+3 e^{1+x^2} (-2+4 x)+e^{2 x^2} (-1+4 x)\right ) \, dx=e^{-4-x} \left (9 e^2+e^{2 x}+e^{2 x^2}+6 e^{1+x^2}-2 e^{x+x^2}\right ) \]
[In]
[Out]
Time = 0.22 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.73
method | result | size |
risch | \({\mathrm e}^{x -4}+9 \,{\mathrm e}^{-2-x}+{\mathrm e}^{2 x^{2}-x -4}+2 \left (-{\mathrm e}^{x}+3 \,{\mathrm e}\right ) {\mathrm e}^{x^{2}-x -4}\) | \(45\) |
parallelrisch | \(\left (9 \,{\mathrm e}^{2}+2 \,{\mathrm e}^{x^{2}} {\mathrm e}^{\ln \left (3\right )+1}+{\mathrm e}^{2 x}-2 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}+{\mathrm e}^{2 x^{2}}\right ) {\mathrm e}^{-4-x}\) | \(45\) |
norman | \(\left ({\mathrm e}^{-4} {\mathrm e}^{2 x}+{\mathrm e}^{-4} {\mathrm e}^{2 x^{2}}+9 \,{\mathrm e}^{-4} {\mathrm e}^{2}+6 \,{\mathrm e}^{-4} {\mathrm e} \,{\mathrm e}^{x^{2}}-2 \,{\mathrm e}^{x} {\mathrm e}^{-4} {\mathrm e}^{x^{2}}\right ) {\mathrm e}^{-x}\) | \(61\) |
parts | \({\mathrm e}^{-4} {\mathrm e}^{x}+\frac {i {\mathrm e}^{-4} \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{8}} \sqrt {2}\, \operatorname {erf}\left (i \sqrt {2}\, x -\frac {i \sqrt {2}}{4}\right )}{4}+4 \,{\mathrm e}^{-4} \left (\frac {{\mathrm e}^{2 x^{2}-x}}{4}-\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{8}} \sqrt {2}\, \operatorname {erf}\left (i \sqrt {2}\, x -\frac {i \sqrt {2}}{4}\right )}{16}\right )+9 \,{\mathrm e}^{2} {\mathrm e}^{-4-x}-2 \,{\mathrm e}^{-4} {\mathrm e}^{x^{2}}+2 \,{\mathrm e}^{\ln \left (3\right )+1} {\mathrm e}^{-4} {\mathrm e}^{x^{2}-x}\) | \(127\) |
default | \({\mathrm e}^{-4} {\mathrm e}^{x}-2 \,{\mathrm e}^{-4} {\mathrm e}^{x^{2}}+9 \,{\mathrm e}^{-4} {\mathrm e}^{-x} {\mathrm e}^{2}+\frac {i {\mathrm e}^{-4} \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{8}} \sqrt {2}\, \operatorname {erf}\left (i \sqrt {2}\, x -\frac {i \sqrt {2}}{4}\right )}{4}+4 \,{\mathrm e}^{-4} \left (\frac {{\mathrm e}^{2 x^{2}-x}}{4}-\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{8}} \sqrt {2}\, \operatorname {erf}\left (i \sqrt {2}\, x -\frac {i \sqrt {2}}{4}\right )}{16}\right )+3 i {\mathrm e}^{-4} {\mathrm e} \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{4}} \operatorname {erf}\left (i x -\frac {1}{2} i\right )+12 \,{\mathrm e}^{-4} {\mathrm e} \left (\frac {{\mathrm e}^{x^{2}-x}}{2}-\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{4}} \operatorname {erf}\left (i x -\frac {1}{2} i\right )}{4}\right )\) | \(165\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 85 vs. \(2 (25) = 50\).
Time = 0.25 (sec) , antiderivative size = 85, normalized size of antiderivative = 3.27 \[ \int e^{-4-x} \left (-9 e^2+e^{2 x}-4 e^{x+x^2} x+3 e^{1+x^2} (-2+4 x)+e^{2 x^2} (-1+4 x)\right ) \, dx=\frac {1}{27} \, {\left (9 \, {\left (9 \, e^{4} - 2 \, e^{\left (x^{2} + x + 2\right )}\right )} e^{\left (2 \, x^{2} + 2 \, \log \left (3\right ) + 2\right )} + e^{\left (4 \, x^{2} + 4 \, \log \left (3\right ) + 4\right )} + 18 \, e^{\left (3 \, x^{2} + 3 \, \log \left (3\right ) + 5\right )} + 81 \, e^{\left (2 \, x^{2} + 2 \, x + 4\right )}\right )} e^{\left (-2 \, x^{2} - x - \log \left (3\right ) - 8\right )} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (22) = 44\).
Time = 0.14 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.42 \[ \int e^{-4-x} \left (-9 e^2+e^{2 x}-4 e^{x+x^2} x+3 e^{1+x^2} (-2+4 x)+e^{2 x^2} (-1+4 x)\right ) \, dx=\frac {\left (\left (- 2 e^{4} e^{2 x} + 6 e^{5} e^{x}\right ) e^{x^{2}} + e^{4} e^{x} e^{2 x^{2}}\right ) e^{- 2 x}}{e^{8}} + \frac {e^{2} e^{x} + 9 e^{4} e^{- x}}{e^{6}} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 0.31 (sec) , antiderivative size = 178, normalized size of antiderivative = 6.85 \[ \int e^{-4-x} \left (-9 e^2+e^{2 x}-4 e^{x+x^2} x+3 e^{1+x^2} (-2+4 x)+e^{2 x^2} (-1+4 x)\right ) \, dx=\frac {1}{4} i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (i \, \sqrt {2} x - \frac {1}{4} i \, \sqrt {2}\right ) e^{\left (-\frac {33}{8}\right )} + 3 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - \frac {1}{2} i\right ) e^{\left (-\frac {13}{4}\right )} + \frac {1}{4} \, \sqrt {2} {\left (\frac {\sqrt {2} \sqrt {\frac {1}{2}} \sqrt {\pi } {\left (4 \, x - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-{\left (4 \, x - 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (4 \, x - 1\right )}^{2}}} + 2 \, \sqrt {2} e^{\left (\frac {1}{8} \, {\left (4 \, x - 1\right )}^{2}\right )}\right )} e^{\left (-\frac {33}{8}\right )} + 3 \, {\left (\frac {\sqrt {\pi } {\left (2 \, x - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 1\right )}^{2}}} + 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 1\right )}^{2}\right )}\right )} e^{\left (-\frac {13}{4}\right )} - 2 \, e^{\left (x^{2} - 4\right )} + e^{\left (x - 4\right )} + 9 \, e^{\left (-x - 2\right )} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.77 \[ \int e^{-4-x} \left (-9 e^2+e^{2 x}-4 e^{x+x^2} x+3 e^{1+x^2} (-2+4 x)+e^{2 x^2} (-1+4 x)\right ) \, dx={\left (e^{\left (2 \, x^{2} - x + 5\right )} + 6 \, e^{\left (x^{2} - x + 6\right )} - 2 \, e^{\left (x^{2} + 5\right )} + e^{\left (x + 5\right )} + 9 \, e^{\left (-x + 7\right )}\right )} e^{\left (-9\right )} \]
[In]
[Out]
Time = 12.31 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.81 \[ \int e^{-4-x} \left (-9 e^2+e^{2 x}-4 e^{x+x^2} x+3 e^{1+x^2} (-2+4 x)+e^{2 x^2} (-1+4 x)\right ) \, dx=9\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-2}-2\,{\mathrm {e}}^{x^2}\,{\mathrm {e}}^{-4}+{\mathrm {e}}^{-4}\,{\mathrm {e}}^x+6\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{x^2}\,{\mathrm {e}}^{-3}+{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-4}\,{\mathrm {e}}^{2\,x^2} \]
[In]
[Out]