3.88.96 \(\int \frac {-1+3 x^2+8 x^3+3 x^4+e^{-32-14 x-2 x^2} (-1-14 x-4 x^2)+e^{-16-7 x-x^2} (2+14 x-22 x^2-22 x^3-4 x^4)}{x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.46, antiderivative size = 93, normalized size of antiderivative = 3.32, number of steps used = 21, number of rules used = 8, integrand size = 77, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.104, Rules used = {14, 2288, 6742, 2234, 2205, 2242, 2240, 2241} \begin {gather*} x^3+4 x^2+2 e^{-x^2-7 x-16} x+4 e^{-x^2-7 x-16}-\frac {2 e^{-x^2-7 x-16}}{x}+\frac {e^{-2 x^2-14 x-32} \left (2 x^2+7 x\right )}{(2 x+7) x^2}+3 x+\frac {1}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-1 + 3*x^2 + 8*x^3 + 3*x^4 + E^(-32 - 14*x - 2*x^2)*(-1 - 14*x - 4*x^2) + E^(-16 - 7*x - x^2)*(2 + 14*x -
 22*x^2 - 22*x^3 - 4*x^4))/x^2,x]

[Out]

4*E^(-16 - 7*x - x^2) + x^(-1) - (2*E^(-16 - 7*x - x^2))/x + 3*x + 2*E^(-16 - 7*x - x^2)*x + 4*x^2 + x^3 + (E^
(-32 - 14*x - 2*x^2)*(7*x + 2*x^2))/(x^2*(7 + 2*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 2205

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

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2240

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(e*F^(a + b*x + c*x^2))/(
2*c*Log[F]), x] - Dist[(b*e - 2*c*d)/(2*c), Int[F^(a + b*x + c*x^2), x], x] /; FreeQ[{F, a, b, c, d, e}, x] &&
 NeQ[b*e - 2*c*d, 0]

Rule 2241

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_))^(m_), x_Symbol] :> Simp[(e*(d + e*x)^(m - 1)
*F^(a + b*x + c*x^2))/(2*c*Log[F]), x] + (-Dist[(b*e - 2*c*d)/(2*c), Int[(d + e*x)^(m - 1)*F^(a + b*x + c*x^2)
, x], x] - Dist[((m - 1)*e^2)/(2*c*Log[F]), Int[(d + e*x)^(m - 2)*F^(a + b*x + c*x^2), x], x]) /; FreeQ[{F, a,
 b, c, d, e}, x] && NeQ[b*e - 2*c*d, 0] && GtQ[m, 1]

