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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 178 \[ \int x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {2}{27} b^2 d^2 n^2 x^3+\frac {1}{16} b^2 d e n^2 x^4+\frac {2}{125} b^2 e^2 n^2 x^5-\frac {2}{9} b d^2 n x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b d e n x^4 \left (a+b \log \left (c x^n\right )\right )-\frac {2}{25} b e^2 n x^5 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} d^2 x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} d e x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{5} e^2 x^5 \left (a+b \log \left (c x^n\right )\right )^2 \] Output:

2/27*b^2*d^2*n^2*x^3+1/16*b^2*d*e*n^2*x^4+2/125*b^2*e^2*n^2*x^5-2/9*b*d^2* 
n*x^3*(a+b*ln(c*x^n))-1/4*b*d*e*n*x^4*(a+b*ln(c*x^n))-2/25*b*e^2*n*x^5*(a+ 
b*ln(c*x^n))+1/3*d^2*x^3*(a+b*ln(c*x^n))^2+1/2*d*e*x^4*(a+b*ln(c*x^n))^2+1 
/5*e^2*x^5*(a+b*ln(c*x^n))^2
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 149, normalized size of antiderivative = 0.84 \[ \int x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {2}{125} b e^2 n x^5 \left (-5 a+b n-5 b \log \left (c x^n\right )\right )+\frac {1}{16} b d e n x^4 \left (-4 a+b n-4 b \log \left (c x^n\right )\right )+\frac {2}{27} b d^2 n x^3 \left (-3 a+b n-3 b \log \left (c x^n\right )\right )+\frac {1}{3} d^2 x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} d e x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{5} e^2 x^5 \left (a+b \log \left (c x^n\right )\right )^2 \] Input:

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

Output:

(2*b*e^2*n*x^5*(-5*a + b*n - 5*b*Log[c*x^n]))/125 + (b*d*e*n*x^4*(-4*a + b 
*n - 4*b*Log[c*x^n]))/16 + (2*b*d^2*n*x^3*(-3*a + b*n - 3*b*Log[c*x^n]))/2 
7 + (d^2*x^3*(a + b*Log[c*x^n])^2)/3 + (d*e*x^4*(a + b*Log[c*x^n])^2)/2 + 
(e^2*x^5*(a + b*Log[c*x^n])^2)/5
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2795, 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 x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx\)

\(\Big \downarrow \) 2795

\(\displaystyle \int \left (d^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+2 d e x^3 \left (a+b \log \left (c x^n\right )\right )^2+e^2 x^4 \left (a+b \log \left (c x^n\right )\right )^2\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{3} d^2 x^3 \left (a+b \log \left (c x^n\right )\right )^2-\frac {2}{9} b d^2 n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} d e x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{4} b d e n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{5} e^2 x^5 \left (a+b \log \left (c x^n\right )\right )^2-\frac {2}{25} b e^2 n x^5 \left (a+b \log \left (c x^n\right )\right )+\frac {2}{27} b^2 d^2 n^2 x^3+\frac {1}{16} b^2 d e n^2 x^4+\frac {2}{125} b^2 e^2 n^2 x^5\)

Input:

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

Output:

(2*b^2*d^2*n^2*x^3)/27 + (b^2*d*e*n^2*x^4)/16 + (2*b^2*e^2*n^2*x^5)/125 - 
(2*b*d^2*n*x^3*(a + b*Log[c*x^n]))/9 - (b*d*e*n*x^4*(a + b*Log[c*x^n]))/4 
- (2*b*e^2*n*x^5*(a + b*Log[c*x^n]))/25 + (d^2*x^3*(a + b*Log[c*x^n])^2)/3 
 + (d*e*x^4*(a + b*Log[c*x^n])^2)/2 + (e^2*x^5*(a + b*Log[c*x^n])^2)/5
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2795
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + 
(e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[ 
c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b 
, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0 
] && IntegerQ[m] && IntegerQ[r]))
 
Maple [A] (verified)

Time = 192.59 (sec) , antiderivative size = 262, normalized size of antiderivative = 1.47

