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

Optimal. Leaf size=226 \[ -\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{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 \sqrt{b^2-4 a c} \left (-c e (a e+3 b d)+b^2 e^2+3 c^2 d^2\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{3 c^3}+\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 \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.319069, antiderivative size = 226, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {2525, 800, 634, 618, 206, 628} \[ -\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{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 \sqrt{b^2-4 a c} \left (-c e (a e+3 b d)+b^2 e^2+3 c^2 d^2\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{3 c^3}+\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 \]

Antiderivative was successfully verified.

[In]

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

[Out]

-((6*c^2*d^2 + b^2*e^2 - c*e*(3*b*d + 2*a*e))*n*x)/(3*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 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]

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

Rubi steps

\begin{align*} \int (d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx &=\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 ) \operatorname{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]  time = 0.377775, size = 204, normalized size = 0.9 \[ \frac{(d+e x)^3 \log \left (d (a+x (b+c x))^n\right )-\frac{n \left (c e x \left (-3 c e (4 a e+6 b d+b e x)+6 b^2 e^2+2 c^2 \left (18 d^2+9 d e x+2 e^2 x^2\right )\right )+3 (2 c d-b e) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right ) \log (a+x (b+c x))-6 e \sqrt{b^2-4 a c} \left (-c e (a e+3 b d)+b^2 e^2+3 c^2 d^2\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )\right )}{6 c^3}}{3 e} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-(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)]))/(6*c^3) + (d + e*x)^3*Log[d*(a + x*(b + c*x))^n])
/(3*e)

________________________________________________________________________________________

Maple [C]  time = 0.148, size = 7155, normalized size = 31.7 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.25016, size = 1242, normalized size = 5.5 \begin{align*} \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 ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.34656, size = 591, normalized size = 2.62 \begin{align*} \frac{b d^{2} n \log \left (c x^{2} + b x + a\right )}{2 \, c} - \frac{{\left (b^{2} d^{2} n - 4 \, a c d^{2} n\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c} - \frac{{\left (b^{2} d n e - 2 \, a c d n e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{2}} + \frac{{\left (b^{3} d n e - 4 \, a b c d n e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c^{2}} + \frac{6 \, c^{2} n x^{3} e^{2} \log \left (c x^{2} + b x + a\right ) + 18 \, c^{2} d n x^{2} e \log \left (c x^{2} + b x + a\right ) - 4 \, c^{2} n x^{3} e^{2} - 18 \, c^{2} d n x^{2} e + 18 \, c^{2} d^{2} n x \log \left (c x^{2} + b x + a\right ) + 6 \, c^{2} x^{3} e^{2} \log \left (d\right ) + 18 \, c^{2} d x^{2} e \log \left (d\right ) - 36 \, c^{2} d^{2} n x + 3 \, b c n x^{2} e^{2} + 18 \, b c d n x e + 18 \, c^{2} d^{2} x \log \left (d\right ) - 6 \, b^{2} n x e^{2} + 12 \, a c n x e^{2}}{18 \, c^{2}} + \frac{{\left (b^{3} n e^{2} - 3 \, a b c n e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{6 \, c^{3}} - \frac{{\left (b^{4} n e^{2} - 5 \, a b^{2} c n e^{2} + 4 \, a^{2} c^{2} n e^{2}\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{3 \, \sqrt{-b^{2} + 4 \, a c} c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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