\(\int \frac {27-54 x+(8-8 x) \log (x^2)+(-27+54 x) \log ^2(x^2)+(9-18 x) \log ^4(x^2)+(-1+2 x) \log ^6(x^2)}{27 x-27 x^2+(-27 x+27 x^2) \log ^2(x^2)+(9 x-9 x^2) \log ^4(x^2)+(-x+x^2) \log ^6(x^2)} \, dx\) [2434]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (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 = 109, antiderivative size = 21 \[ \int \frac {27-54 x+(8-8 x) \log \left (x^2\right )+(-27+54 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{27 x-27 x^2+\left (-27 x+27 x^2\right ) \log ^2\left (x^2\right )+\left (9 x-9 x^2\right ) \log ^4\left (x^2\right )+\left (-x+x^2\right ) \log ^6\left (x^2\right )} \, dx=\log ((2-2 x) x)+\frac {1}{\left (3-\log ^2\left (x^2\right )\right )^2} \]

[Out]

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

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.055, Rules used = {6820, 6874, 78, 205, 213, 267} \[ \int \frac {27-54 x+(8-8 x) \log \left (x^2\right )+(-27+54 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{27 x-27 x^2+\left (-27 x+27 x^2\right ) \log ^2\left (x^2\right )+\left (9 x-9 x^2\right ) \log ^4\left (x^2\right )+\left (-x+x^2\right ) \log ^6\left (x^2\right )} \, dx=\frac {1}{\left (3-\log ^2\left (x^2\right )\right )^2}+\log (1-x)+\log (x) \]

[In]

Int[(27 - 54*x + (8 - 8*x)*Log[x^2] + (-27 + 54*x)*Log[x^2]^2 + (9 - 18*x)*Log[x^2]^4 + (-1 + 2*x)*Log[x^2]^6)
/(27*x - 27*x^2 + (-27*x + 27*x^2)*Log[x^2]^2 + (9*x - 9*x^2)*Log[x^2]^4 + (-x + x^2)*Log[x^2]^6),x]

[Out]

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

Rule 78

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 205

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^n)^(p + 1)/(a*n*(p + 1))), x] + Dist[(n*(p
 + 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (
IntegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[
p])

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rule 6820

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {27-54 x-8 (-1+x) \log \left (x^2\right )+27 (-1+2 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{(1-x) x \left (3-\log ^2\left (x^2\right )\right )^3} \, dx \\ & = \int \left (\frac {-1+2 x}{(-1+x) x}-\frac {8 \log \left (x^2\right )}{x \left (-3+\log ^2\left (x^2\right )\right )^3}\right ) \, dx \\ & = -\left (8 \int \frac {\log \left (x^2\right )}{x \left (-3+\log ^2\left (x^2\right )\right )^3} \, dx\right )+\int \frac {-1+2 x}{(-1+x) x} \, dx \\ & = -\left (4 \text {Subst}\left (\int \frac {x}{\left (-3+x^2\right )^3} \, dx,x,\log \left (x^2\right )\right )\right )+\int \left (\frac {1}{-1+x}+\frac {1}{x}\right ) \, dx \\ & = \log (1-x)+\log (x)+\frac {1}{\left (3-\log ^2\left (x^2\right )\right )^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.24 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {27-54 x+(8-8 x) \log \left (x^2\right )+(-27+54 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{27 x-27 x^2+\left (-27 x+27 x^2\right ) \log ^2\left (x^2\right )+\left (9 x-9 x^2\right ) \log ^4\left (x^2\right )+\left (-x+x^2\right ) \log ^6\left (x^2\right )} \, dx=\log (1-x)+\log (x)+\frac {1}{\left (-3+\log ^2\left (x^2\right )\right )^2} \]

[In]

Integrate[(27 - 54*x + (8 - 8*x)*Log[x^2] + (-27 + 54*x)*Log[x^2]^2 + (9 - 18*x)*Log[x^2]^4 + (-1 + 2*x)*Log[x
^2]^6)/(27*x - 27*x^2 + (-27*x + 27*x^2)*Log[x^2]^2 + (9*x - 9*x^2)*Log[x^2]^4 + (-x + x^2)*Log[x^2]^6),x]

[Out]

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

Maple [A] (verified)

Time = 0.63 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95

method result size
risch \(\ln \left (x^{2}-x \right )+\frac {1}{{\left (\ln \left (x^{2}\right )^{2}-3\right )}^{2}}\) \(20\)
norman \(\frac {-3 \ln \left (x^{2}\right )^{3}+\frac {\ln \left (x^{2}\right )^{5}}{2}+\frac {9 \ln \left (x^{2}\right )}{2}+1}{{\left (\ln \left (x^{2}\right )^{2}-3\right )}^{2}}+\ln \left (-1+x \right )\) \(41\)
parallelrisch \(\frac {2+2 \ln \left (-1+x \right ) \ln \left (x^{2}\right )^{4}+\ln \left (x^{2}\right )^{5}-12 \ln \left (-1+x \right ) \ln \left (x^{2}\right )^{2}-6 \ln \left (x^{2}\right )^{3}+18 \ln \left (-1+x \right )+9 \ln \left (x^{2}\right )}{2 \ln \left (x^{2}\right )^{4}-12 \ln \left (x^{2}\right )^{2}+18}\) \(73\)

[In]

int(((-1+2*x)*ln(x^2)^6+(-18*x+9)*ln(x^2)^4+(54*x-27)*ln(x^2)^2+(-8*x+8)*ln(x^2)-54*x+27)/((x^2-x)*ln(x^2)^6+(
-9*x^2+9*x)*ln(x^2)^4+(27*x^2-27*x)*ln(x^2)^2-27*x^2+27*x),x,method=_RETURNVERBOSE)

[Out]

ln(x^2-x)+1/(ln(x^2)^2-3)^2

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (18) = 36\).

Time = 0.27 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.95 \[ \int \frac {27-54 x+(8-8 x) \log \left (x^2\right )+(-27+54 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{27 x-27 x^2+\left (-27 x+27 x^2\right ) \log ^2\left (x^2\right )+\left (9 x-9 x^2\right ) \log ^4\left (x^2\right )+\left (-x+x^2\right ) \log ^6\left (x^2\right )} \, dx=\frac {\log \left (x^{2} - x\right ) \log \left (x^{2}\right )^{4} - 6 \, \log \left (x^{2} - x\right ) \log \left (x^{2}\right )^{2} + 9 \, \log \left (x^{2} - x\right ) + 1}{\log \left (x^{2}\right )^{4} - 6 \, \log \left (x^{2}\right )^{2} + 9} \]

[In]

integrate(((-1+2*x)*log(x^2)^6+(-18*x+9)*log(x^2)^4+(54*x-27)*log(x^2)^2+(-8*x+8)*log(x^2)-54*x+27)/((x^2-x)*l
og(x^2)^6+(-9*x^2+9*x)*log(x^2)^4+(27*x^2-27*x)*log(x^2)^2-27*x^2+27*x),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14 \[ \int \frac {27-54 x+(8-8 x) \log \left (x^2\right )+(-27+54 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{27 x-27 x^2+\left (-27 x+27 x^2\right ) \log ^2\left (x^2\right )+\left (9 x-9 x^2\right ) \log ^4\left (x^2\right )+\left (-x+x^2\right ) \log ^6\left (x^2\right )} \, dx=\log {\left (x^{2} - x \right )} + \frac {1}{\log {\left (x^{2} \right )}^{4} - 6 \log {\left (x^{2} \right )}^{2} + 9} \]

[In]

integrate(((-1+2*x)*ln(x**2)**6+(-18*x+9)*ln(x**2)**4+(54*x-27)*ln(x**2)**2+(-8*x+8)*ln(x**2)-54*x+27)/((x**2-
x)*ln(x**2)**6+(-9*x**2+9*x)*ln(x**2)**4+(27*x**2-27*x)*ln(x**2)**2-27*x**2+27*x),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10 \[ \int \frac {27-54 x+(8-8 x) \log \left (x^2\right )+(-27+54 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{27 x-27 x^2+\left (-27 x+27 x^2\right ) \log ^2\left (x^2\right )+\left (9 x-9 x^2\right ) \log ^4\left (x^2\right )+\left (-x+x^2\right ) \log ^6\left (x^2\right )} \, dx=\frac {1}{16 \, \log \left (x\right )^{4} - 24 \, \log \left (x\right )^{2} + 9} + \log \left (x - 1\right ) + \log \left (x\right ) \]

[In]

integrate(((-1+2*x)*log(x^2)^6+(-18*x+9)*log(x^2)^4+(54*x-27)*log(x^2)^2+(-8*x+8)*log(x^2)-54*x+27)/((x^2-x)*l
og(x^2)^6+(-9*x^2+9*x)*log(x^2)^4+(27*x^2-27*x)*log(x^2)^2-27*x^2+27*x),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.41 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.19 \[ \int \frac {27-54 x+(8-8 x) \log \left (x^2\right )+(-27+54 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{27 x-27 x^2+\left (-27 x+27 x^2\right ) \log ^2\left (x^2\right )+\left (9 x-9 x^2\right ) \log ^4\left (x^2\right )+\left (-x+x^2\right ) \log ^6\left (x^2\right )} \, dx=\frac {1}{\log \left (x^{2}\right )^{4} - 6 \, \log \left (x^{2}\right )^{2} + 9} + \log \left (x - 1\right ) + \log \left (x\right ) \]

[In]

integrate(((-1+2*x)*log(x^2)^6+(-18*x+9)*log(x^2)^4+(54*x-27)*log(x^2)^2+(-8*x+8)*log(x^2)-54*x+27)/((x^2-x)*l
og(x^2)^6+(-9*x^2+9*x)*log(x^2)^4+(27*x^2-27*x)*log(x^2)^2-27*x^2+27*x),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.43 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {27-54 x+(8-8 x) \log \left (x^2\right )+(-27+54 x) \log ^2\left (x^2\right )+(9-18 x) \log ^4\left (x^2\right )+(-1+2 x) \log ^6\left (x^2\right )}{27 x-27 x^2+\left (-27 x+27 x^2\right ) \log ^2\left (x^2\right )+\left (9 x-9 x^2\right ) \log ^4\left (x^2\right )+\left (-x+x^2\right ) \log ^6\left (x^2\right )} \, dx=\ln \left (x\,\left (x-1\right )\right )+\frac {1}{{\left ({\ln \left (x^2\right )}^2-3\right )}^2} \]

[In]

int((54*x - log(x^2)^6*(2*x - 1) + log(x^2)^4*(18*x - 9) - log(x^2)^2*(54*x - 27) + log(x^2)*(8*x - 8) - 27)/(
log(x^2)^6*(x - x^2) - 27*x - log(x^2)^4*(9*x - 9*x^2) + log(x^2)^2*(27*x - 27*x^2) + 27*x^2),x)

[Out]

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