3.72.26 \(\int \frac {e^{-2-x} (-6-12 x-2 x^2+e^{2+x} (x^2+3 x^3+x^4+3 x^5+3 x^6+x^7))}{x^4+3 x^5+3 x^6+x^7} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 2.00, antiderivative size = 81, normalized size of antiderivative = 2.53, number of steps used = 48, number of rules used = 5, integrand size = 68, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {6741, 6742, 2177, 2178, 1620} \begin {gather*} \frac {2 e^{-x-2}}{x^3}-\frac {4 e^{-x-2}}{x^2}+x-\frac {6 e^{-x-2}}{x+1}+\frac {1}{x+1}-\frac {2 e^{-x-2}}{(x+1)^2}+\frac {1}{(x+1)^2}+\frac {6 e^{-x-2}}{x}-\frac {1}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^(-2 - x)*(-6 - 12*x - 2*x^2 + E^(2 + x)*(x^2 + 3*x^3 + x^4 + 3*x^5 + 3*x^6 + x^7)))/(x^4 + 3*x^5 + 3*x^
6 + x^7),x]

[Out]

(2*E^(-2 - x))/x^3 - (4*E^(-2 - x))/x^2 - x^(-1) + (6*E^(-2 - x))/x + x + (1 + x)^(-2) - (2*E^(-2 - x))/(1 + x
)^2 + (1 + x)^(-1) - (6*E^(-2 - x))/(1 + x)

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

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 6741

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

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 \frac {e^{-2-x} \left (-6-12 x-2 x^2+e^{2+x} \left (x^2+3 x^3+x^4+3 x^5+3 x^6+x^7\right )\right )}{x^4 (1+x)^3} \, dx\\ &=\int \left (-\frac {6 e^{-2-x}}{x^4 (1+x)^3}-\frac {12 e^{-2-x}}{x^3 (1+x)^3}-\frac {2 e^{-2-x}}{x^2 (1+x)^3}+\frac {1+3 x+x^2+3 x^3+3 x^4+x^5}{x^2 (1+x)^3}\right ) \, dx\\ &=-\left (2 \int \frac {e^{-2-x}}{x^2 (1+x)^3} \, dx\right )-6 \int \frac {e^{-2-x}}{x^4 (1+x)^3} \, dx-12 \int \frac {e^{-2-x}}{x^3 (1+x)^3} \, dx+\int \frac {1+3 x+x^2+3 x^3+3 x^4+x^5}{x^2 (1+x)^3} \, dx\\ &=-\left (2 \int \left (\frac {e^{-2-x}}{x^2}-\frac {3 e^{-2-x}}{x}+\frac {e^{-2-x}}{(1+x)^3}+\frac {2 e^{-2-x}}{(1+x)^2}+\frac {3 e^{-2-x}}{1+x}\right ) \, dx\right )-6 \int \left (\frac {e^{-2-x}}{x^4}-\frac {3 e^{-2-x}}{x^3}+\frac {6 e^{-2-x}}{x^2}-\frac {10 e^{-2-x}}{x}+\frac {e^{-2-x}}{(1+x)^3}+\frac {4 e^{-2-x}}{(1+x)^2}+\frac {10 e^{-2-x}}{1+x}\right ) \, dx-12 \int \left (\frac {e^{-2-x}}{x^3}-\frac {3 e^{-2-x}}{x^2}+\frac {6 e^{-2-x}}{x}-\frac {e^{-2-x}}{(1+x)^3}-\frac {3 e^{-2-x}}{(1+x)^2}-\frac {6 e^{-2-x}}{1+x}\right ) \, dx+\int \left (1+\frac {1}{x^2}-\frac {2}{(1+x)^3}-\frac {1}{(1+x)^2}\right ) \, dx\\ &=-\frac {1}{x}+x+\frac {1}{(1+x)^2}+\frac {1}{1+x}-2 \int \frac {e^{-2-x}}{x^2} \, dx-2 \int \frac {e^{-2-x}}{(1+x)^3} \, dx-4 \int \frac {e^{-2-x}}{(1+x)^2} \, dx-6 \int \frac {e^{-2-x}}{x^4} \, dx+6 \int \frac {e^{-2-x}}{x} \, dx-6 \int \frac {e^{-2-x}}{(1+x)^3} \, dx-6 \int \frac {e^{-2-x}}{1+x} \, dx-12 \int \frac {e^{-2-x}}{x^3} \, dx+12 \int \frac {e^{-2-x}}{(1+x)^3} \, dx+18 \int \frac {e^{-2-x}}{x^3} \, dx-24 \int \frac {e^{-2-x}}{(1+x)^2} \, dx+36 \int \frac {e^{-2-x}}{(1+x)^2} \, dx+60 \int \frac {e^{-2-x}}{x} \, dx-60 \int \frac {e^{-2-x}}{1+x} \, dx-72 \int \frac {e^{-2-x}}{x} \, dx+72 \int \frac {e^{-2-x}}{1+x} \, dx\\ &=\frac {2 e^{-2-x}}{x^3}-\frac {3 e^{-2-x}}{x^2}-\frac {1}{x}+\frac {2 e^{-2-x}}{x}+x+\frac {1}{(1+x)^2}-\frac {2 e^{-2-x}}{(1+x)^2}+\frac {1}{1+x}-\frac {8 e^{-2-x}}{1+x}+\frac {6 \text {Ei}(-1-x)}{e}-\frac {6 \text {Ei}(-x)}{e^2}+2 \int \frac {e^{-2-x}}{x^3} \, dx+2 \int \frac {e^{-2-x}}{x} \, dx+3 \int \frac {e^{-2-x}}{(1+x)^2} \, dx+4 \int \frac {e^{-2-x}}{1+x} \, dx+6 \int \frac {e^{-2-x}}{x^2} \, dx-6 \int \frac {e^{-2-x}}{(1+x)^2} \, dx-9 \int \frac {e^{-2-x}}{x^2} \, dx+24 \int \frac {e^{-2-x}}{1+x} \, dx-36 \int \frac {e^{-2-x}}{1+x} \, dx+\int \frac {e^{-2-x}}{(1+x)^2} \, dx\\ &=\frac {2 e^{-2-x}}{x^3}-\frac {4 e^{-2-x}}{x^2}-\frac {1}{x}+\frac {5 e^{-2-x}}{x}+x+\frac {1}{(1+x)^2}-\frac {2 e^{-2-x}}{(1+x)^2}+\frac {1}{1+x}-\frac {6 e^{-2-x}}{1+x}-\frac {2 \text {Ei}(-1-x)}{e}-\frac {4 \text {Ei}(-x)}{e^2}-3 \int \frac {e^{-2-x}}{1+x} \, dx-6 \int \frac {e^{-2-x}}{x} \, dx+6 \int \frac {e^{-2-x}}{1+x} \, dx+9 \int \frac {e^{-2-x}}{x} \, dx-\int \frac {e^{-2-x}}{x^2} \, dx-\int \frac {e^{-2-x}}{1+x} \, dx\\ &=\frac {2 e^{-2-x}}{x^3}-\frac {4 e^{-2-x}}{x^2}-\frac {1}{x}+\frac {6 e^{-2-x}}{x}+x+\frac {1}{(1+x)^2}-\frac {2 e^{-2-x}}{(1+x)^2}+\frac {1}{1+x}-\frac {6 e^{-2-x}}{1+x}-\frac {\text {Ei}(-x)}{e^2}+\int \frac {e^{-2-x}}{x} \, dx\\ &=\frac {2 e^{-2-x}}{x^3}-\frac {4 e^{-2-x}}{x^2}-\frac {1}{x}+\frac {6 e^{-2-x}}{x}+x+\frac {1}{(1+x)^2}-\frac {2 e^{-2-x}}{(1+x)^2}+\frac {1}{1+x}-\frac {6 e^{-2-x}}{1+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.44, size = 35, normalized size = 1.09 \begin {gather*} \frac {2 e^{-2-x}-x^2+x^4+2 x^5+x^6}{x^3 (1+x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^(-2 - x)*(-6 - 12*x - 2*x^2 + E^(2 + x)*(x^2 + 3*x^3 + x^4 + 3*x^5 + 3*x^6 + x^7)))/(x^4 + 3*x^5
+ 3*x^6 + x^7),x]

[Out]

(2*E^(-2 - x) - x^2 + x^4 + 2*x^5 + x^6)/(x^3*(1 + x)^2)

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 45, normalized size = 1.41 \begin {gather*} \frac {{\left ({\left (x^{6} + 2 \, x^{5} + x^{4} - x^{2}\right )} e^{\left (x + 2\right )} + 2\right )} e^{\left (-x - 2\right )}}{x^{5} + 2 \, x^{4} + x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^7+3*x^6+3*x^5+x^4+3*x^3+x^2)*exp(2+x)-2*x^2-12*x-6)/(x^7+3*x^6+3*x^5+x^4)/exp(2+x),x, algorithm=
"fricas")

