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

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

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

\(\Big \downarrow \) 2825

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 2825
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))^(p_.)*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q* 
(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, g, r, m 
, n, q}, x] && IGtQ[p, 0] && RationalQ[m] && RationalQ[q]
 
Maple [C] (warning: unable to verify)

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

Time = 163.31 (sec) , antiderivative size = 4845, normalized size of antiderivative = 12.99

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

Input:

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

Output:

1/2*m/f*x*e*ln(c)^2*b^2-1/2*m*a^2*e^2/f^2*ln(f*x+e)-1/4*a^2*m*x^2-1/2*m*ln 
(x^n)*x^2*b^2*ln(c)+1/2*m*n*x^2*b^2*ln(c)+1/2*m*b^2*n*ln(x^n)*x^2+1/16*m*x 
^2*Pi^2*b^2*csgn(I*c*x^n)^6+1/2*m/f*b^2*ln(x^n)^2*x*e+m/f*x*e*ln(c)*a*b-1/ 
2*m*b*ln(x^n)*x^2*a+1/2*m*b*n*x^2*a+(-1/8*I*Pi*csgn(I*d)*csgn(I*(f*x+e)^m) 
*csgn(I*d*(f*x+e)^m)+1/8*I*Pi*csgn(I*d)*csgn(I*d*(f*x+e)^m)^2+1/8*I*Pi*csg 
n(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)^2-1/8*I*Pi*csgn(I*d*(f*x+e)^m)^3+1/4*ln 
(d))*(1/2*(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)^2*x^2+2*b^2*x^2*ln(x^n)^2-2*b^2*x^2*ln(x^n)*n+b^2*n^2*x^2+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)* 
b*(1/2*x^2*ln(x^n)-1/4*n*x^2))+(1/2*b^2*x^2*ln(x^n)^2+1/2*b*x^2*(I*Pi*b*cs 
gn(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)*ln(x 
^n)+1/8*x^2*(2*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^3*csgn(I*c)-Pi^2*b^2*c 
sgn(I*x^n)^2*csgn(I*c*x^n)^2*csgn(I*c)^2-4*Pi^2*b^2*csgn(I*x^n)*csgn(I*c*x 
^n)^4*csgn(I*c)+4*I*Pi*a*b*csgn(I*x^n)*csgn(I*c*x^n)^2+4*I*Pi*ln(c)*b^2*cs 
gn(I*c*x^n)^2*csgn(I*c)-4*b^2*ln(c)*n+8*a*b*ln(c)+4*a^2+4*I*Pi*a*b*csgn(I* 
c*x^n)^2*csgn(I*c)+4*b^2*ln(c)^2+2*b^2*n^2-4*I*Pi*ln(c)*b^2*csgn(I*c*x^n)^ 
3+2*Pi^2*b^2*csgn(I*c*x^n)^5*csgn(I*c)-Pi^2*b^2*csgn(I*c*x^n)^4*csgn(I*...
 

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(12*int(log(x**n*c)**2/(e*x + f*x**2),x)*b**2*e**3*m*n + 24*int(log(x**n*c 
)/(e*x + f*x**2),x)*a*b*e**3*m*n - 12*int(log(x**n*c)/(e*x + f*x**2),x)*b* 
*2*e**3*m*n**2 + 12*log((e + f*x)**m*d)*log(x**n*c)**2*b**2*f**2*n*x**2 + 
24*log((e + f*x)**m*d)*log(x**n*c)*a*b*f**2*n*x**2 - 12*log((e + f*x)**m*d 
)*log(x**n*c)*b**2*f**2*n**2*x**2 - 12*log((e + f*x)**m*d)*a**2*e**2*n + 1 
2*log((e + f*x)**m*d)*a**2*f**2*n*x**2 + 12*log((e + f*x)**m*d)*a*b*e**2*n 
**2 - 12*log((e + f*x)**m*d)*a*b*f**2*n**2*x**2 - 6*log((e + f*x)**m*d)*b* 
*2*e**2*n**3 + 6*log((e + f*x)**m*d)*b**2*f**2*n**3*x**2 - 4*log(x**n*c)** 
3*b**2*e**2*m - 12*log(x**n*c)**2*a*b*e**2*m + 6*log(x**n*c)**2*b**2*e**2* 
m*n + 12*log(x**n*c)**2*b**2*e*f*m*n*x - 6*log(x**n*c)**2*b**2*f**2*m*n*x* 
*2 + 24*log(x**n*c)*a*b*e*f*m*n*x - 12*log(x**n*c)*a*b*f**2*m*n*x**2 - 36* 
log(x**n*c)*b**2*e*f*m*n**2*x + 12*log(x**n*c)*b**2*f**2*m*n**2*x**2 + 12* 
a**2*e*f*m*n*x - 6*a**2*f**2*m*n*x**2 - 36*a*b*e*f*m*n**2*x + 12*a*b*f**2* 
m*n**2*x**2 + 42*b**2*e*f*m*n**3*x - 9*b**2*f**2*m*n**3*x**2)/(24*f**2*n)