\(\int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} (-15000-15000 x+15000 e^x x)+e^{-2+e^x-x+x^2} (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3)}{x^3} \, dx\) [7509]

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

Optimal result

Integrand size = 77, antiderivative size = 24 \[ \int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} \left (-15000-15000 x+15000 e^x x\right )+e^{-2+e^x-x+x^2} \left (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3\right )}{x^3} \, dx=7500 \left (e^{x^2}+\frac {e^{-2+e^x-x}}{x}\right )^2 \]

[Out]

150*(exp(exp(x)-2-x)/x+exp(x^2))*(50*exp(exp(x)-2-x)/x+50*exp(x^2))

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(87\) vs. \(2(24)=48\).

Time = 0.20 (sec) , antiderivative size = 87, normalized size of antiderivative = 3.62, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.039, Rules used = {14, 2240, 2326} \[ \int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} \left (-15000-15000 x+15000 e^x x\right )+e^{-2+e^x-x+x^2} \left (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3\right )}{x^3} \, dx=\frac {7500 e^{-2 \left (x-e^x+2\right )} \left (x-e^x x\right )}{\left (1-e^x\right ) x^3}+7500 e^{2 x^2}+\frac {15000 e^{x^2-x+e^x-2} \left (-2 x^2-e^x x+x\right )}{\left (-2 x-e^x+1\right ) x^2} \]

[In]

Int[(30000*E^(2*x^2)*x^4 + E^(-4 + 2*E^x - 2*x)*(-15000 - 15000*x + 15000*E^x*x) + E^(-2 + E^x - x + x^2)*(-15
000*x - 15000*x^2 + 15000*E^x*x^2 + 30000*x^3))/x^3,x]

[Out]

7500*E^(2*x^2) + (7500*(x - E^x*x))/(E^(2*(2 - E^x + x))*(1 - E^x)*x^3) + (15000*E^(-2 + E^x - x + x^2)*(x - E
^x*x - 2*x^2))/((1 - E^x - 2*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 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (30000 e^{2 x^2} x+\frac {15000 e^{2 \left (-2+e^x-x\right )} \left (-1-x+e^x x\right )}{x^3}+\frac {15000 e^{-2+e^x-x+x^2} \left (-1-x+e^x x+2 x^2\right )}{x^2}\right ) \, dx \\ & = 15000 \int \frac {e^{2 \left (-2+e^x-x\right )} \left (-1-x+e^x x\right )}{x^3} \, dx+15000 \int \frac {e^{-2+e^x-x+x^2} \left (-1-x+e^x x+2 x^2\right )}{x^2} \, dx+30000 \int e^{2 x^2} x \, dx \\ & = 7500 e^{2 x^2}+\frac {7500 e^{-2 \left (2-e^x+x\right )} \left (x-e^x x\right )}{\left (1-e^x\right ) x^3}+\frac {15000 e^{-2+e^x-x+x^2} \left (x-e^x x-2 x^2\right )}{\left (1-e^x-2 x\right ) x^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.32 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.88 \[ \int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} \left (-15000-15000 x+15000 e^x x\right )+e^{-2+e^x-x+x^2} \left (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3\right )}{x^3} \, dx=7500 \left (e^{2 x^2}+\frac {e^{-4+2 e^x-2 x}}{x^2}\right )+\frac {15000 e^{-2+e^x-x+x^2}}{x} \]

[In]

Integrate[(30000*E^(2*x^2)*x^4 + E^(-4 + 2*E^x - 2*x)*(-15000 - 15000*x + 15000*E^x*x) + E^(-2 + E^x - x + x^2
)*(-15000*x - 15000*x^2 + 15000*E^x*x^2 + 30000*x^3))/x^3,x]

[Out]

7500*(E^(2*x^2) + E^(-4 + 2*E^x - 2*x)/x^2) + (15000*E^(-2 + E^x - x + x^2))/x

Maple [A] (verified)

Time = 0.19 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.71

method result size
risch \(7500 \,{\mathrm e}^{2 x^{2}}+\frac {7500 \,{\mathrm e}^{2 \,{\mathrm e}^{x}-4-2 x}}{x^{2}}+\frac {15000 \,{\mathrm e}^{x^{2}+{\mathrm e}^{x}-2-x}}{x}\) \(41\)
parallelrisch \(\frac {7500 \,{\mathrm e}^{2 x^{2}} x^{2}+15000 \,{\mathrm e}^{x^{2}} x \,{\mathrm e}^{{\mathrm e}^{x}-2-x}+7500 \,{\mathrm e}^{2 \,{\mathrm e}^{x}-4-2 x}}{x^{2}}\) \(44\)

[In]

int(((15000*exp(x)*x-15000*x-15000)*exp(exp(x)-2-x)^2+(15000*exp(x)*x^2+30000*x^3-15000*x^2-15000*x)*exp(x^2)*
exp(exp(x)-2-x)+30000*x^4*exp(x^2)^2)/x^3,x,method=_RETURNVERBOSE)

[Out]

7500*exp(2*x^2)+7500/x^2*exp(2*exp(x)-4-2*x)+15000/x*exp(x^2+exp(x)-2-x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (21) = 42\).

Time = 0.27 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.21 \[ \int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} \left (-15000-15000 x+15000 e^x x\right )+e^{-2+e^x-x+x^2} \left (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3\right )}{x^3} \, dx=\frac {7500 \, {\left (x^{2} e^{\left (4 \, x^{2}\right )} + 2 \, x e^{\left (3 \, x^{2} - x + e^{x} - 2\right )} + e^{\left (2 \, x^{2} - 2 \, x + 2 \, e^{x} - 4\right )}\right )} e^{\left (-2 \, x^{2}\right )}}{x^{2}} \]

