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

   Optimal result
   Rubi [A] (verified)
   Mathematica [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)

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)} \]

[Out]

-(-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)+n*arctanh((2*c*x+b)/(-4*a*c+b^2)^(1/2))*(-4*a*c+b^2)^(1/2)/(a*e^2-b*d*e+c*d^2)

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2605, 814, 648, 632, 212, 642} \[ \int \frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{(d+e x)^2} \, dx=\frac {n \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 {n (2 c d-b e) \log \left (a+b x+c x^2\right )}{2 e \left (a e^2-b d e+c d^2\right )}-\frac {n (2 c d-b e) \log (d+e x)}{e \left (a e^2-b d e+c d^2\right )}-\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{e (d+e x)} \]

[In]

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

[Out]

(Sqrt[b^2 - 4*a*c]*n*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)*n*Log[d
+ e*x])/(e*(c*d^2 - b*d*e + a*e^2)) + ((2*c*d - b*e)*n*Log[a + b*x + c*x^2])/(2*e*(c*d^2 - b*d*e + a*e^2)) - L
og[d*(a + b*x + c*x^2)^n]/(e*(d + e*x))

Rule 212

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

Rule 632

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 642

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 648

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 814

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 2605

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*} \text {integral}& = -\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{e (d+e x)}+\frac {n \int \frac {b+2 c x}{(d+e x) \left (a+b x+c x^2\right )} \, dx}{e} \\ & = -\frac {\log \left (d \left (a+b x+c x^2\right )^n\right )}{e (d+e x)}+\frac {n \int \left (\frac {e (-2 c d+b e)}{\left (c d^2-b d e+a e^2\right ) (d+e x)}+\frac {b c d-b^2 e+2 a c e+c (2 c d-b e) x}{\left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )}\right ) \, dx}{e} \\ & = -\frac {(2 c d-b e) n \log (d+e x)}{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)}+\frac {n \int \frac {b c d-b^2 e+2 a c e+c (2 c d-b e) x}{a+b x+c x^2} \, dx}{e \left (c d^2-b d e+a e^2\right )} \\ & = -\frac {(2 c d-b e) n \log (d+e x)}{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)}-\frac {\left (\left (b^2-4 a c\right ) n\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 \left (c d^2-b d e+a e^2\right )}+\frac {((2 c d-b e) n) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 e \left (c d^2-b d e+a e^2\right )} \\ & = -\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)}+\frac {\left (\left (b^2-4 a c\right ) n\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c d^2-b d e+a e^2} \\ & = \frac {\sqrt {b^2-4 a c} n \tanh ^{-1}\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)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.20 (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)} \]

[In]

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

[Out]

-((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))

Maple [A] (verified)

Time = 1.75 (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 +c \,d^{2}}+\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 -e \,b^{2}+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 c a -b^{2}}}\right )}{\sqrt {4 c a -b^{2}}}}{a \,e^{2}-b d e +c \,d^{2}}\right )}{e}\) \(184\)
risch \(\text {Expression too large to display}\) \(6540\)

[In]

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

[Out]

-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-e*b^2+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)

none

Time = 0.37 (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 ] \]

[In]

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

[Out]

[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} \]

[In]

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

[Out]

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} \]

[In]

integrate(log(d*(c*x^2+b*x+a)^n)/(e*x+d)^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 deta

Giac [A] (verification not implemented)

none

Time = 0.36 (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} \]

[In]

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

[Out]

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 = 4.54 (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} \]

[In]

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

[Out]

(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)