3.83.28 \(\int \frac {27-45 x+156 x^2-28 x^3+e^{5-x} (-27 x^2+17 x^3-4 x^4)+(30 x^2-5 x^3+e^{5-x} (-6 x^2+4 x^3-x^4)) \log (x)}{27 x-18 x^2+3 x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 1.93, antiderivative size = 115, normalized size of antiderivative = 3.71, number of steps used = 39, number of rules used = 18, integrand size = 94, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {1594, 27, 12, 6742, 44, 43, 2351, 2314, 31, 2316, 2315, 2295, 2199, 2194, 2177, 2178, 2176, 2554} \begin {gather*} \frac {4}{3} e^{5-x} x-\frac {23 x}{3}+4 e^{5-x}-\frac {12 e^{5-x}}{3-x}+\frac {60}{3-x}+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}-\frac {5}{3} x \log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(27 - 45*x + 156*x^2 - 28*x^3 + E^(5 - x)*(-27*x^2 + 17*x^3 - 4*x^4) + (30*x^2 - 5*x^3 + E^(5 - x)*(-6*x^2
 + 4*x^3 - x^4))*Log[x])/(27*x - 18*x^2 + 3*x^3),x]

[Out]

4*E^(5 - x) + 60/(3 - x) - (12*E^(5 - x))/(3 - x) - (23*x)/3 + (4*E^(5 - x)*x)/3 + Log[x] + E^(5 - x)*Log[x] -
 (3*E^(5 - x)*Log[x])/(3 - x) - (5*x*Log[x])/3 + (E^(5 - x)*x*Log[x])/3 + (5*x*Log[x])/(3 - 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 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 31

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

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 1594

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

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 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), 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] && LtQ[m, -1] && 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 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 2295

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

