3.52.5 \(\int \frac {e^{-4-x} (18+6 x-15 x^2-3 x^3+(-6-6 x+9 x^2+3 x^3) \log (\frac {4+16 x+20 x^2+8 x^3+x^4}{x^2}))}{2+4 x+x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.89, antiderivative size = 64, normalized size of antiderivative = 2.21, number of steps used = 20, number of rules used = 6, integrand size = 72, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {6728, 2194, 2176, 2178, 2554, 12} \begin {gather*} -3 e^{-x-4} \log \left (\frac {\left (x^2+4 x+2\right )^2}{x^2}\right )+3 e^{-x-4} (1-x) \log \left (\frac {\left (x^2+4 x+2\right )^2}{x^2}\right )+3 e^{-x-4} x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^(-4 - x)*(18 + 6*x - 15*x^2 - 3*x^3 + (-6 - 6*x + 9*x^2 + 3*x^3)*Log[(4 + 16*x + 20*x^2 + 8*x^3 + x^4)/
x^2]))/(2 + 4*x + x^2),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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 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 2554

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[(w*D[u, x]
)/u, x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 6728

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {3 e^{-4-x} \left (-6-2 x+5 x^2+x^3\right )}{2+4 x+x^2}+3 e^{-4-x} (-1+x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )\right ) \, dx\\ &=-\left (3 \int \frac {e^{-4-x} \left (-6-2 x+5 x^2+x^3\right )}{2+4 x+x^2} \, dx\right )+3 \int e^{-4-x} (-1+x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right ) \, dx\\ &=-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-3 \int \frac {2 e^{-4-x} \left (2-x^2\right )}{2+4 x+x^2} \, dx-3 \int \left (e^{-4-x}+e^{-4-x} x-\frac {8 e^{-4-x} (1+x)}{2+4 x+x^2}\right ) \, dx\\ &=-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-3 \int e^{-4-x} \, dx-3 \int e^{-4-x} x \, dx-6 \int \frac {e^{-4-x} \left (2-x^2\right )}{2+4 x+x^2} \, dx+24 \int \frac {e^{-4-x} (1+x)}{2+4 x+x^2} \, dx\\ &=3 e^{-4-x}+3 e^{-4-x} x-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-3 \int e^{-4-x} \, dx-6 \int \left (-e^{-4-x}+\frac {4 e^{-4-x} (1+x)}{2+4 x+x^2}\right ) \, dx+24 \int \left (\frac {\left (1-\frac {1}{\sqrt {2}}\right ) e^{-4-x}}{4-2 \sqrt {2}+2 x}+\frac {\left (1+\frac {1}{\sqrt {2}}\right ) e^{-4-x}}{4+2 \sqrt {2}+2 x}\right ) \, dx\\ &=6 e^{-4-x}+3 e^{-4-x} x-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+6 \int e^{-4-x} \, dx-24 \int \frac {e^{-4-x} (1+x)}{2+4 x+x^2} \, dx+\left (12 \left (2-\sqrt {2}\right )\right ) \int \frac {e^{-4-x}}{4-2 \sqrt {2}+2 x} \, dx+\left (12 \left (2+\sqrt {2}\right )\right ) \int \frac {e^{-4-x}}{4+2 \sqrt {2}+2 x} \, dx\\ &=3 e^{-4-x} x+6 \left (2+\sqrt {2}\right ) e^{-2+\sqrt {2}} \text {Ei}\left (-2-\sqrt {2}-x\right )+6 \left (2-\sqrt {2}\right ) e^{-2-\sqrt {2}} \text {Ei}\left (-2+\sqrt {2}-x\right )-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-24 \int \left (\frac {\left (1-\frac {1}{\sqrt {2}}\right ) e^{-4-x}}{4-2 \sqrt {2}+2 x}+\frac {\left (1+\frac {1}{\sqrt {2}}\right ) e^{-4-x}}{4+2 \sqrt {2}+2 x}\right ) \, dx\\ &=3 e^{-4-x} x+6 \left (2+\sqrt {2}\right ) e^{-2+\sqrt {2}} \text {Ei}\left (-2-\sqrt {2}-x\right )+6 \left (2-\sqrt {2}\right ) e^{-2-\sqrt {2}} \text {Ei}\left (-2+\sqrt {2}-x\right )-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )-\left (12 \left (2-\sqrt {2}\right )\right ) \int \frac {e^{-4-x}}{4-2 \sqrt {2}+2 x} \, dx-\left (12 \left (2+\sqrt {2}\right )\right ) \int \frac {e^{-4-x}}{4+2 \sqrt {2}+2 x} \, dx\\ &=3 e^{-4-x} x-3 e^{-4-x} \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )+3 e^{-4-x} (1-x) \log \left (\frac {\left (2+4 x+x^2\right )^2}{x^2}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(E^(-4 - x)*(18 + 6*x - 15*x^2 - 3*x^3 + (-6 - 6*x + 9*x^2 + 3*x^3)*Log[(4 + 16*x + 20*x^2 + 8*x^3 +
 x^4)/x^2]))/(2 + 4*x + x^2),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.78, size = 42, normalized size = 1.45 \begin {gather*} -3 \, x e^{\left (-x - 4\right )} \log \left (\frac {x^{4} + 8 \, x^{3} + 20 \, x^{2} + 16 \, x + 4}{x^{2}}\right ) + 3 \, x e^{\left (-x - 4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^3+9*x^2-6*x-6)*log((x^4+8*x^3+20*x^2+16*x+4)/x^2)-3*x^3-15*x^2+6*x+18)/(x^2+4*x+2)/exp(4)/exp(
x),x, algorithm="fricas")

