3.18.36 \(\int \frac {e^{-2 x} x^2 (14 x^4+x^5-2 x^6+\frac {e^{2 x} (2+x)^2 (3174 x^2+1955 x^3+194 x^4+5 x^5)}{x^2}+\frac {e^x (2+x) (460 x^3+116 x^4-40 x^5-2 x^6)}{x})}{(2+x)^3} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 1.87, antiderivative size = 159, normalized size of antiderivative = 6.12, number of steps used = 60, number of rules used = 7, integrand size = 94, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {6688, 14, 2199, 2194, 2176, 2177, 2178} \begin {gather*} e^{-2 x} x^5+2 e^{-x} x^5+x^5-4 e^{-2 x} x^4+42 e^{-x} x^4+46 x^4+12 e^{-2 x} x^3-84 e^{-x} x^3+529 x^3-32 e^{-2 x} x^2+168 e^{-x} x^2+80 e^{-2 x} x-336 e^{-x} x-192 e^{-2 x}+672 e^{-x}+\frac {448 e^{-2 x}}{x+2}-\frac {1344 e^{-x}}{x+2}-\frac {128 e^{-2 x}}{(x+2)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(14*x^4 + x^5 - 2*x^6 + (E^(2*x)*(2 + x)^2*(3174*x^2 + 1955*x^3 + 194*x^4 + 5*x^5))/x^2 + (E^x*(2 + x
)*(460*x^3 + 116*x^4 - 40*x^5 - 2*x^6))/x))/(E^(2*x)*(2 + x)^3),x]

[Out]

