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

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

Optimal result

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

[Out]

(-5+ln(4*x/exp(x)))/(-4+4*x)

Rubi [A] (verified)

Time = 0.13 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.60, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {1608, 27, 12, 6874, 907, 2631, 29} \[ \int \frac {-1+7 x-x^2-x \log \left (4 e^{-x} x\right )}{4 x-8 x^2+4 x^3} \, dx=\frac {5}{4 (1-x)}-\frac {\log \left (4 e^{-x} x\right )}{4 (1-x)} \]

[In]

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

[Out]

5/(4*(1 - x)) - Log[(4*x)/E^x]/(4*(1 - 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 29

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

Rule 907

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 1608

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 2631

Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1)*(Log[u]/(b*(m + 1))), x] - Dist[1/
(b*(m + 1)), Int[SimplifyIntegrand[(a + b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && Inverse
FunctionFreeQ[u, x] && NeQ[m, -1]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.10 \[ \int \frac {-1+7 x-x^2-x \log \left (4 e^{-x} x\right )}{4 x-8 x^2+4 x^3} \, dx=-\frac {5-\log \left (4 e^{-x} x\right )}{4 (-1+x)} \]

[In]

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

[Out]

-1/4*(5 - Log[(4*x)/E^x])/(-1 + x)

Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90

method result size
parallelrisch \(\frac {-5+\ln \left (4 x \,{\mathrm e}^{-x}\right )}{-4+4 x}\) \(18\)
norman \(\frac {\frac {\ln \left (4 x \,{\mathrm e}^{-x}\right )}{4}-\frac {5}{4}}{-1+x}\) \(19\)
default \(\frac {\ln \left (4 x \,{\mathrm e}^{-x}\right )}{-4+4 x}-\frac {5}{4 \left (-1+x \right )}\) \(24\)
parts \(\frac {\ln \left (4 x \,{\mathrm e}^{-x}\right )}{-4+4 x}-\frac {5}{4 \left (-1+x \right )}\) \(24\)
risch \(-\frac {\ln \left ({\mathrm e}^{x}\right )}{4 \left (-1+x \right )}+\frac {-10-i \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i {\mathrm e}^{-x}\right ) \operatorname {csgn}\left (i x \,{\mathrm e}^{-x}\right )+i \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \,{\mathrm e}^{-x}\right )^{2}+i \pi \,\operatorname {csgn}\left (i {\mathrm e}^{-x}\right ) \operatorname {csgn}\left (i x \,{\mathrm e}^{-x}\right )^{2}-i \pi \operatorname {csgn}\left (i x \,{\mathrm e}^{-x}\right )^{3}+4 \ln \left (2\right )+2 \ln \left (x \right )}{8 x -8}\) \(113\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {-1+7 x-x^2-x \log \left (4 e^{-x} x\right )}{4 x-8 x^2+4 x^3} \, dx=\frac {\log \left (4 \, x e^{\left (-x\right )}\right ) - 5}{4 \, {\left (x - 1\right )}} \]

[In]

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

[Out]

1/4*(log(4*x*e^(-x)) - 5)/(x - 1)

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \frac {-1+7 x-x^2-x \log \left (4 e^{-x} x\right )}{4 x-8 x^2+4 x^3} \, dx=\frac {\log {\left (4 x e^{- x} \right )}}{4 x - 4} - \frac {5}{4 x - 4} \]

[In]

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

[Out]

log(4*x*exp(-x))/(4*x - 4) - 5/(4*x - 4)

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

1/4*log(4*x*e^(-x))/(x - 1) - 5/4/(x - 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.05 \[ \int \frac {-1+7 x-x^2-x \log \left (4 e^{-x} x\right )}{4 x-8 x^2+4 x^3} \, dx=\frac {\log \left (2\right ) - 3}{2 \, {\left (x - 1\right )}} + \frac {\log \left (x\right )}{4 \, {\left (x - 1\right )}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 11.97 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90 \[ \int \frac {-1+7 x-x^2-x \log \left (4 e^{-x} x\right )}{4 x-8 x^2+4 x^3} \, dx=\frac {2\,\ln \left (2\right )-6\,x+\ln \left (x\right )}{4\,\left (x-1\right )} \]

[In]

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

[Out]

(2*log(2) - 6*x + log(x))/(4*(x - 1))