[Out]

((x^6 + 2*x^5 + x^4 - x^2)*e^(x + 2) + 2)*e^(-x - 2)/(x^5 + 2*x^4 + x^3)

________________________________________________________________________________________

giac [A]  time = 0.14, size = 56, normalized size = 1.75 \begin {gather*} \frac {x^{6} e^{2} + 2 \, x^{5} e^{2} + x^{4} e^{2} - x^{2} e^{2} + 2 \, e^{\left (-x\right )}}{x^{5} e^{2} + 2 \, x^{4} e^{2} + x^{3} e^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^7+3*x^6+3*x^5+x^4+3*x^3+x^2)*exp(2+x)-2*x^2-12*x-6)/(x^7+3*x^6+3*x^5+x^4)/exp(2+x),x, algorithm=
"giac")

[Out]

(x^6*e^2 + 2*x^5*e^2 + x^4*e^2 - x^2*e^2 + 2*e^(-x))/(x^5*e^2 + 2*x^4*e^2 + x^3*e^2)

________________________________________________________________________________________

maple [A]  time = 0.14, size = 34, normalized size = 1.06




method result size



risch \(x -\frac {1}{x \left (x^{2}+2 x +1\right )}+\frac {2 \,{\mathrm e}^{-x -2}}{\left (x +1\right )^{2} x^{3}}\) \(34\)
norman \(\frac {\left (2+{\mathrm e}^{2+x} x^{6}-3 \,{\mathrm e}^{2+x} x^{4}-2 \,{\mathrm e}^{2+x} x^{3}-x^{2} {\mathrm e}^{2+x}\right ) {\mathrm e}^{-x -2}}{x^{3} \left (x +1\right )^{2}}\) \(53\)
derivativedivides \(2+x +\frac {1}{\left (x +1\right )^{2}}+\frac {1}{x +1}-\frac {1}{x}-\frac {5 \,{\mathrm e}^{-x -2} \left (67 \left (2+x \right )^{4}-430 \left (2+x \right )^{3}+1000 \left (2+x \right )^{2}-1630-990 x \right )}{3 \left (\left (2+x \right )^{5}-8 \left (2+x \right )^{4}+25 \left (2+x \right )^{3}-38 \left (2+x \right )^{2}+48+28 x \right )}+\frac {2 \,{\mathrm e}^{-x -2} \left (98 \left (2+x \right )^{4}-629 \left (2+x \right )^{3}+1463 \left (2+x \right )^{2}-2384-1449 x \right )}{3 \left (\left (2+x \right )^{5}-8 \left (2+x \right )^{4}+25 \left (2+x \right )^{3}-38 \left (2+x \right )^{2}+48+28 x \right )}+\frac {{\mathrm e}^{-x -2} \left (139 \left (2+x \right )^{4}-892 \left (2+x \right )^{3}+2074 \left (2+x \right )^{2}-3376-2052 x \right )}{3 \left (2+x \right )^{5}-24 \left (2+x \right )^{4}+75 \left (2+x \right )^{3}-114 \left (2+x \right )^{2}+144+84 x}\) \(220\)
default \(2+x +\frac {1}{\left (x +1\right )^{2}}+\frac {1}{x +1}-\frac {1}{x}-\frac {5 \,{\mathrm e}^{-x -2} \left (67 \left (2+x \right )^{4}-430 \left (2+x \right )^{3}+1000 \left (2+x \right )^{2}-1630-990 x \right )}{3 \left (\left (2+x \right )^{5}-8 \left (2+x \right )^{4}+25 \left (2+x \right )^{3}-38 \left (2+x \right )^{2}+48+28 x \right )}+\frac {2 \,{\mathrm e}^{-x -2} \left (98 \left (2+x \right )^{4}-629 \left (2+x \right )^{3}+1463 \left (2+x \right )^{2}-2384-1449 x \right )}{3 \left (\left (2+x \right )^{5}-8 \left (2+x \right )^{4}+25 \left (2+x \right )^{3}-38 \left (2+x \right )^{2}+48+28 x \right )}+\frac {{\mathrm e}^{-x -2} \left (139 \left (2+x \right )^{4}-892 \left (2+x \right )^{3}+2074 \left (2+x \right )^{2}-3376-2052 x \right )}{3 \left (2+x \right )^{5}-24 \left (2+x \right )^{4}+75 \left (2+x \right )^{3}-114 \left (2+x \right )^{2}+144+84 x}\) \(220\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^7+3*x^6+3*x^5+x^4+3*x^3+x^2)*exp(2+x)-2*x^2-12*x-6)/(x^7+3*x^6+3*x^5+x^4)/exp(2+x),x,method=_RETURNVER
BOSE)

