3.1.9 \(\int \frac {\log (c x^n) (a x^m+b \log ^2(c x^n))^3}{x} \, dx\) [9]

Optimal. Leaf size=272 \[ -\frac {360 a b^2 n^5 x^m}{m^6}-\frac {9 a^2 b n^3 x^{2 m}}{8 m^4}-\frac {a^3 n x^{3 m}}{9 m^2}+\frac {360 a b^2 n^4 x^m \log \left (c x^n\right )}{m^5}+\frac {9 a^2 b n^2 x^{2 m} \log \left (c x^n\right )}{4 m^3}+\frac {a^3 x^{3 m} \log \left (c x^n\right )}{3 m}-\frac {180 a b^2 n^3 x^m \log ^2\left (c x^n\right )}{m^4}-\frac {9 a^2 b n x^{2 m} \log ^2\left (c x^n\right )}{4 m^2}+\frac {60 a b^2 n^2 x^m \log ^3\left (c x^n\right )}{m^3}+\frac {3 a^2 b x^{2 m} \log ^3\left (c x^n\right )}{2 m}-\frac {15 a b^2 n x^m \log ^4\left (c x^n\right )}{m^2}+\frac {3 a b^2 x^m \log ^5\left (c x^n\right )}{m}+\frac {b^3 \log ^8\left (c x^n\right )}{8 n} \]

[Out]

-360*a*b^2*n^5*x^m/m^6-9/8*a^2*b*n^3*x^(2*m)/m^4-1/9*a^3*n*x^(3*m)/m^2+360*a*b^2*n^4*x^m*ln(c*x^n)/m^5+9/4*a^2
*b*n^2*x^(2*m)*ln(c*x^n)/m^3+1/3*a^3*x^(3*m)*ln(c*x^n)/m-180*a*b^2*n^3*x^m*ln(c*x^n)^2/m^4-9/4*a^2*b*n*x^(2*m)
*ln(c*x^n)^2/m^2+60*a*b^2*n^2*x^m*ln(c*x^n)^3/m^3+3/2*a^2*b*x^(2*m)*ln(c*x^n)^3/m-15*a*b^2*n*x^m*ln(c*x^n)^4/m
^2+3*a*b^2*x^m*ln(c*x^n)^5/m+1/8*b^3*ln(c*x^n)^8/n

________________________________________________________________________________________

Rubi [A]
time = 0.20, antiderivative size = 272, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {2619, 2341, 2342, 2339, 30} \begin {gather*} \frac {a^3 x^{3 m} \log \left (c x^n\right )}{3 m}-\frac {a^3 n x^{3 m}}{9 m^2}+\frac {9 a^2 b n^2 x^{2 m} \log \left (c x^n\right )}{4 m^3}-\frac {9 a^2 b n x^{2 m} \log ^2\left (c x^n\right )}{4 m^2}+\frac {3 a^2 b x^{2 m} \log ^3\left (c x^n\right )}{2 m}-\frac {9 a^2 b n^3 x^{2 m}}{8 m^4}+\frac {360 a b^2 n^4 x^m \log \left (c x^n\right )}{m^5}-\frac {180 a b^2 n^3 x^m \log ^2\left (c x^n\right )}{m^4}+\frac {60 a b^2 n^2 x^m \log ^3\left (c x^n\right )}{m^3}-\frac {15 a b^2 n x^m \log ^4\left (c x^n\right )}{m^2}+\frac {3 a b^2 x^m \log ^5\left (c x^n\right )}{m}-\frac {360 a b^2 n^5 x^m}{m^6}+\frac {b^3 \log ^8\left (c x^n\right )}{8 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Log[c*x^n]*(a*x^m + b*Log[c*x^n]^2)^3)/x,x]

[Out]

(-360*a*b^2*n^5*x^m)/m^6 - (9*a^2*b*n^3*x^(2*m))/(8*m^4) - (a^3*n*x^(3*m))/(9*m^2) + (360*a*b^2*n^4*x^m*Log[c*
x^n])/m^5 + (9*a^2*b*n^2*x^(2*m)*Log[c*x^n])/(4*m^3) + (a^3*x^(3*m)*Log[c*x^n])/(3*m) - (180*a*b^2*n^3*x^m*Log
[c*x^n]^2)/m^4 - (9*a^2*b*n*x^(2*m)*Log[c*x^n]^2)/(4*m^2) + (60*a*b^2*n^2*x^m*Log[c*x^n]^3)/m^3 + (3*a^2*b*x^(
2*m)*Log[c*x^n]^3)/(2*m) - (15*a*b^2*n*x^m*Log[c*x^n]^4)/m^2 + (3*a*b^2*x^m*Log[c*x^n]^5)/m + (b^3*Log[c*x^n]^
8)/(8*n)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2339

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 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2619

