Optimal. Leaf size=144 \[ 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 {2 b n^2 \text {Li}_2\left (\frac {c x}{b}+1\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]
________________________________________________________________________________________
Rubi [A] time = 0.28, antiderivative size = 144, normalized size of antiderivative = 1.00, 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]
[Out]
Rule 43
Rule 1593
Rule 2301
Rule 2315
Rule 2390
Rule 2394
Rule 2418
Rule 2523
Rule 2524
Rule 2528
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.06, size = 111, normalized size = 0.77 \[ \frac {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 )-2 b n^2 \text {Li}_2\left (\frac {c x}{b}+1\right )-b n^2 \log ^2(b+c x)}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.69, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\log \left ({\left (c x^{2} + b x\right )}^{n} d\right )^{2}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \log \left ({\left (c x^{2} + b x\right )}^{n} d\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.16, size = 0, normalized size = 0.00 \[ \int \ln \left (d \left (c \,x^{2}+b x \right )^{n}\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.70, size = 123, normalized size = 0.85 \[ -{\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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\ln \left (d\,{\left (c\,x^2+b\,x\right )}^n\right )}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \log {\left (d \left (b x + c x^{2}\right )^{n} \right )}^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________