Integrand size = 44, antiderivative size = 27 \[ \int \frac {e^{-x} \left (4 x^2-8 x^3+2 x^4+e^2 \left (3+3 x+3 x^4-x^5\right )\right )}{x^2} \, dx=e^{-x} \left (-x (-4+2 x)+\frac {e^2 \left (-3+x^4\right )}{x}\right ) \]
[Out]
Leaf count is larger than twice the leaf count of optimal. \(116\) vs. \(2(27)=54\).
Time = 0.11 (sec) , antiderivative size = 116, normalized size of antiderivative = 4.30, number of steps used = 15, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {2230, 2225, 2208, 2209, 2207} \[ \int \frac {e^{-x} \left (4 x^2-8 x^3+2 x^4+e^2 \left (3+3 x+3 x^4-x^5\right )\right )}{x^2} \, dx=e^{2-x} x^3+3 e^{2-x} x^2-\left (2+3 e^2\right ) e^{-x} x^2+6 e^{2-x} x+8 e^{-x} x-2 \left (2+3 e^2\right ) e^{-x} x+6 e^{2-x}+4 e^{-x}-2 \left (2+3 e^2\right ) e^{-x}-\frac {3 e^{2-x}}{x} \]
[In]
[Out]
Rule 2207
Rule 2208
Rule 2209
Rule 2225
Rule 2230
Rubi steps \begin{align*} \text {integral}& = \int \left (4 e^{-x}+\frac {3 e^{2-x}}{x^2}+\frac {3 e^{2-x}}{x}-8 e^{-x} x+e^{-x} \left (2+3 e^2\right ) x^2-e^{2-x} x^3\right ) \, dx \\ & = 3 \int \frac {e^{2-x}}{x^2} \, dx+3 \int \frac {e^{2-x}}{x} \, dx+4 \int e^{-x} \, dx-8 \int e^{-x} x \, dx+\left (2+3 e^2\right ) \int e^{-x} x^2 \, dx-\int e^{2-x} x^3 \, dx \\ & = -4 e^{-x}-\frac {3 e^{2-x}}{x}+8 e^{-x} x-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3+3 e^2 \operatorname {ExpIntegralEi}(-x)-3 \int \frac {e^{2-x}}{x} \, dx-3 \int e^{2-x} x^2 \, dx-8 \int e^{-x} \, dx+\left (2 \left (2+3 e^2\right )\right ) \int e^{-x} x \, dx \\ & = 4 e^{-x}-\frac {3 e^{2-x}}{x}+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3-6 \int e^{2-x} x \, dx+\left (2 \left (2+3 e^2\right )\right ) \int e^{-x} \, dx \\ & = 4 e^{-x}-2 e^{-x} \left (2+3 e^2\right )-\frac {3 e^{2-x}}{x}+6 e^{2-x} x+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3-6 \int e^{2-x} \, dx \\ & = 6 e^{2-x}+4 e^{-x}-2 e^{-x} \left (2+3 e^2\right )-\frac {3 e^{2-x}}{x}+6 e^{2-x} x+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3 \\ \end{align*}
Time = 1.29 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {e^{-x} \left (4 x^2-8 x^3+2 x^4+e^2 \left (3+3 x+3 x^4-x^5\right )\right )}{x^2} \, dx=\frac {e^{-x} \left (-2 (-2+x) x^2+e^2 \left (-3+x^4\right )\right )}{x} \]
[In]
[Out]
Time = 0.09 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.11
method | result | size |
gosper | \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) | \(30\) |
norman | \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) | \(30\) |
risch | \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) | \(30\) |
parallelrisch | \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) | \(30\) |
default | \(4 x \,{\mathrm e}^{-x}-2 x^{2} {\mathrm e}^{-x}+3 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{-x}}{x}+\operatorname {Ei}_{1}\left (x \right )\right )-3 \,{\mathrm e}^{2} \operatorname {Ei}_{1}\left (x \right )+3 \,{\mathrm e}^{2} \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )-{\mathrm e}^{2} \left (-x^{3} {\mathrm e}^{-x}-3 x^{2} {\mathrm e}^{-x}-6 x \,{\mathrm e}^{-x}-6 \,{\mathrm e}^{-x}\right )\) | \(105\) |
meijerg | \(-4+4 \left (2+2 x \right ) {\mathrm e}^{-x}-4 \,{\mathrm e}^{-x}-{\mathrm e}^{2} \left (6-\frac {\left (4 x^{3}+12 x^{2}+24 x +24\right ) {\mathrm e}^{-x}}{4}\right )+\left (3 \,{\mathrm e}^{2}+2\right ) \left (2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\right )-3 \,{\mathrm e}^{2} \operatorname {Ei}_{1}\left (x \right )+3 \,{\mathrm e}^{2} \left (-\frac {1}{x}+1+\frac {2-2 x}{2 x}-\frac {{\mathrm e}^{-x}}{x}+\operatorname {Ei}_{1}\left (x \right )\right )\) | \(112\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.07 \[ \int \frac {e^{-x} \left (4 x^2-8 x^3+2 x^4+e^2 \left (3+3 x+3 x^4-x^5\right )\right )}{x^2} \, dx=-\frac {{\left (2 \, x^{3} - 4 \, x^{2} - {\left (x^{4} - 3\right )} e^{2}\right )} e^{\left (-x\right )}}{x} \]
[In]
[Out]
Time = 0.06 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \frac {e^{-x} \left (4 x^2-8 x^3+2 x^4+e^2 \left (3+3 x+3 x^4-x^5\right )\right )}{x^2} \, dx=\frac {\left (x^{4} e^{2} - 2 x^{3} + 4 x^{2} - 3 e^{2}\right ) e^{- x}}{x} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 0.22 (sec) , antiderivative size = 95, normalized size of antiderivative = 3.52 \[ \int \frac {e^{-x} \left (4 x^2-8 x^3+2 x^4+e^2 \left (3+3 x+3 x^4-x^5\right )\right )}{x^2} \, dx=3 \, {\rm Ei}\left (-x\right ) e^{2} + {\left (x^{3} e^{2} + 3 \, x^{2} e^{2} + 6 \, x e^{2} + 6 \, e^{2}\right )} e^{\left (-x\right )} - 3 \, {\left (x^{2} e^{2} + 2 \, x e^{2} + 2 \, e^{2}\right )} e^{\left (-x\right )} - 2 \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} + 8 \, {\left (x + 1\right )} e^{\left (-x\right )} - 3 \, e^{2} \Gamma \left (-1, x\right ) - 4 \, e^{\left (-x\right )} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.52 \[ \int \frac {e^{-x} \left (4 x^2-8 x^3+2 x^4+e^2 \left (3+3 x+3 x^4-x^5\right )\right )}{x^2} \, dx=\frac {x^{4} e^{\left (-x + 2\right )} - 2 \, x^{3} e^{\left (-x\right )} + 4 \, x^{2} e^{\left (-x\right )} - 3 \, e^{\left (-x + 2\right )}}{x} \]
[In]
[Out]
Time = 0.12 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15 \[ \int \frac {e^{-x} \left (4 x^2-8 x^3+2 x^4+e^2 \left (3+3 x+3 x^4-x^5\right )\right )}{x^2} \, dx=-\frac {{\mathrm {e}}^{-x}\,\left (-{\mathrm {e}}^2\,x^4+2\,x^3-4\,x^2+3\,{\mathrm {e}}^2\right )}{x} \]
[In]
[Out]