### 3.72 $$\int x^3 \log (d (a+b x+c x^2)^n) \, dx$$

Optimal. Leaf size=167 $-\frac{n \left (2 a^2 c^2-4 a b^2 c+b^4\right ) \log \left (a+b x+c x^2\right )}{8 c^4}-\frac{n x^2 \left (b^2-2 a c\right )}{8 c^2}+\frac{b n x \left (b^2-3 a c\right )}{4 c^3}-\frac{b n \sqrt{b^2-4 a c} \left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{4 c^4}+\frac{1}{4} x^4 \log \left (d \left (a+b x+c x^2\right )^n\right )+\frac{b n x^3}{12 c}-\frac{n x^4}{8}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.188672, antiderivative size = 167, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 19, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.316, Rules used = {2525, 800, 634, 618, 206, 628} $-\frac{n \left (2 a^2 c^2-4 a b^2 c+b^4\right ) \log \left (a+b x+c x^2\right )}{8 c^4}-\frac{n x^2 \left (b^2-2 a c\right )}{8 c^2}+\frac{b n x \left (b^2-3 a c\right )}{4 c^3}-\frac{b n \sqrt{b^2-4 a c} \left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{4 c^4}+\frac{1}{4} x^4 \log \left (d \left (a+b x+c x^2\right )^n\right )+\frac{b n x^3}{12 c}-\frac{n x^4}{8}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Mathematica [A]  time = 0.147535, size = 151, normalized size = 0.9 $\frac{-3 n \left (2 a^2 c^2-4 a b^2 c+b^4\right ) \log (a+x (b+c x))+c n x \left (2 b c \left (c x^2-9 a\right )-3 c^2 x \left (c x^2-2 a\right )-3 b^2 c x+6 b^3\right )-6 b n \sqrt{b^2-4 a c} \left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )+6 c^4 x^4 \log \left (d (a+x (b+c x))^n\right )}{24 c^4}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C]  time = 0.1, size = 1146, normalized size = 6.9 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*x^4*ln((c*x^2+b*x+a)^n)+1/8*I*Pi*x^4*csgn(I*(c*x^2+b*x+a)^n)*csgn(I*d*(c*x^2+b*x+a)^n)^2+1/8*I*Pi*x^4*csgn
(I*d)*csgn(I*d*(c*x^2+b*x+a)^n)^2-1/8*I*Pi*x^4*csgn(I*d*(c*x^2+b*x+a)^n)^3-1/8*I*Pi*x^4*csgn(I*d)*csgn(I*(c*x^
2+b*x+a)^n)*csgn(I*d*(c*x^2+b*x+a)^n)+1/4*ln(d)*x^4-1/8*n*x^4+1/12*b*n*x^3/c+1/4/c*a*n*x^2-1/8*b^2*n*x^2/c^2-1
/4/c^2*n*ln(8*a^2*b*c^2-6*a*b^3*c+b^5+2*(-16*a^3*b^2*c^3+20*a^2*b^4*c^2-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-8*a*b^6*c+b^8)^(1/2)*b)*(-16*a^3*b^2*c^3+20*a^2*b^4*c^2-8*a*b^6*c+b^8)^(1/2)+1/8/c^4*n*ln(8*a^2*b
*c^2-6*a*b^3*c+b^5-2*(-16*a^3*b^2*c^3+20*a^2*b^4*c^2-8*a*b^6*c+b^8)^(1/2)*c*x-(-16*a^3*b^2*c^3+20*a^2*b^4*c^2-
8*a*b^6*c+b^8)^(1/2)*b)*(-16*a^3*b^2*c^3+20*a^2*b^4*c^2-8*a*b^6*c+b^8)^(1/2)

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.96504, size = 826, normalized size = 4.95 \begin{align*} \left [-\frac{3 \, c^{4} n x^{4} - 6 \, c^{4} x^{4} \log \left (d\right ) - 2 \, b c^{3} n x^{3} + 3 \,{\left (b^{2} c^{2} - 2 \, a c^{3}\right )} n x^{2} + 3 \,{\left (b^{3} - 2 \, a b c\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 (b^{3} c - 3 \, a b c^{2}\right )} n x - 3 \,{\left (2 \, c^{4} n x^{4} -{\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} n\right )} \log \left (c x^{2} + b x + a\right )}{24 \, c^{4}}, -\frac{3 \, c^{4} n x^{4} - 6 \, c^{4} x^{4} \log \left (d\right ) - 2 \, b c^{3} n x^{3} + 3 \,{\left (b^{2} c^{2} - 2 \, a c^{3}\right )} n x^{2} + 6 \,{\left (b^{3} - 2 \, a b c\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 (b^{3} c - 3 \, a b c^{2}\right )} n x - 3 \,{\left (2 \, c^{4} n x^{4} -{\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} n\right )} \log \left (c x^{2} + b x + a\right )}{24 \, c^{4}}\right ] \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.27076, size = 238, normalized size = 1.43 \begin{align*} \frac{1}{4} \, n x^{4} \log \left (c x^{2} + b x + a\right ) - \frac{1}{8} \,{\left (n - 2 \, \log \left (d\right )\right )} x^{4} + \frac{b n x^{3}}{12 \, c} - \frac{{\left (b^{2} n - 2 \, a c n\right )} x^{2}}{8 \, c^{2}} + \frac{{\left (b^{3} n - 3 \, a b c n\right )} x}{4 \, c^{3}} - \frac{{\left (b^{4} n - 4 \, a b^{2} c n + 2 \, a^{2} c^{2} n\right )} \log \left (c x^{2} + b x + a\right )}{8 \, c^{4}} + \frac{{\left (b^{5} n - 6 \, a b^{3} c n + 8 \, a^{2} b c^{2} n\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{4 \, \sqrt{-b^{2} + 4 \, a c} c^{4}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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