method result size
parallelrisch \(\frac {x^{5} \ln \left (c \,x^{n}\right )^{2} b^{2} e^{2}}{5}-\frac {2 \ln \left (c \,x^{n}\right ) x^{5} n \,b^{2} e^{2}}{25}+\frac {2 b^{2} e^{2} n^{2} x^{5}}{125}+\frac {2 \ln \left (c \,x^{n}\right ) x^{5} a \,e^{2} b}{5}-\frac {2 a b \,e^{2} n \,x^{5}}{25}+\frac {x^{4} \ln \left (c \,x^{n}\right )^{2} b^{2} d e}{2}-\frac {\ln \left (c \,x^{n}\right ) x^{4} n d e \,b^{2}}{4}+\frac {b^{2} d e \,n^{2} x^{4}}{16}+\frac {a^{2} e^{2} x^{5}}{5}+\ln \left (c \,x^{n}\right ) x^{4} d e a b -\frac {a b d e n \,x^{4}}{4}+\frac {x^{3} \ln \left (c \,x^{n}\right )^{2} b^{2} d^{2}}{3}-\frac {2 \ln \left (c \,x^{n}\right ) x^{3} n \,b^{2} d^{2}}{9}+\frac {2 b^{2} d^{2} n^{2} x^{3}}{27}+\frac {a^{2} d e \,x^{4}}{2}+\frac {2 \ln \left (c \,x^{n}\right ) x^{3} a b \,d^{2}}{3}-\frac {2 a b \,d^{2} n \,x^{3}}{9}+\frac {a^{2} d^{2} x^{3}}{3}\) \(262\)
risch \(\text {Expression too large to display}\) \(2597\)

Input:

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

Output:

1/5*x^5*ln(c*x^n)^2*b^2*e^2-2/25*ln(c*x^n)*x^5*n*b^2*e^2+2/125*b^2*e^2*n^2 
*x^5+2/5*ln(c*x^n)*x^5*a*e^2*b-2/25*a*b*e^2*n*x^5+1/2*x^4*ln(c*x^n)^2*b^2* 
d*e-1/4*ln(c*x^n)*x^4*n*d*e*b^2+1/16*b^2*d*e*n^2*x^4+1/5*a^2*e^2*x^5+ln(c* 
x^n)*x^4*d*e*a*b-1/4*a*b*d*e*n*x^4+1/3*x^3*ln(c*x^n)^2*b^2*d^2-2/9*ln(c*x^ 
n)*x^3*n*b^2*d^2+2/27*b^2*d^2*n^2*x^3+1/2*a^2*d*e*x^4+2/3*ln(c*x^n)*x^3*a* 
b*d^2-2/9*a*b*d^2*n*x^3+1/3*a^2*d^2*x^3
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 364 vs. \(2 (160) = 320\).

Time = 0.08 (sec) , antiderivative size = 364, normalized size of antiderivative = 2.04 \[ \int x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{125} \, {\left (2 \, b^{2} e^{2} n^{2} - 10 \, a b e^{2} n + 25 \, a^{2} e^{2}\right )} x^{5} + \frac {1}{16} \, {\left (b^{2} d e n^{2} - 4 \, a b d e n + 8 \, a^{2} d e\right )} x^{4} + \frac {1}{27} \, {\left (2 \, b^{2} d^{2} n^{2} - 6 \, a b d^{2} n + 9 \, a^{2} d^{2}\right )} x^{3} + \frac {1}{30} \, {\left (6 \, b^{2} e^{2} x^{5} + 15 \, b^{2} d e x^{4} + 10 \, b^{2} d^{2} x^{3}\right )} \log \left (c\right )^{2} + \frac {1}{30} \, {\left (6 \, b^{2} e^{2} n^{2} x^{5} + 15 \, b^{2} d e n^{2} x^{4} + 10 \, b^{2} d^{2} n^{2} x^{3}\right )} \log \left (x\right )^{2} - \frac {1}{900} \, {\left (72 \, {\left (b^{2} e^{2} n - 5 \, a b e^{2}\right )} x^{5} + 225 \, {\left (b^{2} d e n - 4 \, a b d e\right )} x^{4} + 200 \, {\left (b^{2} d^{2} n - 3 \, a b d^{2}\right )} x^{3}\right )} \log \left (c\right ) - \frac {1}{900} \, {\left (72 \, {\left (b^{2} e^{2} n^{2} - 5 \, a b e^{2} n\right )} x^{5} + 225 \, {\left (b^{2} d e n^{2} - 4 \, a b d e n\right )} x^{4} + 200 \, {\left (b^{2} d^{2} n^{2} - 3 \, a b d^{2} n\right )} x^{3} - 60 \, {\left (6 \, b^{2} e^{2} n x^{5} + 15 \, b^{2} d e n x^{4} + 10 \, b^{2} d^{2} n x^{3}\right )} \log \left (c\right )\right )} \log \left (x\right ) \] Input:

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

