Optimal. Leaf size=86 \[ \frac {n \sqrt {b^2-4 a c} \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x}-\frac {b n \log \left (a+b x+c x^2\right )}{2 a}+\frac {b n \log (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 86, normalized size of antiderivative = 1.00, 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 \sqrt {b^2-4 a c} \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x}-\frac {b n \log \left (a+b x+c x^2\right )}{2 a}+\frac {b n \log (x)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 800
Rule 2525
Rubi steps
\begin {align*} \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^2} \, dx &=-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x}+n \int \frac {b+2 c x}{x \left (a+b x+c x^2\right )} \, dx\\ &=-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x}+n \int \left (\frac {b}{a x}+\frac {-b^2+2 a c-b c x}{a \left (a+b x+c x^2\right )}\right ) \, dx\\ &=\frac {b n \log (x)}{a}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x}+\frac {n \int \frac {-b^2+2 a c-b c x}{a+b x+c x^2} \, dx}{a}\\ &=\frac {b n \log (x)}{a}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x}-\frac {(b n) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 a}-\frac {\left (\left (b^2-4 a c\right ) n\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 a}\\ &=\frac {b n \log (x)}{a}-\frac {b n \log \left (a+b x+c x^2\right )}{2 a}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x}+\frac {\left (\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 )}{a}\\ &=\frac {\sqrt {b^2-4 a c} n \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a}+\frac {b n \log (x)}{a}-\frac {b n \log \left (a+b x+c x^2\right )}{2 a}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 87, normalized size = 1.01 \[ \frac {2 n \sqrt {4 a c-b^2} \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )-\frac {2 a \log \left (d (a+x (b+c x))^n\right )}{x}-b n \log (a+x (b+c x))+2 b n \log (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.50, size = 199, normalized size = 2.31 \[ \left [\frac {2 \, b n x \log \relax (x) + \sqrt {b^{2} - 4 \, a c} n x \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 ) - {\left (b n x + 2 \, a n\right )} \log \left (c x^{2} + b x + a\right ) - 2 \, a \log \relax (d)}{2 \, a x}, \frac {2 \, b n x \log \relax (x) + 2 \, \sqrt {-b^{2} + 4 \, a c} n x \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - {\left (b n x + 2 \, a n\right )} \log \left (c x^{2} + b x + a\right ) - 2 \, a \log \relax (d)}{2 \, a x}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 99, normalized size = 1.15 \[ -\frac {b n \log \left (c x^{2} + b x + a\right )}{2 \, a} + \frac {b n \log \relax (x)}{a} - \frac {n \log \left (c x^{2} + b x + a\right )}{x} - \frac {{\left (b^{2} n - 4 \, a c n\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} a} - \frac {\log \relax (d)}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.68, size = 261, normalized size = 3.03 \[ -\frac {\ln \left (\left (c \,x^{2}+b x +a \right )^{n}\right )}{x}-\frac {-i \pi a \,\mathrm {csgn}\left (i d \right ) \mathrm {csgn}\left (i \left (c \,x^{2}+b x +a \right )^{n}\right ) \mathrm {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )+i \pi a \,\mathrm {csgn}\left (i d \right ) \mathrm {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )^{2}+i \pi a \,\mathrm {csgn}\left (i \left (c \,x^{2}+b x +a \right )^{n}\right ) \mathrm {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )^{2}-i \pi a \mathrm {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )^{3}-2 b n x \ln \relax (x )-2 a x \RootOf \left (a \,\textit {\_Z}^{2}+b n \textit {\_Z} +c \,n^{2}\right ) \ln \left (-\RootOf \left (a \,\textit {\_Z}^{2}+b n \textit {\_Z} +c \,n^{2}\right )^{2} a b +2 b c \,n^{2}+\left (-2 a c n +b^{2} n \right ) \RootOf \left (a \,\textit {\_Z}^{2}+b n \textit {\_Z} +c \,n^{2}\right )+\left (\RootOf \left (a \,\textit {\_Z}^{2}+b n \textit {\_Z} +c \,n^{2}\right ) b c n +4 c^{2} n^{2}+\left (6 a c -2 b^{2}\right ) \RootOf \left (a \,\textit {\_Z}^{2}+b n \textit {\_Z} +c \,n^{2}\right )^{2}\right ) x \right )+2 a \ln \relax (d )}{2 a x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.93, size = 262, normalized size = 3.05 \[ \frac {b\,n\,\ln \relax (x)}{a}-\frac {\ln \left (2\,b\,c^2\,n^2+4\,c^3\,n^2\,x-\frac {n\,\left (b-\sqrt {b^2-4\,a\,c}\right )\,\left (b^2\,c\,n-2\,a\,c^2\,n+b\,c^2\,n\,x+\frac {c\,n\,\left (b-\sqrt {b^2-4\,a\,c}\right )\,\left (2\,x\,b^2+a\,b-6\,a\,c\,x\right )}{2\,a}\right )}{2\,a}\right )\,\left (b\,n-n\,\sqrt {b^2-4\,a\,c}\right )}{2\,a}-\frac {\ln \left (2\,b\,c^2\,n^2+4\,c^3\,n^2\,x-\frac {n\,\left (b+\sqrt {b^2-4\,a\,c}\right )\,\left (b^2\,c\,n-2\,a\,c^2\,n+b\,c^2\,n\,x+\frac {c\,n\,\left (b+\sqrt {b^2-4\,a\,c}\right )\,\left (2\,x\,b^2+a\,b-6\,a\,c\,x\right )}{2\,a}\right )}{2\,a}\right )\,\left (b\,n+n\,\sqrt {b^2-4\,a\,c}\right )}{2\,a}-\frac {\ln \left (d\,{\left (c\,x^2+b\,x+a\right )}^n\right )}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________