Optimal. Leaf size=121 \[ \frac{n \left (b^2-2 a c\right ) \log \left (a+b x+c x^2\right )}{4 a^2}-\frac{n \log (x) \left (b^2-2 a c\right )}{2 a^2}-\frac{b n \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{2 a^2}-\frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{2 x^2}-\frac{b n}{2 a x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.154217, antiderivative size = 121, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {2525, 800, 634, 618, 206, 628} \[ \frac{n \left (b^2-2 a c\right ) \log \left (a+b x+c x^2\right )}{4 a^2}-\frac{n \log (x) \left (b^2-2 a c\right )}{2 a^2}-\frac{b n \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{2 a^2}-\frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{2 x^2}-\frac{b n}{2 a x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2525
Rule 800
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^3} \, dx &=-\frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{2 x^2}+\frac{1}{2} n \int \frac{b+2 c x}{x^2 \left (a+b x+c x^2\right )} \, dx\\ &=-\frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{2 x^2}+\frac{1}{2} n \int \left (\frac{b}{a x^2}+\frac{-b^2+2 a c}{a^2 x}+\frac{b \left (b^2-3 a c\right )+c \left (b^2-2 a c\right ) x}{a^2 \left (a+b x+c x^2\right )}\right ) \, dx\\ &=-\frac{b n}{2 a x}-\frac{\left (b^2-2 a c\right ) n \log (x)}{2 a^2}-\frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{2 x^2}+\frac{n \int \frac{b \left (b^2-3 a c\right )+c \left (b^2-2 a c\right ) x}{a+b x+c x^2} \, dx}{2 a^2}\\ &=-\frac{b n}{2 a x}-\frac{\left (b^2-2 a c\right ) n \log (x)}{2 a^2}-\frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{2 x^2}+\frac{\left (b \left (b^2-4 a c\right ) n\right ) \int \frac{1}{a+b x+c x^2} \, dx}{4 a^2}+\frac{\left (\left (b^2-2 a c\right ) n\right ) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{4 a^2}\\ &=-\frac{b n}{2 a x}-\frac{\left (b^2-2 a c\right ) n \log (x)}{2 a^2}+\frac{\left (b^2-2 a c\right ) n \log \left (a+b x+c x^2\right )}{4 a^2}-\frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{2 x^2}-\frac{\left (b \left (b^2-4 a c\right ) n\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{2 a^2}\\ &=-\frac{b n}{2 a x}-\frac{b \sqrt{b^2-4 a c} n \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{2 a^2}-\frac{\left (b^2-2 a c\right ) n \log (x)}{2 a^2}+\frac{\left (b^2-2 a c\right ) n \log \left (a+b x+c x^2\right )}{4 a^2}-\frac{\log \left (d \left (a+b x+c x^2\right )^n\right )}{2 x^2}\\ \end{align*}
Mathematica [A] time = 0.237582, size = 105, normalized size = 0.87 \[ -\frac{\frac{n x \left (2 x \log (x) \left (b^2-2 a c\right )-x \left (b^2-2 a c\right ) \log (a+x (b+c x))+2 b x \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )+2 a b\right )}{a^2}+2 \log \left (d (a+x (b+c x))^n\right )}{4 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.089, size = 1178, normalized size = 9.7 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.35442, size = 628, normalized size = 5.19 \begin{align*} \left [\frac{\sqrt{b^{2} - 4 \, a c} b n x^{2} \log \left (\frac{2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt{b^{2} - 4 \, a c}{\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) - 2 \,{\left (b^{2} - 2 \, a c\right )} n x^{2} \log \left (x\right ) - 2 \, a b n x - 2 \, a^{2} \log \left (d\right ) +{\left ({\left (b^{2} - 2 \, a c\right )} n x^{2} - 2 \, a^{2} n\right )} \log \left (c x^{2} + b x + a\right )}{4 \, a^{2} x^{2}}, -\frac{2 \, \sqrt{-b^{2} + 4 \, a c} b n x^{2} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \,{\left (b^{2} - 2 \, a c\right )} n x^{2} \log \left (x\right ) + 2 \, a b n x + 2 \, a^{2} \log \left (d\right ) -{\left ({\left (b^{2} - 2 \, a c\right )} n x^{2} - 2 \, a^{2} n\right )} \log \left (c x^{2} + b x + a\right )}{4 \, a^{2} x^{2}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.26885, size = 174, normalized size = 1.44 \begin{align*} \frac{{\left (b^{2} n - 2 \, a c n\right )} \log \left (c x^{2} + b x + a\right )}{4 \, a^{2}} - \frac{n \log \left (c x^{2} + b x + a\right )}{2 \, x^{2}} - \frac{{\left (b^{2} n - 2 \, a c n\right )} \log \left (x\right )}{2 \, a^{2}} + \frac{{\left (b^{3} n - 4 \, a b c n\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} a^{2}} - \frac{b n x + a \log \left (d\right )}{2 \, a x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]