Output:

1/125*(2*b^2*e^2*n^2 - 10*a*b*e^2*n + 25*a^2*e^2)*x^5 + 1/16*(b^2*d*e*n^2 
- 4*a*b*d*e*n + 8*a^2*d*e)*x^4 + 1/27*(2*b^2*d^2*n^2 - 6*a*b*d^2*n + 9*a^2 
*d^2)*x^3 + 1/30*(6*b^2*e^2*x^5 + 15*b^2*d*e*x^4 + 10*b^2*d^2*x^3)*log(c)^ 
2 + 1/30*(6*b^2*e^2*n^2*x^5 + 15*b^2*d*e*n^2*x^4 + 10*b^2*d^2*n^2*x^3)*log 
(x)^2 - 1/900*(72*(b^2*e^2*n - 5*a*b*e^2)*x^5 + 225*(b^2*d*e*n - 4*a*b*d*e 
)*x^4 + 200*(b^2*d^2*n - 3*a*b*d^2)*x^3)*log(c) - 1/900*(72*(b^2*e^2*n^2 - 
 5*a*b*e^2*n)*x^5 + 225*(b^2*d*e*n^2 - 4*a*b*d*e*n)*x^4 + 200*(b^2*d^2*n^2 
 - 3*a*b*d^2*n)*x^3 - 60*(6*b^2*e^2*n*x^5 + 15*b^2*d*e*n*x^4 + 10*b^2*d^2* 
n*x^3)*log(c))*log(x)
 

Sympy [A] (verification not implemented)

Time = 0.55 (sec) , antiderivative size = 311, normalized size of antiderivative = 1.75 \[ \int x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {a^{2} d^{2} x^{3}}{3} + \frac {a^{2} d e x^{4}}{2} + \frac {a^{2} e^{2} x^{5}}{5} - \frac {2 a b d^{2} n x^{3}}{9} + \frac {2 a b d^{2} x^{3} \log {\left (c x^{n} \right )}}{3} - \frac {a b d e n x^{4}}{4} + a b d e x^{4} \log {\left (c x^{n} \right )} - \frac {2 a b e^{2} n x^{5}}{25} + \frac {2 a b e^{2} x^{5} \log {\left (c x^{n} \right )}}{5} + \frac {2 b^{2} d^{2} n^{2} x^{3}}{27} - \frac {2 b^{2} d^{2} n x^{3} \log {\left (c x^{n} \right )}}{9} + \frac {b^{2} d^{2} x^{3} \log {\left (c x^{n} \right )}^{2}}{3} + \frac {b^{2} d e n^{2} x^{4}}{16} - \frac {b^{2} d e n x^{4} \log {\left (c x^{n} \right )}}{4} + \frac {b^{2} d e x^{4} \log {\left (c x^{n} \right )}^{2}}{2} + \frac {2 b^{2} e^{2} n^{2} x^{5}}{125} - \frac {2 b^{2} e^{2} n x^{5} \log {\left (c x^{n} \right )}}{25} + \frac {b^{2} e^{2} x^{5} \log {\left (c x^{n} \right )}^{2}}{5} \] Input:

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

Output:

a**2*d**2*x**3/3 + a**2*d*e*x**4/2 + a**2*e**2*x**5/5 - 2*a*b*d**2*n*x**3/ 
9 + 2*a*b*d**2*x**3*log(c*x**n)/3 - a*b*d*e*n*x**4/4 + a*b*d*e*x**4*log(c* 
x**n) - 2*a*b*e**2*n*x**5/25 + 2*a*b*e**2*x**5*log(c*x**n)/5 + 2*b**2*d**2 
*n**2*x**3/27 - 2*b**2*d**2*n*x**3*log(c*x**n)/9 + b**2*d**2*x**3*log(c*x* 
*n)**2/3 + b**2*d*e*n**2*x**4/16 - b**2*d*e*n*x**4*log(c*x**n)/4 + b**2*d* 
e*x**4*log(c*x**n)**2/2 + 2*b**2*e**2*n**2*x**5/125 - 2*b**2*e**2*n*x**5*l 
og(c*x**n)/25 + b**2*e**2*x**5*log(c*x**n)**2/5
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.40 \[ \int x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{5} \, b^{2} e^{2} x^{5} \log \left (c x^{n}\right )^{2} - \frac {2}{25} \, a b e^{2} n x^{5} + \frac {2}{5} \, a b e^{2} x^{5} \log \left (c x^{n}\right ) + \frac {1}{2} \, b^{2} d e x^{4} \log \left (c x^{n}\right )^{2} - \frac {1}{4} \, a b d e n x^{4} + \frac {1}{5} \, a^{2} e^{2} x^{5} + a b d e x^{4} \log \left (c x^{n}\right ) + \frac {1}{3} \, b^{2} d^{2} x^{3} \log \left (c x^{n}\right )^{2} - \frac {2}{9} \, a b d^{2} n x^{3} + \frac {1}{2} \, a^{2} d e x^{4} + \frac {2}{3} \, a b d^{2} x^{3} \log \left (c x^{n}\right ) + \frac {1}{3} \, a^{2} d^{2} x^{3} + \frac {2}{27} \, {\left (n^{2} x^{3} - 3 \, n x^{3} \log \left (c x^{n}\right )\right )} b^{2} d^{2} + \frac {1}{16} \, {\left (n^{2} x^{4} - 4 \, n x^{4} \log \left (c x^{n}\right )\right )} b^{2} d e + \frac {2}{125} \, {\left (n^{2} x^{5} - 5 \, n x^{5} \log \left (c x^{n}\right )\right )} b^{2} e^{2} \] Input:

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

Output:

1/5*b^2*e^2*x^5*log(c*x^n)^2 - 2/25*a*b*e^2*n*x^5 + 2/5*a*b*e^2*x^5*log(c* 
x^n) + 1/2*b^2*d*e*x^4*log(c*x^n)^2 - 1/4*a*b*d*e*n*x^4 + 1/5*a^2*e^2*x^5 
+ a*b*d*e*x^4*log(c*x^n) + 1/3*b^2*d^2*x^3*log(c*x^n)^2 - 2/9*a*b*d^2*n*x^ 
3 + 1/2*a^2*d*e*x^4 + 2/3*a*b*d^2*x^3*log(c*x^n) + 1/3*a^2*d^2*x^3 + 2/27* 
(n^2*x^3 - 3*n*x^3*log(c*x^n))*b^2*d^2 + 1/16*(n^2*x^4 - 4*n*x^4*log(c*x^n 
))*b^2*d*e + 2/125*(n^2*x^5 - 5*n*x^5*log(c*x^n))*b^2*e^2
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 408 vs. \(2 (160) = 320\).

