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

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

________________________________________________________________________________________

Rubi [B]  time = 2.14, antiderivative size = 157, normalized size of antiderivative = 4.91, number of steps used = 21, number of rules used = 8, integrand size = 73, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.110, Rules used = {12, 6742, 2199, 2176, 2194, 2178, 2196, 2554} \begin {gather*} -\frac {1}{4} e^{3-x} x^2+\frac {1}{4} e^{-x} x^2 \log (x)-\frac {1}{2} e^{3-x} x+\frac {e^{-x} x}{4}-\frac {1}{4} \left (1-3 e^3\right ) e^{-x} x-\frac {e^{3-x}}{2}-\frac {1}{4} \left (1-3 e^3\right ) e^{-x}-\frac {1}{4} e^{-x} x \log (x)-\frac {1}{4} e^{-x} \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)-3 \log (x)+\frac {1}{4} e^{-x} \left (1-e^3 (13+\log (3))\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$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 \frac {e^{-x} \left (12-12 e^x-x+x^2+e^3 \left (13 x-3 x^2+x^3\right )+\left (1+e^3 x\right ) \log (3)+\left (-13 x+3 x^2-x^3-x \log (3)\right ) \log (x)\right )}{x} \, dx\\ &=\frac {1}{4} \int \left (-\frac {12}{x}+\frac {e^{-x} \left (\left (1-3 e^3\right ) x^2+e^3 x^3+12 \left (1+\frac {\log (3)}{12}\right )-x \left (1-e^3 (13+\log (3))\right )+3 x^2 \log (x)-x^3 \log (x)-13 x \left (1+\frac {\log (3)}{13}\right ) \log (x)\right )}{x}\right ) \, dx\\ &=-3 \log (x)+\frac {1}{4} \int \frac {e^{-x} \left (\left (1-3 e^3\right ) x^2+e^3 x^3+12 \left (1+\frac {\log (3)}{12}\right )-x \left (1-e^3 (13+\log (3))\right )+3 x^2 \log (x)-x^3 \log (x)-13 x \left (1+\frac {\log (3)}{13}\right ) \log (x)\right )}{x} \, dx\\ &=-3 \log (x)+\frac {1}{4} \int \left (\frac {e^{-x} \left (12+\left (1-3 e^3\right ) x^2+e^3 x^3+\log (3)-x \left (1-e^3 (13+\log (3))\right )\right )}{x}-e^{-x} \left (13-3 x+x^2+\log (3)\right ) \log (x)\right ) \, dx\\ &=-3 \log (x)+\frac {1}{4} \int \frac {e^{-x} \left (12+\left (1-3 e^3\right ) x^2+e^3 x^3+\log (3)-x \left (1-e^3 (13+\log (3))\right )\right )}{x} \, dx-\frac {1}{4} \int e^{-x} \left (13-3 x+x^2+\log (3)\right ) \log (x) \, dx\\ &=-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)+\frac {1}{4} \int \frac {e^{-x} \left (-12+x-x^2-\log (3)\right )}{x} \, dx+\frac {1}{4} \int \left (e^{-x} \left (1-3 e^3\right ) x+e^{3-x} x^2+\frac {e^{-x} (12+\log (3))}{x}+e^{-x} \left (-1+e^3 (13+\log (3))\right )\right ) \, dx\\ &=-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)+\frac {1}{4} \int e^{3-x} x^2 \, dx+\frac {1}{4} \int \left (e^{-x}-e^{-x} x+\frac {e^{-x} (-12-\log (3))}{x}\right ) \, dx+\frac {1}{4} \left (1-3 e^3\right ) \int e^{-x} x \, dx+\frac {1}{4} (12+\log (3)) \int \frac {e^{-x}}{x} \, dx+\frac {1}{4} \left (-1+e^3 (13+\log (3))\right ) \int e^{-x} \, dx\\ &=-\frac {1}{4} e^{-x} \left (1-3 e^3\right ) x-\frac {1}{4} e^{3-x} x^2+\frac {1}{4} \text {Ei}(-x) (12+\log (3))+\frac {1}{4} e^{-x} \left (1-e^3 (13+\log (3))\right )-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)+\frac {1}{4} \int e^{-x} \, dx-\frac {1}{4} \int e^{-x} x \, dx+\frac {1}{2} \int e^{3-x} x \, dx+\frac {1}{4} \left (1-3 e^3\right ) \int e^{-x} \, dx+\frac {1}{4} (-12-\log (3)) \int \frac {e^{-x}}{x} \, dx\\ &=-\frac {e^{-x}}{4}-\frac {1}{4} e^{-x} \left (1-3 e^3\right )-\frac {1}{2} e^{3-x} x+\frac {e^{-x} x}{4}-\frac {1}{4} e^{-x} \left (1-3 e^3\right ) x-\frac {1}{4} e^{3-x} x^2+\frac {1}{4} e^{-x} \left (1-e^3 (13+\log (3))\right )-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)-\frac {1}{4} \int e^{-x} \, dx+\frac {1}{2} \int e^{3-x} \, dx\\ &=-\frac {e^{3-x}}{2}-\frac {1}{4} e^{-x} \left (1-3 e^3\right )-\frac {1}{2} e^{3-x} x+\frac {e^{-x} x}{4}-\frac {1}{4} e^{-x} \left (1-3 e^3\right ) x-\frac {1}{4} e^{3-x} x^2+\frac {1}{4} e^{-x} \left (1-e^3 (13+\log (3))\right )-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(12 - 12*E^x - x + x^2 + E^3*(13*x - 3*x^2 + x^3) + (1 + E^3*x)*Log[3] + (-13*x + 3*x^2 - x^3 - x*Lo
g[3])*Log[x])/(4*E^x*x),x]

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 52, normalized size = 1.62