[Out]

x-1/x/(x^2+2*x+1)+2/(x+1)^2/x^3*exp(-x-2)

________________________________________________________________________________________

maxima [B]  time = 0.41, size = 134, normalized size = 4.19 \begin {gather*} x - \frac {6 \, x^{2} + 9 \, x + 2}{2 \, {\left (x^{3} + 2 \, x^{2} + x\right )}} - \frac {6 \, x + 5}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} + \frac {3 \, {\left (4 \, x + 3\right )}}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} + \frac {3 \, {\left (2 \, x + 3\right )}}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} - \frac {3 \, {\left (2 \, x + 1\right )}}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} + \frac {2 \, e^{\left (-x\right )}}{x^{5} e^{2} + 2 \, x^{4} e^{2} + x^{3} e^{2}} - \frac {1}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^7+3*x^6+3*x^5+x^4+3*x^3+x^2)*exp(2+x)-2*x^2-12*x-6)/(x^7+3*x^6+3*x^5+x^4)/exp(2+x),x, algorithm=
"maxima")

[Out]

x - 1/2*(6*x^2 + 9*x + 2)/(x^3 + 2*x^2 + x) - 1/2*(6*x + 5)/(x^2 + 2*x + 1) + 3/2*(4*x + 3)/(x^2 + 2*x + 1) +
3/2*(2*x + 3)/(x^2 + 2*x + 1) - 3/2*(2*x + 1)/(x^2 + 2*x + 1) + 2*e^(-x)/(x^5*e^2 + 2*x^4*e^2 + x^3*e^2) - 1/2
/(x^2 + 2*x + 1)

________________________________________________________________________________________

mupad [B]  time = 4.43, size = 25, normalized size = 0.78 \begin {gather*} x+\frac {2\,{\mathrm {e}}^{-x-2}-x^2}{x^3\,{\left (x+1\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(- x - 2)*(12*x - exp(x + 2)*(x^2 + 3*x^3 + x^4 + 3*x^5 + 3*x^6 + x^7) + 2*x^2 + 6))/(x^4 + 3*x^5 + 3
*x^6 + x^7),x)

[Out]

x + (2*exp(- x - 2) - x^2)/(x^3*(x + 1)^2)

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 32, normalized size = 1.00 \begin {gather*} x + \frac {2 e^{- x - 2}}{x^{5} + 2 x^{4} + x^{3}} - \frac {1}{x^{3} + 2 x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**7+3*x**6+3*x**5+x**4+3*x**3+x**2)*exp(2+x)-2*x**2-12*x-6)/(x**7+3*x**6+3*x**5+x**4)/exp(2+x),x)

[Out]

x + 2*exp(-x - 2)/(x**5 + 2*x**4 + x**3) - 1/(x**3 + 2*x**2 + x)

________________________________________________________________________________________