3.96 \(\int \log ^2(d (b x+c x^2)^n) \, dx\)

Optimal. Leaf size=144 \[ -\frac{2 b n^2 \text{PolyLog}\left (2,\frac{c x}{b}+1\right )}{c}+x \log ^2\left (d \left (b x+c x^2\right )^n\right )-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}-\frac{b n^2 \log ^2(b+c x)}{c}-\frac{2 b n^2 \log \left (-\frac{c x}{b}\right ) \log (b+c x)}{c}-\frac{4 b n^2 \log (b+c x)}{c}+8 n^2 x \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.284003, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 10, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.625, Rules used = {2523, 2528, 43, 2524, 1593, 2418, 2394, 2315, 2390, 2301} \[ -\frac{2 b n^2 \text{PolyLog}\left (2,\frac{c x}{b}+1\right )}{c}+x \log ^2\left (d \left (b x+c x^2\right )^n\right )-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}-\frac{b n^2 \log ^2(b+c x)}{c}-\frac{2 b n^2 \log \left (-\frac{c x}{b}\right ) \log (b+c x)}{c}-\frac{4 b n^2 \log (b+c x)}{c}+8 n^2 x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2523

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.), x_Symbol] :> Simp[x*(a + b*Log[c*RFx^p])^n, x] - Dist[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] &
& RationalFunctionQ[RFx, x] && IGtQ[n, 0]

Rule 2528

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] && RationalF
unctionQ[RGx, x] && IGtQ[n, 0]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2524

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[d + e*x]*(a + b
*Log[c*RFx^p])^n)/e, x] - Dist[(b*n*p)/e, Int[(Log[d + e*x]*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x
] /; FreeQ[{a, b, c, d, e, p}, x] && RationalFunctionQ[RFx, x] && IGtQ[n, 0]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rubi steps

\begin{align*} \int \log ^2\left (d \left (b x+c x^2\right )^n\right ) \, dx &=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 (b x+c x^2\right )^n\right )}{b+c x} \, dx\\ &=x \log ^2\left (d \left (b x+c x^2\right )^n\right )-(2 n) \int \left (2 \log \left (d \left (b x+c x^2\right )^n\right )-\frac{b \log \left (d \left (b x+c x^2\right )^n\right )}{b+c x}\right ) \, dx\\ &=x \log ^2\left (d \left (b x+c x^2\right )^n\right )-(4 n) \int \log \left (d \left (b x+c x^2\right )^n\right ) \, dx+(2 b n) \int \frac{\log \left (d \left (b x+c x^2\right )^n\right )}{b+c x} \, dx\\ &=-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 )+\left (4 n^2\right ) \int \frac{b+2 c x}{b+c x} \, dx-\frac{\left (2 b n^2\right ) \int \frac{(b+2 c x) \log (b+c x)}{b x+c x^2} \, dx}{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 )+\left (4 n^2\right ) \int \left (2-\frac{b}{b+c x}\right ) \, dx-\frac{\left (2 b n^2\right ) \int \frac{(b+2 c x) \log (b+c x)}{x (b+c x)} \, dx}{c}\\ &=8 n^2 x-\frac{4 b n^2 \log (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{\left (2 b n^2\right ) \int \left (\frac{\log (b+c x)}{x}+\frac{c \log (b+c x)}{b+c x}\right ) \, dx}{c}\\ &=8 n^2 x-\frac{4 b n^2 \log (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 )-\left (2 b n^2\right ) \int \frac{\log (b+c x)}{b+c x} \, dx-\frac{\left (2 b n^2\right ) \int \frac{\log (b+c x)}{x} \, dx}{c}\\ &=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}-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 )+\left (2 b n^2\right ) \int \frac{\log \left (-\frac{c x}{b}\right )}{b+c x} \, dx-\frac{\left (2 b n^2\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,b+c x\right )}{c}\\ &=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 \text{Li}_2\left (1+\frac{c x}{b}\right )}{c}\\ \end{align*}

Mathematica [A]  time = 0.0637361, size = 111, normalized size = 0.77 \[ \frac{-2 b n^2 \text{PolyLog}\left (2,\frac{c x}{b}+1\right )+c x \left (\log ^2\left (d (x (b+c x))^n\right )-4 n \log \left (d (x (b+c x))^n\right )+8 n^2\right )-2 b n \log (b+c x) \left (-\log \left (d (x (b+c x))^n\right )+n \log \left (-\frac{c x}{b}\right )+2 n\right )-b n^2 \log ^2(b+c x)}{c} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-(b*n^2*Log[b + c*x]^2) - 2*b*n*Log[b + c*x]*(2*n + n*Log[-((c*x)/b)] - Log[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

________________________________________________________________________________________

Maple [F]  time = 0.037, size = 0, normalized size = 0. \begin{align*} \int \left ( \ln \left ( d \left ( c{x}^{2}+bx \right ) ^{n} \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.23172, size = 166, normalized size = 1.15 \begin{align*} -{\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} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(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

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\log \left ({\left (c x^{2} + b x\right )}^{n} d\right )^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \log{\left (d \left (b x + c x^{2}\right )^{n} \right )}^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \log \left ({\left (c x^{2} + b x\right )}^{n} d\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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