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

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

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

Mathematica [A] (verified)

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

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

Output:

(2*a*e*x - 3*b*e*n*x - a*e^2*x^2 + b*e^2*n*x^2 - 2*a*Log[1 + e*x] + b*n*Lo 
g[1 + e*x] + 2*a*e^2*x^2*Log[1 + e*x] - b*e^2*n*x^2*Log[1 + e*x] + b*Log[c 
*x^n]*(e*x*(2 - e*x) + 2*(-1 + e^2*x^2)*Log[1 + e*x]) - 2*b*n*PolyLog[2, - 
(e*x)])/(4*e^2)
 

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 141, normalized size of antiderivative = 0.97, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, 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 \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}{2} \log (e x+1) x-\frac {x}{4}+\frac {1}{2 e}-\frac {\log (e x+1)}{2 e^2 x}\right )dx-\frac {\log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{2 e^2}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}+\frac {1}{2} x^2 \log (e x+1) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} x^2 \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 )}{2 e^2}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}+\frac {1}{2} x^2 \log (e x+1) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} x^2 \left (a+b \log \left (c x^n\right )\right )-b n \left (\frac {\operatorname {PolyLog}(2,-e x)}{2 e^2}-\frac {\log (e x+1)}{4 e^2}+\frac {1}{4} x^2 \log (e x+1)+\frac {3 x}{4 e}-\frac {x^2}{4}\right )\)

Input:

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

Output:

(x*(a + b*Log[c*x^n]))/(2*e) - (x^2*(a + b*Log[c*x^n]))/4 - ((a + b*Log[c* 
x^n])*Log[1 + e*x])/(2*e^2) + (x^2*(a + b*Log[c*x^n])*Log[1 + e*x])/2 - b* 
n*((3*x)/(4*e) - x^2/4 - Log[1 + e*x]/(4*e^2) + (x^2*Log[1 + e*x])/4 + Pol 
yLog[2, -(e*x)]/(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 = 3.46 (sec) , antiderivative size = 241, normalized size of antiderivative = 1.65

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

Input:

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

Output:

(1/2*b*x^2*ln(e*x+1)-1/4*b*(e^2*x^2-2*e*x+2*ln(e*x+1))/e^2)*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)*csgn(I*c*x^n)*csg 
n(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*l 
n(c)+a)/e^2*(1/2*ln(e*x+1)*(e*x+1)^2-1/4*(e*x+1)^2-ln(e*x+1)*(e*x+1)+e*x+1 
)+1/4*b*n*x^2-3/4*b*n*x/e-1/e^2*n*b-1/4*b*n*x^2*ln(e*x+1)+1/4*b*n*ln(e*x+1 
)/e^2-1/2/e^2*n*b*dilog(e*x+1)
 

Fricas [F]

\[ \int x \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 \log \left (e x + 1\right ) \,d x } \] Input:

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

Output:

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

Sympy [F(-1)]

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

integrate(x*(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 = 178, normalized size of antiderivative = 1.22 \[ \int x \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}{2 \, e^{2}} + \frac {{\left (b {\left (n - 2 \, \log \left (c\right )\right )} - 2 \, a\right )} \log \left (e x + 1\right )}{4 \, e^{2}} - \frac {{\left (a e^{2} - {\left (e^{2} n - e^{2} \log \left (c\right )\right )} b\right )} x^{2} + {\left ({\left (3 \, e n - 2 \, e \log \left (c\right )\right )} b - 2 \, a e\right )} x - {\left ({\left (2 \, a e^{2} - {\left (e^{2} n - 2 \, e^{2} \log \left (c\right )\right )} b\right )} x^{2} + 2 \, b n \log \left (x\right )\right )} \log \left (e x + 1\right ) + {\left (b e^{2} x^{2} - 2 \, b e x - 2 \, {\left (b e^{2} x^{2} - b\right )} \log \left (e x + 1\right )\right )} \log \left (x^{n}\right )}{4 \, e^{2}} \] Input:

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

Output:

-1/2*(log(e*x + 1)*log(x) + dilog(-e*x))*b*n/e^2 + 1/4*(b*(n - 2*log(c)) - 
 2*a)*log(e*x + 1)/e^2 - 1/4*((a*e^2 - (e^2*n - e^2*log(c))*b)*x^2 + ((3*e 
*n - 2*e*log(c))*b - 2*a*e)*x - ((2*a*e^2 - (e^2*n - 2*e^2*log(c))*b)*x^2 
+ 2*b*n*log(x))*log(e*x + 1) + (b*e^2*x^2 - 2*b*e*x - 2*(b*e^2*x^2 - b)*lo 
g(e*x + 1))*log(x^n))/e^2
 

Giac [F]

\[ \int x \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 \log \left (e x + 1\right ) \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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