\(\int \frac {x^2+e^{5+x^2} (-120+240 x^2+(-20+40 x^2) \log (3))}{x^2} \, dx\) [7770]

   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 = 33, antiderivative size = 18 \[ \int \frac {x^2+e^{5+x^2} \left (-120+240 x^2+\left (-20+40 x^2\right ) \log (3)\right )}{x^2} \, dx=x+\frac {20 e^{5+x^2} (6+\log (3))}{x} \]

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {14, 2326} \[ \int \frac {x^2+e^{5+x^2} \left (-120+240 x^2+\left (-20+40 x^2\right ) \log (3)\right )}{x^2} \, dx=\frac {20 e^{x^2+5} (6+\log (3))}{x}+x \]

[In]

Int[(x^2 + E^(5 + x^2)*(-120 + 240*x^2 + (-20 + 40*x^2)*Log[3]))/x^2,x]

[Out]

x + (20*E^(5 + x^2)*(6 + Log[3]))/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 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 (1+\frac {20 e^{5+x^2} \left (-1+2 x^2\right ) (6+\log (3))}{x^2}\right ) \, dx \\ & = x+(20 (6+\log (3))) \int \frac {e^{5+x^2} \left (-1+2 x^2\right )}{x^2} \, dx \\ & = x+\frac {20 e^{5+x^2} (6+\log (3))}{x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int \frac {x^2+e^{5+x^2} \left (-120+240 x^2+\left (-20+40 x^2\right ) \log (3)\right )}{x^2} \, dx=x+\frac {20 e^{5+x^2} (6+\log (3))}{x} \]

[In]

Integrate[(x^2 + E^(5 + x^2)*(-120 + 240*x^2 + (-20 + 40*x^2)*Log[3]))/x^2,x]

[Out]

x + (20*E^(5 + x^2)*(6 + Log[3]))/x

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00

method result size
risch \(x +\frac {20 \left (6+\ln \left (3\right )\right ) {\mathrm e}^{x^{2}+5}}{x}\) \(18\)
norman \(\frac {x^{2}+\left (20 \ln \left (3\right )+120\right ) {\mathrm e}^{x^{2}+5}}{x}\) \(22\)
parallelrisch \(\frac {20 \ln \left (3\right ) {\mathrm e}^{x^{2}+5}+x^{2}+120 \,{\mathrm e}^{x^{2}+5}}{x}\) \(27\)
parts \(x +\frac {120 \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}}{x}+\frac {20 \,{\mathrm e}^{5} \ln \left (3\right ) {\mathrm e}^{x^{2}}}{x}\) \(27\)
default \(x +120 \,{\mathrm e}^{5} \sqrt {\pi }\, \operatorname {erfi}\left (x \right )-120 \,{\mathrm e}^{5} \left (-\frac {{\mathrm e}^{x^{2}}}{x}+\sqrt {\pi }\, \operatorname {erfi}\left (x \right )\right )+20 \,{\mathrm e}^{5} \ln \left (3\right ) \sqrt {\pi }\, \operatorname {erfi}\left (x \right )-20 \,{\mathrm e}^{5} \ln \left (3\right ) \left (-\frac {{\mathrm e}^{x^{2}}}{x}+\sqrt {\pi }\, \operatorname {erfi}\left (x \right )\right )\) \(65\)

[In]

int((((40*x^2-20)*ln(3)+240*x^2-120)*exp(x^2+5)+x^2)/x^2,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.11 \[ \int \frac {x^2+e^{5+x^2} \left (-120+240 x^2+\left (-20+40 x^2\right ) \log (3)\right )}{x^2} \, dx=\frac {x^{2} + 20 \, {\left (\log \left (3\right ) + 6\right )} e^{\left (x^{2} + 5\right )}}{x} \]

[In]

integrate((((40*x^2-20)*log(3)+240*x^2-120)*exp(x^2+5)+x^2)/x^2,x, algorithm="fricas")

[Out]

(x^2 + 20*(log(3) + 6)*e^(x^2 + 5))/x

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {x^2+e^{5+x^2} \left (-120+240 x^2+\left (-20+40 x^2\right ) \log (3)\right )}{x^2} \, dx=x + \frac {\left (20 \log {\left (3 \right )} + 120\right ) e^{x^{2} + 5}}{x} \]

[In]

integrate((((40*x**2-20)*ln(3)+240*x**2-120)*exp(x**2+5)+x**2)/x**2,x)

[Out]

x + (20*log(3) + 120)*exp(x**2 + 5)/x

Maxima [C] (verification not implemented)

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

Time = 0.25 (sec) , antiderivative size = 70, normalized size of antiderivative = 3.89 \[ \int \frac {x^2+e^{5+x^2} \left (-120+240 x^2+\left (-20+40 x^2\right ) \log (3)\right )}{x^2} \, dx=-20 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x\right ) e^{5} \log \left (3\right ) - 120 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x\right ) e^{5} + \frac {10 \, \sqrt {-x^{2}} e^{5} \Gamma \left (-\frac {1}{2}, -x^{2}\right ) \log \left (3\right )}{x} + \frac {60 \, \sqrt {-x^{2}} e^{5} \Gamma \left (-\frac {1}{2}, -x^{2}\right )}{x} + x \]

[In]

integrate((((40*x^2-20)*log(3)+240*x^2-120)*exp(x^2+5)+x^2)/x^2,x, algorithm="maxima")

[Out]

-20*I*sqrt(pi)*erf(I*x)*e^5*log(3) - 120*I*sqrt(pi)*erf(I*x)*e^5 + 10*sqrt(-x^2)*e^5*gamma(-1/2, -x^2)*log(3)/
x + 60*sqrt(-x^2)*e^5*gamma(-1/2, -x^2)/x + x

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.44 \[ \int \frac {x^2+e^{5+x^2} \left (-120+240 x^2+\left (-20+40 x^2\right ) \log (3)\right )}{x^2} \, dx=\frac {x^{2} + 20 \, e^{\left (x^{2} + 5\right )} \log \left (3\right ) + 120 \, e^{\left (x^{2} + 5\right )}}{x} \]

[In]

integrate((((40*x^2-20)*log(3)+240*x^2-120)*exp(x^2+5)+x^2)/x^2,x, algorithm="giac")

[Out]

(x^2 + 20*e^(x^2 + 5)*log(3) + 120*e^(x^2 + 5))/x

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00 \[ \int \frac {x^2+e^{5+x^2} \left (-120+240 x^2+\left (-20+40 x^2\right ) \log (3)\right )}{x^2} \, dx=x+\frac {{\mathrm {e}}^{x^2+5}\,\left (20\,\ln \left (3\right )+120\right )}{x} \]

[In]

int((x^2 + exp(x^2 + 5)*(log(3)*(40*x^2 - 20) + 240*x^2 - 120))/x^2,x)

[Out]

x + (exp(x^2 + 5)*(20*log(3) + 120))/x