\(\int \frac {e^{-\frac {e^2}{x}} (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} (-12+5 x-3 x^3+2 x^4))}{x^3} \, dx\) [5060]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 52, antiderivative size = 33 \[ \int \frac {e^{-\frac {e^2}{x}} \left (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} \left (-12+5 x-3 x^3+2 x^4\right )\right )}{x^3} \, dx=\frac {(-3+x) \left (-1+5 e^{-\frac {e^2}{x}}+x^2+\frac {-2+2 x}{x}\right )}{x} \]

[Out]

(5/exp(exp(2)/x)-1+x^2+(-2+2*x)/x)/x*(-3+x)

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.97, number of steps used = 9, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {6874, 2243, 2240, 14} \[ \int \frac {e^{-\frac {e^2}{x}} \left (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} \left (-12+5 x-3 x^3+2 x^4\right )\right )}{x^3} \, dx=x^2+\frac {6}{x^2}-3 x-15 e^{-\frac {e^2}{x}-2}+5 \left (3+e^2\right ) e^{-\frac {e^2}{x}-2}-\frac {15 e^{-\frac {e^2}{x}}}{x}-\frac {5}{x} \]

[In]

Int[(15*x + E^2*(-15 + 5*x) + E^(E^2/x)*(-12 + 5*x - 3*x^3 + 2*x^4))/(E^(E^2/x)*x^3),x]

[Out]

-15*E^(-2 - E^2/x) + 5*E^(-2 - E^2/x)*(3 + E^2) + 6/x^2 - 5/x - 15/(E^(E^2/x)*x) - 3*x + x^2

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2240

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^n*(
F^(a + b*(c + d*x)^n)/(b*f*n*(c + d*x)^n*Log[F])), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rule 2243

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
- n + 1)*(F^(a + b*(c + d*x)^n)/(b*d*n*Log[F])), x] - Dist[(m - n + 1)/(b*n*Log[F]), Int[(c + d*x)^(m - n)*F^(
a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2*((m + 1)/n)] && LtQ[0, (m + 1)/n, 5] &&
IntegerQ[n] && (LtQ[0, n, m + 1] || LtQ[m, n, 0])

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {5 e^{-\frac {e^2}{x}} \left (-3 e^2+\left (3+e^2\right ) x\right )}{x^3}+\frac {-12+5 x-3 x^3+2 x^4}{x^3}\right ) \, dx \\ & = 5 \int \frac {e^{-\frac {e^2}{x}} \left (-3 e^2+\left (3+e^2\right ) x\right )}{x^3} \, dx+\int \frac {-12+5 x-3 x^3+2 x^4}{x^3} \, dx \\ & = 5 \int \left (-\frac {3 e^{2-\frac {e^2}{x}}}{x^3}+\frac {e^{-\frac {e^2}{x}} \left (3+e^2\right )}{x^2}\right ) \, dx+\int \left (-3-\frac {12}{x^3}+\frac {5}{x^2}+2 x\right ) \, dx \\ & = \frac {6}{x^2}-\frac {5}{x}-3 x+x^2-15 \int \frac {e^{2-\frac {e^2}{x}}}{x^3} \, dx+\left (5 \left (3+e^2\right )\right ) \int \frac {e^{-\frac {e^2}{x}}}{x^2} \, dx \\ & = 5 e^{-2-\frac {e^2}{x}} \left (3+e^2\right )+\frac {6}{x^2}-\frac {5}{x}-\frac {15 e^{-\frac {e^2}{x}}}{x}-3 x+x^2-\frac {15 \int \frac {e^{2-\frac {e^2}{x}}}{x^2} \, dx}{e^2} \\ & = -15 e^{-2-\frac {e^2}{x}}+5 e^{-2-\frac {e^2}{x}} \left (3+e^2\right )+\frac {6}{x^2}-\frac {5}{x}-\frac {15 e^{-\frac {e^2}{x}}}{x}-3 x+x^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00 \[ \int \frac {e^{-\frac {e^2}{x}} \left (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} \left (-12+5 x-3 x^3+2 x^4\right )\right )}{x^3} \, dx=\frac {6-5 x+5 e^{-\frac {e^2}{x}} (-3+x) x-3 x^3+x^4}{x^2} \]

