3.39.63 \(\int \frac {e^{-x} (768 x^2-128 x^3+52 x^4-2 x^5+e^x (-32 x-98 x^3+4 x^4)+e^x (-768+32 x+48 x^2-2 x^3) \log (\frac {1}{3} (-24+x)))}{-24 x^2+x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 2.79, antiderivative size = 59, normalized size of antiderivative = 1.84, number of steps used = 24, number of rules used = 14, integrand size = 83, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.169, Rules used = {1593, 6742, 2196, 2194, 2176, 6688, 1620, 2418, 2389, 2295, 2395, 36, 31, 29} \begin {gather*} 2 e^{-x} x^2+2 x^2+32 e^{-x}-48 \log (24-x)+2 (24-x) \log \left (\frac {x}{3}-8\right )-\frac {32 \log \left (\frac {x}{3}-8\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(768*x^2 - 128*x^3 + 52*x^4 - 2*x^5 + E^x*(-32*x - 98*x^3 + 4*x^4) + E^x*(-768 + 32*x + 48*x^2 - 2*x^3)*Lo
g[(-24 + x)/3])/(E^x*(-24*x^2 + x^3)),x]

[Out]

32/E^x + 2*x^2 + (2*x^2)/E^x - 48*Log[24 - x] + 2*(24 - x)*Log[-8 + x/3] - (32*Log[-8 + x/3])/x

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, 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

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, 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} &=\int \frac {e^{-x} \left (768 x^2-128 x^3+52 x^4-2 x^5+e^x \left (-32 x-98 x^3+4 x^4\right )+e^x \left (-768+32 x+48 x^2-2 x^3\right ) \log \left (\frac {1}{3} (-24+x)\right )\right )}{(-24+x) x^2} \, dx\\ &=\int \left (-2 e^{-x} \left (16-2 x+x^2\right )+\frac {2 \left (-16 x-49 x^3+2 x^4-384 \log \left (-8+\frac {x}{3}\right )+16 x \log \left (-8+\frac {x}{3}\right )+24 x^2 \log \left (-8+\frac {x}{3}\right )-x^3 \log \left (-8+\frac {x}{3}\right )\right )}{(-24+x) x^2}\right ) \, dx\\ &=-\left (2 \int e^{-x} \left (16-2 x+x^2\right ) \, dx\right )+2 \int \frac {-16 x-49 x^3+2 x^4-384 \log \left (-8+\frac {x}{3}\right )+16 x \log \left (-8+\frac {x}{3}\right )+24 x^2 \log \left (-8+\frac {x}{3}\right )-x^3 \log \left (-8+\frac {x}{3}\right )}{(-24+x) x^2} \, dx\\ &=-\left (2 \int \left (16 e^{-x}-2 e^{-x} x+e^{-x} x^2\right ) \, dx\right )+2 \int \frac {-x \left (-16-49 x^2+2 x^3\right )+\left (384-16 x-24 x^2+x^3\right ) \log \left (-8+\frac {x}{3}\right )}{(24-x) x^2} \, dx\\ &=-\left (2 \int e^{-x} x^2 \, dx\right )+2 \int \left (\frac {-16-49 x^2+2 x^3}{(-24+x) x}-\frac {(-4+x) (4+x) \log \left (-8+\frac {x}{3}\right )}{x^2}\right ) \, dx+4 \int e^{-x} x \, dx-32 \int e^{-x} \, dx\\ &=32 e^{-x}-4 e^{-x} x+2 e^{-x} x^2+2 \int \frac {-16-49 x^2+2 x^3}{(-24+x) x} \, dx-2 \int \frac {(-4+x) (4+x) \log \left (-8+\frac {x}{3}\right )}{x^2} \, dx+4 \int e^{-x} \, dx-4 \int e^{-x} x \, dx\\ &=28 e^{-x}+2 e^{-x} x^2+2 \int \left (-1-\frac {74}{3 (-24+x)}+\frac {2}{3 x}+2 x\right ) \, dx-2 \int \left (\log \left (-8+\frac {x}{3}\right )-\frac {16 \log \left (-8+\frac {x}{3}\right )}{x^2}\right ) \, dx-4 \int e^{-x} \, dx\\ &=32 e^{-x}-2 x+2 x^2+2 e^{-x} x^2-\frac {148}{3} \log (24-x)+\frac {4 \log (x)}{3}-2 \int \log \left (-8+\frac {x}{3}\right ) \, dx+32 \int \frac {\log \left (-8+\frac {x}{3}\right )}{x^2} \, dx\\ &=32 e^{-x}-2 x+2 x^2+2 e^{-x} x^2-\frac {148}{3} \log (24-x)-\frac {32 \log \left (-8+\frac {x}{3}\right )}{x}+\frac {4 \log (x)}{3}-6 \operatorname {Subst}\left (\int \log (x) \, dx,x,-8+\frac {x}{3}\right )+\frac {32}{3} \int \frac {1}{\left (-8+\frac {x}{3}\right ) x} \, dx\\ &=32 e^{-x}+2 x^2+2 e^{-x} x^2-\frac {148}{3} \log (24-x)+2 (24-x) \log \left (-8+\frac {x}{3}\right )-\frac {32 \log \left (-8+\frac {x}{3}\right )}{x}+\frac {4 \log (x)}{3}+\frac {4}{9} \int \frac {1}{-8+\frac {x}{3}} \, dx-\frac {4}{3} \int \frac {1}{x} \, dx\\ &=32 e^{-x}+2 x^2+2 e^{-x} x^2-48 \log (24-x)+2 (24-x) \log \left (-8+\frac {x}{3}\right )-\frac {32 \log \left (-8+\frac {x}{3}\right )}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.38, size = 51, normalized size = 1.59 \begin {gather*} 2 \left (x^2+e^{-x} \left (16+x^2\right )-24 \log (24-x)-(-24+x) \log \left (-8+\frac {x}{3}\right )-\frac {16 \log \left (-8+\frac {x}{3}\right )}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(768*x^2 - 128*x^3 + 52*x^4 - 2*x^5 + E^x*(-32*x - 98*x^3 + 4*x^4) + E^x*(-768 + 32*x + 48*x^2 - 2*x
^3)*Log[(-24 + x)/3])/(E^x*(-24*x^2 + x^3)),x]

[Out]

2*(x^2 + (16 + x^2)/E^x - 24*Log[24 - x] - (-24 + x)*Log[-8 + x/3] - (16*Log[-8 + x/3])/x)

________________________________________________________________________________________

fricas [A]  time = 0.80, size = 37, normalized size = 1.16 \begin {gather*} \frac {2 \, {\left (x^{3} e^{x} + x^{3} - {\left (x^{2} + 16\right )} e^{x} \log \left (\frac {1}{3} \, x - 8\right ) + 16 \, x\right )} e^{\left (-x\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+48*x^2+32*x-768)*exp(x)*log(1/3*x-8)+(4*x^4-98*x^3-32*x)*exp(x)-2*x^5+52*x^4-128*x^3+768*x^
2)/(x^3-24*x^2)/exp(x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 49, normalized size = 1.53 \begin {gather*} \frac {2 \, {\left (x^{3} e^{\left (-x\right )} + x^{3} + x^{2} \log \relax (3) - x^{2} \log \left (x - 24\right ) + 16 \, x e^{\left (-x\right )} + 16 \, \log \relax (3) - 16 \, \log \left (x - 24\right )\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+48*x^2+32*x-768)*exp(x)*log(1/3*x-8)+(4*x^4-98*x^3-32*x)*exp(x)-2*x^5+52*x^4-128*x^3+768*x^
2)/(x^3-24*x^2)/exp(x),x, algorithm="giac")

[Out]

2*(x^3*e^(-x) + x^3 + x^2*log(3) - x^2*log(x - 24) + 16*x*e^(-x) + 16*log(3) - 16*log(x - 24))/x

________________________________________________________________________________________

maple [A]  time = 0.10, size = 35, normalized size = 1.09




method result size



risch \(-\frac {2 \left (x^{2}+16\right ) \ln \left (\frac {x}{3}-8\right )}{x}+2 \left ({\mathrm e}^{x} x^{2}+x^{2}+16\right ) {\mathrm e}^{-x}\) \(35\)
default \(32 \,{\mathrm e}^{-x}+2 x^{2} {\mathrm e}^{-x}+2 x^{2}+\frac {4 \ln \relax (x )}{3}-\frac {148 \ln \left (x -24\right )}{3}-6 \left (\frac {x}{3}-8\right ) \ln \left (\frac {x}{3}-8\right )-48-\frac {4 \ln \left (\frac {x}{3}\right )}{3}+\frac {4 \ln \left (\frac {x}{3}-8\right ) \left (\frac {x}{3}-8\right )}{x}\) \(68\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*x^3+48*x^2+32*x-768)*exp(x)*ln(1/3*x-8)+(4*x^4-98*x^3-32*x)*exp(x)-2*x^5+52*x^4-128*x^3+768*x^2)/(x^3
-24*x^2)/exp(x),x,method=_RETURNVERBOSE)

[Out]

-2*(x^2+16)/x*ln(1/3*x-8)+2*(exp(x)*x^2+x^2+16)*exp(-x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -768 \, e^{\left (-24\right )} E_{1}\left (x - 24\right ) + \frac {2 \, {\left (x^{4} + x^{3} {\left (\log \relax (3) - 24\right )} - 24 \, x^{2} \log \relax (3) + {\left (x^{4} - 24 \, x^{3} + 16 \, x^{2}\right )} e^{\left (-x\right )} + 16 \, x \log \relax (3) - {\left (x^{3} - 24 \, x^{2} + 16 \, x - 384\right )} \log \left (x - 24\right ) - 384 \, \log \relax (3)\right )}}{x^{2} - 24 \, x} + 768 \, \int \frac {e^{\left (-x\right )}}{x^{2} - 48 \, x + 576}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+48*x^2+32*x-768)*exp(x)*log(1/3*x-8)+(4*x^4-98*x^3-32*x)*exp(x)-2*x^5+52*x^4-128*x^3+768*x^
2)/(x^3-24*x^2)/exp(x),x, algorithm="maxima")

