\(\int e^{-x} (21-9 x-4 \log (3)) \, dx\) [5128]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 29 \[ \int e^{-x} (21-9 x-4 \log (3)) \, dx=x \left (9 e^{-x}+\frac {\frac {9}{4}+4 e^{-x} (-3+\log (3))}{x}\right ) \]

[Out]

(9/exp(x)+(4*(ln(3)-3)/exp(x)+9/4)/x)*x

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2207, 2225} \[ \int e^{-x} (21-9 x-4 \log (3)) \, dx=9 e^{-x}-e^{-x} (-9 x+21-4 \log (3)) \]

[In]

Int[(21 - 9*x - 4*Log[3])/E^x,x]

[Out]

9/E^x - (21 - 9*x - 4*Log[3])/E^x

Rule 2207

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] &&  !TrueQ[$UseGamma]

Rule 2225

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]

Rubi steps \begin{align*} \text {integral}& = -e^{-x} (21-9 x-4 \log (3))-9 \int e^{-x} \, dx \\ & = 9 e^{-x}-e^{-x} (21-9 x-4 \log (3)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.45 \[ \int e^{-x} (21-9 x-4 \log (3)) \, dx=e^{-x} (-12+9 x+\log (81)) \]

[In]

Integrate[(21 - 9*x - 4*Log[3])/E^x,x]

[Out]

(-12 + 9*x + Log[81])/E^x

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.52

method result size
gosper \(\left (9 x +4 \ln \left (3\right )-12\right ) {\mathrm e}^{-x}\) \(15\)
norman \(\left (9 x +4 \ln \left (3\right )-12\right ) {\mathrm e}^{-x}\) \(15\)
risch \(\left (9 x +4 \ln \left (3\right )-12\right ) {\mathrm e}^{-x}\) \(15\)
parallelrisch \(\left (9 x +4 \ln \left (3\right )-12\right ) {\mathrm e}^{-x}\) \(15\)
default \(-12 \,{\mathrm e}^{-x}+9 x \,{\mathrm e}^{-x}+4 \,{\mathrm e}^{-x} \ln \left (3\right )\) \(23\)
meijerg \(-4 \ln \left (3\right ) \left (1-{\mathrm e}^{-x}\right )+12+\frac {9 \left (2+2 x \right ) {\mathrm e}^{-x}}{2}-21 \,{\mathrm e}^{-x}\) \(32\)

[In]

int((-4*ln(3)-9*x+21)/exp(x),x,method=_RETURNVERBOSE)

[Out]

(9*x+4*ln(3)-12)/exp(x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.48 \[ \int e^{-x} (21-9 x-4 \log (3)) \, dx={\left (9 \, x + 4 \, \log \left (3\right ) - 12\right )} e^{\left (-x\right )} \]

[In]

integrate((-4*log(3)-9*x+21)/exp(x),x, algorithm="fricas")

[Out]

(9*x + 4*log(3) - 12)*e^(-x)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.41 \[ \int e^{-x} (21-9 x-4 \log (3)) \, dx=\left (9 x - 12 + 4 \log {\left (3 \right )}\right ) e^{- x} \]

[In]

integrate((-4*ln(3)-9*x+21)/exp(x),x)

[Out]

(9*x - 12 + 4*log(3))*exp(-x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83 \[ \int e^{-x} (21-9 x-4 \log (3)) \, dx=9 \, {\left (x + 1\right )} e^{\left (-x\right )} + 4 \, e^{\left (-x\right )} \log \left (3\right ) - 21 \, e^{\left (-x\right )} \]

[In]

integrate((-4*log(3)-9*x+21)/exp(x),x, algorithm="maxima")

[Out]

9*(x + 1)*e^(-x) + 4*e^(-x)*log(3) - 21*e^(-x)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.48 \[ \int e^{-x} (21-9 x-4 \log (3)) \, dx={\left (9 \, x + 4 \, \log \left (3\right ) - 12\right )} e^{\left (-x\right )} \]

[In]

integrate((-4*log(3)-9*x+21)/exp(x),x, algorithm="giac")

[Out]

(9*x + 4*log(3) - 12)*e^(-x)

Mupad [B] (verification not implemented)

Time = 12.30 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.41 \[ \int e^{-x} (21-9 x-4 \log (3)) \, dx={\mathrm {e}}^{-x}\,\left (9\,x+\ln \left (81\right )-12\right ) \]

[In]

int(-exp(-x)*(9*x + 4*log(3) - 21),x)

[Out]

exp(-x)*(9*x + log(81) - 12)