method result size



default \(\frac {\left (x \,{\mathrm e}^{3}+x^{2} \ln \relax (x )+\left (\ln \relax (3)+12\right ) \ln \relax (x )-x \ln \relax (x )-x^{2} {\mathrm e}^{3}-12 \,{\mathrm e}^{3}-{\mathrm e}^{3} \ln \relax (3)\right ) {\mathrm e}^{-x}}{4}-3 \ln \relax (x )\) \(52\)
risch \(\frac {\left (x^{2}+\ln \relax (3)-x +12\right ) {\mathrm e}^{-x} \ln \relax (x )}{4}-\frac {\left (x^{2} {\mathrm e}^{3}+12 \,{\mathrm e}^{x} \ln \relax (x )+{\mathrm e}^{3} \ln \relax (3)-x \,{\mathrm e}^{3}+12 \,{\mathrm e}^{3}\right ) {\mathrm e}^{-x}}{4}\) \(53\)
norman \(\left (\left (\frac {\ln \relax (3)}{4}+3\right ) \ln \relax (x )-3 \,{\mathrm e}^{x} \ln \relax (x )+\frac {x \,{\mathrm e}^{3}}{4}-\frac {x \ln \relax (x )}{4}-\frac {x^{2} {\mathrm e}^{3}}{4}+\frac {x^{2} \ln \relax (x )}{4}-3 \,{\mathrm e}^{3}-\frac {{\mathrm e}^{3} \ln \relax (3)}{4}\right ) {\mathrm e}^{-x}\) \(56\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {1}{4} \, {\left (x^{2} - x - 1\right )} e^{\left (-x\right )} \log \relax (x) + \frac {1}{4} \, e^{\left (-x\right )} \log \relax (3) \log \relax (x) - \frac {1}{4} \, {\left (x^{2} e^{3} + 2 \, x e^{3} + 2 \, e^{3}\right )} e^{\left (-x\right )} + \frac {3}{4} \, {\left (x e^{3} + e^{3}\right )} e^{\left (-x\right )} - \frac {1}{4} \, {\left (x + 1\right )} e^{\left (-x\right )} - \frac {1}{4} \, e^{\left (-x + 3\right )} \log \relax (3) + \frac {13}{4} \, e^{\left (-x\right )} \log \relax (x) - \frac {1}{4} \, {\rm Ei}\left (-x\right ) + \frac {1}{4} \, e^{\left (-x\right )} - \frac {13}{4} \, e^{\left (-x + 3\right )} - \frac {1}{4} \, \int \frac {{\left (x^{2} - x - 1\right )} e^{\left (-x\right )}}{x}\,{d x} - 3 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(x^2 - x - 1)*e^(-x)*log(x) + 1/4*e^(-x)*log(3)*log(x) - 1/4*(x^2*e^3 + 2*x*e^3 + 2*e^3)*e^(-x) + 3/4*(x*e
^3 + e^3)*e^(-x) - 1/4*(x + 1)*e^(-x) - 1/4*e^(-x + 3)*log(3) + 13/4*e^(-x)*log(x) - 1/4*Ei(-x) + 1/4*e^(-x) -
 13/4*e^(-x + 3) - 1/4*integrate((x^2 - x - 1)*e^(-x)/x, x) - 3*log(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.60, size = 56, normalized size = 1.75 \begin {gather*} \frac {\left (x^{2} \log {\relax (x )} - x^{2} e^{3} - x \log {\relax (x )} + x e^{3} + \log {\relax (3 )} \log {\relax (x )} + 12 \log {\relax (x )} - 12 e^{3} - e^{3} \log {\relax (3 )}\right ) e^{- x}}{4} - 3 \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________