\(\int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} (-75+300 x^2)+e^{9+x^2} (450-1170 x^2-540 x^4)}{25 x^2} \, dx\) [394]

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

Optimal result

Integrand size = 56, antiderivative size = 23 \[ \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{25 x^2} \, dx=\frac {3 \left (-3+e^{9+x^2}-\frac {9 x^2}{5}\right )^2}{x} \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(56\) vs. \(2(23)=46\).

Time = 0.34 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.43, number of steps used = 13, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 14, 2327, 6874, 2235, 2245, 2243} \[ \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{25 x^2} \, dx=\frac {243 x^3}{25}-\frac {54}{5} e^{x^2+9} x-\frac {18 e^{x^2+9}}{x}+\frac {3 e^{2 x^2+18}}{x}+\frac {162 x}{5}+\frac {27}{x} \]

[In]

Int[(-675 + 810*x^2 + 729*x^4 + E^(18 + 2*x^2)*(-75 + 300*x^2) + E^(9 + x^2)*(450 - 1170*x^2 - 540*x^4))/(25*x
^2),x]

[Out]

27/x - (18*E^(9 + x^2))/x + (3*E^(18 + 2*x^2))/x + (162*x)/5 - (54*E^(9 + x^2)*x)/5 + (243*x^3)/25

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

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 2245

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*(F^(a + b*(c + d*x)^n)/(d*(m + 1))), x] - Dist[b*n*(Log[F]/(m + 1)), 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[-4, (m + 1)/n, 5] && IntegerQ[n
] && ((GtQ[n, 0] && LtQ[m, -1]) || (GtQ[-n, 0] && LeQ[-n, m + 1]))

Rule 2327

Int[(F_)^(u_)*(v_)^(n_.)*(w_), x_Symbol] :> With[{z = Log[F]*v*D[u, x] + (n + 1)*D[v, x]}, Simp[(Coefficient[w
, x, Exponent[w, x]]/Coefficient[z, x, Exponent[z, x]])*F^u*v^(n + 1), x] /; EqQ[Exponent[w, x], Exponent[z, x
]] && EqQ[w*Coefficient[z, x, Exponent[z, x]], z*Coefficient[w, x, Exponent[w, x]]]] /; FreeQ[{F, n}, x] && Po
lynomialQ[u, x] && PolynomialQ[v, x] && PolynomialQ[w, x]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \frac {1}{25} \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{x^2} \, dx \\ & = \frac {1}{25} \int \left (\frac {75 e^{18+2 x^2} (-1+2 x) (1+2 x)}{x^2}-\frac {90 e^{9+x^2} \left (5+2 x^2\right ) \left (-1+3 x^2\right )}{x^2}+\frac {27 \left (-25+30 x^2+27 x^4\right )}{x^2}\right ) \, dx \\ & = \frac {27}{25} \int \frac {-25+30 x^2+27 x^4}{x^2} \, dx+3 \int \frac {e^{18+2 x^2} (-1+2 x) (1+2 x)}{x^2} \, dx-\frac {18}{5} \int \frac {e^{9+x^2} \left (5+2 x^2\right ) \left (-1+3 x^2\right )}{x^2} \, dx \\ & = \frac {3 e^{18+2 x^2}}{x}+\frac {27}{25} \int \left (30-\frac {25}{x^2}+27 x^2\right ) \, dx-\frac {18}{5} \int \left (13 e^{9+x^2}-\frac {5 e^{9+x^2}}{x^2}+6 e^{9+x^2} x^2\right ) \, dx \\ & = \frac {27}{x}+\frac {3 e^{18+2 x^2}}{x}+\frac {162 x}{5}+\frac {243 x^3}{25}+18 \int \frac {e^{9+x^2}}{x^2} \, dx-\frac {108}{5} \int e^{9+x^2} x^2 \, dx-\frac {234}{5} \int e^{9+x^2} \, dx \\ & = \frac {27}{x}-\frac {18 e^{9+x^2}}{x}+\frac {3 e^{18+2 x^2}}{x}+\frac {162 x}{5}-\frac {54}{5} e^{9+x^2} x+\frac {243 x^3}{25}-\frac {117}{5} e^9 \sqrt {\pi } \text {erfi}(x)+\frac {54}{5} \int e^{9+x^2} \, dx+36 \int e^{9+x^2} \, dx \\ & = \frac {27}{x}-\frac {18 e^{9+x^2}}{x}+\frac {3 e^{18+2 x^2}}{x}+\frac {162 x}{5}-\frac {54}{5} e^{9+x^2} x+\frac {243 x^3}{25} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.54 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.09 \[ \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{25 x^2} \, dx=\frac {3 \left (15-5 e^{9+x^2}+9 x^2\right )^2}{25 x} \]

[In]

Integrate[(-675 + 810*x^2 + 729*x^4 + E^(18 + 2*x^2)*(-75 + 300*x^2) + E^(9 + x^2)*(450 - 1170*x^2 - 540*x^4))
/(25*x^2),x]

[Out]

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

Maple [B] (verified)

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

Time = 0.04 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.00

method result size
norman \(\frac {27+\frac {162 x^{2}}{5}+\frac {243 x^{4}}{25}+3 \,{\mathrm e}^{2 x^{2}+18}-\frac {54 \,{\mathrm e}^{x^{2}+9} x^{2}}{5}-18 \,{\mathrm e}^{x^{2}+9}}{x}\) \(46\)
risch \(\frac {162 x}{5}+\frac {27}{x}+\frac {243 x^{3}}{25}+\frac {3 \,{\mathrm e}^{2 x^{2}+18}}{x}-\frac {18 \left (3 x^{2}+5\right ) {\mathrm e}^{x^{2}+9}}{5 x}\) \(46\)
parallelrisch \(\frac {243 x^{4}-270 \,{\mathrm e}^{x^{2}+9} x^{2}+810 x^{2}+675+75 \,{\mathrm e}^{2 x^{2}+18}-450 \,{\mathrm e}^{x^{2}+9}}{25 x}\) \(47\)
default \(\frac {162 x}{5}+\frac {27}{x}+\frac {243 x^{3}}{25}-\frac {117 \,{\mathrm e}^{9} \sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{5}+3 \,{\mathrm e}^{18} \sqrt {2}\, \sqrt {\pi }\, \operatorname {erfi}\left (\sqrt {2}\, x \right )+18 \,{\mathrm e}^{9} \left (-\frac {{\mathrm e}^{x^{2}}}{x}+\sqrt {\pi }\, \operatorname {erfi}\left (x \right )\right )-3 \,{\mathrm e}^{18} \left (-\frac {{\mathrm e}^{2 x^{2}}}{x}+\sqrt {2}\, \sqrt {\pi }\, \operatorname {erfi}\left (\sqrt {2}\, x \right )\right )-\frac {108 \,{\mathrm e}^{9} \left (\frac {{\mathrm e}^{x^{2}} x}{2}-\frac {\sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{4}\right )}{5}\) \(112\)
parts \(\frac {162 x}{5}+\frac {27}{x}+\frac {243 x^{3}}{25}-\frac {117 \,{\mathrm e}^{9} \sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{5}+3 \,{\mathrm e}^{18} \sqrt {2}\, \sqrt {\pi }\, \operatorname {erfi}\left (\sqrt {2}\, x \right )+18 \,{\mathrm e}^{9} \left (-\frac {{\mathrm e}^{x^{2}}}{x}+\sqrt {\pi }\, \operatorname {erfi}\left (x \right )\right )-3 \,{\mathrm e}^{18} \left (-\frac {{\mathrm e}^{2 x^{2}}}{x}+\sqrt {2}\, \sqrt {\pi }\, \operatorname {erfi}\left (\sqrt {2}\, x \right )\right )-\frac {108 \,{\mathrm e}^{9} \left (\frac {{\mathrm e}^{x^{2}} x}{2}-\frac {\sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{4}\right )}{5}\) \(112\)

[In]

int(1/25*((300*x^2-75)*exp(x^2+9)^2+(-540*x^4-1170*x^2+450)*exp(x^2+9)+729*x^4+810*x^2-675)/x^2,x,method=_RETU
RNVERBOSE)

[Out]

(27+162/5*x^2+243/25*x^4+3*exp(x^2+9)^2-54/5*exp(x^2+9)*x^2-18*exp(x^2+9))/x

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.83 \[ \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{25 x^2} \, dx=\frac {3 \, {\left (81 \, x^{4} + 270 \, x^{2} - 30 \, {\left (3 \, x^{2} + 5\right )} e^{\left (x^{2} + 9\right )} + 25 \, e^{\left (2 \, x^{2} + 18\right )} + 225\right )}}{25 \, x} \]

[In]

integrate(1/25*((300*x^2-75)*exp(x^2+9)^2+(-540*x^4-1170*x^2+450)*exp(x^2+9)+729*x^4+810*x^2-675)/x^2,x, algor
ithm="fricas")

[Out]

3/25*(81*x^4 + 270*x^2 - 30*(3*x^2 + 5)*e^(x^2 + 9) + 25*e^(2*x^2 + 18) + 225)/x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (19) = 38\).

Time = 0.08 (sec) , antiderivative size = 48, normalized size of antiderivative = 2.09 \[ \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{25 x^2} \, dx=\frac {243 x^{3}}{25} + \frac {162 x}{5} + \frac {27}{x} + \frac {15 x e^{2 x^{2} + 18} + \left (- 54 x^{3} - 90 x\right ) e^{x^{2} + 9}}{5 x^{2}} \]

[In]

integrate(1/25*((300*x**2-75)*exp(x**2+9)**2+(-540*x**4-1170*x**2+450)*exp(x**2+9)+729*x**4+810*x**2-675)/x**2
,x)

[Out]

243*x**3/25 + 162*x/5 + 27/x + (15*x*exp(2*x**2 + 18) + (-54*x**3 - 90*x)*exp(x**2 + 9))/(5*x**2)

Maxima [C] (verification not implemented)

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

Time = 0.31 (sec) , antiderivative size = 96, normalized size of antiderivative = 4.17 \[ \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{25 x^2} \, dx=\frac {243}{25} \, x^{3} - 3 i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (i \, \sqrt {2} x\right ) e^{18} + 18 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x\right ) e^{9} - \frac {54}{5} \, x e^{\left (x^{2} + 9\right )} + \frac {3 \, \sqrt {2} \sqrt {-x^{2}} e^{18} \Gamma \left (-\frac {1}{2}, -2 \, x^{2}\right )}{2 \, x} - \frac {9 \, \sqrt {-x^{2}} e^{9} \Gamma \left (-\frac {1}{2}, -x^{2}\right )}{x} + \frac {162}{5} \, x + \frac {27}{x} \]

[In]

integrate(1/25*((300*x^2-75)*exp(x^2+9)^2+(-540*x^4-1170*x^2+450)*exp(x^2+9)+729*x^4+810*x^2-675)/x^2,x, algor
ithm="maxima")

[Out]

243/25*x^3 - 3*I*sqrt(2)*sqrt(pi)*erf(I*sqrt(2)*x)*e^18 + 18*I*sqrt(pi)*erf(I*x)*e^9 - 54/5*x*e^(x^2 + 9) + 3/
2*sqrt(2)*sqrt(-x^2)*e^18*gamma(-1/2, -2*x^2)/x - 9*sqrt(-x^2)*e^9*gamma(-1/2, -x^2)/x + 162/5*x + 27/x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (22) = 44\).

Time = 0.29 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.00 \[ \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{25 x^2} \, dx=\frac {3 \, {\left (81 \, x^{4} - 90 \, x^{2} e^{\left (x^{2} + 9\right )} + 270 \, x^{2} + 25 \, e^{\left (2 \, x^{2} + 18\right )} - 150 \, e^{\left (x^{2} + 9\right )} + 225\right )}}{25 \, x} \]

[In]

integrate(1/25*((300*x^2-75)*exp(x^2+9)^2+(-540*x^4-1170*x^2+450)*exp(x^2+9)+729*x^4+810*x^2-675)/x^2,x, algor
ithm="giac")

[Out]

3/25*(81*x^4 - 90*x^2*e^(x^2 + 9) + 270*x^2 + 25*e^(2*x^2 + 18) - 150*e^(x^2 + 9) + 225)/x

Mupad [B] (verification not implemented)

Time = 7.51 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96 \[ \int \frac {-675+810 x^2+729 x^4+e^{18+2 x^2} \left (-75+300 x^2\right )+e^{9+x^2} \left (450-1170 x^2-540 x^4\right )}{25 x^2} \, dx=\frac {3\,{\left (9\,x^2-5\,{\mathrm {e}}^{x^2+9}+15\right )}^2}{25\,x} \]

[In]

int(((162*x^2)/5 - (exp(x^2 + 9)*(1170*x^2 + 540*x^4 - 450))/25 + (729*x^4)/25 + (exp(2*x^2 + 18)*(300*x^2 - 7
5))/25 - 27)/x^2,x)

[Out]

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