Int[(Log[(c_.)*(x_)^(n_.)]^(r_.)*(Log[(c_.)*(x_)^(n_.)]^(q_)*(b_.) + (a_.)*(x_)^(m_.))^(p_.))/(x_), x_Symbol]
:> Int[ExpandIntegrand[Log[c*x^n]^r/x, (a*x^m + b*Log[c*x^n]^q)^p, x], x] /; FreeQ[{a, b, c, m, n, p, q, r}, x
] && EqQ[r, q - 1] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^3}{x} \, dx &=\int \left (a^3 x^{-1+3 m} \log \left (c x^n\right )+3 a^2 b x^{-1+2 m} \log ^3\left (c x^n\right )+3 a b^2 x^{-1+m} \log ^5\left (c x^n\right )+\frac {b^3 \log ^7\left (c x^n\right )}{x}\right ) \, dx\\ &=a^3 \int x^{-1+3 m} \log \left (c x^n\right ) \, dx+\left (3 a^2 b\right ) \int x^{-1+2 m} \log ^3\left (c x^n\right ) \, dx+\left (3 a b^2\right ) \int x^{-1+m} \log ^5\left (c x^n\right ) \, dx+b^3 \int \frac {\log ^7\left (c x^n\right )}{x} \, dx\\ &=-\frac {a^3 n x^{3 m}}{9 m^2}+\frac {a^3 x^{3 m} \log \left (c x^n\right )}{3 m}+\frac {3 a^2 b x^{2 m} \log ^3\left (c x^n\right )}{2 m}+\frac {3 a b^2 x^m \log ^5\left (c x^n\right )}{m}+\frac {b^3 \text {Subst}\left (\int x^7 \, dx,x,\log \left (c x^n\right )\right )}{n}-\frac {\left (9 a^2 b n\right ) \int x^{-1+2 m} \log ^2\left (c x^n\right ) \, dx}{2 m}-\frac {\left (15 a b^2 n\right ) \int x^{-1+m} \log ^4\left (c x^n\right ) \, dx}{m}\\ &=-\frac {a^3 n x^{3 m}}{9 m^2}+\frac {a^3 x^{3 m} \log \left (c x^n\right )}{3 m}-\frac {9 a^2 b n x^{2 m} \log ^2\left (c x^n\right )}{4 m^2}+\frac {3 a^2 b x^{2 m} \log ^3\left (c x^n\right )}{2 m}-\frac {15 a b^2 n x^m \log ^4\left (c x^n\right )}{m^2}+\frac {3 a b^2 x^m \log ^5\left (c x^n\right )}{m}+\frac {b^3 \log ^8\left (c x^n\right )}{8 n}+\frac {\left (9 a^2 b n^2\right ) \int x^{-1+2 m} \log \left (c x^n\right ) \, dx}{2 m^2}+\frac {\left (60 a b^2 n^2\right ) \int x^{-1+m} \log ^3\left (c x^n\right ) \, dx}{m^2}\\ &=-\frac {9 a^2 b n^3 x^{2 m}}{8 m^4}-\frac {a^3 n x^{3 m}}{9 m^2}+\frac {9 a^2 b n^2 x^{2 m} \log \left (c x^n\right )}{4 m^3}+\frac {a^3 x^{3 m} \log \left (c x^n\right )}{3 m}-\frac {9 a^2 b n x^{2 m} \log ^2\left (c x^n\right )}{4 m^2}+\frac {60 a b^2 n^2 x^m \log ^3\left (c x^n\right )}{m^3}+\frac {3 a^2 b x^{2 m} \log ^3\left (c x^n\right )}{2 m}-\frac {15 a b^2 n x^m \log ^4\left (c x^n\right )}{m^2}+\frac {3 a b^2 x^m \log ^5\left (c x^n\right )}{m}+\frac {b^3 \log ^8\left (c x^n\right )}{8 n}-\frac {\left (180 a b^2 n^3\right ) \int x^{-1+m} \log ^2\left (c x^n\right ) \, dx}{m^3}\\ &=-\frac {9 a^2 b n^3 x^{2 m}}{8 m^4}-\frac {a^3 n x^{3 m}}{9 m^2}+\frac {9 a^2 b n^2 x^{2 m} \log \left (c x^n\right )}{4 m^3}+\frac {a^3 x^{3 m} \log \left (c x^n\right )}{3 m}-\frac {180 a b^2 n^3 x^m \log ^2\left (c x^n\right )}{m^4}-\frac {9 a^2 b n x^{2 m} \log ^2\left (c x^n\right )}{4 m^2}+\frac {60 a b^2 n^2 x^m \log ^3\left (c x^n\right )}{m^3}+\frac {3 a^2 b x^{2 m} \log ^3\left (c x^n\right )}{2 m}-\frac {15 a b^2 n x^m \log ^4\left (c x^n\right )}{m^2}+\frac {3 a b^2 x^m \log ^5\left (c x^n\right )}{m}+\frac {b^3 \log ^8\left (c x^n\right )}{8 n}+\frac {\left (360 a b^2 n^4\right ) \int x^{-1+m} \log \left (c x^n\right ) \, dx}{m^4}\\ &=-\frac {360 a b^2 n^5 x^m}{m^6}-\frac {9 a^2 b n^3 x^{2 m}}{8 m^4}-\frac {a^3 n x^{3 m}}{9 m^2}+\frac {360 a b^2 n^4 x^m \log \left (c x^n\right )}{m^5}+\frac {9 a^2 b n^2 x^{2 m} \log \left (c x^n\right )}{4 m^3}+\frac {a^3 x^{3 m} \log \left (c x^n\right )}{3 m}-\frac {180 a b^2 n^3 x^m \log ^2\left (c x^n\right )}{m^4}-\frac {9 a^2 b n x^{2 m} \log ^2\left (c x^n\right )}{4 m^2}+\frac {60 a b^2 n^2 x^m \log ^3\left (c x^n\right )}{m^3}+\frac {3 a^2 b x^{2 m} \log ^3\left (c x^n\right )}{2 m}-\frac {15 a b^2 n x^m \log ^4\left (c x^n\right )}{m^2}+\frac {3 a b^2 x^m \log ^5\left (c x^n\right )}{m}+\frac {b^3 \log ^8\left (c x^n\right )}{8 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.20, size = 336, normalized size = 1.24 \begin {gather*} -\frac {1}{8} b^3 n^7 \log ^8(x)+b^3 n^6 \log ^7(x) \log \left (c x^n\right )-\frac {7}{2} b^3 n^5 \log ^6(x) \log ^2\left (c x^n\right )+7 b^3 n^4 \log ^5(x) \log ^3\left (c x^n\right )-\frac {35}{4} b^3 n^3 \log ^4(x) \log ^4\left (c x^n\right )+7 b^3 n^2 \log ^3(x) \log ^5\left (c x^n\right )-\frac {7}{2} b^3 n \log ^2(x) \log ^6\left (c x^n\right )+b^3 \log (x) \log ^7\left (c x^n\right )+\frac {a x^m \left (-n \left (25920 b^2 n^4+81 a b m^2 n^2 x^m+8 a^2 m^4 x^{2 m}\right )+6 m \left (4320 b^2 n^4+27 a b m^2 n^2 x^m+4 a^2 m^4 x^{2 m}\right ) \log \left (c x^n\right )-162 b m^2 n \left (80 b n^2+a m^2 x^m\right ) \log ^2\left (c x^n\right )+108 b m^3 \left (40 b n^2+a m^2 x^m\right ) \log ^3\left (c x^n\right )-1080 b^2 m^4 n \log ^4\left (c x^n\right )+216 b^2 m^5 \log ^5\left (c x^n\right )\right )}{72 m^6} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Log[c*x^n]*(a*x^m + b*Log[c*x^n]^2)^3)/x,x]

