\(\int (a+b \log (c x^n))^3 \log (d (e+f x)^m) \, dx\) [92]

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [C] (warning: unable to verify)
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 473 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx=-12 a b^2 m n^2 x+18 b^3 m n^3 x-6 b^2 m n^2 (a-b n) x-18 b^3 m n^2 x \log \left (c x^n\right )+6 b m n x \left (a+b \log \left (c x^n\right )\right )^2-m x \left (a+b \log \left (c x^n\right )\right )^3+\frac {6 b^2 e m n^2 (a-b n) \log (e+f x)}{f}+6 a b^2 n^2 x \log \left (d (e+f x)^m\right )-6 b^3 n^3 x \log \left (d (e+f x)^m\right )+6 b^3 n^2 x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-3 b n x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right )+\frac {6 b^3 e m n^2 \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )}{f}-\frac {3 b e m n \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{f}+\frac {e m \left (a+b \log \left (c x^n\right )\right )^3 \log \left (1+\frac {f x}{e}\right )}{f}+\frac {6 b^3 e m n^3 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{f}-\frac {6 b^2 e m n^2 \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{f}+\frac {3 b e m n \left (a+b \log \left (c x^n\right )\right )^2 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{f}+\frac {6 b^3 e m n^3 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{f}-\frac {6 b^2 e m n^2 \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{f}+\frac {6 b^3 e m n^3 \operatorname {PolyLog}\left (4,-\frac {f x}{e}\right )}{f} \] Output:

-12*a*b^2*m*n^2*x+18*b^3*m*n^3*x-6*b^2*m*n^2*(-b*n+a)*x-18*b^3*m*n^2*x*ln( 
c*x^n)+6*b*m*n*x*(a+b*ln(c*x^n))^2-m*x*(a+b*ln(c*x^n))^3+6*b^2*e*m*n^2*(-b 
*n+a)*ln(f*x+e)/f+6*a*b^2*n^2*x*ln(d*(f*x+e)^m)-6*b^3*n^3*x*ln(d*(f*x+e)^m 
)+6*b^3*n^2*x*ln(c*x^n)*ln(d*(f*x+e)^m)-3*b*n*x*(a+b*ln(c*x^n))^2*ln(d*(f* 
x+e)^m)+x*(a+b*ln(c*x^n))^3*ln(d*(f*x+e)^m)+6*b^3*e*m*n^2*ln(c*x^n)*ln(1+f 
*x/e)/f-3*b*e*m*n*(a+b*ln(c*x^n))^2*ln(1+f*x/e)/f+e*m*(a+b*ln(c*x^n))^3*ln 
(1+f*x/e)/f+6*b^3*e*m*n^3*polylog(2,-f*x/e)/f-6*b^2*e*m*n^2*(a+b*ln(c*x^n) 
)*polylog(2,-f*x/e)/f+3*b*e*m*n*(a+b*ln(c*x^n))^2*polylog(2,-f*x/e)/f+6*b^ 
3*e*m*n^3*polylog(3,-f*x/e)/f-6*b^2*e*m*n^2*(a+b*ln(c*x^n))*polylog(3,-f*x 
/e)/f+6*b^3*e*m*n^3*polylog(4,-f*x/e)/f
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(1122\) vs. \(2(473)=946\).

Time = 0.46 (sec) , antiderivative size = 1122, normalized size of antiderivative = 2.37 \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx =\text {Too large to display} \] Input:

Integrate[(a + b*Log[c*x^n])^3*Log[d*(e + f*x)^m],x]
 

Output:

(-(a^3*f*m*x) + 6*a^2*b*f*m*n*x - 18*a*b^2*f*m*n^2*x + 24*b^3*f*m*n^3*x - 
3*a^2*b*f*m*x*Log[c*x^n] + 12*a*b^2*f*m*n*x*Log[c*x^n] - 18*b^3*f*m*n^2*x* 
Log[c*x^n] - 3*a*b^2*f*m*x*Log[c*x^n]^2 + 6*b^3*f*m*n*x*Log[c*x^n]^2 - b^3 
*f*m*x*Log[c*x^n]^3 + a^3*e*m*Log[e + f*x] - 3*a^2*b*e*m*n*Log[e + f*x] + 
6*a*b^2*e*m*n^2*Log[e + f*x] - 6*b^3*e*m*n^3*Log[e + f*x] - 3*a^2*b*e*m*n* 
Log[x]*Log[e + f*x] + 6*a*b^2*e*m*n^2*Log[x]*Log[e + f*x] - 6*b^3*e*m*n^3* 
Log[x]*Log[e + f*x] + 3*a*b^2*e*m*n^2*Log[x]^2*Log[e + f*x] - 3*b^3*e*m*n^ 
3*Log[x]^2*Log[e + f*x] - b^3*e*m*n^3*Log[x]^3*Log[e + f*x] + 3*a^2*b*e*m* 
Log[c*x^n]*Log[e + f*x] - 6*a*b^2*e*m*n*Log[c*x^n]*Log[e + f*x] + 6*b^3*e* 
m*n^2*Log[c*x^n]*Log[e + f*x] - 6*a*b^2*e*m*n*Log[x]*Log[c*x^n]*Log[e + f* 
x] + 6*b^3*e*m*n^2*Log[x]*Log[c*x^n]*Log[e + f*x] + 3*b^3*e*m*n^2*Log[x]^2 
*Log[c*x^n]*Log[e + f*x] + 3*a*b^2*e*m*Log[c*x^n]^2*Log[e + f*x] - 3*b^3*e 
*m*n*Log[c*x^n]^2*Log[e + f*x] - 3*b^3*e*m*n*Log[x]*Log[c*x^n]^2*Log[e + f 
*x] + b^3*e*m*Log[c*x^n]^3*Log[e + f*x] + a^3*f*x*Log[d*(e + f*x)^m] - 3*a 
^2*b*f*n*x*Log[d*(e + f*x)^m] + 6*a*b^2*f*n^2*x*Log[d*(e + f*x)^m] - 6*b^3 
*f*n^3*x*Log[d*(e + f*x)^m] + 3*a^2*b*f*x*Log[c*x^n]*Log[d*(e + f*x)^m] - 
6*a*b^2*f*n*x*Log[c*x^n]*Log[d*(e + f*x)^m] + 6*b^3*f*n^2*x*Log[c*x^n]*Log 
[d*(e + f*x)^m] + 3*a*b^2*f*x*Log[c*x^n]^2*Log[d*(e + f*x)^m] - 3*b^3*f*n* 
x*Log[c*x^n]^2*Log[d*(e + f*x)^m] + b^3*f*x*Log[c*x^n]^3*Log[d*(e + f*x)^m 
] + 3*a^2*b*e*m*n*Log[x]*Log[1 + (f*x)/e] - 6*a*b^2*e*m*n^2*Log[x]*Log[...
 

Rubi [A] (verified)

Time = 0.99 (sec) , antiderivative size = 480, normalized size of antiderivative = 1.01, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2818, 6, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx\)

\(\Big \downarrow \) 2818

\(\displaystyle -f m \int \left (\frac {6 n^2 x \log \left (c x^n\right ) b^3}{e+f x}-\frac {6 n^3 x b^3}{e+f x}+\frac {6 a n^2 x b^2}{e+f x}-\frac {3 n x \left (a+b \log \left (c x^n\right )\right )^2 b}{e+f x}+\frac {x \left (a+b \log \left (c x^n\right )\right )^3}{e+f x}\right )dx+6 a b^2 n^2 x \log \left (d (e+f x)^m\right )-3 b n x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right )+6 b^3 n^2 x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-6 b^3 n^3 x \log \left (d (e+f x)^m\right )\)

\(\Big \downarrow \) 6

\(\displaystyle -f m \int \left (\frac {6 n^2 x \log \left (c x^n\right ) b^3}{e+f x}-\frac {3 n x \left (a+b \log \left (c x^n\right )\right )^2 b}{e+f x}+\frac {x \left (a+b \log \left (c x^n\right )\right )^3}{e+f x}+\frac {\left (6 a b^2 n^2-6 b^3 n^3\right ) x}{e+f x}\right )dx+6 a b^2 n^2 x \log \left (d (e+f x)^m\right )-3 b n x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right )+6 b^3 n^2 x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-6 b^3 n^3 x \log \left (d (e+f x)^m\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle 6 a b^2 n^2 x \log \left (d (e+f x)^m\right )-f m \left (\frac {6 b^2 e n^2 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{f^2}+\frac {6 b^2 e n^2 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{f^2}-\frac {6 b^2 e n^2 (a-b n) \log (e+f x)}{f^2}+\frac {12 a b^2 n^2 x}{f}+\frac {6 b^2 n^2 x (a-b n)}{f}-\frac {3 b e n \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )^2}{f^2}+\frac {3 b e n \log \left (\frac {f x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{f^2}-\frac {e \log \left (\frac {f x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^3}{f^2}-\frac {6 b n x \left (a+b \log \left (c x^n\right )\right )^2}{f}+\frac {x \left (a+b \log \left (c x^n\right )\right )^3}{f}-\frac {6 b^3 e n^2 \log \left (c x^n\right ) \log \left (\frac {f x}{e}+1\right )}{f^2}+\frac {18 b^3 n^2 x \log \left (c x^n\right )}{f}-\frac {6 b^3 e n^3 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{f^2}-\frac {6 b^3 e n^3 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{f^2}-\frac {6 b^3 e n^3 \operatorname {PolyLog}\left (4,-\frac {f x}{e}\right )}{f^2}-\frac {18 b^3 n^3 x}{f}\right )-3 b n x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right )+6 b^3 n^2 x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-6 b^3 n^3 x \log \left (d (e+f x)^m\right )\)

Input:

Int[(a + b*Log[c*x^n])^3*Log[d*(e + f*x)^m],x]
 

Output:

6*a*b^2*n^2*x*Log[d*(e + f*x)^m] - 6*b^3*n^3*x*Log[d*(e + f*x)^m] + 6*b^3* 
n^2*x*Log[c*x^n]*Log[d*(e + f*x)^m] - 3*b*n*x*(a + b*Log[c*x^n])^2*Log[d*( 
e + f*x)^m] + x*(a + b*Log[c*x^n])^3*Log[d*(e + f*x)^m] - f*m*((12*a*b^2*n 
^2*x)/f - (18*b^3*n^3*x)/f + (6*b^2*n^2*(a - b*n)*x)/f + (18*b^3*n^2*x*Log 
[c*x^n])/f - (6*b*n*x*(a + b*Log[c*x^n])^2)/f + (x*(a + b*Log[c*x^n])^3)/f 
 - (6*b^2*e*n^2*(a - b*n)*Log[e + f*x])/f^2 - (6*b^3*e*n^2*Log[c*x^n]*Log[ 
1 + (f*x)/e])/f^2 + (3*b*e*n*(a + b*Log[c*x^n])^2*Log[1 + (f*x)/e])/f^2 - 
(e*(a + b*Log[c*x^n])^3*Log[1 + (f*x)/e])/f^2 - (6*b^3*e*n^3*PolyLog[2, -( 
(f*x)/e)])/f^2 + (6*b^2*e*n^2*(a + b*Log[c*x^n])*PolyLog[2, -((f*x)/e)])/f 
^2 - (3*b*e*n*(a + b*Log[c*x^n])^2*PolyLog[2, -((f*x)/e)])/f^2 - (6*b^3*e* 
n^3*PolyLog[3, -((f*x)/e)])/f^2 + (6*b^2*e*n^2*(a + b*Log[c*x^n])*PolyLog[ 
3, -((f*x)/e)])/f^2 - (6*b^3*e*n^3*PolyLog[4, -((f*x)/e)])/f^2)
 

Defintions of rubi rules used

rule 6
Int[(u_.)*((v_.) + (a_.)*(Fx_) + (b_.)*(Fx_))^(p_.), x_Symbol] :> Int[u*(v 
+ (a + b)*Fx)^p, x] /; FreeQ[{a, b}, x] &&  !FreeQ[Fx, x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2818
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))^(p_.), x_Symbol] :> With[{u = IntHide[(a + b*Log[c*x^n])^p, x]}, 
Simp[Log[d*(e + f*x^m)^r]   u, x] - Simp[f*m*r   Int[x^(m - 1)/(e + f*x^m) 
  u, x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && Inte 
gerQ[m]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.17 (sec) , antiderivative size = 15385, normalized size of antiderivative = 32.53

\[\text {output too large to display}\]

Input:

int((a+b*ln(c*x^n))^3*ln(d*(f*x+e)^m),x)
 

Output:

result too large to display
 

Fricas [F]

\[ \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{3} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \] Input:

integrate((a+b*log(c*x^n))^3*log(d*(f*x+e)^m),x, algorithm="fricas")
 

Output:

integral((b^3*log(c*x^n)^3 + 3*a*b^2*log(c*x^n)^2 + 3*a^2*b*log(c*x^n) + a 
^3)*log((f*x + e)^m*d), x)
 

Sympy [F(-1)]

Timed out. \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx=\text {Timed out} \] Input:

integrate((a+b*ln(c*x**n))**3*ln(d*(f*x+e)**m),x)
 

Output:

Timed out
 

Maxima [F]

\[ \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{3} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \] Input:

integrate((a+b*log(c*x^n))^3*log(d*(f*x+e)^m),x, algorithm="maxima")
 

Output:

((b^3*e*m*log(f*x + e) - (f*m - f*log(d))*b^3*x)*log(x^n)^3 + (b^3*f*x*log 
(x^n)^3 - 3*((f*n - f*log(c))*b^3 - a*b^2*f)*x*log(x^n)^2 - 3*(2*(f*n - f* 
log(c))*a*b^2 - (2*f*n^2 - 2*f*n*log(c) + f*log(c)^2)*b^3 - a^2*b*f)*x*log 
(x^n) - (3*(f*n - f*log(c))*a^2*b - 3*(2*f*n^2 - 2*f*n*log(c) + f*log(c)^2 
)*a*b^2 + (6*f*n^3 - 6*f*n^2*log(c) + 3*f*n*log(c)^2 - f*log(c)^3)*b^3 - a 
^3*f)*x)*log((f*x + e)^m))/f - integrate((((f^2*m - f^2*log(d))*a^3 - 3*(f 
^2*m*n - (f^2*m - f^2*log(d))*log(c))*a^2*b + 3*(2*f^2*m*n^2 - 2*f^2*m*n*l 
og(c) + (f^2*m - f^2*log(d))*log(c)^2)*a*b^2 - (6*f^2*m*n^3 - 6*f^2*m*n^2* 
log(c) + 3*f^2*m*n*log(c)^2 - (f^2*m - f^2*log(d))*log(c)^3)*b^3)*x^2 + 3* 
(((f^2*m - f^2*log(d))*a*b^2 - (2*f^2*m*n - f^2*n*log(d) - (f^2*m - f^2*lo 
g(d))*log(c))*b^3)*x^2 - (a*b^2*e*f*log(d) + (e*f*m*n - e*f*n*log(d) + e*f 
*log(c)*log(d))*b^3)*x + (b^3*e*f*m*n*x + b^3*e^2*m*n)*log(f*x + e))*log(x 
^n)^2 - (b^3*e*f*log(c)^3*log(d) + 3*a*b^2*e*f*log(c)^2*log(d) + 3*a^2*b*e 
*f*log(c)*log(d) + a^3*e*f*log(d))*x + 3*(((f^2*m - f^2*log(d))*a^2*b - 2* 
(f^2*m*n - (f^2*m - f^2*log(d))*log(c))*a*b^2 + (2*f^2*m*n^2 - 2*f^2*m*n*l 
og(c) + (f^2*m - f^2*log(d))*log(c)^2)*b^3)*x^2 - (b^3*e*f*log(c)^2*log(d) 
 + 2*a*b^2*e*f*log(c)*log(d) + a^2*b*e*f*log(d))*x)*log(x^n))/(f^2*x^2 + e 
*f*x), x)
 

Giac [F]

\[ \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{3} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \] Input:

integrate((a+b*log(c*x^n))^3*log(d*(f*x+e)^m),x, algorithm="giac")
 

Output:

integrate((b*log(c*x^n) + a)^3*log((f*x + e)^m*d), x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

Timed out. \[ \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx=\int \ln \left (d\,{\left (e+f\,x\right )}^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^3 \,d x \] Input:

int(log(d*(e + f*x)^m)*(a + b*log(c*x^n))^3,x)
 

Output:

int(log(d*(e + f*x)^m)*(a + b*log(c*x^n))^3, x)
 

Reduce [F]

\[ \int \left (a+b \log \left (c x^n\right )\right )^3 \log \left (d (e+f x)^m\right ) \, dx =\text {Too large to display} \] Input:

int((a+b*log(c*x^n))^3*log(d*(f*x+e)^m),x)
 

Output:

( - 4*int(log(x**n*c)**3/(e*x + f*x**2),x)*b**3*e**2*m*n - 12*int(log(x**n 
*c)**2/(e*x + f*x**2),x)*a*b**2*e**2*m*n + 12*int(log(x**n*c)**2/(e*x + f* 
x**2),x)*b**3*e**2*m*n**2 - 12*int(log(x**n*c)/(e*x + f*x**2),x)*a**2*b*e* 
*2*m*n + 24*int(log(x**n*c)/(e*x + f*x**2),x)*a*b**2*e**2*m*n**2 - 24*int( 
log(x**n*c)/(e*x + f*x**2),x)*b**3*e**2*m*n**3 + 4*log((e + f*x)**m*d)*log 
(x**n*c)**3*b**3*f*n*x + 12*log((e + f*x)**m*d)*log(x**n*c)**2*a*b**2*f*n* 
x - 12*log((e + f*x)**m*d)*log(x**n*c)**2*b**3*f*n**2*x + 12*log((e + f*x) 
**m*d)*log(x**n*c)*a**2*b*f*n*x - 24*log((e + f*x)**m*d)*log(x**n*c)*a*b** 
2*f*n**2*x + 24*log((e + f*x)**m*d)*log(x**n*c)*b**3*f*n**3*x + 4*log((e + 
 f*x)**m*d)*a**3*e*n + 4*log((e + f*x)**m*d)*a**3*f*n*x - 12*log((e + f*x) 
**m*d)*a**2*b*e*n**2 - 12*log((e + f*x)**m*d)*a**2*b*f*n**2*x + 24*log((e 
+ f*x)**m*d)*a*b**2*e*n**3 + 24*log((e + f*x)**m*d)*a*b**2*f*n**3*x - 24*l 
og((e + f*x)**m*d)*b**3*e*n**4 - 24*log((e + f*x)**m*d)*b**3*f*n**4*x + lo 
g(x**n*c)**4*b**3*e*m + 4*log(x**n*c)**3*a*b**2*e*m - 4*log(x**n*c)**3*b** 
3*e*m*n - 4*log(x**n*c)**3*b**3*f*m*n*x + 6*log(x**n*c)**2*a**2*b*e*m - 12 
*log(x**n*c)**2*a*b**2*e*m*n - 12*log(x**n*c)**2*a*b**2*f*m*n*x + 12*log(x 
**n*c)**2*b**3*e*m*n**2 + 24*log(x**n*c)**2*b**3*f*m*n**2*x - 12*log(x**n* 
c)*a**2*b*f*m*n*x + 48*log(x**n*c)*a*b**2*f*m*n**2*x - 72*log(x**n*c)*b**3 
*f*m*n**3*x - 4*a**3*f*m*n*x + 24*a**2*b*f*m*n**2*x - 72*a*b**2*f*m*n**3*x 
 + 96*b**3*f*m*n**4*x)/(4*f*n)