\(\int \log ^2(d (b x+c x^2)^n) \, dx\) [96]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [A] (verification not implemented)
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 16, antiderivative size = 144 \[ \int \log ^2\left (d \left (b x+c x^2\right )^n\right ) \, dx=8 n^2 x-\frac {4 b n^2 \log (b+c x)}{c}-\frac {2 b n^2 \log \left (-\frac {c x}{b}\right ) \log (b+c x)}{c}-\frac {b n^2 \log ^2(b+c x)}{c}-4 n x \log \left (d \left (b x+c x^2\right )^n\right )+\frac {2 b n \log (b+c x) \log \left (d \left (b x+c x^2\right )^n\right )}{c}+x \log ^2\left (d \left (b x+c x^2\right )^n\right )-\frac {2 b n^2 \operatorname {PolyLog}\left (2,1+\frac {c x}{b}\right )}{c} \] Output:

8*n^2*x-4*b*n^2*ln(c*x+b)/c-2*b*n^2*ln(-c*x/b)*ln(c*x+b)/c-b*n^2*ln(c*x+b) 
^2/c-4*n*x*ln(d*(c*x^2+b*x)^n)+2*b*n*ln(c*x+b)*ln(d*(c*x^2+b*x)^n)/c+x*ln( 
d*(c*x^2+b*x)^n)^2-2*b*n^2*polylog(2,1+c*x/b)/c
 

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.77 \[ \int \log ^2\left (d \left (b x+c x^2\right )^n\right ) \, dx=\frac {-b n^2 \log ^2(b+c x)-2 b n \log (b+c x) \left (2 n+n \log \left (-\frac {c x}{b}\right )-\log \left (d (x (b+c x))^n\right )\right )+c x \left (8 n^2-4 n \log \left (d (x (b+c x))^n\right )+\log ^2\left (d (x (b+c x))^n\right )\right )-2 b n^2 \operatorname {PolyLog}\left (2,1+\frac {c x}{b}\right )}{c} \] Input:

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

Output:

(-(b*n^2*Log[b + c*x]^2) - 2*b*n*Log[b + c*x]*(2*n + n*Log[-((c*x)/b)] - L 
og[d*(x*(b + c*x))^n]) + c*x*(8*n^2 - 4*n*Log[d*(x*(b + c*x))^n] + Log[d*( 
x*(b + c*x))^n]^2) - 2*b*n^2*PolyLog[2, 1 + (c*x)/b])/c
 

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 136, normalized size of antiderivative = 0.94, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3003, 3008, 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 \log ^2\left (d \left (b x+c x^2\right )^n\right ) \, dx\)

\(\Big \downarrow \) 3003

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

\(\Big \downarrow \) 3008

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

x*Log[d*(b*x + c*x^2)^n]^2 - 2*n*(-4*n*x + (2*b*n*Log[b + c*x])/c + (b*n*L 
og[-((c*x)/b)]*Log[b + c*x])/c + (b*n*Log[b + c*x]^2)/(2*c) + 2*x*Log[d*(b 
*x + c*x^2)^n] - (b*Log[b + c*x]*Log[d*(b*x + c*x^2)^n])/c + (b*n*PolyLog[ 
2, 1 + (c*x)/b])/c)
 

Defintions of rubi rules used

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

rule 3003
Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.), x_Symbol] :> Simp[x*(a + 
 b*Log[c*RFx^p])^n, x] - Simp[b*n*p   Int[SimplifyIntegrand[x*(a + b*Log[c* 
RFx^p])^(n - 1)*(D[RFx, x]/RFx), x], x], x] /; FreeQ[{a, b, c, p}, x] && Ra 
tionalFunctionQ[RFx, x] && IGtQ[n, 0]
 

rule 3008
Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*(RGx_), x_Symbol] :> With 
[{u = ExpandIntegrand[(a + b*Log[c*RFx^p])^n, RGx, x]}, Int[u, x] /; SumQ[u 
]] /; FreeQ[{a, b, c, p}, x] && RationalFunctionQ[RFx, x] && RationalFuncti 
onQ[RGx, x] && IGtQ[n, 0]
 
Maple [F]

\[\int {\ln \left (d \left (c \,x^{2}+b x \right )^{n}\right )}^{2}d x\]

Input:

int(ln(d*(c*x^2+b*x)^n)^2,x)
 

Output:

int(ln(d*(c*x^2+b*x)^n)^2,x)
 

Fricas [F]

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

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

Output:

integral(log((c*x^2 + b*x)^n*d)^2, x)
 

Sympy [F]

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

integrate(ln(d*(c*x**2+b*x)**n)**2,x)
 

Output:

Integral(log(d*(b*x + c*x**2)**n)**2, x)
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.85 \[ \int \log ^2\left (d \left (b x+c x^2\right )^n\right ) \, dx=-{\left (\frac {2 \, {\left (\log \left (c x + b\right ) \log \left (-\frac {c x + b}{b} + 1\right ) + {\rm Li}_2\left (\frac {c x + b}{b}\right )\right )} b}{c} + \frac {b \log \left (c x + b\right )^{2} - 8 \, c x + 4 \, b \log \left (c x + b\right )}{c}\right )} n^{2} - 2 \, n {\left (2 \, x - \frac {b \log \left (c x + b\right )}{c}\right )} \log \left ({\left (c x^{2} + b x\right )}^{n} d\right ) + x \log \left ({\left (c x^{2} + b x\right )}^{n} d\right )^{2} \] Input:

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

Output:

-(2*(log(c*x + b)*log(-(c*x + b)/b + 1) + dilog((c*x + b)/b))*b/c + (b*log 
(c*x + b)^2 - 8*c*x + 4*b*log(c*x + b))/c)*n^2 - 2*n*(2*x - b*log(c*x + b) 
/c)*log((c*x^2 + b*x)^n*d) + x*log((c*x^2 + b*x)^n*d)^2
 

Giac [F]

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

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

Output:

integrate(log((c*x^2 + b*x)^n*d)^2, x)
 

Mupad [F(-1)]

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

int(log(d*(b*x + c*x^2)^n)^2,x)
 

Output:

int(log(d*(b*x + c*x^2)^n)^2, x)
 

Reduce [F]

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

int(log(d*(c*x^2+b*x)^n)^2,x)
 

Output:

( - 2*int(log((b*x + c*x**2)**n*d)/(b*x + c*x**2),x)*b**2*n + log((b*x + c 
*x**2)**n*d)**2*b + 2*log((b*x + c*x**2)**n*d)**2*c*x - 8*log((b*x + c*x** 
2)**n*d)*b*n - 8*log((b*x + c*x**2)**n*d)*c*n*x + 8*log(x)*b*n**2 + 16*c*n 
**2*x)/(2*c)