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

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 = 234 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x^3} \, dx=-\frac {3 b f m n}{4 e x}-\frac {b f^2 m n \log (x)}{4 e^2}+\frac {b f^2 m n \log ^2(x)}{4 e^2}-\frac {f m \left (a+b \log \left (c x^n\right )\right )}{2 e x}-\frac {f^2 m \log (x) \left (a+b \log \left (c x^n\right )\right )}{2 e^2}+\frac {b f^2 m n \log (e+f x)}{4 e^2}-\frac {b f^2 m n \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{2 e^2}+\frac {f^2 m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{2 e^2}-\frac {b n \log \left (d (e+f x)^m\right )}{4 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{2 x^2}-\frac {b f^2 m n \operatorname {PolyLog}\left (2,1+\frac {f x}{e}\right )}{2 e^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 232, normalized size of antiderivative = 0.99 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x^3} \, dx=-\frac {2 a e f m x+3 b e f m n x-b f^2 m n x^2 \log ^2(x)+2 b e f m x \log \left (c x^n\right )-2 a f^2 m x^2 \log (e+f x)-b f^2 m n x^2 \log (e+f x)-2 b f^2 m x^2 \log \left (c x^n\right ) \log (e+f x)+2 a e^2 \log \left (d (e+f x)^m\right )+b e^2 n \log \left (d (e+f x)^m\right )+2 b e^2 \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+f^2 m x^2 \log (x) \left (2 a+b n+2 b \log \left (c x^n\right )+2 b n \log (e+f x)-2 b n \log \left (1+\frac {f x}{e}\right )\right )-2 b f^2 m n x^2 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{4 e^2 x^2} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 225, 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 \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x^3} \, dx\)

\(\Big \downarrow \) 2823

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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 = 11.16 (sec) , antiderivative size = 945, normalized size of antiderivative = 4.04

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

Input:

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

Output:

-1/4*I*m*f^2/e^2*ln(f*x+e)*Pi*b*csgn(I*c*x^n)^3+1/4*I*m*f^2/e^2*ln(x)*Pi*b 
*csgn(I*c*x^n)^3+(-1/2*b/x^2*ln(x^n)-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)+n*b+2*a)/x^2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gn(I*c)-1/4*I*m*f/e/x*Pi*b*csgn(I*c*x^n)^2*csgn 
(I*c)+1/4*I*m*f^2/e^2*ln(f*x+e)*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2+1/4*I*m*f 
^2/e^2*ln(f*x+e)*Pi*b*csgn(I*c*x^n)^2*csgn(I*c)-1/4*I*m*f^2/e^2*ln(x)*P...
 

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 285, normalized size of antiderivative = 1.22 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x^3} \, 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 f^{2} m n}{2 \, e^{2}} + \frac {{\left (2 \, a f^{2} m + {\left (f^{2} m n + 2 \, f^{2} m \log \left (c\right )\right )} b\right )} \log \left (f x + e\right )}{4 \, e^{2}} - \frac {2 \, b f^{2} m n x^{2} \log \left (f x + e\right ) \log \left (x\right ) - b f^{2} m n x^{2} \log \left (x\right )^{2} + 2 \, a e^{2} \log \left (d\right ) + {\left (2 \, a f^{2} m + {\left (f^{2} m n + 2 \, f^{2} m \log \left (c\right )\right )} b\right )} x^{2} \log \left (x\right ) + {\left (e^{2} n \log \left (d\right ) + 2 \, e^{2} \log \left (c\right ) \log \left (d\right )\right )} b + {\left (2 \, a e f m + {\left (3 \, e f m n + 2 \, e f m \log \left (c\right )\right )} b\right )} x + {\left (2 \, b e^{2} \log \left (x^{n}\right ) + 2 \, a e^{2} + {\left (e^{2} n + 2 \, e^{2} \log \left (c\right )\right )} b\right )} \log \left ({\left (f x + e\right )}^{m}\right ) - 2 \, {\left (b f^{2} m x^{2} \log \left (f x + e\right ) - b f^{2} m x^{2} \log \left (x\right ) - b e f m x - b e^{2} \log \left (d\right )\right )} \log \left (x^{n}\right )}{4 \, e^{2} x^{2}} \] Input:

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

Output:

1/2*(log(f*x/e + 1)*log(x) + dilog(-f*x/e))*b*f^2*m*n/e^2 + 1/4*(2*a*f^2*m 
 + (f^2*m*n + 2*f^2*m*log(c))*b)*log(f*x + e)/e^2 - 1/4*(2*b*f^2*m*n*x^2*l 
og(f*x + e)*log(x) - b*f^2*m*n*x^2*log(x)^2 + 2*a*e^2*log(d) + (2*a*f^2*m 
+ (f^2*m*n + 2*f^2*m*log(c))*b)*x^2*log(x) + (e^2*n*log(d) + 2*e^2*log(c)* 
log(d))*b + (2*a*e*f*m + (3*e*f*m*n + 2*e*f*m*log(c))*b)*x + (2*b*e^2*log( 
x^n) + 2*a*e^2 + (e^2*n + 2*e^2*log(c))*b)*log((f*x + e)^m) - 2*(b*f^2*m*x 
^2*log(f*x + e) - b*f^2*m*x^2*log(x) - b*e*f*m*x - b*e^2*log(d))*log(x^n)) 
/(e^2*x^2)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

( - 4*int(log(x**n*c)/(e*x**3 + f*x**4),x)*b*e**3*m*x**2 - 4*log((e + f*x) 
**m*d)*log(x**n*c)*b*e**2 - 4*log((e + f*x)**m*d)*a*e**2 + 4*log((e + f*x) 
**m*d)*a*f**2*x**2 - 2*log((e + f*x)**m*d)*b*e**2*n + 2*log((e + f*x)**m*d 
)*b*f**2*n*x**2 - 2*log(x**n*c)*b*e**2*m - 4*log(x)*a*f**2*m*x**2 - 2*log( 
x)*b*f**2*m*n*x**2 - 4*a*e*f*m*x - b*e**2*m*n - 2*b*e*f*m*n*x)/(8*e**2*x** 
2)