[Out]

-1/8*(b^3*n^7*Log[x]^8) + b^3*n^6*Log[x]^7*Log[c*x^n] - (7*b^3*n^5*Log[x]^6*Log[c*x^n]^2)/2 + 7*b^3*n^4*Log[x]
^5*Log[c*x^n]^3 - (35*b^3*n^3*Log[x]^4*Log[c*x^n]^4)/4 + 7*b^3*n^2*Log[x]^3*Log[c*x^n]^5 - (7*b^3*n*Log[x]^2*L
og[c*x^n]^6)/2 + b^3*Log[x]*Log[c*x^n]^7 + (a*x^m*(-(n*(25920*b^2*n^4 + 81*a*b*m^2*n^2*x^m + 8*a^2*m^4*x^(2*m)
)) + 6*m*(4320*b^2*n^4 + 27*a*b*m^2*n^2*x^m + 4*a^2*m^4*x^(2*m))*Log[c*x^n] - 162*b*m^2*n*(80*b*n^2 + a*m^2*x^
m)*Log[c*x^n]^2 + 108*b*m^3*(40*b*n^2 + a*m^2*x^m)*Log[c*x^n]^3 - 1080*b^2*m^4*n*Log[c*x^n]^4 + 216*b^2*m^5*Lo
g[c*x^n]^5))/(72*m^6)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 3.89, size = 61910, normalized size = 227.61