[Out]

-3*x*e^(-x - 4)*log((x^4 + 8*x^3 + 20*x^2 + 16*x + 4)/x^2) + 3*x*e^(-x - 4)

________________________________________________________________________________________

giac [A]  time = 0.28, size = 41, normalized size = 1.41 \begin {gather*} -3 \, {\left (x e^{\left (-x\right )} \log \left (\frac {x^{4} + 8 \, x^{3} + 20 \, x^{2} + 16 \, x + 4}{x^{2}}\right ) - x e^{\left (-x\right )}\right )} e^{\left (-4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^3+9*x^2-6*x-6)*log((x^4+8*x^3+20*x^2+16*x+4)/x^2)-3*x^3-15*x^2+6*x+18)/(x^2+4*x+2)/exp(4)/exp(
x),x, algorithm="giac")

[Out]

-3*(x*e^(-x)*log((x^4 + 8*x^3 + 20*x^2 + 16*x + 4)/x^2) - x*e^(-x))*e^(-4)

________________________________________________________________________________________

maple [A]  time = 0.40, size = 44, normalized size = 1.52




method result size



norman \(\left (3 x \,{\mathrm e}^{-4}-3 x \,{\mathrm e}^{-4} \ln \left (\frac {x^{4}+8 x^{3}+20 x^{2}+16 x +4}{x^{2}}\right )\right ) {\mathrm e}^{-x}\) \(44\)
risch \(-6 \ln \left (x^{2}+4 x +2\right ) x \,{\mathrm e}^{-x -4}+\frac {3 \left (-i \pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )+2 i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-i \pi \mathrm {csgn}\left (i x^{2}\right )^{3}+i \pi \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+4 x +2\right )^{2}}{x^{2}}\right )-i \pi \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+4 x +2\right )^{2}}{x^{2}}\right )^{2}+i \pi \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )\right )^{2} \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right )-2 i \pi \,\mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )\right ) \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right )^{2}+i \pi \mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right )^{3}-i \pi \,\mathrm {csgn}\left (i \left (x^{2}+4 x +2\right )^{2}\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+4 x +2\right )^{2}}{x^{2}}\right )^{2}+i \pi \mathrm {csgn}\left (\frac {i \left (x^{2}+4 x +2\right )^{2}}{x^{2}}\right )^{3}+4 \ln \relax (x )+2\right ) x \,{\mathrm e}^{-x -4}}{2}\) \(300\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((3*x^3+9*x^2-6*x-6)*ln((x^4+8*x^3+20*x^2+16*x+4)/x^2)-3*x^3-15*x^2+6*x+18)/(x^2+4*x+2)/exp(4)/exp(x),x,me
thod=_RETURNVERBOSE)

[Out]

(3*x/exp(4)-3*x/exp(4)*ln((x^4+8*x^3+20*x^2+16*x+4)/x^2))/exp(x)

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 34, normalized size = 1.17 \begin {gather*} -3 \, {\left (2 \, x e^{\left (-x\right )} \log \left (x^{2} + 4 \, x + 2\right ) - {\left (2 \, x \log \relax (x) + x\right )} e^{\left (-x\right )}\right )} e^{\left (-4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^3+9*x^2-6*x-6)*log((x^4+8*x^3+20*x^2+16*x+4)/x^2)-3*x^3-15*x^2+6*x+18)/(x^2+4*x+2)/exp(4)/exp(
x),x, algorithm="maxima")

[Out]

-3*(2*x*e^(-x)*log(x^2 + 4*x + 2) - (2*x*log(x) + x)*e^(-x))*e^(-4)

________________________________________________________________________________________

mupad [B]  time = 3.54, size = 34, normalized size = 1.17 \begin {gather*} -3\,x\,{\mathrm {e}}^{-x-4}\,\left (\ln \left (\frac {x^4+8\,x^3+20\,x^2+16\,x+4}{x^2}\right )-1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(-x)*exp(-4)*(log((16*x + 20*x^2 + 8*x^3 + x^4 + 4)/x^2)*(6*x - 9*x^2 - 3*x^3 + 6) - 6*x + 15*x^2 + 3
*x^3 - 18))/(4*x + x^2 + 2),x)

[Out]

-3*x*exp(- x - 4)*(log((16*x + 20*x^2 + 8*x^3 + x^4 + 4)/x^2) - 1)

________________________________________________________________________________________

sympy [A]  time = 0.71, size = 36, normalized size = 1.24 \begin {gather*} \frac {\left (- 3 x \log {\left (\frac {x^{4} + 8 x^{3} + 20 x^{2} + 16 x + 4}{x^{2}} \right )} + 3 x\right ) e^{- x}}{e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x**3+9*x**2-6*x-6)*ln((x**4+8*x**3+20*x**2+16*x+4)/x**2)-3*x**3-15*x**2+6*x+18)/(x**2+4*x+2)/exp
(4)/exp(x),x)

[Out]

(-3*x*log((x**4 + 8*x**3 + 20*x**2 + 16*x + 4)/x**2) + 3*x)*exp(-4)*exp(-x)

________________________________________________________________________________________