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

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

Optimal result

Integrand size = 24, antiderivative size = 283 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=-\frac {5 b e^3 m n x}{16 f^3}+\frac {3 b e^2 m n x^2}{32 f^2}-\frac {7 b e m n x^3}{144 f}+\frac {1}{32} b m n x^4+\frac {e^3 m x \left (a+b \log \left (c x^n\right )\right )}{4 f^3}-\frac {e^2 m x^2 \left (a+b \log \left (c x^n\right )\right )}{8 f^2}+\frac {e m x^3 \left (a+b \log \left (c x^n\right )\right )}{12 f}-\frac {1}{16} m x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {b e^4 m n \log (e+f x)}{16 f^4}+\frac {b e^4 m n \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{4 f^4}-\frac {e^4 m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{4 f^4}-\frac {1}{16} b n x^4 \log \left (d (e+f x)^m\right )+\frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {b e^4 m n \operatorname {PolyLog}\left (2,1+\frac {f x}{e}\right )}{4 f^4} \] Output:

-5/16*b*e^3*m*n*x/f^3+3/32*b*e^2*m*n*x^2/f^2-7/144*b*e*m*n*x^3/f+1/32*b*m* 
n*x^4+1/4*e^3*m*x*(a+b*ln(c*x^n))/f^3-1/8*e^2*m*x^2*(a+b*ln(c*x^n))/f^2+1/ 
12*e*m*x^3*(a+b*ln(c*x^n))/f-1/16*m*x^4*(a+b*ln(c*x^n))+1/16*b*e^4*m*n*ln( 
f*x+e)/f^4+1/4*b*e^4*m*n*ln(-f*x/e)*ln(f*x+e)/f^4-1/4*e^4*m*(a+b*ln(c*x^n) 
)*ln(f*x+e)/f^4-1/16*b*n*x^4*ln(d*(f*x+e)^m)+1/4*x^4*(a+b*ln(c*x^n))*ln(d* 
(f*x+e)^m)+1/4*b*e^4*m*n*polylog(2,1+f*x/e)/f^4
 

Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 290, normalized size of antiderivative = 1.02 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=-\frac {-72 a e^3 f m x+90 b e^3 f m n x+36 a e^2 f^2 m x^2-27 b e^2 f^2 m n x^2-24 a e f^3 m x^3+14 b e f^3 m n x^3+18 a f^4 m x^4-9 b f^4 m n x^4+72 a e^4 m \log (e+f x)-18 b e^4 m n \log (e+f x)-72 b e^4 m n \log (x) \log (e+f x)-72 a f^4 x^4 \log \left (d (e+f x)^m\right )+18 b f^4 n x^4 \log \left (d (e+f x)^m\right )+6 b \log \left (c x^n\right ) \left (f m x \left (-12 e^3+6 e^2 f x-4 e f^2 x^2+3 f^3 x^3\right )+12 e^4 m \log (e+f x)-12 f^4 x^4 \log \left (d (e+f x)^m\right )\right )+72 b e^4 m n \log (x) \log \left (1+\frac {f x}{e}\right )+72 b e^4 m n \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{288 f^4} \] Input:

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

Output:

-1/288*(-72*a*e^3*f*m*x + 90*b*e^3*f*m*n*x + 36*a*e^2*f^2*m*x^2 - 27*b*e^2 
*f^2*m*n*x^2 - 24*a*e*f^3*m*x^3 + 14*b*e*f^3*m*n*x^3 + 18*a*f^4*m*x^4 - 9* 
b*f^4*m*n*x^4 + 72*a*e^4*m*Log[e + f*x] - 18*b*e^4*m*n*Log[e + f*x] - 72*b 
*e^4*m*n*Log[x]*Log[e + f*x] - 72*a*f^4*x^4*Log[d*(e + f*x)^m] + 18*b*f^4* 
n*x^4*Log[d*(e + f*x)^m] + 6*b*Log[c*x^n]*(f*m*x*(-12*e^3 + 6*e^2*f*x - 4* 
e*f^2*x^2 + 3*f^3*x^3) + 12*e^4*m*Log[e + f*x] - 12*f^4*x^4*Log[d*(e + f*x 
)^m]) + 72*b*e^4*m*n*Log[x]*Log[1 + (f*x)/e] + 72*b*e^4*m*n*PolyLog[2, -(( 
f*x)/e)])/f^4
 

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 272, normalized size of antiderivative = 0.96, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2823, 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 x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx\)