Rule 2242

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_))^(m_), x_Symbol] :> Simp[((d + e*x)^(m + 1)*F
^(a + b*x + c*x^2))/(e*(m + 1)), x] + (-Dist[(2*c*Log[F])/(e^2*(m + 1)), Int[(d + e*x)^(m + 2)*F^(a + b*x + c*
x^2), x], x] - Dist[((b*e - 2*c*d)*Log[F])/(e^2*(m + 1)), Int[(d + e*x)^(m + 1)*F^(a + b*x + c*x^2), x], x]) /
; FreeQ[{F, a, b, c, d, e}, x] && NeQ[b*e - 2*c*d, 0] && LtQ[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} &=\int \left (-\frac {e^{-32-14 x-2 x^2} \left (1+14 x+4 x^2\right )}{x^2}-\frac {2 e^{-16-7 x-x^2} \left (-1-7 x+11 x^2+11 x^3+2 x^4\right )}{x^2}+\frac {-1+3 x^2+8 x^3+3 x^4}{x^2}\right ) \, dx\\ &=-\left (2 \int \frac {e^{-16-7 x-x^2} \left (-1-7 x+11 x^2+11 x^3+2 x^4\right )}{x^2} \, dx\right )-\int \frac {e^{-32-14 x-2 x^2} \left (1+14 x+4 x^2\right )}{x^2} \, dx+\int \frac {-1+3 x^2+8 x^3+3 x^4}{x^2} \, dx\\ &=\frac {e^{-32-14 x-2 x^2} \left (7 x+2 x^2\right )}{x^2 (7+2 x)}-2 \int \left (11 e^{-16-7 x-x^2}-\frac {e^{-16-7 x-x^2}}{x^2}-\frac {7 e^{-16-7 x-x^2}}{x}+11 e^{-16-7 x-x^2} x+2 e^{-16-7 x-x^2} x^2\right ) \, dx+\int \left (3-\frac {1}{x^2}+8 x+3 x^2\right ) \, dx\\ &=\frac {1}{x}+3 x+4 x^2+x^3+\frac {e^{-32-14 x-2 x^2} \left (7 x+2 x^2\right )}{x^2 (7+2 x)}+2 \int \frac {e^{-16-7 x-x^2}}{x^2} \, dx-4 \int e^{-16-7 x-x^2} x^2 \, dx+14 \int \frac {e^{-16-7 x-x^2}}{x} \, dx-22 \int e^{-16-7 x-x^2} \, dx-22 \int e^{-16-7 x-x^2} x \, dx\\ &=11 e^{-16-7 x-x^2}+\frac {1}{x}-\frac {2 e^{-16-7 x-x^2}}{x}+3 x+2 e^{-16-7 x-x^2} x+4 x^2+x^3+\frac {e^{-32-14 x-2 x^2} \left (7 x+2 x^2\right )}{x^2 (7+2 x)}-2 \int e^{-16-7 x-x^2} \, dx-4 \int e^{-16-7 x-x^2} \, dx+14 \int e^{-16-7 x-x^2} x \, dx+77 \int e^{-16-7 x-x^2} \, dx-\frac {22 \int e^{-\frac {1}{4} (-7-2 x)^2} \, dx}{e^{15/4}}\\ &=4 e^{-16-7 x-x^2}+\frac {1}{x}-\frac {2 e^{-16-7 x-x^2}}{x}+3 x+2 e^{-16-7 x-x^2} x+4 x^2+x^3+\frac {e^{-32-14 x-2 x^2} \left (7 x+2 x^2\right )}{x^2 (7+2 x)}+\frac {11 \sqrt {\pi } \text {erf}\left (\frac {1}{2} (-7-2 x)\right )}{e^{15/4}}-49 \int e^{-16-7 x-x^2} \, dx-\frac {2 \int e^{-\frac {1}{4} (-7-2 x)^2} \, dx}{e^{15/4}}-\frac {4 \int e^{-\frac {1}{4} (-7-2 x)^2} \, dx}{e^{15/4}}+\frac {77 \int e^{-\frac {1}{4} (-7-2 x)^2} \, dx}{e^{15/4}}\\ &=4 e^{-16-7 x-x^2}+\frac {1}{x}-\frac {2 e^{-16-7 x-x^2}}{x}+3 x+2 e^{-16-7 x-x^2} x+4 x^2+x^3+\frac {e^{-32-14 x-2 x^2} \left (7 x+2 x^2\right )}{x^2 (7+2 x)}-\frac {49 \sqrt {\pi } \text {erf}\left (\frac {1}{2} (-7-2 x)\right )}{2 e^{15/4}}-\frac {49 \int e^{-\frac {1}{4} (-7-2 x)^2} \, dx}{e^{15/4}}\\ &=4 e^{-16-7 x-x^2}+\frac {1}{x}-\frac {2 e^{-16-7 x-x^2}}{x}+3 x+2 e^{-16-7 x-x^2} x+4 x^2+x^3+\frac {e^{-32-14 x-2 x^2} \left (7 x+2 x^2\right )}{x^2 (7+2 x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.22, size = 63, normalized size = 2.25 \begin {gather*} \frac {1}{x}+\frac {e^{-32-14 x-2 x^2}}{x}+3 x+4 x^2+x^3+e^{-7 x-x^2} \left (\frac {4}{e^{16}}-\frac {2}{e^{16} x}+\frac {2 x}{e^{16}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-1 + 3*x^2 + 8*x^3 + 3*x^4 + E^(-32 - 14*x - 2*x^2)*(-1 - 14*x - 4*x^2) + E^(-16 - 7*x - x^2)*(2 +
14*x - 22*x^2 - 22*x^3 - 4*x^4))/x^2,x]

[Out]

x^(-1) + E^(-32 - 14*x - 2*x^2)/x + 3*x + 4*x^2 + x^3 + E^(-7*x - x^2)*(4/E^16 - 2/(E^16*x) + (2*x)/E^16)

________________________________________________________________________________________

fricas [B]  time = 0.52, size = 51, normalized size = 1.82 \begin {gather*} \frac {x^{4} + 4 \, x^{3} + 3 \, x^{2} + 2 \, {\left (x^{2} + 2 \, x - 1\right )} e^{\left (-x^{2} - 7 \, x - 16\right )} + e^{\left (-2 \, x^{2} - 14 \, x - 32\right )} + 1}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x^2-14*x-1)*exp(-x^2-7*x-16)^2+(-4*x^4-22*x^3-22*x^2+14*x+2)*exp(-x^2-7*x-16)+3*x^4+8*x^3+3*x^2
-1)/x^2,x, algorithm="fricas")

[Out]

(x^4 + 4*x^3 + 3*x^2 + 2*(x^2 + 2*x - 1)*e^(-x^2 - 7*x - 16) + e^(-2*x^2 - 14*x - 32) + 1)/x

________________________________________________________________________________________

giac [B]  time = 0.16, size = 83, normalized size = 2.96 \begin {gather*} \frac {{\left (x^{4} e^{48} + 4 \, x^{3} e^{48} + 3 \, x^{2} e^{48} + 2 \, x^{2} e^{\left (-x^{2} - 7 \, x + 32\right )} + 4 \, x e^{\left (-x^{2} - 7 \, x + 32\right )} + e^{48} - 2 \, e^{\left (-x^{2} - 7 \, x + 32\right )} + e^{\left (-2 \, x^{2} - 14 \, x + 16\right )}\right )} e^{\left (-48\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x^2-14*x-1)*exp(-x^2-7*x-16)^2+(-4*x^4-22*x^3-22*x^2+14*x+2)*exp(-x^2-7*x-16)+3*x^4+8*x^3+3*x^2
-1)/x^2,x, algorithm="giac")

