3.43.83 \(\int \frac {9 x^2-18 x^3+e^{x^2} (-25+158 x^2-240 x^3+216 x^4+e^{2 x} (-9+18 x+18 x^2)+e^x (-30+30 x-12 x^2-144 x^3))}{9 x^2} \, dx\)

Optimal. Leaf size=39 \[ x+x \left (-x+e^{x^2} \left (-4+\left (-\frac {5}{3 x}+\frac {-e^x+4 x}{x}\right )^2\right )\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 10.78, antiderivative size = 99, normalized size of antiderivative = 2.54, number of steps used = 15, number of rules used = 8, integrand size = 76, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {12, 14, 6742, 2288, 2204, 2214, 2209, 2212} \begin {gather*} -\frac {40 e^{x^2}}{3}+12 e^{x^2} x+\frac {e^{x^2+2 x} \left (x^2+x\right )}{x^2 (x+1)}+\frac {25 e^{x^2}}{9 x}+\frac {2 e^{x^2+x} \left (-24 x^3-2 x^2+5 x\right )}{3 x^2 (2 x+1)}-\frac {1}{4} (1-2 x)^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(9*x^2 - 18*x^3 + E^x^2*(-25 + 158*x^2 - 240*x^3 + 216*x^4 + E^(2*x)*(-9 + 18*x + 18*x^2) + E^x*(-30 + 30*
x - 12*x^2 - 144*x^3)))/(9*x^2),x]

[Out]

(-40*E^x^2)/3 - (1 - 2*x)^2/4 + (25*E^x^2)/(9*x) + 12*E^x^2*x + (E^(2*x + x^2)*(x + x^2))/(x^2*(1 + x)) + (2*E
^(x + x^2)*(5*x - 2*x^2 - 24*x^3))/(3*x^2*(1 + 2*x))

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 2204

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 2209

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 2212

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 2214

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 2288

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]

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{9} \int \frac {9 x^2-18 x^3+e^{x^2} \left (-25+158 x^2-240 x^3+216 x^4+e^{2 x} \left (-9+18 x+18 x^2\right )+e^x \left (-30+30 x-12 x^2-144 x^3\right )\right )}{x^2} \, dx\\ &=\frac {1}{9} \int \left (-9 (-1+2 x)+\frac {e^{x^2} \left (-25-30 e^x-9 e^{2 x}+30 e^x x+18 e^{2 x} x+158 x^2-12 e^x x^2+18 e^{2 x} x^2-240 x^3-144 e^x x^3+216 x^4\right )}{x^2}\right ) \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {1}{9} \int \frac {e^{x^2} \left (-25-30 e^x-9 e^{2 x}+30 e^x x+18 e^{2 x} x+158 x^2-12 e^x x^2+18 e^{2 x} x^2-240 x^3-144 e^x x^3+216 x^4\right )}{x^2} \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {1}{9} \int \left (\frac {9 e^{2 x+x^2} \left (-1+2 x+2 x^2\right )}{x^2}-\frac {6 e^{x+x^2} \left (5-5 x+2 x^2+24 x^3\right )}{x^2}+\frac {e^{x^2} \left (-25+158 x^2-240 x^3+216 x^4\right )}{x^2}\right ) \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {1}{9} \int \frac {e^{x^2} \left (-25+158 x^2-240 x^3+216 x^4\right )}{x^2} \, dx-\frac {2}{3} \int \frac {e^{x+x^2} \left (5-5 x+2 x^2+24 x^3\right )}{x^2} \, dx+\int \frac {e^{2 x+x^2} \left (-1+2 x+2 x^2\right )}{x^2} \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {e^{2 x+x^2} \left (x+x^2\right )}{x^2 (1+x)}+\frac {2 e^{x+x^2} \left (5 x-2 x^2-24 x^3\right )}{3 x^2 (1+2 x)}+\frac {1}{9} \int \left (158 e^{x^2}-\frac {25 e^{x^2}}{x^2}-240 e^{x^2} x+216 e^{x^2} x^2\right ) \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {e^{2 x+x^2} \left (x+x^2\right )}{x^2 (1+x)}+\frac {2 e^{x+x^2} \left (5 x-2 x^2-24 x^3\right )}{3 x^2 (1+2 x)}-\frac {25}{9} \int \frac {e^{x^2}}{x^2} \, dx+\frac {158}{9} \int e^{x^2} \, dx+24 \int e^{x^2} x^2 \, dx-\frac {80}{3} \int e^{x^2} x \, dx\\ &=-\frac {40 e^{x^2}}{3}-\frac {1}{4} (1-2 x)^2+\frac {25 e^{x^2}}{9 x}+12 e^{x^2} x+\frac {e^{2 x+x^2} \left (x+x^2\right )}{x^2 (1+x)}+\frac {2 e^{x+x^2} \left (5 x-2 x^2-24 x^3\right )}{3 x^2 (1+2 x)}+\frac {79}{9} \sqrt {\pi } \text {erfi}(x)-\frac {50}{9} \int e^{x^2} \, dx-12 \int e^{x^2} \, dx\\ &=-\frac {40 e^{x^2}}{3}-\frac {1}{4} (1-2 x)^2+\frac {25 e^{x^2}}{9 x}+12 e^{x^2} x+\frac {e^{2 x+x^2} \left (x+x^2\right )}{x^2 (1+x)}+\frac {2 e^{x+x^2} \left (5 x-2 x^2-24 x^3\right )}{3 x^2 (1+2 x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.52, size = 54, normalized size = 1.38 \begin {gather*} \frac {9 e^{x (2+x)}+e^{x+x^2} (30-72 x)-9 (-1+x) x^2+e^{x^2} \left (25-120 x+108 x^2\right )}{9 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(9*x^2 - 18*x^3 + E^x^2*(-25 + 158*x^2 - 240*x^3 + 216*x^4 + E^(2*x)*(-9 + 18*x + 18*x^2) + E^x*(-30
 + 30*x - 12*x^2 - 144*x^3)))/(9*x^2),x]

[Out]

(9*E^(x*(2 + x)) + E^(x + x^2)*(30 - 72*x) - 9*(-1 + x)*x^2 + E^x^2*(25 - 120*x + 108*x^2))/(9*x)

________________________________________________________________________________________

fricas [A]  time = 0.78, size = 47, normalized size = 1.21 \begin {gather*} -\frac {9 \, x^{3} - 9 \, x^{2} - {\left (108 \, x^{2} - 6 \, {\left (12 \, x - 5\right )} e^{x} - 120 \, x + 9 \, e^{\left (2 \, x\right )} + 25\right )} e^{\left (x^{2}\right )}}{9 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(((18*x^2+18*x-9)*exp(x)^2+(-144*x^3-12*x^2+30*x-30)*exp(x)+216*x^4-240*x^3+158*x^2-25)*exp(x^2)
-18*x^3+9*x^2)/x^2,x, algorithm="fricas")

[Out]

-1/9*(9*x^3 - 9*x^2 - (108*x^2 - 6*(12*x - 5)*e^x - 120*x + 9*e^(2*x) + 25)*e^(x^2))/x

________________________________________________________________________________________

giac [A]  time = 0.22, size = 65, normalized size = 1.67 \begin {gather*} -\frac {9 \, x^{3} - 108 \, x^{2} e^{\left (x^{2}\right )} - 9 \, x^{2} + 72 \, x e^{\left (x^{2} + x\right )} + 120 \, x e^{\left (x^{2}\right )} - 9 \, e^{\left (x^{2} + 2 \, x\right )} - 30 \, e^{\left (x^{2} + x\right )} - 25 \, e^{\left (x^{2}\right )}}{9 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(((18*x^2+18*x-9)*exp(x)^2+(-144*x^3-12*x^2+30*x-30)*exp(x)+216*x^4-240*x^3+158*x^2-25)*exp(x^2)
-18*x^3+9*x^2)/x^2,x, algorithm="giac")

[Out]

-1/9*(9*x^3 - 108*x^2*e^(x^2) - 9*x^2 + 72*x*e^(x^2 + x) + 120*x*e^(x^2) - 9*e^(x^2 + 2*x) - 30*e^(x^2 + x) -
25*e^(x^2))/x

________________________________________________________________________________________

maple [A]  time = 0.06, size = 42, normalized size = 1.08




method result size



risch \(-x^{2}+x +\frac {\left (108 x^{2}-72 \,{\mathrm e}^{x} x +9 \,{\mathrm e}^{2 x}-120 x +30 \,{\mathrm e}^{x}+25\right ) {\mathrm e}^{x^{2}}}{9 x}\) \(42\)
norman \(\frac {x^{2}+{\mathrm e}^{2 x} {\mathrm e}^{x^{2}}-x^{3}+12 x^{2} {\mathrm e}^{x^{2}}+\frac {10 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}}{3}-\frac {40 \,{\mathrm e}^{x^{2}} x}{3}-8 x \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}+\frac {25 \,{\mathrm e}^{x^{2}}}{9}}{x}\) \(62\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/9*(((18*x^2+18*x-9)*exp(x)^2+(-144*x^3-12*x^2+30*x-30)*exp(x)+216*x^4-240*x^3+158*x^2-25)*exp(x^2)-18*x^
3+9*x^2)/x^2,x,method=_RETURNVERBOSE)