\(\Big \downarrow \) 2823

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )-\frac {e^4 m \log (e+f x) \left (a+b \log \left (c x^n\right )\right )}{4 f^4}+\frac {e^3 m x \left (a+b \log \left (c x^n\right )\right )}{4 f^3}-\frac {e^2 m x^2 \left (a+b \log \left (c x^n\right )\right )}{8 f^2}+\frac {e m x^3 \left (a+b \log \left (c x^n\right )\right )}{12 f}-\frac {1}{16} m x^4 \left (a+b \log \left (c x^n\right )\right )-b n \left (\frac {1}{16} x^4 \log \left (d (e+f x)^m\right )-\frac {e^4 m \operatorname {PolyLog}\left (2,\frac {f x}{e}+1\right )}{4 f^4}-\frac {e^4 m \log (e+f x)}{16 f^4}-\frac {e^4 m \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{4 f^4}+\frac {5 e^3 m x}{16 f^3}-\frac {3 e^2 m x^2}{32 f^2}+\frac {7 e m x^3}{144 f}-\frac {m x^4}{32}\right )\)

Input:

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

Output:

(e^3*m*x*(a + b*Log[c*x^n]))/(4*f^3) - (e^2*m*x^2*(a + b*Log[c*x^n]))/(8*f 
^2) + (e*m*x^3*(a + b*Log[c*x^n]))/(12*f) - (m*x^4*(a + b*Log[c*x^n]))/16 
- (e^4*m*(a + b*Log[c*x^n])*Log[e + f*x])/(4*f^4) + (x^4*(a + b*Log[c*x^n] 
)*Log[d*(e + f*x)^m])/4 - b*n*((5*e^3*m*x)/(16*f^3) - (3*e^2*m*x^2)/(32*f^ 
2) + (7*e*m*x^3)/(144*f) - (m*x^4)/32 - (e^4*m*Log[e + f*x])/(16*f^4) - (e 
^4*m*Log[-((f*x)/e)]*Log[e + f*x])/(4*f^4) + (x^4*Log[d*(e + f*x)^m])/16 - 
 (e^4*m*PolyLog[2, 1 + (f*x)/e])/(4*f^4))
 

Defintions of rubi rules used

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

rule 2823
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q*Log[d* 
(e + f*x^m)^r], x]}, Simp[(a + b*Log[c*x^n])   u, x] - Simp[b*n   Int[1/x 
 u, x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q 
+ 1)/m] || (RationalQ[m] && RationalQ[q])) && NeQ[q, -1]
 
Maple [C] (warning: unable to verify)

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

Time = 158.18 (sec) , antiderivative size = 1248, normalized size of antiderivative = 4.41

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

Input:

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

Output:

-1/16*x^4*a*m+(-1/4*I*Pi*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)+1 
/4*I*Pi*csgn(I*d)*csgn(I*d*(f*x+e)^m)^2+1/4*I*Pi*csgn(I*(f*x+e)^m)*csgn(I* 
d*(f*x+e)^m)^2-1/4*I*Pi*csgn(I*d*(f*x+e)^m)^3+1/2*ln(d))*(1/4*(I*Pi*b*csgn 
(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*b* 
csgn(I*c*x^n)^3+I*Pi*b*csgn(I*c*x^n)^2*csgn(I*c)+2*b*ln(c)+2*a)*x^4+1/2*b* 
x^4*ln(x^n)-1/8*b*n*x^4)-205/576*b*e^4*m*n/f^4-1/16*x^4*ln(c)*b*m-1/16*m*b 
*ln(x^n)*x^4+(1/4*b*x^4*ln(x^n)+1/16*x^4*(2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^ 
n)^2-2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-2*I*b*Pi*csgn(I*c*x^n)^3 
+2*I*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)+4*b*ln(c)-n*b+4*a))*ln((f*x+e)^m)+1/4* 
m/f^3*e^3*x*a+1/12*m/f*e*x^3*a-1/8*m/f^2*x^2*e^2*a-1/4*m/f^4*e^4*ln(f*x+e) 
*a-1/16*I*m/f^2*x^2*e^2*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-5/16*b*e^3*m*n*x/ 
f^3+3/32*b*e^2*m*n*x^2/f^2-7/144*b*e*m*n*x^3/f+1/16*b*e^4*m*n*ln(f*x+e)/f^ 
4-1/24*I*m/f*e*x^3*b*Pi*csgn(I*c*x^n)^3+1/16*I*m/f^2*x^2*e^2*b*Pi*csgn(I*c 
*x^n)^3-1/8*I*m/f^3*e^3*x*b*Pi*csgn(I*c*x^n)^3+1/8*I*m/f^4*e^4*ln(f*x+e)*b 
*Pi*csgn(I*c*x^n)^3+1/32*I*m*x^4*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)- 
1/32*I*m*x^4*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-1/32*I*m*x^4*b*Pi*csgn(I*c*x 
^n)^2*csgn(I*c)-1/4*m/f^4*b*ln(x^n)*e^4*ln(f*x+e)+1/32*I*m*x^4*b*Pi*csgn(I 
*c*x^n)^3-1/24*I*m/f*e*x^3*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+1/16*I 
*m/f^2*x^2*e^2*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/8*I*m/f^3*e^3*x* 
b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+1/8*I*m/f^4*e^4*ln(f*x+e)*b*Pi...
 

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 381, normalized size of antiderivative = 1.35 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=-\frac {{\left (\log \left (\frac {f x}{e} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-\frac {f x}{e}\right )\right )} b e^{4} m n}{4 \, f^{4}} - \frac {{\left (4 \, a e^{4} m - {\left (e^{4} m n - 4 \, e^{4} m \log \left (c\right )\right )} b\right )} \log \left (f x + e\right )}{16 \, f^{4}} + \frac {72 \, b e^{4} m n \log \left (f x + e\right ) \log \left (x\right ) - 9 \, {\left (2 \, {\left (f^{4} m - 4 \, f^{4} \log \left (d\right )\right )} a - {\left (f^{4} m n - 2 \, f^{4} n \log \left (d\right ) - 2 \, {\left (f^{4} m - 4 \, f^{4} \log \left (d\right )\right )} \log \left (c\right )\right )} b\right )} x^{4} + 2 \, {\left (12 \, a e f^{3} m - {\left (7 \, e f^{3} m n - 12 \, e f^{3} m \log \left (c\right )\right )} b\right )} x^{3} - 9 \, {\left (4 \, a e^{2} f^{2} m - {\left (3 \, e^{2} f^{2} m n - 4 \, e^{2} f^{2} m \log \left (c\right )\right )} b\right )} x^{2} + 18 \, {\left (4 \, a e^{3} f m - {\left (5 \, e^{3} f m n - 4 \, e^{3} f m \log \left (c\right )\right )} b\right )} x + 18 \, {\left (4 \, b f^{4} x^{4} \log \left (x^{n}\right ) + {\left (4 \, a f^{4} - {\left (f^{4} n - 4 \, f^{4} \log \left (c\right )\right )} b\right )} x^{4}\right )} \log \left ({\left (f x + e\right )}^{m}\right ) + 6 \, {\left (4 \, b e f^{3} m x^{3} - 6 \, b e^{2} f^{2} m x^{2} + 12 \, b e^{3} f m x - 12 \, b e^{4} m \log \left (f x + e\right ) - 3 \, {\left (f^{4} m - 4 \, f^{4} \log \left (d\right )\right )} b x^{4}\right )} \log \left (x^{n}\right )}{288 \, f^{4}} \] Input:

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

Output:

-1/4*(log(f*x/e + 1)*log(x) + dilog(-f*x/e))*b*e^4*m*n/f^4 - 1/16*(4*a*e^4 
*m - (e^4*m*n - 4*e^4*m*log(c))*b)*log(f*x + e)/f^4 + 1/288*(72*b*e^4*m*n* 
log(f*x + e)*log(x) - 9*(2*(f^4*m - 4*f^4*log(d))*a - (f^4*m*n - 2*f^4*n*l 
og(d) - 2*(f^4*m - 4*f^4*log(d))*log(c))*b)*x^4 + 2*(12*a*e*f^3*m - (7*e*f 
^3*m*n - 12*e*f^3*m*log(c))*b)*x^3 - 9*(4*a*e^2*f^2*m - (3*e^2*f^2*m*n - 4 
*e^2*f^2*m*log(c))*b)*x^2 + 18*(4*a*e^3*f*m - (5*e^3*f*m*n - 4*e^3*f*m*log 
(c))*b)*x + 18*(4*b*f^4*x^4*log(x^n) + (4*a*f^4 - (f^4*n - 4*f^4*log(c))*b 
)*x^4)*log((f*x + e)^m) + 6*(4*b*e*f^3*m*x^3 - 6*b*e^2*f^2*m*x^2 + 12*b*e^ 
3*f*m*x - 12*b*e^4*m*log(f*x + e) - 3*(f^4*m - 4*f^4*log(d))*b*x^4)*log(x^ 
n))/f^4
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=\frac {72 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{f \,x^{2}+e x}d x \right ) b \,e^{5} m n +72 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) \mathrm {log}\left (x^{n} c \right ) b \,f^{4} n \,x^{4}-72 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) a \,e^{4} n +72 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) a \,f^{4} n \,x^{4}+18 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) b \,e^{4} n^{2}-18 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) b \,f^{4} n^{2} x^{4}-36 \mathrm {log}\left (x^{n} c \right )^{2} b \,e^{4} m +72 \,\mathrm {log}\left (x^{n} c \right ) b \,e^{3} f m n x -36 \,\mathrm {log}\left (x^{n} c \right ) b \,e^{2} f^{2} m n \,x^{2}+24 \,\mathrm {log}\left (x^{n} c \right ) b e \,f^{3} m n \,x^{3}-18 \,\mathrm {log}\left (x^{n} c \right ) b \,f^{4} m n \,x^{4}+72 a \,e^{3} f m n x -36 a \,e^{2} f^{2} m n \,x^{2}+24 a e \,f^{3} m n \,x^{3}-18 a \,f^{4} m n \,x^{4}-90 b \,e^{3} f m \,n^{2} x +27 b \,e^{2} f^{2} m \,n^{2} x^{2}-14 b e \,f^{3} m \,n^{2} x^{3}+9 b \,f^{4} m \,n^{2} x^{4}}{288 f^{4} n} \] Input:

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

Output:

(72*int(log(x**n*c)/(e*x + f*x**2),x)*b*e**5*m*n + 72*log((e + f*x)**m*d)* 
log(x**n*c)*b*f**4*n*x**4 - 72*log((e + f*x)**m*d)*a*e**4*n + 72*log((e + 
f*x)**m*d)*a*f**4*n*x**4 + 18*log((e + f*x)**m*d)*b*e**4*n**2 - 18*log((e 
+ f*x)**m*d)*b*f**4*n**2*x**4 - 36*log(x**n*c)**2*b*e**4*m + 72*log(x**n*c 
)*b*e**3*f*m*n*x - 36*log(x**n*c)*b*e**2*f**2*m*n*x**2 + 24*log(x**n*c)*b* 
e*f**3*m*n*x**3 - 18*log(x**n*c)*b*f**4*m*n*x**4 + 72*a*e**3*f*m*n*x - 36* 
a*e**2*f**2*m*n*x**2 + 24*a*e*f**3*m*n*x**3 - 18*a*f**4*m*n*x**4 - 90*b*e* 
*3*f*m*n**2*x + 27*b*e**2*f**2*m*n**2*x**2 - 14*b*e*f**3*m*n**2*x**3 + 9*b 
*f**4*m*n**2*x**4)/(288*f**4*n)