Time = 0.12 (sec) , antiderivative size = 408, normalized size of antiderivative = 2.29 \[ \int x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{5} \, b^{2} e^{2} n^{2} x^{5} \log \left (x\right )^{2} - \frac {2}{25} \, b^{2} e^{2} n^{2} x^{5} \log \left (x\right ) + \frac {2}{5} \, b^{2} e^{2} n x^{5} \log \left (c\right ) \log \left (x\right ) + \frac {1}{2} \, b^{2} d e n^{2} x^{4} \log \left (x\right )^{2} + \frac {2}{125} \, b^{2} e^{2} n^{2} x^{5} - \frac {2}{25} \, b^{2} e^{2} n x^{5} \log \left (c\right ) + \frac {1}{5} \, b^{2} e^{2} x^{5} \log \left (c\right )^{2} - \frac {1}{4} \, b^{2} d e n^{2} x^{4} \log \left (x\right ) + \frac {2}{5} \, a b e^{2} n x^{5} \log \left (x\right ) + b^{2} d e n x^{4} \log \left (c\right ) \log \left (x\right ) + \frac {1}{3} \, b^{2} d^{2} n^{2} x^{3} \log \left (x\right )^{2} + \frac {1}{16} \, b^{2} d e n^{2} x^{4} - \frac {2}{25} \, a b e^{2} n x^{5} - \frac {1}{4} \, b^{2} d e n x^{4} \log \left (c\right ) + \frac {2}{5} \, a b e^{2} x^{5} \log \left (c\right ) + \frac {1}{2} \, b^{2} d e x^{4} \log \left (c\right )^{2} - \frac {2}{9} \, b^{2} d^{2} n^{2} x^{3} \log \left (x\right ) + a b d e n x^{4} \log \left (x\right ) + \frac {2}{3} \, b^{2} d^{2} n x^{3} \log \left (c\right ) \log \left (x\right ) + \frac {2}{27} \, b^{2} d^{2} n^{2} x^{3} - \frac {1}{4} \, a b d e n x^{4} + \frac {1}{5} \, a^{2} e^{2} x^{5} - \frac {2}{9} \, b^{2} d^{2} n x^{3} \log \left (c\right ) + a b d e x^{4} \log \left (c\right ) + \frac {1}{3} \, b^{2} d^{2} x^{3} \log \left (c\right )^{2} + \frac {2}{3} \, a b d^{2} n x^{3} \log \left (x\right ) - \frac {2}{9} \, a b d^{2} n x^{3} + \frac {1}{2} \, a^{2} d e x^{4} + \frac {2}{3} \, a b d^{2} x^{3} \log \left (c\right ) + \frac {1}{3} \, a^{2} d^{2} x^{3} \] Input:

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

Output:

1/5*b^2*e^2*n^2*x^5*log(x)^2 - 2/25*b^2*e^2*n^2*x^5*log(x) + 2/5*b^2*e^2*n 
*x^5*log(c)*log(x) + 1/2*b^2*d*e*n^2*x^4*log(x)^2 + 2/125*b^2*e^2*n^2*x^5 
- 2/25*b^2*e^2*n*x^5*log(c) + 1/5*b^2*e^2*x^5*log(c)^2 - 1/4*b^2*d*e*n^2*x 
^4*log(x) + 2/5*a*b*e^2*n*x^5*log(x) + b^2*d*e*n*x^4*log(c)*log(x) + 1/3*b 
^2*d^2*n^2*x^3*log(x)^2 + 1/16*b^2*d*e*n^2*x^4 - 2/25*a*b*e^2*n*x^5 - 1/4* 
b^2*d*e*n*x^4*log(c) + 2/5*a*b*e^2*x^5*log(c) + 1/2*b^2*d*e*x^4*log(c)^2 - 
 2/9*b^2*d^2*n^2*x^3*log(x) + a*b*d*e*n*x^4*log(x) + 2/3*b^2*d^2*n*x^3*log 
(c)*log(x) + 2/27*b^2*d^2*n^2*x^3 - 1/4*a*b*d*e*n*x^4 + 1/5*a^2*e^2*x^5 - 
2/9*b^2*d^2*n*x^3*log(c) + a*b*d*e*x^4*log(c) + 1/3*b^2*d^2*x^3*log(c)^2 + 
 2/3*a*b*d^2*n*x^3*log(x) - 2/9*a*b*d^2*n*x^3 + 1/2*a^2*d*e*x^4 + 2/3*a*b* 