method result size
risch \(\text {Expression too large to display}\) \(61910\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*x^n)*(a*x^m+b*ln(c*x^n)^2)^3/x,x,method=_RETURNVERBOSE)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1115 vs. \(2 (258) = 516\).
time = 0.32, size = 1115, normalized size = 4.10 \begin {gather*} \frac {1}{84} \, {\left (\frac {12 \, b^{3} \log \left (c x^{n}\right )^{7}}{n} + \frac {252 \, a b^{2} x^{m} \log \left (c x^{n}\right )^{4}}{m} + \frac {126 \, a^{2} b x^{2 \, m} \log \left (c x^{n}\right )^{2}}{m} - 1008 \, {\left (\frac {n x^{m} \log \left (c x^{n}\right )^{3}}{m^{2}} - \frac {3 \, {\left (\frac {n x^{m} \log \left (c x^{n}\right )^{2}}{m^{2}} - \frac {2 \, n {\left (\frac {n x^{m} \log \left (c x^{n}\right )}{m^{2}} - \frac {n^{2} x^{m}}{m^{3}}\right )}}{m}\right )} n}{m}\right )} a b^{2} - 63 \, a^{2} b {\left (\frac {2 \, n x^{2 \, m} \log \left (c x^{n}\right )}{m^{2}} - \frac {n^{2} x^{2 \, m}}{m^{3}}\right )} + \frac {28 \, a^{3} x^{3 \, m}}{m}\right )} \log \left (c x^{n}\right ) + \frac {9 \, b^{3} m^{6} n^{7} \log \left (x\right )^{8} - 72 \, b^{3} m^{6} n^{6} \log \left (c\right ) \log \left (x\right )^{7} + 252 \, b^{3} m^{6} n^{5} \log \left (c\right )^{2} \log \left (x\right )^{6} - 504 \, b^{3} m^{6} n^{4} \log \left (c\right )^{3} \log \left (x\right )^{5} + 630 \, b^{3} m^{6} n^{3} \log \left (c\right )^{4} \log \left (x\right )^{4} - 504 \, b^{3} m^{6} n^{2} \log \left (c\right )^{5} \log \left (x\right )^{3} + 252 \, b^{3} m^{6} n \log \left (c\right )^{6} \log \left (x\right )^{2} - 72 \, b^{3} m^{6} \log \left (c\right )^{7} \log \left (x\right ) - 72 \, b^{3} m^{6} \log \left (x\right ) \log \left (x^{n}\right )^{7} - 56 \, a^{3} m^{4} n x^{3 \, m} + 252 \, {\left (b^{3} m^{6} n \log \left (x\right )^{2} - 2 \, b^{3} m^{6} \log \left (c\right ) \log \left (x\right )\right )} \log \left (x^{n}\right )^{6} - 504 \, {\left (b^{3} m^{6} n^{2} \log \left (x\right )^{3} - 3 \, b^{3} m^{6} n \log \left (c\right ) \log \left (x\right )^{2} + 3 \, b^{3} m^{6} \log \left (c\right )^{2} \log \left (x\right )\right )} \log \left (x^{n}\right )^{5} - 189 \, {\left (2 \, m^{4} n \log \left (c\right )^{2} - 4 \, m^{3} n^{2} \log \left (c\right ) + 3 \, m^{2} n^{3}\right )} a^{2} b x^{2 \, m} - 1512 \, {\left (m^{4} n \log \left (c\right )^{4} - 8 \, m^{3} n^{2} \log \left (c\right )^{3} + 36 \, m^{2} n^{3} \log \left (c\right )^{2} - 96 \, m n^{4} \log \left (c\right ) + 120 \, n^{5}\right )} a b^{2} x^{m} + 126 \, {\left (5 \, b^{3} m^{6} n^{3} \log \left (x\right )^{4} - 20 \, b^{3} m^{6} n^{2} \log \left (c\right ) \log \left (x\right )^{3} + 30 \, b^{3} m^{6} n \log \left (c\right )^{2} \log \left (x\right )^{2} - 20 \, b^{3} m^{6} \log \left (c\right )^{3} \log \left (x\right ) - 12 \, a b^{2} m^{4} n x^{m}\right )} \log \left (x^{n}\right )^{4} - 504 \, {\left (b^{3} m^{6} n^{4} \log \left (x\right )^{5} - 5 \, b^{3} m^{6} n^{3} \log \left (c\right ) \log \left (x\right )^{4} + 10 \, b^{3} m^{6} n^{2} \log \left (c\right )^{2} \log \left (x\right )^{3} - 10 \, b^{3} m^{6} n \log \left (c\right )^{3} \log \left (x\right )^{2} + 5 \, b^{3} m^{6} \log \left (c\right )^{4} \log \left (x\right ) + 12 \, {\left (m^{4} n \log \left (c\right ) - 2 \, m^{3} n^{2}\right )} a b^{2} x^{m}\right )} \log \left (x^{n}\right )^{3} + 126 \, {\left (2 \, b^{3} m^{6} n^{5} \log \left (x\right )^{6} - 12 \, b^{3} m^{6} n^{4} \log \left (c\right ) \log \left (x\right )^{5} + 30 \, b^{3} m^{6} n^{3} \log \left (c\right )^{2} \log \left (x\right )^{4} - 40 \, b^{3} m^{6} n^{2} \log \left (c\right )^{3} \log \left (x\right )^{3} + 30 \, b^{3} m^{6} n \log \left (c\right )^{4} \log \left (x\right )^{2} - 12 \, b^{3} m^{6} \log \left (c\right )^{5} \log \left (x\right ) - 3 \, a^{2} b m^{4} n x^{2 \, m} - 72 \, {\left (m^{4} n \log \left (c\right )^{2} - 4 \, m^{3} n^{2} \log \left (c\right ) + 6 \, m^{2} n^{3}\right )} a b^{2} x^{m}\right )} \log \left (x^{n}\right )^{2} - 36 \, {\left (2 \, b^{3} m^{6} n^{6} \log \left (x\right )^{7} - 14 \, b^{3} m^{6} n^{5} \log \left (c\right ) \log \left (x\right )^{6} + 42 \, b^{3} m^{6} n^{4} \log \left (c\right )^{2} \log \left (x\right )^{5} - 70 \, b^{3} m^{6} n^{3} \log \left (c\right )^{3} \log \left (x\right )^{4} + 70 \, b^{3} m^{6} n^{2} \log \left (c\right )^{4} \log \left (x\right )^{3} - 42 \, b^{3} m^{6} n \log \left (c\right )^{5} \log \left (x\right )^{2} + 14 \, b^{3} m^{6} \log \left (c\right )^{6} \log \left (x\right ) + 21 \, {\left (m^{4} n \log \left (c\right ) - m^{3} n^{2}\right )} a^{2} b x^{2 \, m} + 168 \, {\left (m^{4} n \log \left (c\right )^{3} - 6 \, m^{3} n^{2} \log \left (c\right )^{2} + 18 \, m^{2} n^{3} \log \left (c\right ) - 24 \, m n^{4}\right )} a b^{2} x^{m}\right )} \log \left (x^{n}\right )}{504 \, m^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^n)*(a*x^m+b*log(c*x^n)^2)^3/x,x, algorithm="maxima")

[Out]