-192/E^(2*x) + 672/E^x + (80*x)/E^(2*x) - (336*x)/E^x - (32*x^2)/E^(2*x) + (168*x^2)/E^x + 529*x^3 + (12*x^3)/
E^(2*x) - (84*x^3)/E^x + 46*x^4 - (4*x^4)/E^(2*x) + (42*x^4)/E^x + x^5 + x^5/E^(2*x) + (2*x^5)/E^x - 128/(E^(2
*x)*(2 + x)^2) + 448/(E^(2*x)*(2 + x)) - 1344/(E^x*(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 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 6688

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int x^2 \left (1587+184 x+5 x^2+\frac {e^{-2 x} x^4 \left (14+x-2 x^2\right )}{(2+x)^3}-\frac {2 e^{-x} x^2 \left (-230-58 x+20 x^2+x^3\right )}{(2+x)^2}\right ) \, dx\\ &=\int \left (-\frac {e^{-2 x} x^6 \left (-14-x+2 x^2\right )}{(2+x)^3}+x^2 \left (1587+184 x+5 x^2\right )-\frac {2 e^{-x} x^4 \left (-230-58 x+20 x^2+x^3\right )}{(2+x)^2}\right ) \, dx\\ &=-\left (2 \int \frac {e^{-x} x^4 \left (-230-58 x+20 x^2+x^3\right )}{(2+x)^2} \, dx\right )-\int \frac {e^{-2 x} x^6 \left (-14-x+2 x^2\right )}{(2+x)^3} \, dx+\int x^2 \left (1587+184 x+5 x^2\right ) \, dx\\ &=-\left (2 \int \left (504 e^{-x}-336 e^{-x} x+210 e^{-x} x^2-126 e^{-x} x^3+16 e^{-x} x^4+e^{-x} x^5-\frac {672 e^{-x}}{(2+x)^2}-\frac {672 e^{-x}}{2+x}\right ) \, dx\right )+\int \left (1587 x^2+184 x^3+5 x^4\right ) \, dx-\int \left (-464 e^{-2 x}+224 e^{-2 x} x-100 e^{-2 x} x^2+40 e^{-2 x} x^3-13 e^{-2 x} x^4+2 e^{-2 x} x^5-\frac {256 e^{-2 x}}{(2+x)^3}+\frac {192 e^{-2 x}}{(2+x)^2}+\frac {896 e^{-2 x}}{2+x}\right ) \, dx\\ &=529 x^3+46 x^4+x^5-2 \int e^{-2 x} x^5 \, dx-2 \int e^{-x} x^5 \, dx+13 \int e^{-2 x} x^4 \, dx-32 \int e^{-x} x^4 \, dx-40 \int e^{-2 x} x^3 \, dx+100 \int e^{-2 x} x^2 \, dx-192 \int \frac {e^{-2 x}}{(2+x)^2} \, dx-224 \int e^{-2 x} x \, dx+252 \int e^{-x} x^3 \, dx+256 \int \frac {e^{-2 x}}{(2+x)^3} \, dx-420 \int e^{-x} x^2 \, dx+464 \int e^{-2 x} \, dx+672 \int e^{-x} x \, dx-896 \int \frac {e^{-2 x}}{2+x} \, dx-1008 \int e^{-x} \, dx+1344 \int \frac {e^{-x}}{(2+x)^2} \, dx+1344 \int \frac {e^{-x}}{2+x} \, dx\\ &=-232 e^{-2 x}+1008 e^{-x}+112 e^{-2 x} x-672 e^{-x} x-50 e^{-2 x} x^2+420 e^{-x} x^2+529 x^3+20 e^{-2 x} x^3-252 e^{-x} x^3+46 x^4-\frac {13}{2} e^{-2 x} x^4+32 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {192 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}+1344 e^2 \text {Ei}(-2-x)-896 e^4 \text {Ei}(-2 (2+x))-5 \int e^{-2 x} x^4 \, dx-10 \int e^{-x} x^4 \, dx+26 \int e^{-2 x} x^3 \, dx-60 \int e^{-2 x} x^2 \, dx+100 \int e^{-2 x} x \, dx-112 \int e^{-2 x} \, dx-128 \int e^{-x} x^3 \, dx-256 \int \frac {e^{-2 x}}{(2+x)^2} \, dx+384 \int \frac {e^{-2 x}}{2+x} \, dx+672 \int e^{-x} \, dx+756 \int e^{-x} x^2 \, dx-840 \int e^{-x} x \, dx-1344 \int \frac {e^{-x}}{2+x} \, dx\\ &=-176 e^{-2 x}+336 e^{-x}+62 e^{-2 x} x+168 e^{-x} x-20 e^{-2 x} x^2-336 e^{-x} x^2+529 x^3+7 e^{-2 x} x^3-124 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}-512 e^4 \text {Ei}(-2 (2+x))-10 \int e^{-2 x} x^3 \, dx+39 \int e^{-2 x} x^2 \, dx-40 \int e^{-x} x^3 \, dx+50 \int e^{-2 x} \, dx-60 \int e^{-2 x} x \, dx-384 \int e^{-x} x^2 \, dx+512 \int \frac {e^{-2 x}}{2+x} \, dx-840 \int e^{-x} \, dx+1512 \int e^{-x} x \, dx\\ &=-201 e^{-2 x}+1176 e^{-x}+92 e^{-2 x} x-1344 e^{-x} x-\frac {79}{2} e^{-2 x} x^2+48 e^{-x} x^2+529 x^3+12 e^{-2 x} x^3-84 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}-15 \int e^{-2 x} x^2 \, dx-30 \int e^{-2 x} \, dx+39 \int e^{-2 x} x \, dx-120 \int e^{-x} x^2 \, dx-768 \int e^{-x} x \, dx+1512 \int e^{-x} \, dx\\ &=-186 e^{-2 x}-336 e^{-x}+\frac {145}{2} e^{-2 x} x-576 e^{-x} x-32 e^{-2 x} x^2+168 e^{-x} x^2+529 x^3+12 e^{-2 x} x^3-84 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}-15 \int e^{-2 x} x \, dx+\frac {39}{2} \int e^{-2 x} \, dx-240 \int e^{-x} x \, dx-768 \int e^{-x} \, dx\\ &=-\frac {783}{4} e^{-2 x}+432 e^{-x}+80 e^{-2 x} x-336 e^{-x} x-32 e^{-2 x} x^2+168 e^{-x} x^2+529 x^3+12 e^{-2 x} x^3-84 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}-\frac {15}{2} \int e^{-2 x} \, dx-240 \int e^{-x} \, dx\\ &=-192 e^{-2 x}+672 e^{-x}+80 e^{-2 x} x-336 e^{-x} x-32 e^{-2 x} x^2+168 e^{-x} x^2+529 x^3+12 e^{-2 x} x^3-84 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.34, size = 60, normalized size = 2.31 \begin {gather*} \frac {e^{-2 x} \left (x^7+2 e^x x^5 \left (46+25 x+x^2\right )+e^{2 x} (2+x)^3 \left (1764-882 x+441 x^2+44 x^3+x^4\right )\right )}{(2+x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(14*x^4 + x^5 - 2*x^6 + (E^(2*x)*(2 + x)^2*(3174*x^2 + 1955*x^3 + 194*x^4 + 5*x^5))/x^2 + (E^x*
(2 + x)*(460*x^3 + 116*x^4 - 40*x^5 - 2*x^6))/x))/(E^(2*x)*(2 + x)^3),x]

