\(\int \frac {1}{10} e^{-x} (-10+4 x-x^2+(-4 x+2 x^2) \log (3)) \, dx\) [6872]

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

Optimal result

Integrand size = 31, antiderivative size = 28 \[ \int \frac {1}{10} e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx=\frac {1}{5} \left (3+e^{-x} \left (4+x \left (-1+\frac {x}{2}-x \log (3)\right )\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.64, number of steps used = 16, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {12, 2227, 2225, 2207} \[ \int \frac {1}{10} e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx=\frac {1}{10} e^{-x} x^2-\frac {1}{5} e^{-x} x^2 \log (3)-\frac {e^{-x} x}{5}+\frac {4 e^{-x}}{5} \]

[In]

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

[Out]

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

Rule 2227

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

Rubi steps \begin{align*} \text {integral}& = \frac {1}{10} \int e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx \\ & = \frac {1}{10} \int \left (-10 e^{-x}+4 e^{-x} x-e^{-x} x^2+2 e^{-x} (-2+x) x \log (3)\right ) \, dx \\ & = -\left (\frac {1}{10} \int e^{-x} x^2 \, dx\right )+\frac {2}{5} \int e^{-x} x \, dx+\frac {1}{5} \log (3) \int e^{-x} (-2+x) x \, dx-\int e^{-x} \, dx \\ & = e^{-x}-\frac {2 e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2-\frac {1}{5} \int e^{-x} x \, dx+\frac {2}{5} \int e^{-x} \, dx+\frac {1}{5} \log (3) \int \left (-2 e^{-x} x+e^{-x} x^2\right ) \, dx \\ & = \frac {3 e^{-x}}{5}-\frac {e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2-\frac {1}{5} \int e^{-x} \, dx+\frac {1}{5} \log (3) \int e^{-x} x^2 \, dx-\frac {1}{5} (2 \log (3)) \int e^{-x} x \, dx \\ & = \frac {4 e^{-x}}{5}-\frac {e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2+\frac {2}{5} e^{-x} x \log (3)-\frac {1}{5} e^{-x} x^2 \log (3)-\frac {1}{5} (2 \log (3)) \int e^{-x} \, dx+\frac {1}{5} (2 \log (3)) \int e^{-x} x \, dx \\ & = \frac {4 e^{-x}}{5}-\frac {e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2+\frac {2}{5} e^{-x} \log (3)-\frac {1}{5} e^{-x} x^2 \log (3)+\frac {1}{5} (2 \log (3)) \int e^{-x} \, dx \\ & = \frac {4 e^{-x}}{5}-\frac {e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2-\frac {1}{5} e^{-x} x^2 \log (3) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.82 \[ \int \frac {1}{10} e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx=\frac {1}{10} e^{-x} \left (8-2 x-x^2 (-1+\log (9))\right ) \]

[In]

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

[Out]

(8 - 2*x - x^2*(-1 + Log[9]))/(10*E^x)

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.75

method result size
norman \(\left (\frac {4}{5}+\left (-\frac {\ln \left (3\right )}{5}+\frac {1}{10}\right ) x^{2}-\frac {x}{5}\right ) {\mathrm e}^{-x}\) \(21\)
risch \(\frac {\left (-2 x^{2} \ln \left (3\right )+x^{2}-2 x +8\right ) {\mathrm e}^{-x}}{10}\) \(22\)
gosper \(-\frac {\left (2 x^{2} \ln \left (3\right )-x^{2}+2 x -8\right ) {\mathrm e}^{-x}}{10}\) \(24\)
parallelrisch \(-\frac {\left (2 x^{2} \ln \left (3\right )-x^{2}+2 x -8\right ) {\mathrm e}^{-x}}{10}\) \(24\)
meijerg \(-1+{\mathrm e}^{-x}+\left (\frac {\ln \left (3\right )}{5}-\frac {1}{10}\right ) \left (2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\right )+\left (-\frac {2 \ln \left (3\right )}{5}+\frac {2}{5}\right ) \left (1-\frac {\left (2+2 x \right ) {\mathrm e}^{-x}}{2}\right )\) \(52\)
default \(\frac {4 \,{\mathrm e}^{-x}}{5}-\frac {x \,{\mathrm e}^{-x}}{5}+\frac {x^{2} {\mathrm e}^{-x}}{10}-\frac {2 \ln \left (3\right ) \left (-x \,{\mathrm e}^{-x}-{\mathrm e}^{-x}\right )}{5}+\frac {\ln \left (3\right ) \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )}{5}\) \(69\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.82 \[ \int \frac {1}{10} e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx=-\frac {1}{10} \, {\left (2 \, x^{2} \log \left (3\right ) - x^{2} + 2 \, x - 8\right )} e^{\left (-x\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.71 \[ \int \frac {1}{10} e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx=\frac {\left (- 2 x^{2} \log {\left (3 \right )} + x^{2} - 2 x + 8\right ) e^{- x}}{10} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (22) = 44\).

Time = 0.19 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.96 \[ \int \frac {1}{10} e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx=-\frac {1}{5} \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} \log \left (3\right ) + \frac {2}{5} \, {\left (x + 1\right )} e^{\left (-x\right )} \log \left (3\right ) + \frac {1}{10} \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} - \frac {2}{5} \, {\left (x + 1\right )} e^{\left (-x\right )} + e^{\left (-x\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.82 \[ \int \frac {1}{10} e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx=-\frac {1}{10} \, {\left (2 \, x^{2} \log \left (3\right ) - x^{2} + 2 \, x - 8\right )} e^{\left (-x\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.79 \[ \int \frac {1}{10} e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx=-\frac {{\mathrm {e}}^{-x}\,\left (2\,x+x^2\,\ln \left (9\right )-x^2-8\right )}{10} \]

[In]

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

[Out]

-(exp(-x)*(2*x + x^2*log(9) - x^2 - 8))/10