Integrand size = 18, antiderivative size = 101 \[ \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=-2 a b d n x+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2-2 b^2 d n x \log \left (c x^n\right )-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+d x \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2 \] Output:
-2*a*b*d*n*x+2*b^2*d*n^2*x+1/4*b^2*e*n^2*x^2-2*b^2*d*n*x*ln(c*x^n)-1/2*b*e *n*x^2*(a+b*ln(c*x^n))+d*x*(a+b*ln(c*x^n))^2+1/2*e*x^2*(a+b*ln(c*x^n))^2
Time = 0.06 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.76 \[ \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{4} x \left (b e n x \left (-2 a+b n-2 b \log \left (c x^n\right )\right )+4 d \left (a+b \log \left (c x^n\right )\right )^2+2 e x \left (a+b \log \left (c x^n\right )\right )^2-8 b d n \left (a-b n+b \log \left (c x^n\right )\right )\right ) \] Input:
Integrate[(d + e*x)*(a + b*Log[c*x^n])^2,x]
Output:
(x*(b*e*n*x*(-2*a + b*n - 2*b*Log[c*x^n]) + 4*d*(a + b*Log[c*x^n])^2 + 2*e *x*(a + b*Log[c*x^n])^2 - 8*b*d*n*(a - b*n + b*Log[c*x^n])))/4
Time = 0.28 (sec) , antiderivative size = 101, 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.111, Rules used = {2767, 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 (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx\) |
\(\Big \downarrow \) 2767 |
\(\displaystyle \int \left (d \left (a+b \log \left (c x^n\right )\right )^2+e x \left (a+b \log \left (c x^n\right )\right )^2\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle d x \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-2 a b d n x-2 b^2 d n x \log \left (c x^n\right )+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2\) |
Input:
Int[(d + e*x)*(a + b*Log[c*x^n])^2,x]
Output:
-2*a*b*d*n*x + 2*b^2*d*n^2*x + (b^2*e*n^2*x^2)/4 - 2*b^2*d*n*x*Log[c*x^n] - (b*e*n*x^2*(a + b*Log[c*x^n]))/2 + d*x*(a + b*Log[c*x^n])^2 + (e*x^2*(a + b*Log[c*x^n])^2)/2
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^( q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (d + e*x ^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))
Time = 0.36 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.40
method | result | size |
parallelrisch | \(\frac {b^{2} \ln \left (c \,x^{n}\right )^{2} e \,x^{2}}{2}-\frac {\ln \left (c \,x^{n}\right ) x^{2} n \,b^{2} e}{2}+\frac {b^{2} e \,n^{2} x^{2}}{4}+a b \ln \left (c \,x^{n}\right ) e \,x^{2}-\frac {n b a e \,x^{2}}{2}+x \,b^{2} \ln \left (c \,x^{n}\right )^{2} d -2 b^{2} d n x \ln \left (c \,x^{n}\right )+2 b^{2} d \,n^{2} x +\frac {a^{2} e \,x^{2}}{2}+2 x a b \ln \left (c \,x^{n}\right ) d -2 a b d n x +a^{2} d x\) | \(141\) |
risch | \(\text {Expression too large to display}\) | \(1545\) |
Input:
int((e*x+d)*(a+b*ln(c*x^n))^2,x,method=_RETURNVERBOSE)
Output:
1/2*b^2*ln(c*x^n)^2*e*x^2-1/2*ln(c*x^n)*x^2*n*b^2*e+1/4*b^2*e*n^2*x^2+a*b* ln(c*x^n)*e*x^2-1/2*n*b*a*e*x^2+x*b^2*ln(c*x^n)^2*d-2*b^2*d*n*x*ln(c*x^n)+ 2*b^2*d*n^2*x+1/2*a^2*e*x^2+2*x*a*b*ln(c*x^n)*d-2*a*b*d*n*x+a^2*d*x
Leaf count of result is larger than twice the leaf count of optimal. 200 vs. \(2 (95) = 190\).
Time = 0.07 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.98 \[ \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{4} \, {\left (b^{2} e n^{2} - 2 \, a b e n + 2 \, a^{2} e\right )} x^{2} + \frac {1}{2} \, {\left (b^{2} e x^{2} + 2 \, b^{2} d x\right )} \log \left (c\right )^{2} + \frac {1}{2} \, {\left (b^{2} e n^{2} x^{2} + 2 \, b^{2} d n^{2} x\right )} \log \left (x\right )^{2} + {\left (2 \, b^{2} d n^{2} - 2 \, a b d n + a^{2} d\right )} x - \frac {1}{2} \, {\left ({\left (b^{2} e n - 2 \, a b e\right )} x^{2} + 4 \, {\left (b^{2} d n - a b d\right )} x\right )} \log \left (c\right ) - \frac {1}{2} \, {\left ({\left (b^{2} e n^{2} - 2 \, a b e n\right )} x^{2} + 4 \, {\left (b^{2} d n^{2} - a b d n\right )} x - 2 \, {\left (b^{2} e n x^{2} + 2 \, b^{2} d n x\right )} \log \left (c\right )\right )} \log \left (x\right ) \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="fricas")
Output:
1/4*(b^2*e*n^2 - 2*a*b*e*n + 2*a^2*e)*x^2 + 1/2*(b^2*e*x^2 + 2*b^2*d*x)*lo g(c)^2 + 1/2*(b^2*e*n^2*x^2 + 2*b^2*d*n^2*x)*log(x)^2 + (2*b^2*d*n^2 - 2*a *b*d*n + a^2*d)*x - 1/2*((b^2*e*n - 2*a*b*e)*x^2 + 4*(b^2*d*n - a*b*d)*x)* log(c) - 1/2*((b^2*e*n^2 - 2*a*b*e*n)*x^2 + 4*(b^2*d*n^2 - a*b*d*n)*x - 2* (b^2*e*n*x^2 + 2*b^2*d*n*x)*log(c))*log(x)
Time = 0.23 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.61 \[ \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=a^{2} d x + \frac {a^{2} e x^{2}}{2} - 2 a b d n x + 2 a b d x \log {\left (c x^{n} \right )} - \frac {a b e n x^{2}}{2} + a b e x^{2} \log {\left (c x^{n} \right )} + 2 b^{2} d n^{2} x - 2 b^{2} d n x \log {\left (c x^{n} \right )} + b^{2} d x \log {\left (c x^{n} \right )}^{2} + \frac {b^{2} e n^{2} x^{2}}{4} - \frac {b^{2} e n x^{2} \log {\left (c x^{n} \right )}}{2} + \frac {b^{2} e x^{2} \log {\left (c x^{n} \right )}^{2}}{2} \] Input:
integrate((e*x+d)*(a+b*ln(c*x**n))**2,x)
Output:
a**2*d*x + a**2*e*x**2/2 - 2*a*b*d*n*x + 2*a*b*d*x*log(c*x**n) - a*b*e*n*x **2/2 + a*b*e*x**2*log(c*x**n) + 2*b**2*d*n**2*x - 2*b**2*d*n*x*log(c*x**n ) + b**2*d*x*log(c*x**n)**2 + b**2*e*n**2*x**2/4 - b**2*e*n*x**2*log(c*x** n)/2 + b**2*e*x**2*log(c*x**n)**2/2
Time = 0.03 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.35 \[ \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{2} \, b^{2} e x^{2} \log \left (c x^{n}\right )^{2} - \frac {1}{2} \, a b e n x^{2} + a b e x^{2} \log \left (c x^{n}\right ) + b^{2} d x \log \left (c x^{n}\right )^{2} - 2 \, a b d n x + \frac {1}{2} \, a^{2} e x^{2} + 2 \, a b d x \log \left (c x^{n}\right ) + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} d + \frac {1}{4} \, {\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} b^{2} e + a^{2} d x \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="maxima")
Output:
1/2*b^2*e*x^2*log(c*x^n)^2 - 1/2*a*b*e*n*x^2 + a*b*e*x^2*log(c*x^n) + b^2* d*x*log(c*x^n)^2 - 2*a*b*d*n*x + 1/2*a^2*e*x^2 + 2*a*b*d*x*log(c*x^n) + 2* (n^2*x - n*x*log(c*x^n))*b^2*d + 1/4*(n^2*x^2 - 2*n*x^2*log(c*x^n))*b^2*e + a^2*d*x
Leaf count of result is larger than twice the leaf count of optimal. 215 vs. \(2 (95) = 190\).
Time = 0.12 (sec) , antiderivative size = 215, normalized size of antiderivative = 2.13 \[ \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {1}{2} \, b^{2} e n^{2} x^{2} \log \left (x\right )^{2} - \frac {1}{2} \, b^{2} e n^{2} x^{2} \log \left (x\right ) + b^{2} e n x^{2} \log \left (c\right ) \log \left (x\right ) + b^{2} d n^{2} x \log \left (x\right )^{2} + \frac {1}{4} \, b^{2} e n^{2} x^{2} - \frac {1}{2} \, b^{2} e n x^{2} \log \left (c\right ) + \frac {1}{2} \, b^{2} e x^{2} \log \left (c\right )^{2} - 2 \, b^{2} d n^{2} x \log \left (x\right ) + a b e n x^{2} \log \left (x\right ) + 2 \, b^{2} d n x \log \left (c\right ) \log \left (x\right ) + 2 \, b^{2} d n^{2} x - \frac {1}{2} \, a b e n x^{2} - 2 \, b^{2} d n x \log \left (c\right ) + a b e x^{2} \log \left (c\right ) + b^{2} d x \log \left (c\right )^{2} + 2 \, a b d n x \log \left (x\right ) - 2 \, a b d n x + \frac {1}{2} \, a^{2} e x^{2} + 2 \, a b d x \log \left (c\right ) + a^{2} d x \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2,x, algorithm="giac")
Output:
1/2*b^2*e*n^2*x^2*log(x)^2 - 1/2*b^2*e*n^2*x^2*log(x) + b^2*e*n*x^2*log(c) *log(x) + b^2*d*n^2*x*log(x)^2 + 1/4*b^2*e*n^2*x^2 - 1/2*b^2*e*n*x^2*log(c ) + 1/2*b^2*e*x^2*log(c)^2 - 2*b^2*d*n^2*x*log(x) + a*b*e*n*x^2*log(x) + 2 *b^2*d*n*x*log(c)*log(x) + 2*b^2*d*n^2*x - 1/2*a*b*e*n*x^2 - 2*b^2*d*n*x*l og(c) + a*b*e*x^2*log(c) + b^2*d*x*log(c)^2 + 2*a*b*d*n*x*log(x) - 2*a*b*d *n*x + 1/2*a^2*e*x^2 + 2*a*b*d*x*log(c) + a^2*d*x
Time = 27.52 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.03 \[ \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\ln \left (c\,x^n\right )\,\left (\frac {b\,e\,\left (2\,a-b\,n\right )\,x^2}{2}+2\,b\,d\,\left (a-b\,n\right )\,x\right )+{\ln \left (c\,x^n\right )}^2\,\left (\frac {e\,b^2\,x^2}{2}+d\,b^2\,x\right )+\frac {e\,x^2\,\left (2\,a^2-2\,a\,b\,n+b^2\,n^2\right )}{4}+d\,x\,\left (a^2-2\,a\,b\,n+2\,b^2\,n^2\right ) \] Input:
int((a + b*log(c*x^n))^2*(d + e*x),x)
Output:
log(c*x^n)*((b*e*x^2*(2*a - b*n))/2 + 2*b*d*x*(a - b*n)) + log(c*x^n)^2*(( b^2*e*x^2)/2 + b^2*d*x) + (e*x^2*(2*a^2 + b^2*n^2 - 2*a*b*n))/4 + d*x*(a^2 + 2*b^2*n^2 - 2*a*b*n)
Time = 0.16 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.26 \[ \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {x \left (4 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d +2 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e x +8 \,\mathrm {log}\left (x^{n} c \right ) a b d +4 \,\mathrm {log}\left (x^{n} c \right ) a b e x -8 \,\mathrm {log}\left (x^{n} c \right ) b^{2} d n -2 \,\mathrm {log}\left (x^{n} c \right ) b^{2} e n x +4 a^{2} d +2 a^{2} e x -8 a b d n -2 a b e n x +8 b^{2} d \,n^{2}+b^{2} e \,n^{2} x \right )}{4} \] Input:
int((e*x+d)*(a+b*log(c*x^n))^2,x)
Output:
(x*(4*log(x**n*c)**2*b**2*d + 2*log(x**n*c)**2*b**2*e*x + 8*log(x**n*c)*a* b*d + 4*log(x**n*c)*a*b*e*x - 8*log(x**n*c)*b**2*d*n - 2*log(x**n*c)*b**2* e*n*x + 4*a**2*d + 2*a**2*e*x - 8*a*b*d*n - 2*a*b*e*n*x + 8*b**2*d*n**2 + b**2*e*n**2*x))/4