[Out]

(x^7 + 2*E^x*x^5*(46 + 25*x + x^2) + E^(2*x)*(2 + x)^3*(1764 - 882*x + 441*x^2 + 44*x^3 + x^4))/(E^(2*x)*(2 +
x)^2)

________________________________________________________________________________________

fricas [B]  time = 0.77, size = 72, normalized size = 2.77 \begin {gather*} {\left (x^{5} + {\left (x^{5} + 46 \, x^{4} + 529 \, x^{3}\right )} e^{\left (2 \, x + 2 \, \log \left (\frac {x + 2}{x}\right )\right )} + 2 \, {\left (x^{5} + 23 \, x^{4}\right )} e^{\left (x + \log \left (\frac {x + 2}{x}\right )\right )}\right )} e^{\left (-2 \, x - 2 \, \log \left (\frac {x + 2}{x}\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x^5+194*x^4+1955*x^3+3174*x^2)*exp(log((2+x)/x)+x)^2+(-2*x^6-40*x^5+116*x^4+460*x^3)*exp(log((2+
x)/x)+x)-2*x^6+x^5+14*x^4)/(2+x)/exp(log((2+x)/x)+x)^2,x, algorithm="fricas")

[Out]

(x^5 + (x^5 + 46*x^4 + 529*x^3)*e^(2*x + 2*log((x + 2)/x)) + 2*(x^5 + 23*x^4)*e^(x + log((x + 2)/x)))*e^(-2*x
- 2*log((x + 2)/x))

________________________________________________________________________________________

giac [B]  time = 0.28, size = 70, normalized size = 2.69 \begin {gather*} \frac {2 \, x^{7} e^{\left (-x\right )} + x^{7} e^{\left (-2 \, x\right )} + x^{7} + 50 \, x^{6} e^{\left (-x\right )} + 50 \, x^{6} + 92 \, x^{5} e^{\left (-x\right )} + 717 \, x^{5} + 2300 \, x^{4} + 2116 \, x^{3}}{x^{2} + 4 \, x + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x^5+194*x^4+1955*x^3+3174*x^2)*exp(log((2+x)/x)+x)^2+(-2*x^6-40*x^5+116*x^4+460*x^3)*exp(log((2+
x)/x)+x)-2*x^6+x^5+14*x^4)/(2+x)/exp(log((2+x)/x)+x)^2,x, algorithm="giac")

[Out]

(2*x^7*e^(-x) + x^7*e^(-2*x) + x^7 + 50*x^6*e^(-x) + 50*x^6 + 92*x^5*e^(-x) + 717*x^5 + 2300*x^4 + 2116*x^3)/(
x^2 + 4*x + 4)

________________________________________________________________________________________

maple [A]  time = 0.36, size = 50, normalized size = 1.92




method result size



risch \(x^{5}+46 x^{4}+529 x^{3}+\frac {\left (2 x^{5}+46 x^{4}\right ) x \,{\mathrm e}^{-x}}{2+x}+\frac {x^{7} {\mathrm e}^{-2 x}}{\left (2+x \right )^{2}}\) \(50\)
default \(x^{5}+46 x^{4}+529 x^{3}+168 x^{2} {\mathrm e}^{-x}-336 x \,{\mathrm e}^{-x}+672 \,{\mathrm e}^{-x}+\frac {1344 \,{\mathrm e}^{-x}}{-x -2}-84 \,{\mathrm e}^{-x} x^{3}+42 \,{\mathrm e}^{-x} x^{4}+2 \,{\mathrm e}^{-x} x^{5}-4 \,{\mathrm e}^{-2 x} x^{4}+12 \,{\mathrm e}^{-2 x} x^{3}-32 x^{2} {\mathrm e}^{-2 x}+80 \,{\mathrm e}^{-2 x} x -192 \,{\mathrm e}^{-2 x}-\frac {896 \,{\mathrm e}^{-2 x}}{-2 x -4}-\frac {512 \,{\mathrm e}^{-2 x}}{\left (-2 x -4\right )^{2}}+{\mathrm e}^{-2 x} x^{5}\) \(151\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((5*x^5+194*x^4+1955*x^3+3174*x^2)*exp(ln((2+x)/x)+x)^2+(-2*x^6-40*x^5+116*x^4+460*x^3)*exp(ln((2+x)/x)+x)
-2*x^6+x^5+14*x^4)/(2+x)/exp(ln((2+x)/x)+x)^2,x,method=_RETURNVERBOSE)

