\(\int x^2 (a+b \log (c x^n)) \log (1+e x) \, dx\) [9]

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 = 20, antiderivative size = 178 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx=\frac {4 b n x}{9 e^2}-\frac {5 b n x^2}{36 e}+\frac {2}{27} b n x^3-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log (1+e x)}{9 e^3}-\frac {1}{9} b n x^3 \log (1+e x)+\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)+\frac {b n \operatorname {PolyLog}(2,-e x)}{3 e^3} \] Output:

4/9*b*n*x/e^2-5/36*b*n*x^2/e+2/27*b*n*x^3-1/3*x*(a+b*ln(c*x^n))/e^2+1/6*x^ 
2*(a+b*ln(c*x^n))/e-1/9*x^3*(a+b*ln(c*x^n))-1/9*b*n*ln(e*x+1)/e^3-1/9*b*n* 
x^3*ln(e*x+1)+1/3*(a+b*ln(c*x^n))*ln(e*x+1)/e^3+1/3*x^3*(a+b*ln(c*x^n))*ln 
(e*x+1)+1/3*b*n*polylog(2,-e*x)/e^3
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 161, normalized size of antiderivative = 0.90 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx=\frac {-36 a e x+48 b e n x+18 a e^2 x^2-15 b e^2 n x^2-12 a e^3 x^3+8 b e^3 n x^3+36 a \log (1+e x)-12 b n \log (1+e x)+36 a e^3 x^3 \log (1+e x)-12 b e^3 n x^3 \log (1+e x)+6 b \log \left (c x^n\right ) \left (e x \left (-6+3 e x-2 e^2 x^2\right )+6 \left (1+e^3 x^3\right ) \log (1+e x)\right )+36 b n \operatorname {PolyLog}(2,-e x)}{108 e^3} \] Input:

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

Output:

(-36*a*e*x + 48*b*e*n*x + 18*a*e^2*x^2 - 15*b*e^2*n*x^2 - 12*a*e^3*x^3 + 8 
*b*e^3*n*x^3 + 36*a*Log[1 + e*x] - 12*b*n*Log[1 + e*x] + 36*a*e^3*x^3*Log[ 
1 + e*x] - 12*b*e^3*n*x^3*Log[1 + e*x] + 6*b*Log[c*x^n]*(e*x*(-6 + 3*e*x - 
 2*e^2*x^2) + 6*(1 + e^3*x^3)*Log[1 + e*x]) + 36*b*n*PolyLog[2, -(e*x)])/( 
108*e^3)
 

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 171, 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.100, 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^2 \log (e x+1) \left (a+b \log \left (c x^n\right )\right ) \, dx\)

\(\Big \downarrow \) 2823

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {1}{3} x^3 \log (e x+1) \left (a+b \log \left (c x^n\right )\right )+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )-b n \left (-\frac {\operatorname {PolyLog}(2,-e x)}{3 e^3}+\frac {\log (e x+1)}{9 e^3}-\frac {4 x}{9 e^2}+\frac {1}{9} x^3 \log (e x+1)+\frac {5 x^2}{36 e}-\frac {2 x^3}{27}\right )\)

Input:

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

Output:

-1/3*(x*(a + b*Log[c*x^n]))/e^2 + (x^2*(a + b*Log[c*x^n]))/(6*e) - (x^3*(a 
 + b*Log[c*x^n]))/9 + ((a + b*Log[c*x^n])*Log[1 + e*x])/(3*e^3) + (x^3*(a 
+ b*Log[c*x^n])*Log[1 + e*x])/3 - b*n*((-4*x)/(9*e^2) + (5*x^2)/(36*e) - ( 
2*x^3)/27 + Log[1 + e*x]/(9*e^3) + (x^3*Log[1 + e*x])/9 - PolyLog[2, -(e*x 
)]/(3*e^3))
 

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 = 6.55 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.60

method result size
risch \(\left (\frac {b \,x^{3} \ln \left (e x +1\right )}{3}+\frac {b \left (-2 e^{3} x^{3}+3 e^{2} x^{2}-6 e x +6 \ln \left (e x +1\right )\right )}{18 e^{3}}\right ) \ln \left (x^{n}\right )+\frac {\left (\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}+b \ln \left (c \right )+a \right ) \left (\frac {\ln \left (e x +1\right ) \left (e x +1\right )^{3}}{3}-\frac {\left (e x +1\right )^{3}}{9}-\ln \left (e x +1\right ) \left (e x +1\right )^{2}+\frac {\left (e x +1\right )^{2}}{2}+\ln \left (e x +1\right ) \left (e x +1\right )-e x -1\right )}{e^{3}}+\frac {2 b n \,x^{3}}{27}-\frac {5 b n \,x^{2}}{36 e}+\frac {4 b n x}{9 e^{2}}+\frac {71 n b}{108 e^{3}}-\frac {b n \,x^{3} \ln \left (e x +1\right )}{9}-\frac {b n \ln \left (e x +1\right )}{9 e^{3}}+\frac {n b \operatorname {dilog}\left (e x +1\right )}{3 e^{3}}\) \(284\)

Input:

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

Output:

(1/3*b*x^3*ln(e*x+1)+1/18*b*(-2*e^3*x^3+3*e^2*x^2-6*e*x+6*ln(e*x+1))/e^3)* 
ln(x^n)+(1/2*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*Pi*b*csgn(I*x^n)*csg 
n(I*c*x^n)*csgn(I*c)-1/2*I*Pi*b*csgn(I*c*x^n)^3+1/2*I*Pi*b*csgn(I*c*x^n)^2 
*csgn(I*c)+b*ln(c)+a)/e^3*(1/3*ln(e*x+1)*(e*x+1)^3-1/9*(e*x+1)^3-ln(e*x+1) 
*(e*x+1)^2+1/2*(e*x+1)^2+ln(e*x+1)*(e*x+1)-e*x-1)+2/27*b*n*x^3-5/36*b*n*x^ 
2/e+4/9*b*n*x/e^2+71/108/e^3*n*b-1/9*b*n*x^3*ln(e*x+1)-1/9*b*n*ln(e*x+1)/e 
^3+1/3/e^3*n*b*dilog(e*x+1)
 

