\(\int \frac {\log (d (a+b x+c x^2)^n)}{x^4} \, dx\) [79]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [F(-2)]
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 149 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx=-\frac {b n}{6 a x^2}+\frac {\left (b^2-2 a c\right ) n}{3 a^2 x}+\frac {\sqrt {b^2-4 a c} \left (b^2-a c\right ) n \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{3 a^3}+\frac {b \left (b^2-3 a c\right ) n \log (x)}{3 a^3}-\frac {b \left (b^2-3 a c\right ) n \log \left (a+b x+c x^2\right )}{6 a^3}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{3 x^3} \] Output:

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

Mathematica [A] (verified)

Time = 0.40 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.89 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx=-\frac {\frac {n x \left (a^2 b-2 a \left (b^2-2 a c\right ) x-2 \sqrt {b^2-4 a c} \left (b^2-a c\right ) x^2 \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )-2 b \left (b^2-3 a c\right ) x^2 \log (x)+b \left (b^2-3 a c\right ) x^2 \log (a+x (b+c x))\right )}{a^3}+2 \log \left (d (a+x (b+c x))^n\right )}{6 x^3} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 141, normalized size of antiderivative = 0.95, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3005, 1200, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx\)

\(\Big \downarrow \) 3005

\(\displaystyle \frac {1}{3} n \int \frac {b+2 c x}{x^3 \left (c x^2+b x+a\right )}dx-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{3 x^3}\)

\(\Big \downarrow \) 1200

\(\displaystyle \frac {1}{3} n \int \left (\frac {b}{a x^3}+\frac {b^3-3 a b c}{a^3 x}+\frac {-b^4+4 a c b^2-c \left (b^2-3 a c\right ) x b-2 a^2 c^2}{a^3 \left (c x^2+b x+a\right )}+\frac {2 a c-b^2}{a^2 x^2}\right )dx-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{3 x^3}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{3} n \left (\frac {\sqrt {b^2-4 a c} \left (b^2-a c\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^3}-\frac {b \left (b^2-3 a c\right ) \log \left (a+b x+c x^2\right )}{2 a^3}+\frac {b \log (x) \left (b^2-3 a c\right )}{a^3}+\frac {b^2-2 a c}{a^2 x}-\frac {b}{2 a x^2}\right )-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{3 x^3}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 1200
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_.) + (b_.)* 
(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g* 
x)^n/(a + b*x + c*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && In 
tegersQ[n]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3005
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] - Simp[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] && RationalFunctionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || 
 IntegerQ[m]) && NeQ[m, -1]
 
Maple [A] (verified)

Time = 0.56 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.21

