\(\int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx\) [4172]

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

Optimal result

Integrand size = 37, antiderivative size = 20 \[ \int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx=2 \left (1+\frac {5 \log ^2(x)}{\left (9+\frac {1}{x}\right )^2 x}\right ) \]

[Out]

2+10*ln(x)^2/(9+1/x)^2/x

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.55, number of steps used = 12, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.243, Rules used = {6820, 12, 6874, 2398, 90, 2351, 31, 2404, 2338} \[ \int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx=\frac {5 \log ^2(x)}{18}-\frac {5 (1-9 x)^2 \log ^2(x)}{18 (9 x+1)^2} \]

[In]

Int[((20 + 180*x)*Log[x] + (10 - 90*x)*Log[x]^2)/(1 + 27*x + 243*x^2 + 729*x^3),x]

[Out]

(5*Log[x]^2)/18 - (5*(1 - 9*x)^2*Log[x]^2)/(18*(1 + 9*x)^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

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

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2351

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 2398

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

Rule 2404

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

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 {10 \log (x) (2+18 x+\log (x)-9 x \log (x))}{(1+9 x)^3} \, dx \\ & = 10 \int \frac {\log (x) (2+18 x+\log (x)-9 x \log (x))}{(1+9 x)^3} \, dx \\ & = 10 \int \left (\frac {2 \log (x)}{(1+9 x)^2}-\frac {(-1+9 x) \log ^2(x)}{(1+9 x)^3}\right ) \, dx \\ & = -\left (10 \int \frac {(-1+9 x) \log ^2(x)}{(1+9 x)^3} \, dx\right )+20 \int \frac {\log (x)}{(1+9 x)^2} \, dx \\ & = \frac {20 x \log (x)}{1+9 x}-\frac {5 (1-9 x)^2 \log ^2(x)}{18 (1+9 x)^2}+\frac {5}{9} \int \frac {(-1+9 x)^2 \log (x)}{x (1+9 x)^2} \, dx-20 \int \frac {1}{1+9 x} \, dx \\ & = \frac {20 x \log (x)}{1+9 x}-\frac {5 (1-9 x)^2 \log ^2(x)}{18 (1+9 x)^2}-\frac {20}{9} \log (1+9 x)+\frac {5}{9} \int \left (\frac {\log (x)}{x}-\frac {36 \log (x)}{(1+9 x)^2}\right ) \, dx \\ & = \frac {20 x \log (x)}{1+9 x}-\frac {5 (1-9 x)^2 \log ^2(x)}{18 (1+9 x)^2}-\frac {20}{9} \log (1+9 x)+\frac {5}{9} \int \frac {\log (x)}{x} \, dx-20 \int \frac {\log (x)}{(1+9 x)^2} \, dx \\ & = \frac {5 \log ^2(x)}{18}-\frac {5 (1-9 x)^2 \log ^2(x)}{18 (1+9 x)^2}-\frac {20}{9} \log (1+9 x)+20 \int \frac {1}{1+9 x} \, dx \\ & = \frac {5 \log ^2(x)}{18}-\frac {5 (1-9 x)^2 \log ^2(x)}{18 (1+9 x)^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.70 \[ \int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx=\frac {10 x \log ^2(x)}{(1+9 x)^2} \]

[In]

Integrate[((20 + 180*x)*Log[x] + (10 - 90*x)*Log[x]^2)/(1 + 27*x + 243*x^2 + 729*x^3),x]

[Out]

(10*x*Log[x]^2)/(1 + 9*x)^2

Maple [A] (verified)

Time = 0.66 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.75

method result size
norman \(\frac {10 x \ln \left (x \right )^{2}}{\left (9 x +1\right )^{2}}\) \(15\)
risch \(\frac {10 x \ln \left (x \right )^{2}}{81 x^{2}+18 x +1}\) \(20\)
parallelrisch \(\frac {10 x \ln \left (x \right )^{2}}{81 x^{2}+18 x +1}\) \(20\)
default \(\frac {20 \ln \left (x \right ) x}{9 x +1}+\frac {-180 x^{2} \ln \left (x \right )-20 x \ln \left (x \right )+10 x \ln \left (x \right )^{2}}{\left (9 x +1\right )^{2}}\) \(42\)
parts \(\frac {20 \ln \left (x \right ) x}{9 x +1}+\frac {-180 x^{2} \ln \left (x \right )-20 x \ln \left (x \right )+10 x \ln \left (x \right )^{2}}{\left (9 x +1\right )^{2}}\) \(42\)

[In]

int(((-90*x+10)*ln(x)^2+(180*x+20)*ln(x))/(729*x^3+243*x^2+27*x+1),x,method=_RETURNVERBOSE)

[Out]

10*x*ln(x)^2/(9*x+1)^2

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx=\frac {10 \, x \log \left (x\right )^{2}}{81 \, x^{2} + 18 \, x + 1} \]

[In]

integrate(((-90*x+10)*log(x)^2+(180*x+20)*log(x))/(729*x^3+243*x^2+27*x+1),x, algorithm="fricas")

[Out]

10*x*log(x)^2/(81*x^2 + 18*x + 1)

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx=\frac {10 x \log {\left (x \right )}^{2}}{81 x^{2} + 18 x + 1} \]

[In]

integrate(((-90*x+10)*ln(x)**2+(180*x+20)*ln(x))/(729*x**3+243*x**2+27*x+1),x)

[Out]

10*x*log(x)**2/(81*x**2 + 18*x + 1)

Maxima [B] (verification not implemented)

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

Time = 0.27 (sec) , antiderivative size = 69, normalized size of antiderivative = 3.45 \[ \int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx=-\frac {10 \, {\left (18 \, x + 1\right )} \log \left (x\right )}{9 \, {\left (81 \, x^{2} + 18 \, x + 1\right )}} + \frac {10 \, {\left (9 \, x \log \left (x\right )^{2} + 2 \, {\left (9 \, x + 1\right )} \log \left (x\right )\right )}}{9 \, {\left (81 \, x^{2} + 18 \, x + 1\right )}} - \frac {10 \, \log \left (x\right )}{9 \, {\left (81 \, x^{2} + 18 \, x + 1\right )}} \]

[In]

integrate(((-90*x+10)*log(x)^2+(180*x+20)*log(x))/(729*x^3+243*x^2+27*x+1),x, algorithm="maxima")

[Out]

-10/9*(18*x + 1)*log(x)/(81*x^2 + 18*x + 1) + 10/9*(9*x*log(x)^2 + 2*(9*x + 1)*log(x))/(81*x^2 + 18*x + 1) - 1
0/9*log(x)/(81*x^2 + 18*x + 1)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx=\frac {10 \, x \log \left (x\right )^{2}}{81 \, x^{2} + 18 \, x + 1} \]

[In]

integrate(((-90*x+10)*log(x)^2+(180*x+20)*log(x))/(729*x^3+243*x^2+27*x+1),x, algorithm="giac")

[Out]

10*x*log(x)^2/(81*x^2 + 18*x + 1)

Mupad [B] (verification not implemented)

Time = 9.79 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.70 \[ \int \frac {(20+180 x) \log (x)+(10-90 x) \log ^2(x)}{1+27 x+243 x^2+729 x^3} \, dx=\frac {10\,x\,{\ln \left (x\right )}^2}{{\left (9\,x+1\right )}^2} \]

[In]

int((log(x)*(180*x + 20) - log(x)^2*(90*x - 10))/(27*x + 243*x^2 + 729*x^3 + 1),x)

[Out]

(10*x*log(x)^2)/(9*x + 1)^2