3.77 \(\int \frac {\log (d (a+b x+c x^2)^n)}{x^2} \, dx\)

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]

b*n*ln(x)/a-1/2*b*n*ln(c*x^2+b*x+a)/a-ln(d*(c*x^2+b*x+a)^n)/x+n*arctanh((2*c*x+b)/(-4*a*c+b^2)^(1/2))*(-4*a*c+
b^2)^(1/2)/a

________________________________________________________________________________________

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]

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

[Out]

(Sqrt[b^2 - 4*a*c]*n*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/a + (b*n*Log[x])/a - (b*n*Log[a + b*x + c*x^2])/(
2*a) - Log[d*(a + b*x + c*x^2)^n]/x

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

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

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 2525

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

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]

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

[Out]

(2*Sqrt[-b^2 + 4*a*c]*n*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]] + 2*b*n*Log[x] - b*n*Log[a + x*(b + c*x)] - (2*
a*Log[d*(a + x*(b + c*x))^n])/x)/(2*a)

________________________________________________________________________________________

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]

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

[Out]

[1/2*(2*b*n*x*log(x) + sqrt(b^2 - 4*a*c)*n*x*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c + sqrt(b^2 - 4*a*c)*(2*c*x
 + b))/(c*x^2 + b*x + a)) - (b*n*x + 2*a*n)*log(c*x^2 + b*x + a) - 2*a*log(d))/(a*x), 1/2*(2*b*n*x*log(x) + 2*
sqrt(-b^2 + 4*a*c)*n*x*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) - (b*n*x + 2*a*n)*log(c*x^2 + b*x
 + a) - 2*a*log(d))/(a*x)]

________________________________________________________________________________________

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]

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

[Out]

-1/2*b*n*log(c*x^2 + b*x + a)/a + b*n*log(x)/a - n*log(c*x^2 + b*x + a)/x - (b^2*n - 4*a*c*n)*arctan((2*c*x +
b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*a) - log(d)/x

________________________________________________________________________________________

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]

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

[Out]

-1/x*ln((c*x^2+b*x+a)^n)-1/2*(-I*Pi*a*csgn(I*d)*csgn(I*(c*x^2+b*x+a)^n)*csgn(I*d*(c*x^2+b*x+a)^n)+I*Pi*a*csgn(
I*d)*csgn(I*d*(c*x^2+b*x+a)^n)^2+I*Pi*a*csgn(I*(c*x^2+b*x+a)^n)*csgn(I*d*(c*x^2+b*x+a)^n)^2-I*Pi*a*csgn(I*d*(c
*x^2+b*x+a)^n)^3-2*b*n*ln(x)*x-2*sum(_R*ln(((6*a*c-2*b^2)*_R^2+_R*b*c*n+4*c^2*n^2)*x-a*b*_R^2+(-2*a*c*n+b^2*n)
*_R+2*b*c*n^2),_R=RootOf(_Z^2*a+_Z*b*n+c*n^2))*a*x+2*ln(d)*a)/a/x

________________________________________________________________________________________

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]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more details)Is 4*a*c-b^2 positive or negative?

________________________________________________________________________________________

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]

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

[Out]

(b*n*log(x))/a - (log(2*b*c^2*n^2 + 4*c^3*n^2*x - (n*(b - (b^2 - 4*a*c)^(1/2))*(b^2*c*n - 2*a*c^2*n + b*c^2*n*
x + (c*n*(b - (b^2 - 4*a*c)^(1/2))*(a*b + 2*b^2*x - 6*a*c*x))/(2*a)))/(2*a))*(b*n - n*(b^2 - 4*a*c)^(1/2)))/(2
*a) - (log(2*b*c^2*n^2 + 4*c^3*n^2*x - (n*(b + (b^2 - 4*a*c)^(1/2))*(b^2*c*n - 2*a*c^2*n + b*c^2*n*x + (c*n*(b
 + (b^2 - 4*a*c)^(1/2))*(a*b + 2*b^2*x - 6*a*c*x))/(2*a)))/(2*a))*(b*n + n*(b^2 - 4*a*c)^(1/2)))/(2*a) - log(d
*(a + b*x + c*x^2)^n)/x

________________________________________________________________________________________

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]

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

[Out]

Timed out

________________________________________________________________________________________