Rule 2314

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

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2316

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

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

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} &=\int \frac {27-45 x+156 x^2-28 x^3+e^{5-x} \left (-27 x^2+17 x^3-4 x^4\right )+\left (30 x^2-5 x^3+e^{5-x} \left (-6 x^2+4 x^3-x^4\right )\right ) \log (x)}{x \left (27-18 x+3 x^2\right )} \, dx\\ &=\int \frac {27-45 x+156 x^2-28 x^3+e^{5-x} \left (-27 x^2+17 x^3-4 x^4\right )+\left (30 x^2-5 x^3+e^{5-x} \left (-6 x^2+4 x^3-x^4\right )\right ) \log (x)}{3 (-3+x)^2 x} \, dx\\ &=\frac {1}{3} \int \frac {27-45 x+156 x^2-28 x^3+e^{5-x} \left (-27 x^2+17 x^3-4 x^4\right )+\left (30 x^2-5 x^3+e^{5-x} \left (-6 x^2+4 x^3-x^4\right )\right ) \log (x)}{(-3+x)^2 x} \, dx\\ &=\frac {1}{3} \int \left (-\frac {45}{(-3+x)^2}+\frac {27}{(-3+x)^2 x}+\frac {156 x}{(-3+x)^2}-\frac {28 x^2}{(-3+x)^2}+\frac {30 x \log (x)}{(-3+x)^2}-\frac {5 x^2 \log (x)}{(-3+x)^2}-\frac {e^{5-x} x \left (27-17 x+4 x^2+6 \log (x)-4 x \log (x)+x^2 \log (x)\right )}{(-3+x)^2}\right ) \, dx\\ &=-\frac {15}{3-x}-\frac {1}{3} \int \frac {e^{5-x} x \left (27-17 x+4 x^2+6 \log (x)-4 x \log (x)+x^2 \log (x)\right )}{(-3+x)^2} \, dx-\frac {5}{3} \int \frac {x^2 \log (x)}{(-3+x)^2} \, dx+9 \int \frac {1}{(-3+x)^2 x} \, dx-\frac {28}{3} \int \frac {x^2}{(-3+x)^2} \, dx+10 \int \frac {x \log (x)}{(-3+x)^2} \, dx+52 \int \frac {x}{(-3+x)^2} \, dx\\ &=-\frac {15}{3-x}-\frac {1}{3} \int \left (\frac {e^{5-x} x \left (27-17 x+4 x^2\right )}{(-3+x)^2}+\frac {e^{5-x} x \left (6-4 x+x^2\right ) \log (x)}{(-3+x)^2}\right ) \, dx-\frac {5}{3} \int \left (\log (x)+\frac {9 \log (x)}{(-3+x)^2}+\frac {6 \log (x)}{-3+x}\right ) \, dx+9 \int \left (\frac {1}{3 (-3+x)^2}-\frac {1}{9 (-3+x)}+\frac {1}{9 x}\right ) \, dx-\frac {28}{3} \int \left (1+\frac {9}{(-3+x)^2}+\frac {6}{-3+x}\right ) \, dx+10 \int \left (\frac {3 \log (x)}{(-3+x)^2}+\frac {\log (x)}{-3+x}\right ) \, dx+52 \int \left (\frac {3}{(-3+x)^2}+\frac {1}{-3+x}\right ) \, dx\\ &=\frac {60}{3-x}-\frac {28 x}{3}-5 \log (3-x)+\log (x)-\frac {1}{3} \int \frac {e^{5-x} x \left (27-17 x+4 x^2\right )}{(-3+x)^2} \, dx-\frac {1}{3} \int \frac {e^{5-x} x \left (6-4 x+x^2\right ) \log (x)}{(-3+x)^2} \, dx-\frac {5}{3} \int \log (x) \, dx-15 \int \frac {\log (x)}{(-3+x)^2} \, dx+30 \int \frac {\log (x)}{(-3+x)^2} \, dx\\ &=\frac {60}{3-x}-\frac {23 x}{3}-5 \log (3-x)+\log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}-\frac {5}{3} x \log (x)+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}+\frac {1}{3} \int \frac {e^{5-x} x}{3-x} \, dx-\frac {1}{3} \int \left (7 e^{5-x}+\frac {36 e^{5-x}}{(-3+x)^2}+\frac {33 e^{5-x}}{-3+x}+4 e^{5-x} x\right ) \, dx-5 \int \frac {1}{-3+x} \, dx+10 \int \frac {1}{-3+x} \, dx\\ &=\frac {60}{3-x}-\frac {23 x}{3}+\log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}-\frac {5}{3} x \log (x)+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}+\frac {1}{3} \int \left (-e^{5-x}-\frac {3 e^{5-x}}{-3+x}\right ) \, dx-\frac {4}{3} \int e^{5-x} x \, dx-\frac {7}{3} \int e^{5-x} \, dx-11 \int \frac {e^{5-x}}{-3+x} \, dx-12 \int \frac {e^{5-x}}{(-3+x)^2} \, dx\\ &=\frac {7 e^{5-x}}{3}+\frac {60}{3-x}-\frac {12 e^{5-x}}{3-x}-\frac {23 x}{3}+\frac {4}{3} e^{5-x} x-11 e^2 \text {Ei}(3-x)+\log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}-\frac {5}{3} x \log (x)+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}-\frac {1}{3} \int e^{5-x} \, dx-\frac {4}{3} \int e^{5-x} \, dx+12 \int \frac {e^{5-x}}{-3+x} \, dx-\int \frac {e^{5-x}}{-3+x} \, dx\\ &=4 e^{5-x}+\frac {60}{3-x}-\frac {12 e^{5-x}}{3-x}-\frac {23 x}{3}+\frac {4}{3} e^{5-x} x+\log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}-\frac {5}{3} x \log (x)+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.66, size = 62, normalized size = 2.00 \begin {gather*} \frac {e^{-x} \left (4 e^5 x^2+e^x \left (-180+69 x-23 x^2\right )+\left (e^5 x^2+e^x \left (-9+3 x-5 x^2\right )\right ) \log (x)\right )}{3 (-3+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(27 - 45*x + 156*x^2 - 28*x^3 + E^(5 - x)*(-27*x^2 + 17*x^3 - 4*x^4) + (30*x^2 - 5*x^3 + E^(5 - x)*(
-6*x^2 + 4*x^3 - x^4))*Log[x])/(27*x - 18*x^2 + 3*x^3),x]

[Out]

(4*E^5*x^2 + E^x*(-180 + 69*x - 23*x^2) + (E^5*x^2 + E^x*(-9 + 3*x - 5*x^2))*Log[x])/(3*E^x*(-3 + x))

________________________________________________________________________________________

fricas [A]  time = 0.97, size = 51, normalized size = 1.65 \begin {gather*} \frac {4 \, x^{2} e^{\left (-x + 5\right )} - 23 \, x^{2} + {\left (x^{2} e^{\left (-x + 5\right )} - 5 \, x^{2} + 3 \, x - 9\right )} \log \relax (x) + 69 \, x - 180}{3 \, {\left (x - 3\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-x^4+4*x^3-6*x^2)*exp(5-x)-5*x^3+30*x^2)*log(x)+(-4*x^4+17*x^3-27*x^2)*exp(5-x)-28*x^3+156*x^2-45
*x+27)/(3*x^3-18*x^2+27*x),x, algorithm="fricas")

[Out]

1/3*(4*x^2*e^(-x + 5) - 23*x^2 + (x^2*e^(-x + 5) - 5*x^2 + 3*x - 9)*log(x) + 69*x - 180)/(x - 3)

________________________________________________________________________________________

giac [A]  time = 0.16, size = 56, normalized size = 1.81 \begin {gather*} \frac {x^{2} e^{\left (-x + 5\right )} \log \relax (x) + 4 \, x^{2} e^{\left (-x + 5\right )} - 5 \, x^{2} \log \relax (x) - 23 \, x^{2} + 3 \, x \log \relax (x) + 69 \, x - 9 \, \log \relax (x) - 180}{3 \, {\left (x - 3\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-x^4+4*x^3-6*x^2)*exp(5-x)-5*x^3+30*x^2)*log(x)+(-4*x^4+17*x^3-27*x^2)*exp(5-x)-28*x^3+156*x^2-45
*x+27)/(3*x^3-18*x^2+27*x),x, algorithm="giac")