method result size
parts \(-\frac {\ln \left (d \left (c \,x^{2}+b x +a \right )^{n}\right )}{3 x^{3}}+\frac {n \left (\frac {\frac {\left (3 a b \,c^{2}-b^{3} c \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (-2 a^{2} c^{2}+4 a \,b^{2} c -b^{4}-\frac {\left (3 a b \,c^{2}-b^{3} c \right ) b}{2 c}\right ) \arctan \left (\frac {2 x c +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{a^{3}}-\frac {b}{2 a \,x^{2}}-\frac {2 a c -b^{2}}{a^{2} x}-\frac {b \left (3 a c -b^{2}\right ) \ln \left (x \right )}{a^{3}}\right )}{3}\) \(181\)
risch \(-\frac {\ln \left (\left (c \,x^{2}+b x +a \right )^{n}\right )}{3 x^{3}}-\frac {6 \ln \left (x \right ) a b c n \,x^{3}-2 \ln \left (x \right ) b^{3} n \,x^{3}-i \pi \,a^{3} \operatorname {csgn}\left (i d \right ) \operatorname {csgn}\left (i \left (c \,x^{2}+b x +a \right )^{n}\right ) \operatorname {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )+i \pi \,a^{3} \operatorname {csgn}\left (i d \right ) {\operatorname {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )}^{2}+i \pi \,a^{3} \operatorname {csgn}\left (i \left (c \,x^{2}+b x +a \right )^{n}\right ) {\operatorname {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )}^{2}-i \pi \,a^{3} {\operatorname {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )}^{3}-2 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (a^{3} \textit {\_Z}^{2}+\left (-3 a b c n +b^{3} n \right ) \textit {\_Z} +c^{3} n^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (6 a^{5} c -2 a^{4} b^{2}\right ) \textit {\_R}^{2}+\left (-7 a^{3} b \,c^{2} n +2 a^{2} b^{3} c n \right ) \textit {\_R} +4 a^{2} c^{4} n^{2}-4 a \,b^{2} c^{3} n^{2}+b^{4} c^{2} n^{2}\right ) x -a^{5} b \,\textit {\_R}^{2}+\left (2 a^{4} c^{2} n -4 a^{3} b^{2} c n +a^{2} b^{4} n \right ) \textit {\_R} +6 a^{2} b \,c^{3} n^{2}-5 a \,b^{3} c^{2} n^{2}+b^{5} c \,n^{2}\right )\right ) a^{3} x^{3}+4 a^{2} c n \,x^{2}-2 a \,b^{2} n \,x^{2}+a^{2} b n x +2 \ln \left (d \right ) a^{3}}{6 a^{3} x^{3}}\) \(423\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 318, normalized size of antiderivative = 2.13 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx=\left [-\frac {{\left (b^{2} - a c\right )} \sqrt {b^{2} - 4 \, a c} n x^{3} \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^{3} - 3 \, a b c\right )} n x^{3} \log \left (x\right ) + a^{2} b n x - 2 \, {\left (a b^{2} - 2 \, a^{2} c\right )} n x^{2} + 2 \, a^{3} \log \left (d\right ) + {\left ({\left (b^{3} - 3 \, a b c\right )} n x^{3} + 2 \, a^{3} n\right )} \log \left (c x^{2} + b x + a\right )}{6 \, a^{3} x^{3}}, \frac {2 \, {\left (b^{2} - a c\right )} \sqrt {-b^{2} + 4 \, a c} n x^{3} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \, {\left (b^{3} - 3 \, a b c\right )} n x^{3} \log \left (x\right ) - a^{2} b n x + 2 \, {\left (a b^{2} - 2 \, a^{2} c\right )} n x^{2} - 2 \, a^{3} \log \left (d\right ) - {\left ({\left (b^{3} - 3 \, a b c\right )} n x^{3} + 2 \, a^{3} n\right )} \log \left (c x^{2} + b x + a\right )}{6 \, a^{3} x^{3}}\right ] \] Input:

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

Output:

[-1/6*((b^2 - a*c)*sqrt(b^2 - 4*a*c)*n*x^3*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)) - 2*(b^3 - 3*a 
*b*c)*n*x^3*log(x) + a^2*b*n*x - 2*(a*b^2 - 2*a^2*c)*n*x^2 + 2*a^3*log(d) 
+ ((b^3 - 3*a*b*c)*n*x^3 + 2*a^3*n)*log(c*x^2 + b*x + a))/(a^3*x^3), 1/6*( 
2*(b^2 - a*c)*sqrt(-b^2 + 4*a*c)*n*x^3*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + 
 b)/(b^2 - 4*a*c)) + 2*(b^3 - 3*a*b*c)*n*x^3*log(x) - a^2*b*n*x + 2*(a*b^2 
 - 2*a^2*c)*n*x^2 - 2*a^3*log(d) - ((b^3 - 3*a*b*c)*n*x^3 + 2*a^3*n)*log(c 
*x^2 + b*x + a))/(a^3*x^3)]
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.10 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx=-\frac {{\left (b^{3} n - 3 \, a b c n\right )} \log \left (c x^{2} + b x + a\right )}{6 \, a^{3}} - \frac {n \log \left (c x^{2} + b x + a\right )}{3 \, x^{3}} + \frac {{\left (b^{3} n - 3 \, a b c n\right )} \log \left (x\right )}{3 \, a^{3}} - \frac {{\left (b^{4} n - 5 \, a b^{2} c n + 4 \, a^{2} c^{2} n\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{3 \, \sqrt {-b^{2} + 4 \, a c} a^{3}} + \frac {2 \, b^{2} n x^{2} - 4 \, a c n x^{2} - a b n x - 2 \, a^{2} \log \left (d\right )}{6 \, a^{2} x^{3}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 26.18 (sec) , antiderivative size = 505, normalized size of antiderivative = 3.39 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx=\frac {\ln \left (2\,a\,b^4\,\sqrt {b^2-4\,a\,c}-2\,b^6\,x-2\,a\,b^5+2\,b^5\,x\,\sqrt {b^2-4\,a\,c}+13\,a^2\,b^3\,c-20\,a^3\,b\,c^2+4\,a^3\,c^3\,x+2\,a^3\,c^2\,\sqrt {b^2-4\,a\,c}-25\,a^2\,b^2\,c^2\,x+14\,a\,b^4\,c\,x-7\,a^2\,b^2\,c\,\sqrt {b^2-4\,a\,c}-10\,a\,b^3\,c\,x\,\sqrt {b^2-4\,a\,c}+11\,a^2\,b\,c^2\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (a\,\left (\frac {b\,c\,n}{2}-\frac {c\,n\,\sqrt {b^2-4\,a\,c}}{6}\right )-\frac {b^3\,n}{6}+\frac {b^2\,n\,\sqrt {b^2-4\,a\,c}}{6}\right )}{a^3}-\frac {\ln \left (d\,{\left (c\,x^2+b\,x+a\right )}^n\right )}{3\,x^3}-\frac {\frac {b\,n}{2\,a}+\frac {n\,x\,\left (2\,a\,c-b^2\right )}{a^2}}{3\,x^2}-\frac {\ln \left (2\,a\,b^5+2\,b^6\,x+2\,a\,b^4\,\sqrt {b^2-4\,a\,c}+2\,b^5\,x\,\sqrt {b^2-4\,a\,c}-13\,a^2\,b^3\,c+20\,a^3\,b\,c^2-4\,a^3\,c^3\,x+2\,a^3\,c^2\,\sqrt {b^2-4\,a\,c}+25\,a^2\,b^2\,c^2\,x-14\,a\,b^4\,c\,x-7\,a^2\,b^2\,c\,\sqrt {b^2-4\,a\,c}-10\,a\,b^3\,c\,x\,\sqrt {b^2-4\,a\,c}+11\,a^2\,b\,c^2\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {b^3\,n}{6}-a\,\left (\frac {b\,c\,n}{2}+\frac {c\,n\,\sqrt {b^2-4\,a\,c}}{6}\right )+\frac {b^2\,n\,\sqrt {b^2-4\,a\,c}}{6}\right )}{a^3}+\frac {\ln \left (x\right )\,\left (b^3\,n-3\,a\,b\,c\,n\right )}{3\,a^3} \] Input:

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

Output:

(log(2*a*b^4*(b^2 - 4*a*c)^(1/2) - 2*b^6*x - 2*a*b^5 + 2*b^5*x*(b^2 - 4*a* 
c)^(1/2) + 13*a^2*b^3*c - 20*a^3*b*c^2 + 4*a^3*c^3*x + 2*a^3*c^2*(b^2 - 4* 
a*c)^(1/2) - 25*a^2*b^2*c^2*x + 14*a*b^4*c*x - 7*a^2*b^2*c*(b^2 - 4*a*c)^( 
1/2) - 10*a*b^3*c*x*(b^2 - 4*a*c)^(1/2) + 11*a^2*b*c^2*x*(b^2 - 4*a*c)^(1/ 
2))*(a*((b*c*n)/2 - (c*n*(b^2 - 4*a*c)^(1/2))/6) - (b^3*n)/6 + (b^2*n*(b^2 
 - 4*a*c)^(1/2))/6))/a^3 - log(d*(a + b*x + c*x^2)^n)/(3*x^3) - ((b*n)/(2* 
a) + (n*x*(2*a*c - b^2))/a^2)/(3*x^2) - (log(2*a*b^5 + 2*b^6*x + 2*a*b^4*( 
b^2 - 4*a*c)^(1/2) + 2*b^5*x*(b^2 - 4*a*c)^(1/2) - 13*a^2*b^3*c + 20*a^3*b 
*c^2 - 4*a^3*c^3*x + 2*a^3*c^2*(b^2 - 4*a*c)^(1/2) + 25*a^2*b^2*c^2*x - 14 
*a*b^4*c*x - 7*a^2*b^2*c*(b^2 - 4*a*c)^(1/2) - 10*a*b^3*c*x*(b^2 - 4*a*c)^ 
(1/2) + 11*a^2*b*c^2*x*(b^2 - 4*a*c)^(1/2))*((b^3*n)/6 - a*((b*c*n)/2 + (c 
*n*(b^2 - 4*a*c)^(1/2))/6) + (b^2*n*(b^2 - 4*a*c)^(1/2))/6))/a^3 + (log(x) 
*(b^3*n - 3*a*b*c*n))/(3*a^3)
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.38 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{x^4} \, dx=\frac {-2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a c n \,x^{3}+2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) b^{2} n \,x^{3}-2 \,\mathrm {log}\left (\left (c \,x^{2}+b x +a \right )^{n} d \right ) a^{3}+3 \,\mathrm {log}\left (\left (c \,x^{2}+b x +a \right )^{n} d \right ) a b c \,x^{3}-\mathrm {log}\left (\left (c \,x^{2}+b x +a \right )^{n} d \right ) b^{3} x^{3}-6 \,\mathrm {log}\left (x \right ) a b c n \,x^{3}+2 \,\mathrm {log}\left (x \right ) b^{3} n \,x^{3}-a^{2} b n x -4 a^{2} c n \,x^{2}+2 a \,b^{2} n \,x^{2}}{6 a^{3} x^{3}} \] Input:

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

Output:

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