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

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 158, 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^2} \, dx\)

\(\Big \downarrow \) 2823

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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.30 (sec) , antiderivative size = 737, normalized size of antiderivative = 4.49

method result size
risch \(\left (-\frac {b \ln \left (x^{n}\right )}{x}-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )+2 b \ln \left (c \right )+2 n b +2 a}{2 x}\right ) \ln \left (\left (f x +e \right )^{m}\right )+\left (-\frac {i \pi \,\operatorname {csgn}\left (i d \right ) \operatorname {csgn}\left (i \left (f x +e \right )^{m}\right ) \operatorname {csgn}\left (i d \left (f x +e \right )^{m}\right )}{4}+\frac {i \pi \,\operatorname {csgn}\left (i d \right ) \operatorname {csgn}\left (i d \left (f x +e \right )^{m}\right )^{2}}{4}+\frac {i \pi \,\operatorname {csgn}\left (i \left (f x +e \right )^{m}\right ) \operatorname {csgn}\left (i d \left (f x +e \right )^{m}\right )^{2}}{4}-\frac {i \pi \operatorname {csgn}\left (i d \left (f x +e \right )^{m}\right )^{3}}{4}+\frac {\ln \left (d \right )}{2}\right ) \left (-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )+2 b \ln \left (c \right )+2 a}{x}-\frac {2 b \ln \left (x^{n}\right )}{x}-\frac {2 b n}{x}\right )+\frac {i m f \ln \left (x \right ) \pi b \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2 e}+\frac {i m f \ln \left (x \right ) \pi b \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2 e}+\frac {i m f \ln \left (f x +e \right ) \pi b \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2 e}-\frac {i m f \ln \left (f x +e \right ) \pi b \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2 e}-\frac {m f \ln \left (f x +e \right ) b \ln \left (c \right )}{e}-\frac {b f m n \ln \left (f x +e \right )}{e}-\frac {m f \ln \left (f x +e \right ) a}{e}-\frac {i m f \ln \left (x \right ) \pi b \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2 e}+\frac {i m f \ln \left (f x +e \right ) \pi b \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2 e}-\frac {i m f \ln \left (x \right ) \pi b \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2 e}-\frac {i m f \ln \left (f x +e \right ) \pi b \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2 e}+\frac {m f \ln \left (x \right ) b \ln \left (c \right )}{e}+\frac {b f m n \ln \left (x \right )}{e}+\frac {m f \ln \left (x \right ) a}{e}-\frac {m f b \ln \left (x^{n}\right ) \ln \left (f x +e \right )}{e}+\frac {m f b \ln \left (x^{n}\right ) \ln \left (x \right )}{e}-\frac {b f m n \ln \left (x \right )^{2}}{2 e}+\frac {b f m n \ln \left (-\frac {f x}{e}\right ) \ln \left (f x +e \right )}{e}+\frac {m f b n \operatorname {dilog}\left (-\frac {f x}{e}\right )}{e}\) \(737\)

Input:

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

Output:

(-b/x*ln(x^n)-1/2*(I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*csgn(I*x^n)*c 
sgn(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*n*b+2*a)/x)*ln((f*x+e)^m)+(-1/4*I*Pi*csgn(I*d)*csgn(I*(f* 
x+e)^m)*csgn(I*d*(f*x+e)^m)+1/4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}{x^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x + e\right )}^{m} d\right )}{x^{2}} \,d x } \] Input:

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

Output:

integral((b*log(c*x^n) + a)*log((f*x + e)^m*d)/x^2, 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^2} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [F]

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

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

Output:

integrate((b*log(c*x^n) + a)*log((f*x + e)^m*d)/x^2, 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^2} \, dx=\int \frac {\ln \left (d\,{\left (e+f\,x\right )}^m\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

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