1/84*(12*b^3*log(c*x^n)^7/n + 252*a*b^2*x^m*log(c*x^n)^4/m + 126*a^2*b*x^(2*m)*log(c*x^n)^2/m - 1008*(n*x^m*lo
g(c*x^n)^3/m^2 - 3*(n*x^m*log(c*x^n)^2/m^2 - 2*n*(n*x^m*log(c*x^n)/m^2 - n^2*x^m/m^3)/m)*n/m)*a*b^2 - 63*a^2*b
*(2*n*x^(2*m)*log(c*x^n)/m^2 - n^2*x^(2*m)/m^3) + 28*a^3*x^(3*m)/m)*log(c*x^n) + 1/504*(9*b^3*m^6*n^7*log(x)^8
 - 72*b^3*m^6*n^6*log(c)*log(x)^7 + 252*b^3*m^6*n^5*log(c)^2*log(x)^6 - 504*b^3*m^6*n^4*log(c)^3*log(x)^5 + 63
0*b^3*m^6*n^3*log(c)^4*log(x)^4 - 504*b^3*m^6*n^2*log(c)^5*log(x)^3 + 252*b^3*m^6*n*log(c)^6*log(x)^2 - 72*b^3
*m^6*log(c)^7*log(x) - 72*b^3*m^6*log(x)*log(x^n)^7 - 56*a^3*m^4*n*x^(3*m) + 252*(b^3*m^6*n*log(x)^2 - 2*b^3*m
^6*log(c)*log(x))*log(x^n)^6 - 504*(b^3*m^6*n^2*log(x)^3 - 3*b^3*m^6*n*log(c)*log(x)^2 + 3*b^3*m^6*log(c)^2*lo
g(x))*log(x^n)^5 - 189*(2*m^4*n*log(c)^2 - 4*m^3*n^2*log(c) + 3*m^2*n^3)*a^2*b*x^(2*m) - 1512*(m^4*n*log(c)^4
- 8*m^3*n^2*log(c)^3 + 36*m^2*n^3*log(c)^2 - 96*m*n^4*log(c) + 120*n^5)*a*b^2*x^m + 126*(5*b^3*m^6*n^3*log(x)^
4 - 20*b^3*m^6*n^2*log(c)*log(x)^3 + 30*b^3*m^6*n*log(c)^2*log(x)^2 - 20*b^3*m^6*log(c)^3*log(x) - 12*a*b^2*m^
4*n*x^m)*log(x^n)^4 - 504*(b^3*m^6*n^4*log(x)^5 - 5*b^3*m^6*n^3*log(c)*log(x)^4 + 10*b^3*m^6*n^2*log(c)^2*log(
x)^3 - 10*b^3*m^6*n*log(c)^3*log(x)^2 + 5*b^3*m^6*log(c)^4*log(x) + 12*(m^4*n*log(c) - 2*m^3*n^2)*a*b^2*x^m)*l
og(x^n)^3 + 126*(2*b^3*m^6*n^5*log(x)^6 - 12*b^3*m^6*n^4*log(c)*log(x)^5 + 30*b^3*m^6*n^3*log(c)^2*log(x)^4 -
40*b^3*m^6*n^2*log(c)^3*log(x)^3 + 30*b^3*m^6*n*log(c)^4*log(x)^2 - 12*b^3*m^6*log(c)^5*log(x) - 3*a^2*b*m^4*n
*x^(2*m) - 72*(m^4*n*log(c)^2 - 4*m^3*n^2*log(c) + 6*m^2*n^3)*a*b^2*x^m)*log(x^n)^2 - 36*(2*b^3*m^6*n^6*log(x)
^7 - 14*b^3*m^6*n^5*log(c)*log(x)^6 + 42*b^3*m^6*n^4*log(c)^2*log(x)^5 - 70*b^3*m^6*n^3*log(c)^3*log(x)^4 + 70
*b^3*m^6*n^2*log(c)^4*log(x)^3 - 42*b^3*m^6*n*log(c)^5*log(x)^2 + 14*b^3*m^6*log(c)^6*log(x) + 21*(m^4*n*log(c
) - m^3*n^2)*a^2*b*x^(2*m) + 168*(m^4*n*log(c)^3 - 6*m^3*n^2*log(c)^2 + 18*m^2*n^3*log(c) - 24*m*n^4)*a*b^2*x^
m)*log(x^n))/m^6

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 655 vs. \(2 (258) = 516\).
time = 0.38, size = 655, normalized size = 2.41 \begin {gather*} \frac {9 \, b^{3} m^{6} n^{7} \log \left (x\right )^{8} + 72 \, b^{3} m^{6} n^{6} \log \left (c\right ) \log \left (x\right )^{7} + 252 \, b^{3} m^{6} n^{5} \log \left (c\right )^{2} \log \left (x\right )^{6} + 504 \, b^{3} m^{6} n^{4} \log \left (c\right )^{3} \log \left (x\right )^{5} + 630 \, b^{3} m^{6} n^{3} \log \left (c\right )^{4} \log \left (x\right )^{4} + 504 \, b^{3} m^{6} n^{2} \log \left (c\right )^{5} \log \left (x\right )^{3} + 252 \, b^{3} m^{6} n \log \left (c\right )^{6} \log \left (x\right )^{2} + 72 \, b^{3} m^{6} \log \left (c\right )^{7} \log \left (x\right ) + 8 \, {\left (3 \, a^{3} m^{5} n \log \left (x\right ) + 3 \, a^{3} m^{5} \log \left (c\right ) - a^{3} m^{4} n\right )} x^{3 \, m} + 27 \, {\left (4 \, a^{2} b m^{5} n^{3} \log \left (x\right )^{3} + 4 \, a^{2} b m^{5} \log \left (c\right )^{3} - 6 \, a^{2} b m^{4} n \log \left (c\right )^{2} + 6 \, a^{2} b m^{3} n^{2} \log \left (c\right ) - 3 \, a^{2} b m^{2} n^{3} + 6 \, {\left (2 \, a^{2} b m^{5} n^{2} \log \left (c\right ) - a^{2} b m^{4} n^{3}\right )} \log \left (x\right )^{2} + 6 \, {\left (2 \, a^{2} b m^{5} n \log \left (c\right )^{2} - 2 \, a^{2} b m^{4} n^{2} \log \left (c\right ) + a^{2} b m^{3} n^{3}\right )} \log \left (x\right )\right )} x^{2 \, m} + 216 \, {\left (a b^{2} m^{5} n^{5} \log \left (x\right )^{5} + a b^{2} m^{5} \log \left (c\right )^{5} - 5 \, a b^{2} m^{4} n \log \left (c\right )^{4} + 20 \, a b^{2} m^{3} n^{2} \log \left (c\right )^{3} - 60 \, a b^{2} m^{2} n^{3} \log \left (c\right )^{2} + 120 \, a b^{2} m n^{4} \log \left (c\right ) - 120 \, a b^{2} n^{5} + 5 \, {\left (a b^{2} m^{5} n^{4} \log \left (c\right ) - a b^{2} m^{4} n^{5}\right )} \log \left (x\right )^{4} + 10 \, {\left (a b^{2} m^{5} n^{3} \log \left (c\right )^{2} - 2 \, a b^{2} m^{4} n^{4} \log \left (c\right ) + 2 \, a b^{2} m^{3} n^{5}\right )} \log \left (x\right )^{3} + 10 \, {\left (a b^{2} m^{5} n^{2} \log \left (c\right )^{3} - 3 \, a b^{2} m^{4} n^{3} \log \left (c\right )^{2} + 6 \, a b^{2} m^{3} n^{4} \log \left (c\right ) - 6 \, a b^{2} m^{2} n^{5}\right )} \log \left (x\right )^{2} + 5 \, {\left (a b^{2} m^{5} n \log \left (c\right )^{4} - 4 \, a b^{2} m^{4} n^{2} \log \left (c\right )^{3} + 12 \, a b^{2} m^{3} n^{3} \log \left (c\right )^{2} - 24 \, a b^{2} m^{2} n^{4} \log \left (c\right ) + 24 \, a b^{2} m n^{5}\right )} \log \left (x\right )\right )} x^{m}}{72 \, m^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^n)*(a*x^m+b*log(c*x^n)^2)^3/x,x, algorithm="fricas")

