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

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 = 23, antiderivative size = 165 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{(d+e x)^2} \, dx=\frac {\sqrt {b^2-4 a c} n \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c d^2-b d e+a e^2}-\frac {(2 c d-b e) n \log (d+e x)}{e \left (c d^2-b d e+a e^2\right )}+\frac {(2 c d-b e) n \log \left (a+b x+c x^2\right )}{2 e \left (c d^2-b d e+a e^2\right )}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{e (d+e x)} \] Output:

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

Mathematica [A] (verified)

Time = 0.32 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.01 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{(d+e x)^2} \, dx=-\frac {\sqrt {-b^2+4 a c} n \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{-c d^2+e (b d-a e)}+\frac {(-2 c d+b e) n \log (d+e x)}{e \left (c d^2+e (-b d+a e)\right )}-\frac {(-2 c d+b e) n \log (a+x (b+c x))}{2 e \left (c d^2+e (-b d+a e)\right )}-\frac {\log \left (d (a+x (b+c x))^n\right )}{e (d+e x)} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, 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 )}{(d+e x)^2} \, dx\)

\(\Big \downarrow \) 3005

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

\(\Big \downarrow \) 1200

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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 = 1.10 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.12

method result size
parts \(-\frac {\ln \left (d \left (c \,x^{2}+b x +a \right )^{n}\right )}{e \left (e x +d \right )}+\frac {n \left (\frac {\left (b e -2 c d \right ) \ln \left (e x +d \right )}{a \,e^{2}-b d e +d^{2} c}+\frac {\frac {\left (-b c e +2 c^{2} d \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (2 a c e -b^{2} e +b c d -\frac {\left (-b c e +2 c^{2} d \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 \,e^{2}-b d e +d^{2} c}\right )}{e}\) \(184\)
risch \(\text {Expression too large to display}\) \(1785\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

integrate(log(d*(c*x^2+b*x+a)^n)/(e*x+d)^2,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 = 189, normalized size of antiderivative = 1.15 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{(d+e x)^2} \, dx=\frac {{\left (2 \, c d n - b e n\right )} \log \left (c x^{2} + b x + a\right )}{2 \, {\left (c d^{2} e - b d e^{2} + a e^{3}\right )}} - \frac {n \log \left (c x^{2} + b x + a\right )}{e^{2} x + d e} - \frac {{\left (2 \, c d n - b e n\right )} \log \left (e x + d\right )}{c d^{2} e - b d e^{2} + a e^{3}} - \frac {{\left (b^{2} n - 4 \, a c n\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (c d^{2} - b d e + a e^{2}\right )} \sqrt {-b^{2} + 4 \, a c}} - \frac {\log \left (d\right )}{e^{2} x + d e} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 28.39 (sec) , antiderivative size = 590, normalized size of antiderivative = 3.58 \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{(d+e x)^2} \, dx=\frac {\ln \left (d+e\,x\right )\,\left (b\,e\,n-2\,c\,d\,n\right )}{c\,d^2\,e-b\,d\,e^2+a\,e^3}-\frac {\ln \left (d\,{\left (c\,x^2+b\,x+a\right )}^n\right )}{e\,\left (d+e\,x\right )}-\frac {\ln \left (\frac {2\,b\,c^2\,n^2}{e}+\frac {4\,c^3\,n^2\,x}{e}-\frac {n\,\left (b\,e-2\,c\,d+e\,\sqrt {b^2-4\,a\,c}\right )\,\left (c^2\,n\,x\,\left (b\,e-2\,c\,d\right )-c\,n\,\left (-e\,b^2+c\,d\,b+2\,a\,c\,e\right )+\frac {c\,e\,n\,\left (b\,e-2\,c\,d+e\,\sqrt {b^2-4\,a\,c}\right )\,\left (b^2\,d\,e+2\,x\,b^2\,e^2+b\,c\,d^2-2\,x\,b\,c\,d\,e+a\,b\,e^2+2\,x\,c^2\,d^2-8\,a\,c\,d\,e-6\,a\,x\,c\,e^2\right )}{2\,\left (c\,d^2\,e-b\,d\,e^2+a\,e^3\right )}\right )}{2\,\left (c\,d^2\,e-b\,d\,e^2+a\,e^3\right )}\right )\,\left (e\,\left (\frac {b\,n}{2}+\frac {n\,\sqrt {b^2-4\,a\,c}}{2}\right )-c\,d\,n\right )}{c\,d^2\,e-b\,d\,e^2+a\,e^3}-\frac {\ln \left (\frac {2\,b\,c^2\,n^2}{e}+\frac {4\,c^3\,n^2\,x}{e}-\frac {n\,\left (2\,c\,d-b\,e+e\,\sqrt {b^2-4\,a\,c}\right )\,\left (c\,n\,\left (-e\,b^2+c\,d\,b+2\,a\,c\,e\right )-c^2\,n\,x\,\left (b\,e-2\,c\,d\right )+\frac {c\,e\,n\,\left (2\,c\,d-b\,e+e\,\sqrt {b^2-4\,a\,c}\right )\,\left (b^2\,d\,e+2\,x\,b^2\,e^2+b\,c\,d^2-2\,x\,b\,c\,d\,e+a\,b\,e^2+2\,x\,c^2\,d^2-8\,a\,c\,d\,e-6\,a\,x\,c\,e^2\right )}{2\,\left (c\,d^2\,e-b\,d\,e^2+a\,e^3\right )}\right )}{2\,\left (c\,d^2\,e-b\,d\,e^2+a\,e^3\right )}\right )\,\left (e\,\left (\frac {b\,n}{2}-\frac {n\,\sqrt {b^2-4\,a\,c}}{2}\right )-c\,d\,n\right )}{c\,d^2\,e-b\,d\,e^2+a\,e^3} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

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