3.9.53 \(\int \frac {2-2 x-5 x^2+2 x^3+2 x^4+(x^2-x^3) \log (-4 x+4 x^2)}{-x^2+x^3} \, dx\)

Optimal. Leaf size=27 \[ \frac {2}{x}-x-x \left (-7-x+\log \left (4 \left (-x+x^2\right )\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 39, normalized size of antiderivative = 1.44, number of steps used = 8, number of rules used = 6, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {1593, 6742, 1620, 2487, 29, 8} \begin {gather*} x^2+6 x+\frac {2}{x}-\log (1-x)-\log (x)+(1-x) \log (-4 (1-x) x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2/x + 6*x + x^2 - Log[1 - x] - Log[x] + (1 - x)*Log[-4*(1 - x)*x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 29

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

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 2487

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.), x_Symbol] :> Simp[((
a + b*x)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/b, x] + (Dist[(q*r*s*(b*c - a*d))/b, Int[Log[e*(f*(a + b*x)^p
*(c + d*x)^q)^r]^(s - 1)/(c + d*x), x], x] - Dist[r*s*(p + q), Int[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1
), x], x]) /; FreeQ[{a, b, c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && NeQ[p + q, 0] && IGtQ[s, 0] &&
LtQ[s, 4]

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 {2-2 x-5 x^2+2 x^3+2 x^4+\left (x^2-x^3\right ) \log \left (-4 x+4 x^2\right )}{(-1+x) x^2} \, dx\\ &=\int \left (\frac {2-2 x-5 x^2+2 x^3+2 x^4}{(-1+x) x^2}-\log (4 (-1+x) x)\right ) \, dx\\ &=\int \frac {2-2 x-5 x^2+2 x^3+2 x^4}{(-1+x) x^2} \, dx-\int \log (4 (-1+x) x) \, dx\\ &=(1-x) \log (-4 (1-x) x)+2 \int 1 \, dx-\int \frac {1}{x} \, dx+\int \left (4+\frac {1}{1-x}-\frac {2}{x^2}+2 x\right ) \, dx\\ &=\frac {2}{x}+6 x+x^2-\log (1-x)-\log (x)+(1-x) \log (-4 (1-x) x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 22, normalized size = 0.81 \begin {gather*} \frac {2}{x}+6 x+x^2-x \log (4 (-1+x) x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2/x + 6*x + x^2 - x*Log[4*(-1 + x)*x]

________________________________________________________________________________________

fricas [A]  time = 1.02, size = 29, normalized size = 1.07 \begin {gather*} \frac {x^{3} - x^{2} \log \left (4 \, x^{2} - 4 \, x\right ) + 6 \, x^{2} + 2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.66, size = 25, normalized size = 0.93 \begin {gather*} x^{2} - x \log \left (4 \, x^{2} - 4 \, x\right ) + 6 \, x + \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.21, size = 29, normalized size = 1.07




method result size



default \(x^{2}+6 x +\frac {2}{x}-2 x \ln \relax (2)-x \ln \left (x^{2}-x \right )\) \(29\)
risch \(-x \ln \left (4 x^{2}-4 x \right )+\frac {x^{3}+6 x^{2}+2}{x}\) \(29\)
norman \(\frac {2+x^{3}+6 x^{2}-x^{2} \ln \left (4 x^{2}-4 x \right )}{x}\) \(30\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2+6*x+2/x-2*x*ln(2)-x*ln(x^2-x)

________________________________________________________________________________________

maxima [A]  time = 0.59, size = 39, normalized size = 1.44 \begin {gather*} x^{2} - 2 \, x {\left (\log \relax (2) - 1\right )} - {\left (x - 1\right )} \log \left (x - 1\right ) - x \log \relax (x) + 4 \, x + \frac {2}{x} - \log \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.74, size = 25, normalized size = 0.93 \begin {gather*} 6\,x-x\,\ln \left (4\,x^2-4\,x\right )+\frac {2}{x}+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(4*x^2 - 4*x)*(x^2 - x^3) - 2*x - 5*x^2 + 2*x^3 + 2*x^4 + 2)/(x^2 - x^3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 20, normalized size = 0.74 \begin {gather*} x^{2} - x \log {\left (4 x^{2} - 4 x \right )} + 6 x + \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x**3+x**2)*ln(4*x**2-4*x)+2*x**4+2*x**3-5*x**2-2*x+2)/(x**3-x**2),x)

[Out]

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

________________________________________________________________________________________