[In]

integrate(((15000*exp(x)*x-15000*x-15000)*exp(exp(x)-2-x)^2+(15000*exp(x)*x^2+30000*x^3-15000*x^2-15000*x)*exp
(x^2)*exp(exp(x)-2-x)+30000*x^4*exp(x^2)^2)/x^3,x, algorithm="fricas")

[Out]

7500*(x^2*e^(4*x^2) + 2*x*e^(3*x^2 - x + e^x - 2) + e^(2*x^2 - 2*x + 2*e^x - 4))*e^(-2*x^2)/x^2

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.83 \[ \int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} \left (-15000-15000 x+15000 e^x x\right )+e^{-2+e^x-x+x^2} \left (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3\right )}{x^3} \, dx=7500 e^{2 x^{2}} + \frac {15000 x^{2} e^{x^{2}} e^{- x + e^{x} - 2} + 7500 x e^{- 2 x + 2 e^{x} - 4}}{x^{3}} \]

[In]

integrate(((15000*exp(x)*x-15000*x-15000)*exp(exp(x)-2-x)**2+(15000*exp(x)*x**2+30000*x**3-15000*x**2-15000*x)
*exp(x**2)*exp(exp(x)-2-x)+30000*x**4*exp(x**2)**2)/x**3,x)

[Out]

7500*exp(2*x**2) + (15000*x**2*exp(x**2)*exp(-x + exp(x) - 2) + 7500*x*exp(-2*x + 2*exp(x) - 4))/x**3

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.58 \[ \int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} \left (-15000-15000 x+15000 e^x x\right )+e^{-2+e^x-x+x^2} \left (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3\right )}{x^3} \, dx=\frac {7500 \, {\left (2 \, x e^{\left (x^{2} + x + e^{x} + 2\right )} + e^{\left (2 \, e^{x}\right )}\right )} e^{\left (-2 \, x - 4\right )}}{x^{2}} + 7500 \, e^{\left (2 \, x^{2}\right )} \]

[In]

integrate(((15000*exp(x)*x-15000*x-15000)*exp(exp(x)-2-x)^2+(15000*exp(x)*x^2+30000*x^3-15000*x^2-15000*x)*exp
(x^2)*exp(exp(x)-2-x)+30000*x^4*exp(x^2)^2)/x^3,x, algorithm="maxima")

[Out]

7500*(2*x*e^(x^2 + x + e^x + 2) + e^(2*e^x))*e^(-2*x - 4)/x^2 + 7500*e^(2*x^2)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (21) = 42\).

Time = 0.27 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.88 \[ \int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} \left (-15000-15000 x+15000 e^x x\right )+e^{-2+e^x-x+x^2} \left (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3\right )}{x^3} \, dx=\frac {7500 \, {\left (x^{2} e^{\left (2 \, x^{2} + x + 4\right )} + 2 \, x e^{\left (x^{2} + e^{x} + 2\right )} + e^{\left (-x + 2 \, e^{x}\right )}\right )} e^{\left (-x - 4\right )}}{x^{2}} \]

[In]

integrate(((15000*exp(x)*x-15000*x-15000)*exp(exp(x)-2-x)^2+(15000*exp(x)*x^2+30000*x^3-15000*x^2-15000*x)*exp
(x^2)*exp(exp(x)-2-x)+30000*x^4*exp(x^2)^2)/x^3,x, algorithm="giac")

[Out]

7500*(x^2*e^(2*x^2 + x + 4) + 2*x*e^(x^2 + e^x + 2) + e^(-x + 2*e^x))*e^(-x - 4)/x^2

Mupad [B] (verification not implemented)

Time = 0.65 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.79 \[ \int \frac {30000 e^{2 x^2} x^4+e^{-4+2 e^x-2 x} \left (-15000-15000 x+15000 e^x x\right )+e^{-2+e^x-x+x^2} \left (-15000 x-15000 x^2+15000 e^x x^2+30000 x^3\right )}{x^3} \, dx=7500\,{\mathrm {e}}^{2\,x^2}+\frac {7500\,{\mathrm {e}}^{-2\,x}\,{\mathrm {e}}^{-4}\,{\mathrm {e}}^{2\,{\mathrm {e}}^x}}{x^2}+\frac {15000\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{x^2}\,{\mathrm {e}}^{{\mathrm {e}}^x}\,{\mathrm {e}}^{-2}}{x} \]

[In]

int(-(exp(2*exp(x) - 2*x - 4)*(15000*x - 15000*x*exp(x) + 15000) - 30000*x^4*exp(2*x^2) + exp(x^2)*exp(exp(x)
- x - 2)*(15000*x - 15000*x^2*exp(x) + 15000*x^2 - 30000*x^3))/x^3,x)

[Out]

7500*exp(2*x^2) + (7500*exp(-2*x)*exp(-4)*exp(2*exp(x)))/x^2 + (15000*exp(-x)*exp(x^2)*exp(exp(x))*exp(-2))/x