d^2*x^3*log(c) + 1/3*a^2*d^2*x^3
 

Mupad [B] (verification not implemented)

Time = 27.15 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.01 \[ \int x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\ln \left (c\,x^n\right )\,\left (\frac {2\,b\,\left (3\,a-b\,n\right )\,d^2\,x^3}{9}+\frac {b\,\left (4\,a-b\,n\right )\,d\,e\,x^4}{4}+\frac {2\,b\,\left (5\,a-b\,n\right )\,e^2\,x^5}{25}\right )+{\ln \left (c\,x^n\right )}^2\,\left (\frac {b^2\,d^2\,x^3}{3}+\frac {b^2\,d\,e\,x^4}{2}+\frac {b^2\,e^2\,x^5}{5}\right )+\frac {d^2\,x^3\,\left (9\,a^2-6\,a\,b\,n+2\,b^2\,n^2\right )}{27}+\frac {e^2\,x^5\,\left (25\,a^2-10\,a\,b\,n+2\,b^2\,n^2\right )}{125}+\frac {d\,e\,x^4\,\left (8\,a^2-4\,a\,b\,n+b^2\,n^2\right )}{16} \] Input:

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

Output:

log(c*x^n)*((2*b*d^2*x^3*(3*a - b*n))/9 + (2*b*e^2*x^5*(5*a - b*n))/25 + ( 
b*d*e*x^4*(4*a - b*n))/4) + log(c*x^n)^2*((b^2*d^2*x^3)/3 + (b^2*e^2*x^5)/ 
5 + (b^2*d*e*x^4)/2) + (d^2*x^3*(9*a^2 + 2*b^2*n^2 - 6*a*b*n))/27 + (e^2*x 
^5*(25*a^2 + 2*b^2*n^2 - 10*a*b*n))/125 + (d*e*x^4*(8*a^2 + b^2*n^2 - 4*a* 
b*n))/16
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.33 \[ \int x^2 (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {x^{3} \left (18000 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d^{2}+27000 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d e x +10800 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e^{2} x^{2}+36000 \,\mathrm {log}\left (x^{n} c \right ) a b \,d^{2}+54000 \,\mathrm {log}\left (x^{n} c \right ) a b d e x +21600 \,\mathrm {log}\left (x^{n} c \right ) a b \,e^{2} x^{2}-12000 \,\mathrm {log}\left (x^{n} c \right ) b^{2} d^{2} n -13500 \,\mathrm {log}\left (x^{n} c \right ) b^{2} d e n x -4320 \,\mathrm {log}\left (x^{n} c \right ) b^{2} e^{2} n \,x^{2}+18000 a^{2} d^{2}+27000 a^{2} d e x +10800 a^{2} e^{2} x^{2}-12000 a b \,d^{2} n -13500 a b d e n x -4320 a b \,e^{2} n \,x^{2}+4000 b^{2} d^{2} n^{2}+3375 b^{2} d e \,n^{2} x +864 b^{2} e^{2} n^{2} x^{2}\right )}{54000} \] Input:

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

Output:

(x**3*(18000*log(x**n*c)**2*b**2*d**2 + 27000*log(x**n*c)**2*b**2*d*e*x + 
10800*log(x**n*c)**2*b**2*e**2*x**2 + 36000*log(x**n*c)*a*b*d**2 + 54000*l 
og(x**n*c)*a*b*d*e*x + 21600*log(x**n*c)*a*b*e**2*x**2 - 12000*log(x**n*c) 
*b**2*d**2*n - 13500*log(x**n*c)*b**2*d*e*n*x - 4320*log(x**n*c)*b**2*e**2 
*n*x**2 + 18000*a**2*d**2 + 27000*a**2*d*e*x + 10800*a**2*e**2*x**2 - 1200 
0*a*b*d**2*n - 13500*a*b*d*e*n*x - 4320*a*b*e**2*n*x**2 + 4000*b**2*d**2*n 
**2 + 3375*b**2*d*e*n**2*x + 864*b**2*e**2*n**2*x**2))/54000