3.4.94 \(\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. Leaf size=23 \[ \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] Leaf count is larger than twice the leaf count of optimal. \(56\) vs. \(2(23)=46\).
time = 0.23, antiderivative size = 56, normalized size of antiderivative = 2.43, number of steps used = 13, number of rules used = 7, integrand size = 56, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 14, 2327, 6874, 2235, 2245, 2243} \begin {gather*} \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} \end {gather*}

Antiderivative was successfully verified.

[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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 1.26, size = 25, normalized size = 1.09 \begin {gather*} \frac {3 \left (15-5 e^{9+x^2}+9 x^2\right )^2}{25 x} \end {gather*}

Antiderivative was successfully verified.

[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 [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.08, size = 112, normalized size = 4.87

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\)
default \(\frac {162 x}{5}+\frac {27}{x}+\frac {243 x^{3}}{25}-\frac {117 \,{\mathrm e}^{9} \sqrt {\pi }\, \erfi \left (x \right )}{5}+3 \,{\mathrm e}^{18} \sqrt {2}\, \sqrt {\pi }\, \erfi \left (\sqrt {2}\, x \right )+18 \,{\mathrm e}^{9} \left (-\frac {{\mathrm e}^{x^{2}}}{x}+\sqrt {\pi }\, \erfi \left (x \right )\right )-3 \,{\mathrm e}^{18} \left (-\frac {{\mathrm e}^{2 x^{2}}}{x}+\sqrt {2}\, \sqrt {\pi }\, \erfi \left (\sqrt {2}\, x \right )\right )-\frac {108 \,{\mathrm e}^{9} \left (\frac {{\mathrm e}^{x^{2}} x}{2}-\frac {\sqrt {\pi }\, \erfi \left (x \right )}{4}\right )}{5}\) \(112\)

Verification of antiderivative is not currently implemented for this CAS.

[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]

162/5*x+27/x+243/25*x^3-117/5*exp(9)*Pi^(1/2)*erfi(x)+3*exp(9)^2*2^(1/2)*Pi^(1/2)*erfi(2^(1/2)*x)+18*exp(9)*(-
exp(x^2)/x+Pi^(1/2)*erfi(x))-3*exp(9)^2*(-exp(x^2)^2/x+2^(1/2)*Pi^(1/2)*erfi(2^(1/2)*x))-108/5*exp(9)*(1/2*exp
(x^2)*x-1/4*Pi^(1/2)*erfi(x))

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.55, size = 96, normalized size = 4.17 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Fricas [A]
time = 0.31, size = 42, normalized size = 1.83 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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] Leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (19) = 38\).
time = 0.07, size = 48, normalized size = 2.09 \begin {gather*} \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}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (22) = 44\).
time = 0.41, size = 46, normalized size = 2.00 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.47, size = 22, normalized size = 0.96 \begin {gather*} \frac {3\,{\left (9\,x^2-5\,{\mathrm {e}}^{x^2+9}+15\right )}^2}{25\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________