[Out]

1/3*(x^2*e^(-x + 5)*log(x) + 4*x^2*e^(-x + 5) - 5*x^2*log(x) - 23*x^2 + 3*x*log(x) + 69*x - 9*log(x) - 180)/(x
 - 3)

________________________________________________________________________________________

maple [A]  time = 0.12, size = 48, normalized size = 1.55




method result size



norman \(\frac {-\frac {23 x^{2}}{3}+\frac {4 x^{2} {\mathrm e}^{5-x}}{3}-\frac {5 x^{2} \ln \relax (x )}{3}+9+\frac {\ln \relax (x ) {\mathrm e}^{5-x} x^{2}}{3}}{x -3}+\ln \relax (x )\) \(48\)
default \(\frac {\ln \relax (x ) {\mathrm e}^{5-x} x^{2}+4 x^{2} {\mathrm e}^{5-x}}{3 x -9}-\frac {23 x}{3}+\ln \relax (x )-\frac {60}{x -3}-\frac {5 x \ln \relax (x )}{3}-\frac {5 \ln \relax (x ) x}{x -3}\) \(60\)
risch \(\frac {\left (x^{2} {\mathrm e}^{5-x}-5 x^{2}+15 x -45\right ) \ln \relax (x )}{3 x -9}-\frac {-4 x^{2} {\mathrm e}^{5-x}+12 x \ln \relax (x )+23 x^{2}-36 \ln \relax (x )-69 x +180}{3 \left (x -3\right )}\) \(68\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((-x^4+4*x^3-6*x^2)*exp(5-x)-5*x^3+30*x^2)*ln(x)+(-4*x^4+17*x^3-27*x^2)*exp(5-x)-28*x^3+156*x^2-45*x+27)/
(3*x^3-18*x^2+27*x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 64, normalized size = 2.06 \begin {gather*} -\frac {28}{3} \, x + \frac {5 \, x^{2} + {\left (x^{2} e^{5} \log \relax (x) + 4 \, x^{2} e^{5}\right )} e^{\left (-x\right )} - 5 \, {\left (x^{2} - 3 \, x + 9\right )} \log \relax (x) - 15 \, x}{3 \, {\left (x - 3\right )}} - \frac {60}{x - 3} - 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-x^4+4*x^3-6*x^2)*exp(5-x)-5*x^3+30*x^2)*log(x)+(-4*x^4+17*x^3-27*x^2)*exp(5-x)-28*x^3+156*x^2-45
*x+27)/(3*x^3-18*x^2+27*x),x, algorithm="maxima")

[Out]

-28/3*x + 1/3*(5*x^2 + (x^2*e^5*log(x) + 4*x^2*e^5)*e^(-x) - 5*(x^2 - 3*x + 9)*log(x) - 15*x)/(x - 3) - 60/(x
- 3) - 4*log(x)

________________________________________________________________________________________

mupad [B]  time = 5.10, size = 64, normalized size = 2.06 \begin {gather*} \ln \relax (x)-\frac {23\,x}{3}-\frac {60}{x-3}+\frac {4\,x^2\,{\mathrm {e}}^{5-x}}{3\,\left (x-3\right )}-\frac {5\,x^2\,\ln \relax (x)}{3\,\left (x-3\right )}+\frac {x^2\,{\mathrm {e}}^{5-x}\,\ln \relax (x)}{3\,\left (x-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(45*x + log(x)*(exp(5 - x)*(6*x^2 - 4*x^3 + x^4) - 30*x^2 + 5*x^3) - 156*x^2 + 28*x^3 + exp(5 - x)*(27*x^
2 - 17*x^3 + 4*x^4) - 27)/(27*x - 18*x^2 + 3*x^3),x)

[Out]

log(x) - (23*x)/3 - 60/(x - 3) + (4*x^2*exp(5 - x))/(3*(x - 3)) - (5*x^2*log(x))/(3*(x - 3)) + (x^2*exp(5 - x)
*log(x))/(3*(x - 3))

________________________________________________________________________________________

sympy [B]  time = 0.45, size = 54, normalized size = 1.74 \begin {gather*} - \frac {23 x}{3} - 4 \log {\relax (x )} + \frac {\left (x^{2} \log {\relax (x )} + 4 x^{2}\right ) e^{5 - x}}{3 x - 9} + \frac {\left (- 5 x^{2} + 15 x - 45\right ) \log {\relax (x )}}{3 x - 9} - \frac {60}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-x**4+4*x**3-6*x**2)*exp(5-x)-5*x**3+30*x**2)*ln(x)+(-4*x**4+17*x**3-27*x**2)*exp(5-x)-28*x**3+15
6*x**2-45*x+27)/(3*x**3-18*x**2+27*x),x)

[Out]

-23*x/3 - 4*log(x) + (x**2*log(x) + 4*x**2)*exp(5 - x)/(3*x - 9) + (-5*x**2 + 15*x - 45)*log(x)/(3*x - 9) - 60
/(x - 3)

________________________________________________________________________________________