[Out]

-x^2+x+1/9*(108*x^2-72*exp(x)*x+9*exp(2*x)-120*x+30*exp(x)+25)/x*exp(x^2)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {2}{3} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + \frac {1}{2} i\right ) e^{\left (-\frac {1}{4}\right )} - x^{2} + 12 \, x e^{\left (x^{2}\right )} - \frac {25}{9} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x\right ) + x + \frac {25 \, \sqrt {-x^{2}} \Gamma \left (-\frac {1}{2}, -x^{2}\right )}{18 \, x} + \frac {e^{\left (x^{2} + 2 \, x\right )}}{x} - \frac {40}{3} \, e^{\left (x^{2}\right )} - \frac {1}{9} \, \int \frac {6 \, {\left (24 \, x^{3} - 5 \, x + 5\right )} e^{\left (x^{2} + x\right )}}{x^{2}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(((18*x^2+18*x-9)*exp(x)^2+(-144*x^3-12*x^2+30*x-30)*exp(x)+216*x^4-240*x^3+158*x^2-25)*exp(x^2)
-18*x^3+9*x^2)/x^2,x, algorithm="maxima")

[Out]

2/3*I*sqrt(pi)*erf(I*x + 1/2*I)*e^(-1/4) - x^2 + 12*x*e^(x^2) - 25/9*I*sqrt(pi)*erf(I*x) + x + 25/18*sqrt(-x^2
)*gamma(-1/2, -x^2)/x + e^(x^2 + 2*x)/x - 40/3*e^(x^2) - 1/9*integrate(6*(24*x^3 - 5*x + 5)*e^(x^2 + x)/x^2, x
)

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 57, normalized size = 1.46 \begin {gather*} \frac {\frac {10\,{\mathrm {e}}^{x^2+x}}{3}+\frac {25\,{\mathrm {e}}^{x^2}}{9}+{\mathrm {e}}^{x^2+2\,x}}{x}-\frac {40\,{\mathrm {e}}^{x^2}}{3}-8\,{\mathrm {e}}^{x^2+x}+x\,\left (12\,{\mathrm {e}}^{x^2}+1\right )-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((exp(x^2)*(exp(2*x)*(18*x + 18*x^2 - 9) + 158*x^2 - 240*x^3 + 216*x^4 - exp(x)*(12*x^2 - 30*x + 144*x^3 +
 30) - 25))/9 + x^2 - 2*x^3)/x^2,x)

[Out]

((10*exp(x + x^2))/3 + (25*exp(x^2))/9 + exp(2*x + x^2))/x - (40*exp(x^2))/3 - 8*exp(x + x^2) + x*(12*exp(x^2)
 + 1) - x^2

________________________________________________________________________________________

sympy [A]  time = 0.24, size = 41, normalized size = 1.05 \begin {gather*} - x^{2} + x + \frac {\left (108 x^{2} - 72 x e^{x} - 120 x + 9 e^{2 x} + 30 e^{x} + 25\right ) e^{x^{2}}}{9 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(((18*x**2+18*x-9)*exp(x)**2+(-144*x**3-12*x**2+30*x-30)*exp(x)+216*x**4-240*x**3+158*x**2-25)*e
xp(x**2)-18*x**3+9*x**2)/x**2,x)

[Out]

-x**2 + x + (108*x**2 - 72*x*exp(x) - 120*x + 9*exp(2*x) + 30*exp(x) + 25)*exp(x**2)/(9*x)

________________________________________________________________________________________