3.46.88 \(\int \frac {4-8 e^3+4 e^{3+x} x}{e^3 (1+2 x+x^2)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 25, normalized size of antiderivative = 1.19, number of steps used = 7, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {12, 27, 6741, 6742, 2197} \begin {gather*} \frac {4 e^x}{x+1}+\frac {4 \left (2-\frac {1}{e^3}\right )}{x+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(4 - 8*E^3 + 4*E^(3 + x)*x)/(E^3*(1 + 2*x + x^2)),x]

[Out]

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

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 2197

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[(g*u^(m + 1)*F^(c*v))/(b*c
*e*Log[F]), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

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} &=\frac {\int \frac {4-8 e^3+4 e^{3+x} x}{1+2 x+x^2} \, dx}{e^3}\\ &=\frac {\int \frac {4-8 e^3+4 e^{3+x} x}{(1+x)^2} \, dx}{e^3}\\ &=\frac {\int \frac {4 \left (1-2 e^3+e^{3+x} x\right )}{(1+x)^2} \, dx}{e^3}\\ &=\frac {4 \int \frac {1-2 e^3+e^{3+x} x}{(1+x)^2} \, dx}{e^3}\\ &=\frac {4 \int \left (\frac {1-2 e^3}{(1+x)^2}+\frac {e^{3+x} x}{(1+x)^2}\right ) \, dx}{e^3}\\ &=\frac {4 \left (2-\frac {1}{e^3}\right )}{1+x}+\frac {4 \int \frac {e^{3+x} x}{(1+x)^2} \, dx}{e^3}\\ &=\frac {4 \left (2-\frac {1}{e^3}\right )}{1+x}+\frac {4 e^x}{1+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 22, normalized size = 1.05 \begin {gather*} \frac {4 \left (-1+2 e^3+e^{3+x}\right )}{e^3 (1+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(4 - 8*E^3 + 4*E^(3 + x)*x)/(E^3*(1 + 2*x + x^2)),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 19, normalized size = 0.90 \begin {gather*} \frac {4 \, {\left (2 \, e^{3} + e^{\left (x + 3\right )} - 1\right )} e^{\left (-3\right )}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 19, normalized size = 0.90 \begin {gather*} \frac {4 \, {\left (2 \, e^{3} + e^{\left (x + 3\right )} - 1\right )} e^{\left (-3\right )}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.18, size = 25, normalized size = 1.19




method result size



norman \(\frac {-4 \left (2 \,{\mathrm e}^{3}-1\right ) {\mathrm e}^{-3} x +4 \,{\mathrm e}^{x}}{x +1}\) \(25\)
risch \(\frac {8 \,{\mathrm e}^{-3} {\mathrm e}^{3}}{x +1}-\frac {4 \,{\mathrm e}^{-3}}{x +1}+\frac {4 \,{\mathrm e}^{x}}{x +1}\) \(31\)
default \(4 \,{\mathrm e}^{-3} \left (-\frac {1}{x +1}+\frac {{\mathrm e}^{3} {\mathrm e}^{x}}{x +1}+\frac {2 \,{\mathrm e}^{3}}{x +1}\right )\) \(34\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 31, normalized size = 1.48 \begin {gather*} 4 \, {\left (\frac {2 \, e^{3}}{x + 1} + \frac {e^{\left (x + 3\right )}}{x + 1} - \frac {1}{x + 1}\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(-3)*(4*x*exp(3)*exp(x) - 8*exp(3) + 4))/(2*x + x^2 + 1),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 22, normalized size = 1.05 \begin {gather*} - \frac {4 - 8 e^{3}}{x e^{3} + e^{3}} + \frac {4 e^{x}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x*exp(3)*exp(x)-8*exp(3)+4)/(x**2+2*x+1)/exp(3),x)

[Out]

-(4 - 8*exp(3))/(x*exp(3) + exp(3)) + 4*exp(x)/(x + 1)

________________________________________________________________________________________