Integrand size = 19, antiderivative size = 109 \[ \int x (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{4} b^2 d n^2 x^2+\frac {2}{27} b^2 e n^2 x^3-\frac {1}{2} b d n x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {2}{9} b e n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} d x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{3} e x^3 \left (a+b \log \left (c x^n\right )\right )^2 \] Output:
1/4*b^2*d*n^2*x^2+2/27*b^2*e*n^2*x^3-1/2*b*d*n*x^2*(a+b*ln(c*x^n))-2/9*b*e *n*x^3*(a+b*ln(c*x^n))+1/2*d*x^2*(a+b*ln(c*x^n))^2+1/3*e*x^3*(a+b*ln(c*x^n ))^2
Time = 0.07 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.75 \[ \int x (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{108} x^2 \left (8 b e n x \left (-3 a+b n-3 b \log \left (c x^n\right )\right )+27 b d n \left (-2 a+b n-2 b \log \left (c x^n\right )\right )+54 d \left (a+b \log \left (c x^n\right )\right )^2+36 e x \left (a+b \log \left (c x^n\right )\right )^2\right ) \] Input:
Integrate[x*(d + e*x)*(a + b*Log[c*x^n])^2,x]
Output:
(x^2*(8*b*e*n*x*(-3*a + b*n - 3*b*Log[c*x^n]) + 27*b*d*n*(-2*a + b*n - 2*b *Log[c*x^n]) + 54*d*(a + b*Log[c*x^n])^2 + 36*e*x*(a + b*Log[c*x^n])^2))/1 08
Time = 0.31 (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.105, 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 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx\) |
\(\Big \downarrow \) 2795 |
\(\displaystyle \int \left (d x \left (a+b \log \left (c x^n\right )\right )^2+e x^2 \left (a+b \log \left (c x^n\right )\right )^2\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} d x^2 \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b d n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} e x^3 \left (a+b \log \left (c x^n\right )\right )^2-\frac {2}{9} b e n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{4} b^2 d n^2 x^2+\frac {2}{27} b^2 e n^2 x^3\) |
Input:
Int[x*(d + e*x)*(a + b*Log[c*x^n])^2,x]
Output:
(b^2*d*n^2*x^2)/4 + (2*b^2*e*n^2*x^3)/27 - (b*d*n*x^2*(a + b*Log[c*x^n]))/ 2 - (2*b*e*n*x^3*(a + b*Log[c*x^n]))/9 + (d*x^2*(a + b*Log[c*x^n])^2)/2 + (e*x^3*(a + b*Log[c*x^n])^2)/3
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.32 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.42
method | result | size |
parallelrisch | \(\frac {x^{3} b^{2} \ln \left (c \,x^{n}\right )^{2} e}{3}-\frac {2 \ln \left (c \,x^{n}\right ) x^{3} n \,b^{2} e}{9}+\frac {2 b^{2} e \,n^{2} x^{3}}{27}+\frac {2 x^{3} a b \ln \left (c \,x^{n}\right ) e}{3}-\frac {2 n b \,x^{3} a e}{9}+\frac {x^{2} b^{2} \ln \left (c \,x^{n}\right )^{2} d}{2}-\frac {\ln \left (c \,x^{n}\right ) x^{2} n \,b^{2} d}{2}+\frac {b^{2} d \,n^{2} x^{2}}{4}+\frac {x^{3} a^{2} e}{3}+x^{2} a b \ln \left (c \,x^{n}\right ) d -\frac {n b d a \,x^{2}}{2}+\frac {x^{2} a^{2} d}{2}\) | \(155\) |
risch | \(\text {Expression too large to display}\) | \(1621\) |
Input:
int(x*(e*x+d)*(a+b*ln(c*x^n))^2,x,method=_RETURNVERBOSE)
Output:
1/3*x^3*b^2*ln(c*x^n)^2*e-2/9*ln(c*x^n)*x^3*n*b^2*e+2/27*b^2*e*n^2*x^3+2/3 *x^3*a*b*ln(c*x^n)*e-2/9*n*b*x^3*a*e+1/2*x^2*b^2*ln(c*x^n)^2*d-1/2*ln(c*x^ n)*x^2*n*b^2*d+1/4*b^2*d*n^2*x^2+1/3*x^3*a^2*e+x^2*a*b*ln(c*x^n)*d-1/2*n*b *d*a*x^2+1/2*x^2*a^2*d
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 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{27} \, {\left (2 \, b^{2} e n^{2} - 6 \, a b e n + 9 \, a^{2} e\right )} x^{3} + \frac {1}{4} \, {\left (b^{2} d n^{2} - 2 \, a b d n + 2 \, a^{2} d\right )} x^{2} + \frac {1}{6} \, {\left (2 \, b^{2} e x^{3} + 3 \, b^{2} d x^{2}\right )} \log \left (c\right )^{2} + \frac {1}{6} \, {\left (2 \, b^{2} e n^{2} x^{3} + 3 \, b^{2} d n^{2} x^{2}\right )} \log \left (x\right )^{2} - \frac {1}{18} \, {\left (4 \, {\left (b^{2} e n - 3 \, a b e\right )} x^{3} + 9 \, {\left (b^{2} d n - 2 \, a b d\right )} x^{2}\right )} \log \left (c\right ) - \frac {1}{18} \, {\left (4 \, {\left (b^{2} e n^{2} - 3 \, a b e n\right )} x^{3} + 9 \, {\left (b^{2} d n^{2} - 2 \, a b d n\right )} x^{2} - 6 \, {\left (2 \, b^{2} e n x^{3} + 3 \, b^{2} d n x^{2}\right )} \log \left (c\right )\right )} \log \left (x\right ) \] Input:
integrate(x*(e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="fricas")
Output:
1/27*(2*b^2*e*n^2 - 6*a*b*e*n + 9*a^2*e)*x^3 + 1/4*(b^2*d*n^2 - 2*a*b*d*n + 2*a^2*d)*x^2 + 1/6*(2*b^2*e*x^3 + 3*b^2*d*x^2)*log(c)^2 + 1/6*(2*b^2*e*n ^2*x^3 + 3*b^2*d*n^2*x^2)*log(x)^2 - 1/18*(4*(b^2*e*n - 3*a*b*e)*x^3 + 9*( b^2*d*n - 2*a*b*d)*x^2)*log(c) - 1/18*(4*(b^2*e*n^2 - 3*a*b*e*n)*x^3 + 9*( b^2*d*n^2 - 2*a*b*d*n)*x^2 - 6*(2*b^2*e*n*x^3 + 3*b^2*d*n*x^2)*log(c))*log (x)
Time = 0.30 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.69 \[ \int x (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {a^{2} d x^{2}}{2} + \frac {a^{2} e x^{3}}{3} - \frac {a b d n x^{2}}{2} + a b d x^{2} \log {\left (c x^{n} \right )} - \frac {2 a b e n x^{3}}{9} + \frac {2 a b e x^{3} \log {\left (c x^{n} \right )}}{3} + \frac {b^{2} d n^{2} x^{2}}{4} - \frac {b^{2} d n x^{2} \log {\left (c x^{n} \right )}}{2} + \frac {b^{2} d x^{2} \log {\left (c x^{n} \right )}^{2}}{2} + \frac {2 b^{2} e n^{2} x^{3}}{27} - \frac {2 b^{2} e n x^{3} \log {\left (c x^{n} \right )}}{9} + \frac {b^{2} e x^{3} \log {\left (c x^{n} \right )}^{2}}{3} \] Input:
integrate(x*(e*x+d)*(a+b*ln(c*x**n))**2,x)
Output:
a**2*d*x**2/2 + a**2*e*x**3/3 - a*b*d*n*x**2/2 + a*b*d*x**2*log(c*x**n) - 2*a*b*e*n*x**3/9 + 2*a*b*e*x**3*log(c*x**n)/3 + b**2*d*n**2*x**2/4 - b**2* d*n*x**2*log(c*x**n)/2 + b**2*d*x**2*log(c*x**n)**2/2 + 2*b**2*e*n**2*x**3 /27 - 2*b**2*e*n*x**3*log(c*x**n)/9 + b**2*e*x**3*log(c*x**n)**2/3
Time = 0.03 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.38 \[ \int x (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{3} \, b^{2} e x^{3} \log \left (c x^{n}\right )^{2} - \frac {2}{9} \, a b e n x^{3} + \frac {2}{3} \, a b e x^{3} \log \left (c x^{n}\right ) + \frac {1}{2} \, b^{2} d x^{2} \log \left (c x^{n}\right )^{2} - \frac {1}{2} \, a b d n x^{2} + \frac {1}{3} \, a^{2} e x^{3} + a b d x^{2} \log \left (c x^{n}\right ) + \frac {1}{2} \, a^{2} d x^{2} + \frac {1}{4} \, {\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} b^{2} d + \frac {2}{27} \, {\left (n^{2} x^{3} - 3 \, n x^{3} \log \left (c x^{n}\right )\right )} b^{2} e \] Input:
integrate(x*(e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="maxima")
Output:
1/3*b^2*e*x^3*log(c*x^n)^2 - 2/9*a*b*e*n*x^3 + 2/3*a*b*e*x^3*log(c*x^n) + 1/2*b^2*d*x^2*log(c*x^n)^2 - 1/2*a*b*d*n*x^2 + 1/3*a^2*e*x^3 + a*b*d*x^2*l og(c*x^n) + 1/2*a^2*d*x^2 + 1/4*(n^2*x^2 - 2*n*x^2*log(c*x^n))*b^2*d + 2/2 7*(n^2*x^3 - 3*n*x^3*log(c*x^n))*b^2*e
Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (97) = 194\).
Time = 0.12 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.18 \[ \int x (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{3} \, b^{2} e n^{2} x^{3} \log \left (x\right )^{2} - \frac {2}{9} \, b^{2} e n^{2} x^{3} \log \left (x\right ) + \frac {2}{3} \, b^{2} e n x^{3} \log \left (c\right ) \log \left (x\right ) + \frac {1}{2} \, b^{2} d n^{2} x^{2} \log \left (x\right )^{2} + \frac {2}{27} \, b^{2} e n^{2} x^{3} - \frac {2}{9} \, b^{2} e n x^{3} \log \left (c\right ) + \frac {1}{3} \, b^{2} e x^{3} \log \left (c\right )^{2} - \frac {1}{2} \, b^{2} d n^{2} x^{2} \log \left (x\right ) + \frac {2}{3} \, a b e n x^{3} \log \left (x\right ) + b^{2} d n x^{2} \log \left (c\right ) \log \left (x\right ) + \frac {1}{4} \, b^{2} d n^{2} x^{2} - \frac {2}{9} \, a b e n x^{3} - \frac {1}{2} \, b^{2} d n x^{2} \log \left (c\right ) + \frac {2}{3} \, a b e x^{3} \log \left (c\right ) + \frac {1}{2} \, b^{2} d x^{2} \log \left (c\right )^{2} + a b d n x^{2} \log \left (x\right ) - \frac {1}{2} \, a b d n x^{2} + \frac {1}{3} \, a^{2} e x^{3} + a b d x^{2} \log \left (c\right ) + \frac {1}{2} \, a^{2} d x^{2} \] Input:
integrate(x*(e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="giac")
Output:
1/3*b^2*e*n^2*x^3*log(x)^2 - 2/9*b^2*e*n^2*x^3*log(x) + 2/3*b^2*e*n*x^3*lo g(c)*log(x) + 1/2*b^2*d*n^2*x^2*log(x)^2 + 2/27*b^2*e*n^2*x^3 - 2/9*b^2*e* n*x^3*log(c) + 1/3*b^2*e*x^3*log(c)^2 - 1/2*b^2*d*n^2*x^2*log(x) + 2/3*a*b *e*n*x^3*log(x) + b^2*d*n*x^2*log(c)*log(x) + 1/4*b^2*d*n^2*x^2 - 2/9*a*b* e*n*x^3 - 1/2*b^2*d*n*x^2*log(c) + 2/3*a*b*e*x^3*log(c) + 1/2*b^2*d*x^2*lo g(c)^2 + a*b*d*n*x^2*log(x) - 1/2*a*b*d*n*x^2 + 1/3*a^2*e*x^3 + a*b*d*x^2* log(c) + 1/2*a^2*d*x^2
Time = 27.66 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.06 \[ \int x (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^3}{3}+\frac {d\,b^2\,x^2}{2}\right )+\ln \left (c\,x^n\right )\,\left (\frac {2\,b\,e\,\left (3\,a-b\,n\right )\,x^3}{9}+\frac {b\,d\,\left (2\,a-b\,n\right )\,x^2}{2}\right )+\frac {d\,x^2\,\left (2\,a^2-2\,a\,b\,n+b^2\,n^2\right )}{4}+\frac {e\,x^3\,\left (9\,a^2-6\,a\,b\,n+2\,b^2\,n^2\right )}{27} \] Input:
int(x*(a + b*log(c*x^n))^2*(d + e*x),x)
Output:
log(c*x^n)^2*((b^2*d*x^2)/2 + (b^2*e*x^3)/3) + log(c*x^n)*((b*d*x^2*(2*a - b*n))/2 + (2*b*e*x^3*(3*a - b*n))/9) + (d*x^2*(2*a^2 + b^2*n^2 - 2*a*b*n) )/4 + (e*x^3*(9*a^2 + 2*b^2*n^2 - 6*a*b*n))/27
Time = 0.16 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.19 \[ \int x (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {x^{2} \left (54 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d +36 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e x +108 \,\mathrm {log}\left (x^{n} c \right ) a b d +72 \,\mathrm {log}\left (x^{n} c \right ) a b e x -54 \,\mathrm {log}\left (x^{n} c \right ) b^{2} d n -24 \,\mathrm {log}\left (x^{n} c \right ) b^{2} e n x +54 a^{2} d +36 a^{2} e x -54 a b d n -24 a b e n x +27 b^{2} d \,n^{2}+8 b^{2} e \,n^{2} x \right )}{108} \] Input:
int(x*(e*x+d)*(a+b*log(c*x^n))^2,x)
Output:
(x**2*(54*log(x**n*c)**2*b**2*d + 36*log(x**n*c)**2*b**2*e*x + 108*log(x** n*c)*a*b*d + 72*log(x**n*c)*a*b*e*x - 54*log(x**n*c)*b**2*d*n - 24*log(x** n*c)*b**2*e*n*x + 54*a**2*d + 36*a**2*e*x - 54*a*b*d*n - 24*a*b*e*n*x + 27 *b**2*d*n**2 + 8*b**2*e*n**2*x))/108