[Out]

1/72*(9*b^3*m^6*n^7*log(x)^8 + 72*b^3*m^6*n^6*log(c)*log(x)^7 + 252*b^3*m^6*n^5*log(c)^2*log(x)^6 + 504*b^3*m^
6*n^4*log(c)^3*log(x)^5 + 630*b^3*m^6*n^3*log(c)^4*log(x)^4 + 504*b^3*m^6*n^2*log(c)^5*log(x)^3 + 252*b^3*m^6*
n*log(c)^6*log(x)^2 + 72*b^3*m^6*log(c)^7*log(x) + 8*(3*a^3*m^5*n*log(x) + 3*a^3*m^5*log(c) - a^3*m^4*n)*x^(3*
m) + 27*(4*a^2*b*m^5*n^3*log(x)^3 + 4*a^2*b*m^5*log(c)^3 - 6*a^2*b*m^4*n*log(c)^2 + 6*a^2*b*m^3*n^2*log(c) - 3
*a^2*b*m^2*n^3 + 6*(2*a^2*b*m^5*n^2*log(c) - a^2*b*m^4*n^3)*log(x)^2 + 6*(2*a^2*b*m^5*n*log(c)^2 - 2*a^2*b*m^4
*n^2*log(c) + a^2*b*m^3*n^3)*log(x))*x^(2*m) + 216*(a*b^2*m^5*n^5*log(x)^5 + a*b^2*m^5*log(c)^5 - 5*a*b^2*m^4*
n*log(c)^4 + 20*a*b^2*m^3*n^2*log(c)^3 - 60*a*b^2*m^2*n^3*log(c)^2 + 120*a*b^2*m*n^4*log(c) - 120*a*b^2*n^5 +
5*(a*b^2*m^5*n^4*log(c) - a*b^2*m^4*n^5)*log(x)^4 + 10*(a*b^2*m^5*n^3*log(c)^2 - 2*a*b^2*m^4*n^4*log(c) + 2*a*
b^2*m^3*n^5)*log(x)^3 + 10*(a*b^2*m^5*n^2*log(c)^3 - 3*a*b^2*m^4*n^3*log(c)^2 + 6*a*b^2*m^3*n^4*log(c) - 6*a*b
^2*m^2*n^5)*log(x)^2 + 5*(a*b^2*m^5*n*log(c)^4 - 4*a*b^2*m^4*n^2*log(c)^3 + 12*a*b^2*m^3*n^3*log(c)^2 - 24*a*b
^2*m^2*n^4*log(c) + 24*a*b^2*m*n^5)*log(x))*x^m)/m^6

________________________________________________________________________________________

Sympy [A]
time = 30.90, size = 411, normalized size = 1.51 \begin {gather*} - a^{3} n \left (\begin {cases} \frac {\begin {cases} \frac {x^{3 m}}{3 m} & \text {for}\: m \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{3 m} & \text {for}\: m > -\infty \wedge m < \infty \wedge m \neq 0 \\\frac {\log {\left (x \right )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + a^{3} \left (\begin {cases} \frac {x^{3 m}}{3 m} & \text {for}\: m \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} + 3 a^{2} b \left (\begin {cases} \frac {x^{2 m} \log {\left (c x^{n} \right )}^{3}}{2 m} - \frac {3 n x^{2 m} \log {\left (c x^{n} \right )}^{2}}{4 m^{2}} + \frac {3 n^{2} x^{2 m} \log {\left (c x^{n} \right )}}{4 m^{3}} - \frac {3 n^{3} x^{2 m}}{8 m^{4}} & \text {for}\: m \neq 0 \\\begin {cases} 0 & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \wedge \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (c x^{n} \right )}^{4}}{4 n} & \text {for}\: \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (\frac {x^{- n}}{c} \right )}^{4}}{4 n} & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \\\frac {6 {G_{5, 5}^{5, 0}\left (\begin {matrix} & 1, 1, 1, 1, 1 \\0, 0, 0, 0, 0 & \end {matrix} \middle | {c x^{n}} \right )}}{n} + \frac {6 {G_{5, 5}^{0, 5}\left (\begin {matrix} 1, 1, 1, 1, 1 & \\ & 0, 0, 0, 0, 0 \end {matrix} \middle | {c x^{n}} \right )}}{n} & \text {otherwise} \end {cases} & \text {otherwise} \end {cases}\right ) + 3 a b^{2} \left (\begin {cases} \frac {x^{m} \log {\left (c x^{n} \right )}^{5}}{m} - \frac {5 n x^{m} \log {\left (c x^{n} \right )}^{4}}{m^{2}} + \frac {20 n^{2} x^{m} \log {\left (c x^{n} \right )}^{3}}{m^{3}} - \frac {60 n^{3} x^{m} \log {\left (c x^{n} \right )}^{2}}{m^{4}} + \frac {120 n^{4} x^{m} \log {\left (c x^{n} \right )}}{m^{5}} - \frac {120 n^{5} x^{m}}{m^{6}} & \text {for}\: m \neq 0 \\\begin {cases} 0 & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \wedge \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (c x^{n} \right )}^{6}}{6 n} & \text {for}\: \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (\frac {x^{- n}}{c} \right )}^{6}}{6 n} & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \\\frac {120 {G_{7, 7}^{7, 0}\left (\begin {matrix} & 1, 1, 1, 1, 1, 1, 1 \\0, 0, 0, 0, 0, 0, 0 & \end {matrix} \middle | {c x^{n}} \right )}}{n} + \frac {120 {G_{7, 7}^{0, 7}\left (\begin {matrix} 1, 1, 1, 1, 1, 1, 1 & \\ & 0, 0, 0, 0, 0, 0, 0 \end {matrix} \middle | {c x^{n}} \right )}}{n} & \text {otherwise} \end {cases} & \text {otherwise} \end {cases}\right ) - b^{3} \left (\begin {cases} - \log {\left (c \right )}^{7} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{8}}{8 n} & \text {otherwise} \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*x**n)*(a*x**m+b*ln(c*x**n)**2)**3/x,x)

