Integrand size = 21, antiderivative size = 109 \[ \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {2}{27} b^2 d n^2 x^3+\frac {1}{32} b^2 e n^2 x^4-\frac {2}{9} b d n x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{8} b e n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} d x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{4} e x^4 \left (a+b \log \left (c x^n\right )\right )^2 \] Output:
2/27*b^2*d*n^2*x^3+1/32*b^2*e*n^2*x^4-2/9*b*d*n*x^3*(a+b*ln(c*x^n))-1/8*b* e*n*x^4*(a+b*ln(c*x^n))+1/3*d*x^3*(a+b*ln(c*x^n))^2+1/4*e*x^4*(a+b*ln(c*x^ n))^2
Time = 0.08 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.75 \[ \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{864} x^3 \left (27 b e n x \left (-4 a+b n-4 b \log \left (c x^n\right )\right )+64 b d n \left (-3 a+b n-3 b \log \left (c x^n\right )\right )+288 d \left (a+b \log \left (c x^n\right )\right )^2+216 e x \left (a+b \log \left (c x^n\right )\right )^2\right ) \] Input:
Integrate[x^2*(d + e*x)*(a + b*Log[c*x^n])^2,x]
Output:
(x^3*(27*b*e*n*x*(-4*a + b*n - 4*b*Log[c*x^n]) + 64*b*d*n*(-3*a + b*n - 3* b*Log[c*x^n]) + 288*d*(a + b*Log[c*x^n])^2 + 216*e*x*(a + b*Log[c*x^n])^2) )/864
Time = 0.36 (sec) , antiderivative size = 109, 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.095, 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) \left (a+b \log \left (c x^n\right )\right )^2 \, dx\) |
\(\Big \downarrow \) 2795 |
\(\displaystyle \int \left (d x^2 \left (a+b \log \left (c x^n\right )\right )^2+e x^3 \left (a+b \log \left (c x^n\right )\right )^2\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{3} d x^3 \left (a+b \log \left (c x^n\right )\right )^2-\frac {2}{9} b d n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{4} e x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{8} b e n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {2}{27} b^2 d n^2 x^3+\frac {1}{32} b^2 e n^2 x^4\) |
Input:
Int[x^2*(d + e*x)*(a + b*Log[c*x^n])^2,x]
Output:
(2*b^2*d*n^2*x^3)/27 + (b^2*e*n^2*x^4)/32 - (2*b*d*n*x^3*(a + b*Log[c*x^n] ))/9 - (b*e*n*x^4*(a + b*Log[c*x^n]))/8 + (d*x^3*(a + b*Log[c*x^n])^2)/3 + (e*x^4*(a + b*Log[c*x^n])^2)/4
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]))
Time = 0.42 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.43
method | result | size |
parallelrisch | \(\frac {x^{4} \ln \left (c \,x^{n}\right )^{2} b^{2} e}{4}-\frac {\ln \left (c \,x^{n}\right ) x^{4} n \,b^{2} e}{8}+\frac {b^{2} e \,n^{2} x^{4}}{32}+\frac {\ln \left (c \,x^{n}\right ) x^{4} e a b}{2}-\frac {a b e n \,x^{4}}{8}+\frac {x^{3} \ln \left (c \,x^{n}\right )^{2} b^{2} d}{3}-\frac {2 \ln \left (c \,x^{n}\right ) x^{3} n \,b^{2} d}{9}+\frac {2 b^{2} d \,n^{2} x^{3}}{27}+\frac {a^{2} e \,x^{4}}{4}+\frac {2 \ln \left (c \,x^{n}\right ) x^{3} d a b}{3}-\frac {2 a b d n \,x^{3}}{9}+\frac {a^{2} d \,x^{3}}{3}\) | \(156\) |
risch | \(\text {Expression too large to display}\) | \(1622\) |
Input:
int(x^2*(e*x+d)*(a+b*ln(c*x^n))^2,x,method=_RETURNVERBOSE)
Output:
1/4*x^4*ln(c*x^n)^2*b^2*e-1/8*ln(c*x^n)*x^4*n*b^2*e+1/32*b^2*e*n^2*x^4+1/2 *ln(c*x^n)*x^4*e*a*b-1/8*a*b*e*n*x^4+1/3*x^3*ln(c*x^n)^2*b^2*d-2/9*ln(c*x^ n)*x^3*n*b^2*d+2/27*b^2*d*n^2*x^3+1/4*a^2*e*x^4+2/3*ln(c*x^n)*x^3*d*a*b-2/ 9*a*b*d*n*x^3+1/3*a^2*d*x^3
Leaf count of result is larger than twice the leaf count of optimal. 219 vs. \(2 (97) = 194\).
Time = 0.07 (sec) , antiderivative size = 219, normalized size of antiderivative = 2.01 \[ \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{32} \, {\left (b^{2} e n^{2} - 4 \, a b e n + 8 \, a^{2} e\right )} x^{4} + \frac {1}{27} \, {\left (2 \, b^{2} d n^{2} - 6 \, a b d n + 9 \, a^{2} d\right )} x^{3} + \frac {1}{12} \, {\left (3 \, b^{2} e x^{4} + 4 \, b^{2} d x^{3}\right )} \log \left (c\right )^{2} + \frac {1}{12} \, {\left (3 \, b^{2} e n^{2} x^{4} + 4 \, b^{2} d n^{2} x^{3}\right )} \log \left (x\right )^{2} - \frac {1}{72} \, {\left (9 \, {\left (b^{2} e n - 4 \, a b e\right )} x^{4} + 16 \, {\left (b^{2} d n - 3 \, a b d\right )} x^{3}\right )} \log \left (c\right ) - \frac {1}{72} \, {\left (9 \, {\left (b^{2} e n^{2} - 4 \, a b e n\right )} x^{4} + 16 \, {\left (b^{2} d n^{2} - 3 \, a b d n\right )} x^{3} - 12 \, {\left (3 \, b^{2} e n x^{4} + 4 \, b^{2} d n x^{3}\right )} \log \left (c\right )\right )} \log \left (x\right ) \] Input:
integrate(x^2*(e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="fricas")
Output:
1/32*(b^2*e*n^2 - 4*a*b*e*n + 8*a^2*e)*x^4 + 1/27*(2*b^2*d*n^2 - 6*a*b*d*n + 9*a^2*d)*x^3 + 1/12*(3*b^2*e*x^4 + 4*b^2*d*x^3)*log(c)^2 + 1/12*(3*b^2* e*n^2*x^4 + 4*b^2*d*n^2*x^3)*log(x)^2 - 1/72*(9*(b^2*e*n - 4*a*b*e)*x^4 + 16*(b^2*d*n - 3*a*b*d)*x^3)*log(c) - 1/72*(9*(b^2*e*n^2 - 4*a*b*e*n)*x^4 + 16*(b^2*d*n^2 - 3*a*b*d*n)*x^3 - 12*(3*b^2*e*n*x^4 + 4*b^2*d*n*x^3)*log(c ))*log(x)
Time = 0.41 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.70 \[ \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {a^{2} d x^{3}}{3} + \frac {a^{2} e x^{4}}{4} - \frac {2 a b d n x^{3}}{9} + \frac {2 a b d x^{3} \log {\left (c x^{n} \right )}}{3} - \frac {a b e n x^{4}}{8} + \frac {a b e x^{4} \log {\left (c x^{n} \right )}}{2} + \frac {2 b^{2} d n^{2} x^{3}}{27} - \frac {2 b^{2} d n x^{3} \log {\left (c x^{n} \right )}}{9} + \frac {b^{2} d x^{3} \log {\left (c x^{n} \right )}^{2}}{3} + \frac {b^{2} e n^{2} x^{4}}{32} - \frac {b^{2} e n x^{4} \log {\left (c x^{n} \right )}}{8} + \frac {b^{2} e x^{4} \log {\left (c x^{n} \right )}^{2}}{4} \] Input:
integrate(x**2*(e*x+d)*(a+b*ln(c*x**n))**2,x)
Output:
a**2*d*x**3/3 + a**2*e*x**4/4 - 2*a*b*d*n*x**3/9 + 2*a*b*d*x**3*log(c*x**n )/3 - a*b*e*n*x**4/8 + a*b*e*x**4*log(c*x**n)/2 + 2*b**2*d*n**2*x**3/27 - 2*b**2*d*n*x**3*log(c*x**n)/9 + b**2*d*x**3*log(c*x**n)**2/3 + b**2*e*n**2 *x**4/32 - b**2*e*n*x**4*log(c*x**n)/8 + b**2*e*x**4*log(c*x**n)**2/4
Time = 0.03 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.39 \[ \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{4} \, b^{2} e x^{4} \log \left (c x^{n}\right )^{2} - \frac {1}{8} \, a b e n x^{4} + \frac {1}{2} \, a b e x^{4} \log \left (c x^{n}\right ) + \frac {1}{3} \, b^{2} d x^{3} \log \left (c x^{n}\right )^{2} - \frac {2}{9} \, a b d n x^{3} + \frac {1}{4} \, a^{2} e x^{4} + \frac {2}{3} \, a b d x^{3} \log \left (c x^{n}\right ) + \frac {1}{3} \, a^{2} d x^{3} + \frac {2}{27} \, {\left (n^{2} x^{3} - 3 \, n x^{3} \log \left (c x^{n}\right )\right )} b^{2} d + \frac {1}{32} \, {\left (n^{2} x^{4} - 4 \, n x^{4} \log \left (c x^{n}\right )\right )} b^{2} e \] Input:
integrate(x^2*(e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="maxima")
Output:
1/4*b^2*e*x^4*log(c*x^n)^2 - 1/8*a*b*e*n*x^4 + 1/2*a*b*e*x^4*log(c*x^n) + 1/3*b^2*d*x^3*log(c*x^n)^2 - 2/9*a*b*d*n*x^3 + 1/4*a^2*e*x^4 + 2/3*a*b*d*x ^3*log(c*x^n) + 1/3*a^2*d*x^3 + 2/27*(n^2*x^3 - 3*n*x^3*log(c*x^n))*b^2*d + 1/32*(n^2*x^4 - 4*n*x^4*log(c*x^n))*b^2*e
Leaf count of result is larger than twice the leaf count of optimal. 241 vs. \(2 (97) = 194\).
Time = 0.12 (sec) , antiderivative size = 241, normalized size of antiderivative = 2.21 \[ \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{4} \, b^{2} e n^{2} x^{4} \log \left (x\right )^{2} - \frac {1}{8} \, b^{2} e n^{2} x^{4} \log \left (x\right ) + \frac {1}{2} \, b^{2} e n x^{4} \log \left (c\right ) \log \left (x\right ) + \frac {1}{3} \, b^{2} d n^{2} x^{3} \log \left (x\right )^{2} + \frac {1}{32} \, b^{2} e n^{2} x^{4} - \frac {1}{8} \, b^{2} e n x^{4} \log \left (c\right ) + \frac {1}{4} \, b^{2} e x^{4} \log \left (c\right )^{2} - \frac {2}{9} \, b^{2} d n^{2} x^{3} \log \left (x\right ) + \frac {1}{2} \, a b e n x^{4} \log \left (x\right ) + \frac {2}{3} \, b^{2} d n x^{3} \log \left (c\right ) \log \left (x\right ) + \frac {2}{27} \, b^{2} d n^{2} x^{3} - \frac {1}{8} \, a b e n x^{4} - \frac {2}{9} \, b^{2} d n x^{3} \log \left (c\right ) + \frac {1}{2} \, a b e x^{4} \log \left (c\right ) + \frac {1}{3} \, b^{2} d x^{3} \log \left (c\right )^{2} + \frac {2}{3} \, a b d n x^{3} \log \left (x\right ) - \frac {2}{9} \, a b d n x^{3} + \frac {1}{4} \, a^{2} e x^{4} + \frac {2}{3} \, a b d x^{3} \log \left (c\right ) + \frac {1}{3} \, a^{2} d x^{3} \] Input:
integrate(x^2*(e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="giac")
Output:
1/4*b^2*e*n^2*x^4*log(x)^2 - 1/8*b^2*e*n^2*x^4*log(x) + 1/2*b^2*e*n*x^4*lo g(c)*log(x) + 1/3*b^2*d*n^2*x^3*log(x)^2 + 1/32*b^2*e*n^2*x^4 - 1/8*b^2*e* n*x^4*log(c) + 1/4*b^2*e*x^4*log(c)^2 - 2/9*b^2*d*n^2*x^3*log(x) + 1/2*a*b *e*n*x^4*log(x) + 2/3*b^2*d*n*x^3*log(c)*log(x) + 2/27*b^2*d*n^2*x^3 - 1/8 *a*b*e*n*x^4 - 2/9*b^2*d*n*x^3*log(c) + 1/2*a*b*e*x^4*log(c) + 1/3*b^2*d*x ^3*log(c)^2 + 2/3*a*b*d*n*x^3*log(x) - 2/9*a*b*d*n*x^3 + 1/4*a^2*e*x^4 + 2 /3*a*b*d*x^3*log(c) + 1/3*a^2*d*x^3
Time = 29.02 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.06 \[ \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx={\ln \left (c\,x^n\right )}^2\,\left (\frac {e\,b^2\,x^4}{4}+\frac {d\,b^2\,x^3}{3}\right )+\ln \left (c\,x^n\right )\,\left (\frac {b\,e\,\left (4\,a-b\,n\right )\,x^4}{8}+\frac {2\,b\,d\,\left (3\,a-b\,n\right )\,x^3}{9}\right )+\frac {d\,x^3\,\left (9\,a^2-6\,a\,b\,n+2\,b^2\,n^2\right )}{27}+\frac {e\,x^4\,\left (8\,a^2-4\,a\,b\,n+b^2\,n^2\right )}{32} \] Input:
int(x^2*(a + b*log(c*x^n))^2*(d + e*x),x)
Output:
log(c*x^n)^2*((b^2*d*x^3)/3 + (b^2*e*x^4)/4) + log(c*x^n)*((2*b*d*x^3*(3*a - b*n))/9 + (b*e*x^4*(4*a - b*n))/8) + (d*x^3*(9*a^2 + 2*b^2*n^2 - 6*a*b* n))/27 + (e*x^4*(8*a^2 + b^2*n^2 - 4*a*b*n))/32
Time = 0.17 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.19 \[ \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {x^{3} \left (288 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d +216 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e x +576 \,\mathrm {log}\left (x^{n} c \right ) a b d +432 \,\mathrm {log}\left (x^{n} c \right ) a b e x -192 \,\mathrm {log}\left (x^{n} c \right ) b^{2} d n -108 \,\mathrm {log}\left (x^{n} c \right ) b^{2} e n x +288 a^{2} d +216 a^{2} e x -192 a b d n -108 a b e n x +64 b^{2} d \,n^{2}+27 b^{2} e \,n^{2} x \right )}{864} \] Input:
int(x^2*(e*x+d)*(a+b*log(c*x^n))^2,x)
Output:
(x**3*(288*log(x**n*c)**2*b**2*d + 216*log(x**n*c)**2*b**2*e*x + 576*log(x **n*c)*a*b*d + 432*log(x**n*c)*a*b*e*x - 192*log(x**n*c)*b**2*d*n - 108*lo g(x**n*c)*b**2*e*n*x + 288*a**2*d + 216*a**2*e*x - 192*a*b*d*n - 108*a*b*e *n*x + 64*b**2*d*n**2 + 27*b**2*e*n**2*x))/864