[Out]

(x^4*e^48 + 4*x^3*e^48 + 3*x^2*e^48 + 2*x^2*e^(-x^2 - 7*x + 32) + 4*x*e^(-x^2 - 7*x + 32) + e^48 - 2*e^(-x^2 -
 7*x + 32) + e^(-2*x^2 - 14*x + 16))*e^(-48)/x

________________________________________________________________________________________

maple [A]  time = 0.08, size = 55, normalized size = 1.96




method result size



risch \(4 x^{2}+3 x +\frac {1}{x}+x^{3}+\frac {{\mathrm e}^{-2 x^{2}-14 x -32}}{x}+\frac {2 \left (x^{2}+2 x -1\right ) {\mathrm e}^{-x^{2}-7 x -16}}{x}\) \(55\)
norman \(\frac {1+x^{4}+{\mathrm e}^{-2 x^{2}-14 x -32}+3 x^{2}+4 x^{3}+4 \,{\mathrm e}^{-x^{2}-7 x -16} x +2 \,{\mathrm e}^{-x^{2}-7 x -16} x^{2}-2 \,{\mathrm e}^{-x^{2}-7 x -16}}{x}\) \(76\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-4*x^2-14*x-1)*exp(-x^2-7*x-16)^2+(-4*x^4-22*x^3-22*x^2+14*x+2)*exp(-x^2-7*x-16)+3*x^4+8*x^3+3*x^2-1)/x^
2,x,method=_RETURNVERBOSE)

[Out]

4*x^2+3*x+1/x+x^3+exp(-2*x^2-14*x-32)/x+2*(x^2+2*x-1)/x*exp(-x^2-7*x-16)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} x^{3} - \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} x + \frac {7}{2} \, \sqrt {2}\right ) e^{\left (-\frac {15}{2}\right )} + 4 \, x^{2} + 3 \, x + \frac {2 \, {\left (x^{2} + 2 \, x - 1\right )} e^{\left (-x^{2} - 7 \, x - 16\right )}}{x} + \frac {1}{x} - \int \frac {{\left (14 \, x + 1\right )} e^{\left (-2 \, x^{2} - 14 \, x - 32\right )}}{x^{2}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x^2-14*x-1)*exp(-x^2-7*x-16)^2+(-4*x^4-22*x^3-22*x^2+14*x+2)*exp(-x^2-7*x-16)+3*x^4+8*x^3+3*x^2
-1)/x^2,x, algorithm="maxima")

[Out]

x^3 - sqrt(2)*sqrt(pi)*erf(sqrt(2)*x + 7/2*sqrt(2))*e^(-15/2) + 4*x^2 + 3*x + 2*(x^2 + 2*x - 1)*e^(-x^2 - 7*x
- 16)/x + 1/x - integrate((14*x + 1)*e^(-2*x^2 - 14*x - 32)/x^2, x)

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 73, normalized size = 2.61 \begin {gather*} 3\,x+4\,{\mathrm {e}}^{-x^2-7\,x-16}-\frac {2\,{\mathrm {e}}^{-x^2-7\,x-16}}{x}+\frac {{\mathrm {e}}^{-2\,x^2-14\,x-32}}{x}+2\,x\,{\mathrm {e}}^{-x^2-7\,x-16}+\frac {1}{x}+4\,x^2+x^3 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(- 7*x - x^2 - 16)*(22*x^2 - 14*x + 22*x^3 + 4*x^4 - 2) + exp(- 14*x - 2*x^2 - 32)*(14*x + 4*x^2 + 1)
 - 3*x^2 - 8*x^3 - 3*x^4 + 1)/x^2,x)

[Out]

3*x + 4*exp(- 7*x - x^2 - 16) - (2*exp(- 7*x - x^2 - 16))/x + exp(- 14*x - 2*x^2 - 32)/x + 2*x*exp(- 7*x - x^2
 - 16) + 1/x + 4*x^2 + x^3

________________________________________________________________________________________

sympy [B]  time = 0.17, size = 58, normalized size = 2.07 \begin {gather*} x^{3} + 4 x^{2} + 3 x + \frac {1}{x} + \frac {x e^{- 2 x^{2} - 14 x - 32} + \left (2 x^{3} + 4 x^{2} - 2 x\right ) e^{- x^{2} - 7 x - 16}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x**2-14*x-1)*exp(-x**2-7*x-16)**2+(-4*x**4-22*x**3-22*x**2+14*x+2)*exp(-x**2-7*x-16)+3*x**4+8*x
**3+3*x**2-1)/x**2,x)

[Out]

x**3 + 4*x**2 + 3*x + 1/x + (x*exp(-2*x**2 - 14*x - 32) + (2*x**3 + 4*x**2 - 2*x)*exp(-x**2 - 7*x - 16))/x**2

________________________________________________________________________________________