[Out]

-a**3*n*Piecewise((Piecewise((x**(3*m)/(3*m), Ne(m, 0)), (log(x), True))/(3*m), (m > -oo) & (m < oo) & Ne(m, 0
)), (log(x)**2/2, True)) + a**3*Piecewise((x**(3*m)/(3*m), Ne(m, 0)), (log(x), True))*log(c*x**n) + 3*a**2*b*P
iecewise((x**(2*m)*log(c*x**n)**3/(2*m) - 3*n*x**(2*m)*log(c*x**n)**2/(4*m**2) + 3*n**2*x**(2*m)*log(c*x**n)/(
4*m**3) - 3*n**3*x**(2*m)/(8*m**4), Ne(m, 0)), (Piecewise((0, (Abs(c*x**n) < 1) & (1/Abs(c*x**n) < 1)), (log(c
*x**n)**4/(4*n), Abs(c*x**n) < 1), (log(1/(c*x**n))**4/(4*n), 1/Abs(c*x**n) < 1), (6*meijerg(((), (1, 1, 1, 1,
 1)), ((0, 0, 0, 0, 0), ()), c*x**n)/n + 6*meijerg(((1, 1, 1, 1, 1), ()), ((), (0, 0, 0, 0, 0)), c*x**n)/n, Tr
ue)), True)) + 3*a*b**2*Piecewise((x**m*log(c*x**n)**5/m - 5*n*x**m*log(c*x**n)**4/m**2 + 20*n**2*x**m*log(c*x
**n)**3/m**3 - 60*n**3*x**m*log(c*x**n)**2/m**4 + 120*n**4*x**m*log(c*x**n)/m**5 - 120*n**5*x**m/m**6, Ne(m, 0
)), (Piecewise((0, (Abs(c*x**n) < 1) & (1/Abs(c*x**n) < 1)), (log(c*x**n)**6/(6*n), Abs(c*x**n) < 1), (log(1/(
c*x**n))**6/(6*n), 1/Abs(c*x**n) < 1), (120*meijerg(((), (1, 1, 1, 1, 1, 1, 1)), ((0, 0, 0, 0, 0, 0, 0), ()),
c*x**n)/n + 120*meijerg(((1, 1, 1, 1, 1, 1, 1), ()), ((), (0, 0, 0, 0, 0, 0, 0)), c*x**n)/n, True)), True)) -
b**3*Piecewise((-log(c)**7*log(x), Eq(n, 0)), (-log(c*x**n)**8/(8*n), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 766 vs. \(2 (258) = 516\).
time = 5.48, size = 766, normalized size = 2.82 \begin {gather*} \frac {1}{8} \, b^{3} n^{7} \log \left (x\right )^{8} + b^{3} n^{6} \log \left (c\right ) \log \left (x\right )^{7} + \frac {7}{2} \, b^{3} n^{5} \log \left (c\right )^{2} \log \left (x\right )^{6} + 7 \, b^{3} n^{4} \log \left (c\right )^{3} \log \left (x\right )^{5} + \frac {35}{4} \, b^{3} n^{3} \log \left (c\right )^{4} \log \left (x\right )^{4} + 7 \, b^{3} n^{2} \log \left (c\right )^{5} \log \left (x\right )^{3} + \frac {3 \, a b^{2} n^{5} x^{m} \log \left (x\right )^{5}}{m} + \frac {7}{2} \, b^{3} n \log \left (c\right )^{6} \log \left (x\right )^{2} + \frac {15 \, a b^{2} n^{4} x^{m} \log \left (c\right ) \log \left (x\right )^{4}}{m} + b^{3} \log \left (c\right )^{7} \log \left (x\right ) + \frac {30 \, a b^{2} n^{3} x^{m} \log \left (c\right )^{2} \log \left (x\right )^{3}}{m} - \frac {15 \, a b^{2} n^{5} x^{m} \log \left (x\right )^{4}}{m^{2}} + \frac {30 \, a b^{2} n^{2} x^{m} \log \left (c\right )^{3} \log \left (x\right )^{2}}{m} - \frac {60 \, a b^{2} n^{4} x^{m} \log \left (c\right ) \log \left (x\right )^{3}}{m^{2}} + \frac {15 \, a b^{2} n x^{m} \log \left (c\right )^{4} \log \left (x\right )}{m} - \frac {90 \, a b^{2} n^{3} x^{m} \log \left (c\right )^{2} \log \left (x\right )^{2}}{m^{2}} + \frac {3 \, a^{2} b n^{3} x^{2 \, m} \log \left (x\right )^{3}}{2 \, m} + \frac {60 \, a b^{2} n^{5} x^{m} \log \left (x\right )^{3}}{m^{3}} + \frac {3 \, a b^{2} x^{m} \log \left (c\right )^{5}}{m} - \frac {60 \, a b^{2} n^{2} x^{m} \log \left (c\right )^{3} \log \left (x\right )}{m^{2}} + \frac {9 \, a^{2} b n^{2} x^{2 \, m} \log \left (c\right ) \log \left (x\right )^{2}}{2 \, m} + \frac {180 \, a b^{2} n^{4} x^{m} \log \left (c\right ) \log \left (x\right )^{2}}{m^{3}} - \frac {15 \, a b^{2} n x^{m} \log \left (c\right )^{4}}{m^{2}} + \frac {9 \, a^{2} b n x^{2 \, m} \log \left (c\right )^{2} \log \left (x\right )}{2 \, m} + \frac {180 \, a b^{2} n^{3} x^{m} \log \left (c\right )^{2} \log \left (x\right )}{m^{3}} - \frac {9 \, a^{2} b n^{3} x^{2 \, m} \log \left (x\right )^{2}}{4 \, m^{2}} - \frac {180 \, a b^{2} n^{5} x^{m} \log \left (x\right )^{2}}{m^{4}} + \frac {3 \, a^{2} b x^{2 \, m} \log \left (c\right )^{3}}{2 \, m} + \frac {60 \, a b^{2} n^{2} x^{m} \log \left (c\right )^{3}}{m^{3}} - \frac {9 \, a^{2} b n^{2} x^{2 \, m} \log \left (c\right ) \log \left (x\right )}{2 \, m^{2}} - \frac {360 \, a b^{2} n^{4} x^{m} \log \left (c\right ) \log \left (x\right )}{m^{4}} - \frac {9 \, a^{2} b n x^{2 \, m} \log \left (c\right )^{2}}{4 \, m^{2}} - \frac {180 \, a b^{2} n^{3} x^{m} \log \left (c\right )^{2}}{m^{4}} + \frac {a^{3} n x^{3 \, m} \log \left (x\right )}{3 \, m} + \frac {9 \, a^{2} b n^{3} x^{2 \, m} \log \left (x\right )}{4 \, m^{3}} + \frac {360 \, a b^{2} n^{5} x^{m} \log \left (x\right )}{m^{5}} + \frac {a^{3} x^{3 \, m} \log \left (c\right )}{3 \, m} + \frac {9 \, a^{2} b n^{2} x^{2 \, m} \log \left (c\right )}{4 \, m^{3}} + \frac {360 \, a b^{2} n^{4} x^{m} \log \left (c\right )}{m^{5}} - \frac {a^{3} n x^{3 \, m}}{9 \, m^{2}} - \frac {9 \, a^{2} b n^{3} x^{2 \, m}}{8 \, m^{4}} - \frac {360 \, a b^{2} n^{5} x^{m}}{m^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^n)*(a*x^m+b*log(c*x^n)^2)^3/x,x, algorithm="giac")

[Out]

1/8*b^3*n^7*log(x)^8 + b^3*n^6*log(c)*log(x)^7 + 7/2*b^3*n^5*log(c)^2*log(x)^6 + 7*b^3*n^4*log(c)^3*log(x)^5 +
 35/4*b^3*n^3*log(c)^4*log(x)^4 + 7*b^3*n^2*log(c)^5*log(x)^3 + 3*a*b^2*n^5*x^m*log(x)^5/m + 7/2*b^3*n*log(c)^
6*log(x)^2 + 15*a*b^2*n^4*x^m*log(c)*log(x)^4/m + b^3*log(c)^7*log(x) + 30*a*b^2*n^3*x^m*log(c)^2*log(x)^3/m -
 15*a*b^2*n^5*x^m*log(x)^4/m^2 + 30*a*b^2*n^2*x^m*log(c)^3*log(x)^2/m - 60*a*b^2*n^4*x^m*log(c)*log(x)^3/m^2 +
 15*a*b^2*n*x^m*log(c)^4*log(x)/m - 90*a*b^2*n^3*x^m*log(c)^2*log(x)^2/m^2 + 3/2*a^2*b*n^3*x^(2*m)*log(x)^3/m
+ 60*a*b^2*n^5*x^m*log(x)^3/m^3 + 3*a*b^2*x^m*log(c)^5/m - 60*a*b^2*n^2*x^m*log(c)^3*log(x)/m^2 + 9/2*a^2*b*n^
2*x^(2*m)*log(c)*log(x)^2/m + 180*a*b^2*n^4*x^m*log(c)*log(x)^2/m^3 - 15*a*b^2*n*x^m*log(c)^4/m^2 + 9/2*a^2*b*
n*x^(2*m)*log(c)^2*log(x)/m + 180*a*b^2*n^3*x^m*log(c)^2*log(x)/m^3 - 9/4*a^2*b*n^3*x^(2*m)*log(x)^2/m^2 - 180
*a*b^2*n^5*x^m*log(x)^2/m^4 + 3/2*a^2*b*x^(2*m)*log(c)^3/m + 60*a*b^2*n^2*x^m*log(c)^3/m^3 - 9/2*a^2*b*n^2*x^(
2*m)*log(c)*log(x)/m^2 - 360*a*b^2*n^4*x^m*log(c)*log(x)/m^4 - 9/4*a^2*b*n*x^(2*m)*log(c)^2/m^2 - 180*a*b^2*n^
3*x^m*log(c)^2/m^4 + 1/3*a^3*n*x^(3*m)*log(x)/m + 9/4*a^2*b*n^3*x^(2*m)*log(x)/m^3 + 360*a*b^2*n^5*x^m*log(x)/
m^5 + 1/3*a^3*x^(3*m)*log(c)/m + 9/4*a^2*b*n^2*x^(2*m)*log(c)/m^3 + 360*a*b^2*n^4*x^m*log(c)/m^5 - 1/9*a^3*n*x
^(3*m)/m^2 - 9/8*a^2*b*n^3*x^(2*m)/m^4 - 360*a*b^2*n^5*x^m/m^6

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (c\,x^n\right )\,{\left (a\,x^m+b\,{\ln \left (c\,x^n\right )}^2\right )}^3}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(c*x^n)*(a*x^m + b*log(c*x^n)^2)^3)/x,x)

[Out]

int((log(c*x^n)*(a*x^m + b*log(c*x^n)^2)^3)/x, x)

________________________________________________________________________________________