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

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

________________________________________________________________________________________

Rubi [A]  time = 0.44, antiderivative size = 66, normalized size of antiderivative = 2.00, number of steps used = 21, number of rules used = 6, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {12, 6742, 2194, 2176, 2196, 2554} \begin {gather*} -\frac {1}{2} e^{-x} x^3-\frac {1}{4} e^{-x} x^3 \log (3 x)-e^{-x} x^2-\frac {1}{2} e^{-x} x^2 \log (3 x)-2 e^{-x} x+3 x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

3*x - (2*x)/E^x - x^2/E^x - x^3/(2*E^x) - (x^2*Log[3*x])/(2*E^x) - (x^3*Log[3*x])/(4*E^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 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 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 2196

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

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 6742

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.85, size = 39, normalized size = 1.18 \begin {gather*} -\frac {1}{4} \, {\left (2 \, x^{3} + 4 \, x^{2} - 12 \, x e^{x} + {\left (x^{3} + 2 \, x^{2}\right )} \log \left (3 \, x\right ) + 8 \, x\right )} e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.16, size = 73, normalized size = 2.21 \begin {gather*} -\frac {1}{4} \, x^{3} e^{\left (-x\right )} \log \relax (3) - \frac {1}{4} \, x^{3} e^{\left (-x\right )} \log \relax (x) - \frac {1}{2} \, x^{3} e^{\left (-x\right )} - \frac {1}{2} \, x^{2} e^{\left (-x\right )} \log \relax (3) - \frac {1}{2} \, x^{2} e^{\left (-x\right )} \log \relax (x) - x^{2} e^{\left (-x\right )} - 2 \, x e^{\left (-x\right )} + 3 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 37, normalized size = 1.12




method result size



risch \(-\frac {x^{2} \left (2+x \right ) {\mathrm e}^{-x} \ln \left (3 x \right )}{4}-\frac {x \left (x^{2}+2 x -6 \,{\mathrm e}^{x}+4\right ) {\mathrm e}^{-x}}{2}\) \(37\)
default \(3 x +\frac {\left (-8 x -4 x^{2}-2 x^{3}-2 x^{2} \ln \left (3 x \right )-x^{3} \ln \left (3 x \right )\right ) {\mathrm e}^{-x}}{4}\) \(43\)
norman \(\left (-2 x -x^{2}-\frac {x^{3}}{2}-\frac {x^{2} \ln \left (3 x \right )}{2}-\frac {x^{3} \ln \left (3 x \right )}{4}+3 \,{\mathrm e}^{x} x \right ) {\mathrm e}^{-x}\) \(43\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.73, size = 91, normalized size = 2.76 \begin {gather*} -\frac {1}{4} \, {\left (x^{3} \log \relax (3) + x^{2} {\left (2 \, \log \relax (3) + 1\right )} + {\left (x^{3} + 2 \, x^{2}\right )} \log \relax (x) + 4 \, x + 4\right )} e^{\left (-x\right )} - \frac {1}{2} \, {\left (x^{3} + 3 \, x^{2} + 6 \, x + 6\right )} e^{\left (-x\right )} + \frac {3}{4} \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} + \frac {1}{2} \, {\left (x + 1\right )} e^{\left (-x\right )} + 3 \, x + 2 \, e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.31, size = 46, normalized size = 1.39 \begin {gather*} \frac {x\,{\mathrm {e}}^{-x}\,\left (12\,{\mathrm {e}}^x-8\right )}{4}-\frac {x^2\,{\mathrm {e}}^{-x}\,\left (2\,\ln \left (3\,x\right )+4\right )}{4}-\frac {x^3\,{\mathrm {e}}^{-x}\,\left (\ln \left (3\,x\right )+2\right )}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x*exp(-x)*(12*exp(x) - 8))/4 - (x^2*exp(-x)*(2*log(3*x) + 4))/4 - (x^3*exp(-x)*(log(3*x) + 2))/4

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________