\(\int (d+e x)^2 \log (d (a+b x+c x^2)^n) \, dx\) [84]

   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 = 226 \[ \int (d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=-\frac {\left (6 c^2 d^2+b^2 e^2-c e (3 b d+2 a e)\right ) n x}{3 c^2}-\frac {e (6 c d-b e) n x^2}{6 c}-\frac {2}{9} e^2 n x^3+\frac {\sqrt {b^2-4 a c} \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right ) n \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{3 c^3}-\frac {(2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right ) n \log \left (a+b x+c x^2\right )}{6 c^3 e}+\frac {(d+e x)^3 \log \left (d \left (a+b x+c x^2\right )^n\right )}{3 e} \]

[Out]

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

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 226, 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 (d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\frac {n \sqrt {b^2-4 a c} \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (-c e (a e+3 b d)+b^2 e^2+3 c^2 d^2\right )}{3 c^3}-\frac {n x \left (-c e (2 a e+3 b d)+b^2 e^2+6 c^2 d^2\right )}{3 c^2}-\frac {n (2 c d-b e) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right ) \log \left (a+b x+c x^2\right )}{6 c^3 e}+\frac {(d+e x)^3 \log \left (d \left (a+b x+c x^2\right )^n\right )}{3 e}-\frac {e n x^2 (6 c d-b e)}{6 c}-\frac {2}{9} e^2 n x^3 \]

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.24 (sec) , antiderivative size = 204, normalized size of antiderivative = 0.90 \[ \int (d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\frac {-\frac {n \left (c e x \left (6 b^2 e^2-3 c e (6 b d+4 a e+b e x)+2 c^2 \left (18 d^2+9 d e x+2 e^2 x^2\right )\right )-6 \sqrt {b^2-4 a c} e \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )+3 (2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right ) \log (a+x (b+c x))\right )}{6 c^3}+(d+e x)^3 \log \left (d (a+x (b+c x))^n\right )}{3 e} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.61 (sec) , antiderivative size = 384, normalized size of antiderivative = 1.70

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

[In]

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

[Out]

1/3*ln(d*(c*x^2+b*x+a)^n)*e^2*x^3+ln(d*(c*x^2+b*x+a)^n)*e*d*x^2+ln(d*(c*x^2+b*x+a)^n)*d^2*x+1/3*ln(d*(c*x^2+b*
x+a)^n)/e*d^3-1/3/e*n*(-e/c^2*(-2/3*c^2*e^2*x^3+1/2*b*c*e^2*x^2-3*c^2*d*e*x^2+2*x*c*a*e^2-x*e^2*b^2+3*x*b*c*d*
e-6*c^2*d^2*x)+1/c^2*(1/2*(3*a*b*c*e^3-6*a*c^2*d*e^2-b^3*e^3+3*b^2*c*d*e^2-3*b*c^2*d^2*e+2*c^3*d^3)/c*ln(c*x^2
+b*x+a)+2*(2*a^2*c*e^3-a*b^2*e^3+3*a*b*c*d*e^2-6*a*c^2*d^2*e+b*c^2*d^3-1/2*(3*a*b*c*e^3-6*a*c^2*d*e^2-b^3*e^3+
3*b^2*c*d*e^2-3*b*c^2*d^2*e+2*c^3*d^3)*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.32 (sec) , antiderivative size = 567, normalized size of antiderivative = 2.51 \[ \int (d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\left [-\frac {4 \, c^{3} e^{2} n x^{3} + 3 \, {\left (6 \, c^{3} d e - b c^{2} e^{2}\right )} n x^{2} + 3 \, {\left (3 \, c^{2} d^{2} - 3 \, b c d e + {\left (b^{2} - a c\right )} e^{2}\right )} \sqrt {b^{2} - 4 \, a c} n \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 ) + 6 \, {\left (6 \, c^{3} d^{2} - 3 \, b c^{2} d e + {\left (b^{2} c - 2 \, a c^{2}\right )} e^{2}\right )} n x - 3 \, {\left (2 \, c^{3} e^{2} n x^{3} + 6 \, c^{3} d e n x^{2} + 6 \, c^{3} d^{2} n x + {\left (3 \, b c^{2} d^{2} - 3 \, {\left (b^{2} c - 2 \, a c^{2}\right )} d e + {\left (b^{3} - 3 \, a b c\right )} e^{2}\right )} n\right )} \log \left (c x^{2} + b x + a\right ) - 6 \, {\left (c^{3} e^{2} x^{3} + 3 \, c^{3} d e x^{2} + 3 \, c^{3} d^{2} x\right )} \log \left (d\right )}{18 \, c^{3}}, -\frac {4 \, c^{3} e^{2} n x^{3} + 3 \, {\left (6 \, c^{3} d e - b c^{2} e^{2}\right )} n x^{2} - 6 \, {\left (3 \, c^{2} d^{2} - 3 \, b c d e + {\left (b^{2} - a c\right )} e^{2}\right )} \sqrt {-b^{2} + 4 \, a c} n \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 6 \, {\left (6 \, c^{3} d^{2} - 3 \, b c^{2} d e + {\left (b^{2} c - 2 \, a c^{2}\right )} e^{2}\right )} n x - 3 \, {\left (2 \, c^{3} e^{2} n x^{3} + 6 \, c^{3} d e n x^{2} + 6 \, c^{3} d^{2} n x + {\left (3 \, b c^{2} d^{2} - 3 \, {\left (b^{2} c - 2 \, a c^{2}\right )} d e + {\left (b^{3} - 3 \, a b c\right )} e^{2}\right )} n\right )} \log \left (c x^{2} + b x + a\right ) - 6 \, {\left (c^{3} e^{2} x^{3} + 3 \, c^{3} d e x^{2} + 3 \, c^{3} d^{2} x\right )} \log \left (d\right )}{18 \, c^{3}}\right ] \]

[In]

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

[Out]

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

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F(-2)]

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

[In]

integrate((e*x+d)^2*log(d*(c*x^2+b*x+a)^n),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.34 (sec) , antiderivative size = 307, normalized size of antiderivative = 1.36 \[ \int (d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=-\frac {1}{9} \, {\left (2 \, e^{2} n - 3 \, e^{2} \log \left (d\right )\right )} x^{3} - \frac {{\left (6 \, c d e n - b e^{2} n - 6 \, c d e \log \left (d\right )\right )} x^{2}}{6 \, c} + \frac {1}{3} \, {\left (e^{2} n x^{3} + 3 \, d e n x^{2} + 3 \, d^{2} n x\right )} \log \left (c x^{2} + b x + a\right ) - \frac {{\left (6 \, c^{2} d^{2} n - 3 \, b c d e n + b^{2} e^{2} n - 2 \, a c e^{2} n - 3 \, c^{2} d^{2} \log \left (d\right )\right )} x}{3 \, c^{2}} + \frac {{\left (3 \, b c^{2} d^{2} n - 3 \, b^{2} c d e n + 6 \, a c^{2} d e n + b^{3} e^{2} n - 3 \, a b c e^{2} n\right )} \log \left (c x^{2} + b x + a\right )}{6 \, c^{3}} - \frac {{\left (3 \, b^{2} c^{2} d^{2} n - 12 \, a c^{3} d^{2} n - 3 \, b^{3} c d e n + 12 \, a b c^{2} d e n + b^{4} e^{2} n - 5 \, a b^{2} c e^{2} n + 4 \, a^{2} c^{2} e^{2} n\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{3 \, \sqrt {-b^{2} + 4 \, a c} c^{3}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.75 (sec) , antiderivative size = 457, normalized size of antiderivative = 2.02 \[ \int (d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\ln \left (b\,\sqrt {b^2-4\,a\,c}-4\,a\,c+b^2+2\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {\frac {d^2\,n\,\sqrt {b^2-4\,a\,c}}{2}+\frac {b\,d^2\,n}{2}+a\,d\,e\,n}{c}-\frac {\frac {a\,b\,e^2\,n}{2}+\frac {b^2\,d\,e\,n}{2}+\frac {a\,e^2\,n\,\sqrt {b^2-4\,a\,c}}{6}+\frac {b\,d\,e\,n\,\sqrt {b^2-4\,a\,c}}{2}}{c^2}+\frac {b^3\,e^2\,n}{6\,c^3}+\frac {b^2\,e^2\,n\,\sqrt {b^2-4\,a\,c}}{6\,c^3}\right )+x\,\left (\frac {b\,\left (\frac {e\,n\,\left (b\,e+6\,c\,d\right )}{3\,c}-\frac {2\,b\,e^2\,n}{3\,c}\right )}{c}-\frac {d\,n\,\left (b\,e+2\,c\,d\right )}{c}+\frac {2\,a\,e^2\,n}{3\,c}\right )-\ln \left (4\,a\,c+b\,\sqrt {b^2-4\,a\,c}-b^2+2\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {\frac {a\,b\,e^2\,n}{2}+\frac {b^2\,d\,e\,n}{2}-\frac {a\,e^2\,n\,\sqrt {b^2-4\,a\,c}}{6}-\frac {b\,d\,e\,n\,\sqrt {b^2-4\,a\,c}}{2}}{c^2}-\frac {\frac {b\,d^2\,n}{2}-\frac {d^2\,n\,\sqrt {b^2-4\,a\,c}}{2}+a\,d\,e\,n}{c}-\frac {b^3\,e^2\,n}{6\,c^3}+\frac {b^2\,e^2\,n\,\sqrt {b^2-4\,a\,c}}{6\,c^3}\right )+\ln \left (d\,{\left (c\,x^2+b\,x+a\right )}^n\right )\,\left (d^2\,x+d\,e\,x^2+\frac {e^2\,x^3}{3}\right )-x^2\,\left (\frac {e\,n\,\left (b\,e+6\,c\,d\right )}{6\,c}-\frac {b\,e^2\,n}{3\,c}\right )-\frac {2\,e^2\,n\,x^3}{9} \]

[In]

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

[Out]

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