3.88.13 \(\int (1+e^{\frac {1}{5} (1-5 x-5 \log (2))} (5-7 x+x^2)+e^x (-5-3 x+x^2)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 49, normalized size of antiderivative = 1.75, number of steps used = 17, number of rules used = 3, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {2196, 2194, 2176} \begin {gather*} -\frac {1}{2} e^{\frac {1}{5} (1-5 x)} x^2+e^x x^2+\frac {5}{2} e^{\frac {1}{5} (1-5 x)} x-5 e^x x+x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1 + E^((1 - 5*x - 5*Log[2])/5)*(5 - 7*x + x^2) + E^x*(-5 - 3*x + x^2),x]

[Out]

x + (5*E^((1 - 5*x)/5)*x)/2 - 5*E^x*x - (E^((1 - 5*x)/5)*x^2)/2 + E^x*x^2

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 27, normalized size = 0.96 \begin {gather*} x-\frac {1}{2} e^{\frac {1}{5}-x} (-5+x) x+e^x (-5+x) x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1 + E^((1 - 5*x - 5*Log[2])/5)*(5 - 7*x + x^2) + E^x*(-5 - 3*x + x^2),x]

[Out]

x - (E^(1/5 - x)*(-5 + x)*x)/2 + E^x*(-5 + x)*x

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 43, normalized size = 1.54 \begin {gather*} -{\left (x^{2} - {\left ({\left (x^{2} - 5 \, x\right )} e^{\left (2 \, x\right )} + x e^{x}\right )} e^{\left (\log \relax (2) - \frac {1}{5}\right )} - 5 \, x\right )} e^{\left (-x - \log \relax (2) + \frac {1}{5}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 31, normalized size = 1.11 \begin {gather*} {\left (x^{2} - 5 \, x\right )} e^{x} - {\left (x^{2} - 5 \, x\right )} e^{\left (-x - \log \relax (2) + \frac {1}{5}\right )} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 30, normalized size = 1.07




method result size



risch \(\left (x^{2}-5 x \right ) {\mathrm e}^{x}+\frac {\left (-x^{2}+5 x \right ) {\mathrm e}^{-x +\frac {1}{5}}}{2}+x\) \(30\)
norman \(\left ({\mathrm e}^{x} x +{\mathrm e}^{2 x} x^{2}+\frac {5 x \,{\mathrm e}^{\frac {1}{5}}}{2}-5 x \,{\mathrm e}^{2 x}-\frac {x^{2} {\mathrm e}^{\frac {1}{5}}}{2}\right ) {\mathrm e}^{-x}\) \(38\)
default \(x -\frac {23 \,{\mathrm e}^{-\ln \relax (2)-x +\frac {1}{5}} \left (-\ln \relax (2)-x +\frac {1}{5}\right )}{5}+\frac {24 \,{\mathrm e}^{-\ln \relax (2)-x +\frac {1}{5}}}{25}-{\mathrm e}^{-\ln \relax (2)-x +\frac {1}{5}} \left (-\ln \relax (2)-x +\frac {1}{5}\right )^{2}-\frac {23 \ln \relax (2) {\mathrm e}^{-\ln \relax (2)-x +\frac {1}{5}}}{5}-\ln \relax (2)^{2} {\mathrm e}^{-\ln \relax (2)-x +\frac {1}{5}}-2 \,{\mathrm e}^{-\ln \relax (2)-x +\frac {1}{5}} \left (-\ln \relax (2)-x +\frac {1}{5}\right ) \ln \relax (2)+{\mathrm e}^{x} x^{2}-5 \,{\mathrm e}^{x} x\) \(123\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2-5*x)*exp(x)+1/2*(-x^2+5*x)*exp(-x+1/5)+x

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 55, normalized size = 1.96 \begin {gather*} -\frac {1}{2} \, {\left (x^{2} e^{\frac {1}{5}} + 2 \, x e^{\frac {1}{5}} + 2 \, e^{\frac {1}{5}}\right )} e^{\left (-x\right )} + \frac {7}{2} \, {\left (x e^{\frac {1}{5}} + e^{\frac {1}{5}}\right )} e^{\left (-x\right )} + {\left (x^{2} - 5 \, x\right )} e^{x} + x - \frac {5}{2} \, e^{\left (-x + \frac {1}{5}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(x^2*e^(1/5) + 2*x*e^(1/5) + 2*e^(1/5))*e^(-x) + 7/2*(x*e^(1/5) + e^(1/5))*e^(-x) + (x^2 - 5*x)*e^x + x -
 5/2*e^(-x + 1/5)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 33, normalized size = 1.18 \begin {gather*} x+x^2\,{\mathrm {e}}^x+\frac {5\,x\,{\mathrm {e}}^{\frac {1}{5}-x}}{2}-5\,x\,{\mathrm {e}}^x-\frac {x^2\,{\mathrm {e}}^{\frac {1}{5}-x}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + x^2*exp(x) + (5*x*exp(1/5 - x))/2 - 5*x*exp(x) - (x^2*exp(1/5 - x))/2

________________________________________________________________________________________

sympy [B]  time = 0.16, size = 36, normalized size = 1.29 \begin {gather*} x + \frac {\left (2 x^{2} - 10 x\right ) e^{x}}{2} + \frac {\left (- x^{2} e^{\frac {1}{5}} + 5 x e^{\frac {1}{5}}\right ) e^{- x}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2-3*x-5)*exp(x)+(x**2-7*x+5)*exp(-ln(2)-x+1/5)+1,x)

[Out]

x + (2*x**2 - 10*x)*exp(x)/2 + (-x**2*exp(1/5) + 5*x*exp(1/5))*exp(-x)/2

________________________________________________________________________________________