[Out]

x^5+46*x^4+529*x^3+(2*x^5+46*x^4)*x/(2+x)*exp(-x)+x^7/(2+x)^2*exp(-2*x)

________________________________________________________________________________________

maxima [B]  time = 0.47, size = 63, normalized size = 2.42 \begin {gather*} \frac {x^{7} e^{\left (-2 \, x\right )} + x^{7} + 50 \, x^{6} + 717 \, x^{5} + 2300 \, x^{4} + 2116 \, x^{3} + 2 \, {\left (x^{7} + 25 \, x^{6} + 46 \, x^{5}\right )} e^{\left (-x\right )}}{x^{2} + 4 \, x + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x^5+194*x^4+1955*x^3+3174*x^2)*exp(log((2+x)/x)+x)^2+(-2*x^6-40*x^5+116*x^4+460*x^3)*exp(log((2+
x)/x)+x)-2*x^6+x^5+14*x^4)/(2+x)/exp(log((2+x)/x)+x)^2,x, algorithm="maxima")

[Out]

(x^7*e^(-2*x) + x^7 + 50*x^6 + 717*x^5 + 2300*x^4 + 2116*x^3 + 2*(x^7 + 25*x^6 + 46*x^5)*e^(-x))/(x^2 + 4*x +
4)

________________________________________________________________________________________

mupad [B]  time = 1.30, size = 60, normalized size = 2.31 \begin {gather*} 529\,x^3+46\,x^4+x^5+\frac {46\,x^5\,{\mathrm {e}}^{-x}}{x+2}+\frac {2\,x^6\,{\mathrm {e}}^{-x}}{x+2}+\frac {x^7\,{\mathrm {e}}^{-2\,x}}{x^2+4\,x+4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(- 2*x - 2*log((x + 2)/x))*(exp(2*x + 2*log((x + 2)/x))*(3174*x^2 + 1955*x^3 + 194*x^4 + 5*x^5) + exp(
x + log((x + 2)/x))*(460*x^3 + 116*x^4 - 40*x^5 - 2*x^6) + 14*x^4 + x^5 - 2*x^6))/(x + 2),x)

[Out]

529*x^3 + 46*x^4 + x^5 + (46*x^5*exp(-x))/(x + 2) + (2*x^6*exp(-x))/(x + 2) + (x^7*exp(-2*x))/(4*x + x^2 + 4)

________________________________________________________________________________________

sympy [B]  time = 0.23, size = 63, normalized size = 2.42 \begin {gather*} x^{5} + 46 x^{4} + 529 x^{3} + \frac {\left (x^{8} + 2 x^{7}\right ) e^{- 2 x} + \left (2 x^{8} + 54 x^{7} + 192 x^{6} + 184 x^{5}\right ) e^{- x}}{x^{3} + 6 x^{2} + 12 x + 8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x**5+194*x**4+1955*x**3+3174*x**2)*exp(ln((2+x)/x)+x)**2+(-2*x**6-40*x**5+116*x**4+460*x**3)*exp
(ln((2+x)/x)+x)-2*x**6+x**5+14*x**4)/(2+x)/exp(ln((2+x)/x)+x)**2,x)

[Out]

x**5 + 46*x**4 + 529*x**3 + ((x**8 + 2*x**7)*exp(-2*x) + (2*x**8 + 54*x**7 + 192*x**6 + 184*x**5)*exp(-x))/(x*
*3 + 6*x**2 + 12*x + 8)

________________________________________________________________________________________