3.1.45 \(\int \frac {-6 x^2-2 x^3+(-12-10 x+8 x^2) \log (2-x)}{(-6 x^2+x^3+x^4) \log (2-x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.37, antiderivative size = 25, normalized size of antiderivative = 0.78, number of steps used = 8, number of rules used = 6, integrand size = 51, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {1594, 6728, 77, 2390, 2302, 29} \begin {gather*} -\frac {2}{x}+2 \log (x)-2 \log (x+3)-2 \log (\log (2-x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-6*x^2 - 2*x^3 + (-12 - 10*x + 8*x^2)*Log[2 - x])/((-6*x^2 + x^3 + x^4)*Log[2 - x]),x]

[Out]

-2/x + 2*Log[x] - 2*Log[3 + x] - 2*Log[Log[2 - x]]

Rule 29

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

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

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 2302

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

Rule 2390

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

Rule 6728

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-6 x^2-2 x^3+\left (-12-10 x+8 x^2\right ) \log (2-x)}{x^2 \left (-6+x+x^2\right ) \log (2-x)} \, dx\\ &=\int \left (\frac {2 (3+4 x)}{x^2 (3+x)}-\frac {2}{(-2+x) \log (2-x)}\right ) \, dx\\ &=2 \int \frac {3+4 x}{x^2 (3+x)} \, dx-2 \int \frac {1}{(-2+x) \log (2-x)} \, dx\\ &=2 \int \left (\frac {1}{-3-x}+\frac {1}{x^2}+\frac {1}{x}\right ) \, dx-2 \operatorname {Subst}\left (\int \frac {1}{x \log (x)} \, dx,x,2-x\right )\\ &=-\frac {2}{x}+2 \log (x)-2 \log (3+x)-2 \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,\log (2-x)\right )\\ &=-\frac {2}{x}+2 \log (x)-2 \log (3+x)-2 \log (\log (2-x))\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 21, normalized size = 0.66 \begin {gather*} -2 \left (\frac {1}{x}-\log (x)+\log (3+x)+\log (\log (2-x))\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-6*x^2 - 2*x^3 + (-12 - 10*x + 8*x^2)*Log[2 - x])/((-6*x^2 + x^3 + x^4)*Log[2 - x]),x]

[Out]

-2*(x^(-1) - Log[x] + Log[3 + x] + Log[Log[2 - x]])

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 27, normalized size = 0.84 \begin {gather*} -\frac {2 \, {\left (x \log \left (x + 3\right ) - x \log \relax (x) + x \log \left (\log \left (-x + 2\right )\right ) + 1\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^2-10*x-12)*log(2-x)-2*x^3-6*x^2)/(x^4+x^3-6*x^2)/log(2-x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.30, size = 25, normalized size = 0.78 \begin {gather*} -\frac {2}{x} - 2 \, \log \left (x + 3\right ) + 2 \, \log \relax (x) - 2 \, \log \left (\log \left (-x + 2\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^2-10*x-12)*log(2-x)-2*x^3-6*x^2)/(x^4+x^3-6*x^2)/log(2-x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 26, normalized size = 0.81




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((8*x^2-10*x-12)*ln(2-x)-2*x^3-6*x^2)/(x^4+x^3-6*x^2)/ln(2-x),x,method=_RETURNVERBOSE)

[Out]

-2/x+2*ln(x)-2*ln(ln(2-x))-2*ln(3+x)

________________________________________________________________________________________

maxima [A]  time = 0.68, size = 25, normalized size = 0.78 \begin {gather*} -\frac {2}{x} - 2 \, \log \left (x + 3\right ) + 2 \, \log \relax (x) - 2 \, \log \left (\log \left (-x + 2\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^2-10*x-12)*log(2-x)-2*x^3-6*x^2)/(x^4+x^3-6*x^2)/log(2-x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.22, size = 25, normalized size = 0.78 \begin {gather*} 2\,\ln \relax (x)-2\,\ln \left (x+3\right )-2\,\ln \left (\ln \left (2-x\right )\right )-\frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(2 - x)*(10*x - 8*x^2 + 12) + 6*x^2 + 2*x^3)/(log(2 - x)*(x^3 - 6*x^2 + x^4)),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 22, normalized size = 0.69 \begin {gather*} 2 \log {\relax (x )} - 2 \log {\left (x + 3 \right )} - 2 \log {\left (\log {\left (2 - x \right )} \right )} - \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x**2-10*x-12)*ln(2-x)-2*x**3-6*x**2)/(x**4+x**3-6*x**2)/ln(2-x),x)

[Out]

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

________________________________________________________________________________________