\(\int \frac {(a+b \log (c x^n))^2 \log (1+e x)}{x} \, dx\) [20]

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

-(a+b*ln(c*x^n))^2*polylog(2,-e*x)+2*b*n*(a+b*ln(c*x^n))*polylog(3,-e*x)-2 
*b^2*n^2*polylog(4,-e*x)
 

Mathematica [A] (verified)

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

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

Output:

-((a + b*Log[c*x^n])^2*PolyLog[2, -(e*x)]) + 2*b*n*((a + b*Log[c*x^n])*Pol 
yLog[3, -(e*x)] - b*n*PolyLog[4, -(e*x)])
 

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.96, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2821, 2830, 7143}

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 {\log (e x+1) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx\)

\(\Big \downarrow \) 2821

\(\displaystyle 2 b n \int \frac {\left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}(2,-e x)}{x}dx-\operatorname {PolyLog}(2,-e x) \left (a+b \log \left (c x^n\right )\right )^2\)

\(\Big \downarrow \) 2830

\(\displaystyle 2 b n \left (\operatorname {PolyLog}(3,-e x) \left (a+b \log \left (c x^n\right )\right )-b n \int \frac {\operatorname {PolyLog}(3,-e x)}{x}dx\right )-\operatorname {PolyLog}(2,-e x) \left (a+b \log \left (c x^n\right )\right )^2\)

\(\Big \downarrow \) 7143

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

Input:

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

Output:

-((a + b*Log[c*x^n])^2*PolyLog[2, -(e*x)]) + 2*b*n*((a + b*Log[c*x^n])*Pol 
yLog[3, -(e*x)] - b*n*PolyLog[4, -(e*x)])
 

Defintions of rubi rules used

rule 2821
Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b 
_.))^(p_.))/(x_), x_Symbol] :> Simp[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c 
*x^n])^p/m), x] + Simp[b*n*(p/m)   Int[PolyLog[2, (-d)*f*x^m]*((a + b*Log[c 
*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 
0] && EqQ[d*e, 1]
 

rule 2830
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*PolyLog[k_, (e_.)*(x_)^(q_ 
.)])/(x_), x_Symbol] :> Simp[PolyLog[k + 1, e*x^q]*((a + b*Log[c*x^n])^p/q) 
, x] - Simp[b*n*(p/q)   Int[PolyLog[k + 1, e*x^q]*((a + b*Log[c*x^n])^(p - 
1)/x), x], x] /; FreeQ[{a, b, c, e, k, n, q}, x] && GtQ[p, 0]
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 
Maple [C] (warning: unable to verify)

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

Time = 6.92 (sec) , antiderivative size = 352, normalized size of antiderivative = 6.40

method result size
risch \(-\ln \left (x \right )^{2} \operatorname {dilog}\left (e x +1\right ) b^{2} n^{2}+\ln \left (x \right )^{2} \operatorname {polylog}\left (2, -e x \right ) b^{2} n^{2}+2 \ln \left (x \right ) \ln \left (x^{n}\right ) \operatorname {dilog}\left (e x +1\right ) b^{2} n -2 \ln \left (x \right ) \ln \left (x^{n}\right ) \operatorname {polylog}\left (2, -e x \right ) b^{2} n -\ln \left (x^{n}\right )^{2} \operatorname {dilog}\left (e x +1\right ) b^{2}+2 \ln \left (x^{n}\right ) \operatorname {polylog}\left (3, -e x \right ) b^{2} n -2 b^{2} n^{2} \operatorname {polylog}\left (4, -e x \right )+\left (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 \right ) b \left (-\left (\ln \left (x^{n}\right )-n \ln \left (x \right )\right ) \operatorname {dilog}\left (e x +1\right )-\ln \left (x \right ) \operatorname {polylog}\left (2, -e x \right ) n +\operatorname {polylog}\left (3, -e x \right ) n \right )-\frac {{\left (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 \right )}^{2} \operatorname {dilog}\left (e x +1\right )}{4}\) \(352\)

Input:

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

Output:

-ln(x)^2*dilog(e*x+1)*b^2*n^2+ln(x)^2*polylog(2,-e*x)*b^2*n^2+2*ln(x)*ln(x 
^n)*dilog(e*x+1)*b^2*n-2*ln(x)*ln(x^n)*polylog(2,-e*x)*b^2*n-ln(x^n)^2*dil 
og(e*x+1)*b^2+2*ln(x^n)*polylog(3,-e*x)*b^2*n-2*b^2*n^2*polylog(4,-e*x)+(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*(-(ln(x^n)-n*ln(x))*dilog(e*x+1)-ln(x)*polylog(2,-e*x)*n+polylog(3,-e*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*l 
n(c)+2*a)^2*dilog(e*x+1)
 

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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