\(\int \frac {-x-x^2+e^{25 x^2} (-5+250 x^2)}{x^2} \, dx\) [1045]

   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 [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 25 \[ \int \frac {-x-x^2+e^{25 x^2} \left (-5+250 x^2\right )}{x^2} \, dx=1+\frac {5 e^{25 x^2}}{x}-x-\log (2)-\log (x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {14, 45, 2326} \[ \int \frac {-x-x^2+e^{25 x^2} \left (-5+250 x^2\right )}{x^2} \, dx=\frac {5 e^{25 x^2}}{x}-x-\log (x) \]

[In]

Int[(-x - x^2 + E^(25*x^2)*(-5 + 250*x^2))/x^2,x]

[Out]

(5*E^(25*x^2))/x - x - Log[x]

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 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 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 (\frac {-1-x}{x}+\frac {5 e^{25 x^2} \left (-1+50 x^2\right )}{x^2}\right ) \, dx \\ & = 5 \int \frac {e^{25 x^2} \left (-1+50 x^2\right )}{x^2} \, dx+\int \frac {-1-x}{x} \, dx \\ & = \frac {5 e^{25 x^2}}{x}+\int \left (-1-\frac {1}{x}\right ) \, dx \\ & = \frac {5 e^{25 x^2}}{x}-x-\log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {-x-x^2+e^{25 x^2} \left (-5+250 x^2\right )}{x^2} \, dx=\frac {5 e^{25 x^2}}{x}-x-\log (x) \]

[In]

Integrate[(-x - x^2 + E^(25*x^2)*(-5 + 250*x^2))/x^2,x]

[Out]

(5*E^(25*x^2))/x - x - Log[x]

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80

method result size
default \(-x -\ln \left (x \right )+\frac {5 \,{\mathrm e}^{25 x^{2}}}{x}\) \(20\)
risch \(-x -\ln \left (x \right )+\frac {5 \,{\mathrm e}^{25 x^{2}}}{x}\) \(20\)
parts \(-x -\ln \left (x \right )+\frac {5 \,{\mathrm e}^{25 x^{2}}}{x}\) \(20\)
parallelrisch \(-\frac {x \ln \left (x \right )+x^{2}-5 \,{\mathrm e}^{25 x^{2}}}{x}\) \(22\)
norman \(\frac {-x^{2}+5 \,{\mathrm e}^{25 x^{2}}}{x}-\ln \left (x \right )\) \(24\)

[In]

int(((250*x^2-5)*exp(25*x^2)-x^2-x)/x^2,x,method=_RETURNVERBOSE)

[Out]

-x-ln(x)+5*exp(x^2)^25/x

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \frac {-x-x^2+e^{25 x^2} \left (-5+250 x^2\right )}{x^2} \, dx=-\frac {x^{2} + x \log \left (x\right ) - 5 \, e^{\left (25 \, x^{2}\right )}}{x} \]

[In]

integrate(((250*x^2-5)*exp(25*x^2)-x^2-x)/x^2,x, algorithm="fricas")

[Out]

-(x^2 + x*log(x) - 5*e^(25*x^2))/x

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.56 \[ \int \frac {-x-x^2+e^{25 x^2} \left (-5+250 x^2\right )}{x^2} \, dx=- x - \log {\left (x \right )} + \frac {5 e^{25 x^{2}}}{x} \]

[In]

integrate(((250*x**2-5)*exp(25*x**2)-x**2-x)/x**2,x)

[Out]

-x - log(x) + 5*exp(25*x**2)/x

Maxima [C] (verification not implemented)

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

Time = 0.29 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.44 \[ \int \frac {-x-x^2+e^{25 x^2} \left (-5+250 x^2\right )}{x^2} \, dx=-25 i \, \sqrt {\pi } \operatorname {erf}\left (5 i \, x\right ) - x + \frac {25 \, \sqrt {-x^{2}} \Gamma \left (-\frac {1}{2}, -25 \, x^{2}\right )}{2 \, x} - \log \left (x\right ) \]

[In]

integrate(((250*x^2-5)*exp(25*x^2)-x^2-x)/x^2,x, algorithm="maxima")

[Out]

-25*I*sqrt(pi)*erf(5*I*x) - x + 25/2*sqrt(-x^2)*gamma(-1/2, -25*x^2)/x - log(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \frac {-x-x^2+e^{25 x^2} \left (-5+250 x^2\right )}{x^2} \, dx=-\frac {x^{2} + x \log \left (x\right ) - 5 \, e^{\left (25 \, x^{2}\right )}}{x} \]

[In]

integrate(((250*x^2-5)*exp(25*x^2)-x^2-x)/x^2,x, algorithm="giac")

[Out]

-(x^2 + x*log(x) - 5*e^(25*x^2))/x

Mupad [B] (verification not implemented)

Time = 8.35 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \frac {-x-x^2+e^{25 x^2} \left (-5+250 x^2\right )}{x^2} \, dx=\frac {5\,{\mathrm {e}}^{25\,x^2}-x^2}{x}-\ln \left (x\right ) \]

[In]

int(-(x - exp(25*x^2)*(250*x^2 - 5) + x^2)/x^2,x)

[Out]

(5*exp(25*x^2) - x^2)/x - log(x)