[In]

Integrate[(15*x + E^2*(-15 + 5*x) + E^(E^2/x)*(-12 + 5*x - 3*x^3 + 2*x^4))/(E^(E^2/x)*x^3),x]

[Out]

(6 - 5*x + (5*(-3 + x)*x)/E^(E^2/x) - 3*x^3 + x^4)/x^2

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00

method result size
risch \(x^{2}-3 x +\frac {-5 x +6}{x^{2}}+\frac {5 \left (-3+x \right ) {\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}}{x}\) \(33\)
norman \(\frac {\left (x^{4} {\mathrm e}^{\frac {{\mathrm e}^{2}}{x}}-15 x +5 x^{2}-5 \,{\mathrm e}^{\frac {{\mathrm e}^{2}}{x}} x -3 \,{\mathrm e}^{\frac {{\mathrm e}^{2}}{x}} x^{3}+6 \,{\mathrm e}^{\frac {{\mathrm e}^{2}}{x}}\right ) {\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}}{x^{2}}\) \(65\)
parallelrisch \(\frac {\left (x^{4} {\mathrm e}^{\frac {{\mathrm e}^{2}}{x}}-15 x +5 x^{2}-5 \,{\mathrm e}^{\frac {{\mathrm e}^{2}}{x}} x -3 \,{\mathrm e}^{\frac {{\mathrm e}^{2}}{x}} x^{3}+6 \,{\mathrm e}^{\frac {{\mathrm e}^{2}}{x}}\right ) {\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}}{x^{2}}\) \(65\)
parts \(x^{2}-3 x -\frac {5}{x}+\frac {6}{x^{2}}-5 \,{\mathrm e}^{-4} \left (-{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}} {\mathrm e}^{4}-3 \,{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}} {\mathrm e}^{2}-3 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{2} {\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}}{x}-{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}\right )\right )\) \(85\)
derivativedivides \(-{\mathrm e}^{-4} \left (-\frac {6 \,{\mathrm e}^{4}}{x^{2}}-x^{2} {\mathrm e}^{4}+3 x \,{\mathrm e}^{4}-15 \,{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}} {\mathrm e}^{2}-5 \,{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}} {\mathrm e}^{4}-15 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{2} {\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}}{x}-{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}\right )+\frac {5 \,{\mathrm e}^{4}}{x}\right )\) \(102\)
default \(-{\mathrm e}^{-4} \left (-\frac {6 \,{\mathrm e}^{4}}{x^{2}}-x^{2} {\mathrm e}^{4}+3 x \,{\mathrm e}^{4}-15 \,{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}} {\mathrm e}^{2}-5 \,{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}} {\mathrm e}^{4}-15 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{2} {\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}}{x}-{\mathrm e}^{-\frac {{\mathrm e}^{2}}{x}}\right )+\frac {5 \,{\mathrm e}^{4}}{x}\right )\) \(102\)

[In]

int(((2*x^4-3*x^3+5*x-12)*exp(exp(2)/x)+(5*x-15)*exp(2)+15*x)/x^3/exp(exp(2)/x),x,method=_RETURNVERBOSE)

[Out]

x^2-3*x+(-5*x+6)/x^2+5*(-3+x)/x*exp(-exp(2)/x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.27 \[ \int \frac {e^{-\frac {e^2}{x}} \left (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} \left (-12+5 x-3 x^3+2 x^4\right )\right )}{x^3} \, dx=\frac {{\left (5 \, x^{2} + {\left (x^{4} - 3 \, x^{3} - 5 \, x + 6\right )} e^{\left (\frac {e^{2}}{x}\right )} - 15 \, x\right )} e^{\left (-\frac {e^{2}}{x}\right )}}{x^{2}} \]

[In]

integrate(((2*x^4-3*x^3+5*x-12)*exp(exp(2)/x)+(5*x-15)*exp(2)+15*x)/x^3/exp(exp(2)/x),x, algorithm="fricas")