Fricas [F]

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

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

Output:

integral(b*x^2*log(c*x^n)*log(e*x + 1) + a*x^2*log(e*x + 1), x)
 

Sympy [F(-1)]

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

integrate(x**2*(a+b*ln(c*x**n))*ln(e*x+1),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.24 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx=\frac {{\left (\log \left (e x + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-e x\right )\right )} b n}{3 \, e^{3}} - \frac {{\left (b {\left (n - 3 \, \log \left (c\right )\right )} - 3 \, a\right )} \log \left (e x + 1\right )}{9 \, e^{3}} - \frac {4 \, {\left (3 \, a e^{3} - {\left (2 \, e^{3} n - 3 \, e^{3} \log \left (c\right )\right )} b\right )} x^{3} - 3 \, {\left (6 \, a e^{2} - {\left (5 \, e^{2} n - 6 \, e^{2} \log \left (c\right )\right )} b\right )} x^{2} - 12 \, {\left ({\left (4 \, e n - 3 \, e \log \left (c\right )\right )} b - 3 \, a e\right )} x - 12 \, {\left ({\left (3 \, a e^{3} - {\left (e^{3} n - 3 \, e^{3} \log \left (c\right )\right )} b\right )} x^{3} - 3 \, b n \log \left (x\right )\right )} \log \left (e x + 1\right ) + 6 \, {\left (2 \, b e^{3} x^{3} - 3 \, b e^{2} x^{2} + 6 \, b e x - 6 \, {\left (b e^{3} x^{3} + b\right )} \log \left (e x + 1\right )\right )} \log \left (x^{n}\right )}{108 \, e^{3}} \] Input:

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

Output:

1/3*(log(e*x + 1)*log(x) + dilog(-e*x))*b*n/e^3 - 1/9*(b*(n - 3*log(c)) - 
3*a)*log(e*x + 1)/e^3 - 1/108*(4*(3*a*e^3 - (2*e^3*n - 3*e^3*log(c))*b)*x^ 
3 - 3*(6*a*e^2 - (5*e^2*n - 6*e^2*log(c))*b)*x^2 - 12*((4*e*n - 3*e*log(c) 
)*b - 3*a*e)*x - 12*((3*a*e^3 - (e^3*n - 3*e^3*log(c))*b)*x^3 - 3*b*n*log( 
x))*log(e*x + 1) + 6*(2*b*e^3*x^3 - 3*b*e^2*x^2 + 6*b*e*x - 6*(b*e^3*x^3 + 
 b)*log(e*x + 1))*log(x^n))/e^3
 

Giac [F]

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

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

Output:

integrate((b*log(c*x^n) + a)*x^2*log(e*x + 1), x)
 

Mupad [F(-1)]

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

int(x^2*log(e*x + 1)*(a + b*log(c*x^n)),x)
 

Output:

int(x^2*log(e*x + 1)*(a + b*log(c*x^n)), x)
 

Reduce [F]

\[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx=\frac {-36 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{e \,x^{2}+x}d x \right ) b n +36 \,\mathrm {log}\left (e x +1\right ) \mathrm {log}\left (x^{n} c \right ) b \,e^{3} n \,x^{3}+36 \,\mathrm {log}\left (e x +1\right ) a \,e^{3} n \,x^{3}+36 \,\mathrm {log}\left (e x +1\right ) a n -12 \,\mathrm {log}\left (e x +1\right ) b \,e^{3} n^{2} x^{3}-12 \,\mathrm {log}\left (e x +1\right ) b \,n^{2}+18 \mathrm {log}\left (x^{n} c \right )^{2} b -12 \,\mathrm {log}\left (x^{n} c \right ) b \,e^{3} n \,x^{3}+18 \,\mathrm {log}\left (x^{n} c \right ) b \,e^{2} n \,x^{2}-36 \,\mathrm {log}\left (x^{n} c \right ) b e n x -12 a \,e^{3} n \,x^{3}+18 a \,e^{2} n \,x^{2}-36 a e n x +8 b \,e^{3} n^{2} x^{3}-15 b \,e^{2} n^{2} x^{2}+48 b e \,n^{2} x}{108 e^{3} n} \] Input:

int(x^2*(a+b*log(c*x^n))*log(e*x+1),x)
 

Output:

( - 36*int(log(x**n*c)/(e*x**2 + x),x)*b*n + 36*log(e*x + 1)*log(x**n*c)*b 
*e**3*n*x**3 + 36*log(e*x + 1)*a*e**3*n*x**3 + 36*log(e*x + 1)*a*n - 12*lo 
g(e*x + 1)*b*e**3*n**2*x**3 - 12*log(e*x + 1)*b*n**2 + 18*log(x**n*c)**2*b 
 - 12*log(x**n*c)*b*e**3*n*x**3 + 18*log(x**n*c)*b*e**2*n*x**2 - 36*log(x* 
*n*c)*b*e*n*x - 12*a*e**3*n*x**3 + 18*a*e**2*n*x**2 - 36*a*e*n*x + 8*b*e** 
3*n**2*x**3 - 15*b*e**2*n**2*x**2 + 48*b*e*n**2*x)/(108*e**3*n)