[Out]

-768*e^(-24)*exp_integral_e(1, x - 24) + 2*(x^4 + x^3*(log(3) - 24) - 24*x^2*log(3) + (x^4 - 24*x^3 + 16*x^2)*
e^(-x) + 16*x*log(3) - (x^3 - 24*x^2 + 16*x - 384)*log(x - 24) - 384*log(3))/(x^2 - 24*x) + 768*integrate(e^(-
x)/(x^2 - 48*x + 576), x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(-x)*(768*x^2 - 128*x^3 + 52*x^4 - 2*x^5 - exp(x)*(32*x + 98*x^3 - 4*x^4) + exp(x)*log(x/3 - 8)*(32*x
 + 48*x^2 - 2*x^3 - 768)))/(24*x^2 - x^3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.38, size = 31, normalized size = 0.97 \begin {gather*} 2 x^{2} + \left (2 x^{2} + 32\right ) e^{- x} + \frac {\left (- 2 x^{2} - 32\right ) \log {\left (\frac {x}{3} - 8 \right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x**3+48*x**2+32*x-768)*exp(x)*ln(1/3*x-8)+(4*x**4-98*x**3-32*x)*exp(x)-2*x**5+52*x**4-128*x**3+
768*x**2)/(x**3-24*x**2)/exp(x),x)

[Out]

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

________________________________________________________________________________________