[Out]

(5*x^2 + (x^4 - 3*x^3 - 5*x + 6)*e^(e^2/x) - 15*x)*e^(-e^2/x)/x^2

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.82 \[ \int \frac {e^{-\frac {e^2}{x}} \left (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} \left (-12+5 x-3 x^3+2 x^4\right )\right )}{x^3} \, dx=x^{2} - 3 x + \frac {\left (5 x - 15\right ) e^{- \frac {e^{2}}{x}}}{x} + \frac {6 - 5 x}{x^{2}} \]

[In]

integrate(((2*x**4-3*x**3+5*x-12)*exp(exp(2)/x)+(5*x-15)*exp(2)+15*x)/x**3/exp(exp(2)/x),x)

[Out]

x**2 - 3*x + (5*x - 15)*exp(-exp(2)/x)/x + (6 - 5*x)/x**2

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.22 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.55 \[ \int \frac {e^{-\frac {e^2}{x}} \left (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} \left (-12+5 x-3 x^3+2 x^4\right )\right )}{x^3} \, dx=x^{2} - 15 \, e^{\left (-2\right )} \Gamma \left (2, \frac {e^{2}}{x}\right ) - 3 \, x - \frac {5}{x} + \frac {6}{x^{2}} + 15 \, e^{\left (-\frac {e^{2}}{x} - 2\right )} + 5 \, e^{\left (-\frac {e^{2}}{x}\right )} \]

[In]

integrate(((2*x^4-3*x^3+5*x-12)*exp(exp(2)/x)+(5*x-15)*exp(2)+15*x)/x^3/exp(exp(2)/x),x, algorithm="maxima")

[Out]

x^2 - 15*e^(-2)*gamma(2, e^2/x) - 3*x - 5/x + 6/x^2 + 15*e^(-e^2/x - 2) + 5*e^(-e^2/x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (30) = 60\).

Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.91 \[ \int \frac {e^{-\frac {e^2}{x}} \left (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} \left (-12+5 x-3 x^3+2 x^4\right )\right )}{x^3} \, dx=-x^{2} {\left (\frac {3 \, e^{8}}{x} - \frac {5 \, e^{\left (-\frac {e^{2}}{x} + 8\right )}}{x^{2}} + \frac {5 \, e^{8}}{x^{3}} + \frac {15 \, e^{\left (-\frac {e^{2}}{x} + 8\right )}}{x^{3}} - \frac {6 \, e^{8}}{x^{4}} - e^{8}\right )} e^{\left (-8\right )} \]

[In]

integrate(((2*x^4-3*x^3+5*x-12)*exp(exp(2)/x)+(5*x-15)*exp(2)+15*x)/x^3/exp(exp(2)/x),x, algorithm="giac")

[Out]

-x^2*(3*e^8/x - 5*e^(-e^2/x + 8)/x^2 + 5*e^8/x^3 + 15*e^(-e^2/x + 8)/x^3 - 6*e^8/x^4 - e^8)*e^(-8)

Mupad [B] (verification not implemented)

Time = 11.39 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.15 \[ \int \frac {e^{-\frac {e^2}{x}} \left (15 x+e^2 (-15+5 x)+e^{\frac {e^2}{x}} \left (-12+5 x-3 x^3+2 x^4\right )\right )}{x^3} \, dx=5\,{\mathrm {e}}^{-\frac {{\mathrm {e}}^2}{x}}-3\,x-\frac {x\,\left (15\,{\mathrm {e}}^{-\frac {{\mathrm {e}}^2}{x}}+5\right )-6}{x^2}+x^2 \]

[In]

int((exp(-exp(2)/x)*(15*x + exp(exp(2)/x)*(5*x - 3*x^3 + 2*x^4 - 12) + exp(2)*(5*x - 15)))/x^3,x)

[Out]

5*exp(-exp(2)/x) - 3*x - (x*(15*exp(-exp(2)/x) + 5) - 6)/x^2 + x^2