Integrand size = 21, antiderivative size = 109 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx=-\frac {2 b^2 d n^2}{27 x^3}-\frac {b^2 e n^2}{4 x^2}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2} \] Output:
-2/27*b^2*d*n^2/x^3-1/4*b^2*e*n^2/x^2-2/9*b*d*n*(a+b*ln(c*x^n))/x^3-1/2*b* e*n*(a+b*ln(c*x^n))/x^2-1/3*d*(a+b*ln(c*x^n))^2/x^3-1/2*e*(a+b*ln(c*x^n))^ 2/x^2
Time = 0.07 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.75 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx=-\frac {36 d \left (a+b \log \left (c x^n\right )\right )^2+54 e x \left (a+b \log \left (c x^n\right )\right )^2+27 b e n x \left (2 a+b n+2 b \log \left (c x^n\right )\right )+8 b d n \left (3 a+b n+3 b \log \left (c x^n\right )\right )}{108 x^3} \] Input:
Integrate[((d + e*x)*(a + b*Log[c*x^n])^2)/x^4,x]
Output:
-1/108*(36*d*(a + b*Log[c*x^n])^2 + 54*e*x*(a + b*Log[c*x^n])^2 + 27*b*e*n *x*(2*a + b*n + 2*b*Log[c*x^n]) + 8*b*d*n*(3*a + b*n + 3*b*Log[c*x^n]))/x^ 3
Time = 0.35 (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 \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx\) |
\(\Big \downarrow \) 2795 |
\(\displaystyle \int \left (\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x^4}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x^3}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {2 b^2 d n^2}{27 x^3}-\frac {b^2 e n^2}{4 x^2}\) |
Input:
Int[((d + e*x)*(a + b*Log[c*x^n])^2)/x^4,x]
Output:
(-2*b^2*d*n^2)/(27*x^3) - (b^2*e*n^2)/(4*x^2) - (2*b*d*n*(a + b*Log[c*x^n] ))/(9*x^3) - (b*e*n*(a + b*Log[c*x^n]))/(2*x^2) - (d*(a + b*Log[c*x^n])^2) /(3*x^3) - (e*(a + b*Log[c*x^n])^2)/(2*x^2)
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.26 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.20
method | result | size |
parallelrisch | \(-\frac {54 b^{2} \ln \left (c \,x^{n}\right )^{2} e x +54 b^{2} e n x \ln \left (c \,x^{n}\right )+27 b^{2} e \,n^{2} x +108 a b \ln \left (c \,x^{n}\right ) e x +54 a b e n x +36 b^{2} \ln \left (c \,x^{n}\right )^{2} d +24 \ln \left (c \,x^{n}\right ) n \,b^{2} d +8 b^{2} d \,n^{2}+54 a^{2} e x +72 a b \ln \left (c \,x^{n}\right ) d +24 d a b n +36 a^{2} d}{108 x^{3}}\) | \(131\) |
risch | \(\text {Expression too large to display}\) | \(1486\) |
Input:
int((e*x+d)*(a+b*ln(c*x^n))^2/x^4,x,method=_RETURNVERBOSE)
Output:
-1/108/x^3*(54*b^2*ln(c*x^n)^2*e*x+54*b^2*e*n*x*ln(c*x^n)+27*b^2*e*n^2*x+1 08*a*b*ln(c*x^n)*e*x+54*a*b*e*n*x+36*b^2*ln(c*x^n)^2*d+24*ln(c*x^n)*n*b^2* d+8*b^2*d*n^2+54*a^2*e*x+72*a*b*ln(c*x^n)*d+24*d*a*b*n+36*a^2*d)
Time = 0.08 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.72 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx=-\frac {8 \, b^{2} d n^{2} + 24 \, a b d n + 36 \, a^{2} d + 18 \, {\left (3 \, b^{2} e x + 2 \, b^{2} d\right )} \log \left (c\right )^{2} + 18 \, {\left (3 \, b^{2} e n^{2} x + 2 \, b^{2} d n^{2}\right )} \log \left (x\right )^{2} + 27 \, {\left (b^{2} e n^{2} + 2 \, a b e n + 2 \, a^{2} e\right )} x + 6 \, {\left (4 \, b^{2} d n + 12 \, a b d + 9 \, {\left (b^{2} e n + 2 \, a b e\right )} x\right )} \log \left (c\right ) + 6 \, {\left (4 \, b^{2} d n^{2} + 12 \, a b d n + 9 \, {\left (b^{2} e n^{2} + 2 \, a b e n\right )} x + 6 \, {\left (3 \, b^{2} e n x + 2 \, b^{2} d n\right )} \log \left (c\right )\right )} \log \left (x\right )}{108 \, x^{3}} \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2/x^4,x, algorithm="fricas")
Output:
-1/108*(8*b^2*d*n^2 + 24*a*b*d*n + 36*a^2*d + 18*(3*b^2*e*x + 2*b^2*d)*log (c)^2 + 18*(3*b^2*e*n^2*x + 2*b^2*d*n^2)*log(x)^2 + 27*(b^2*e*n^2 + 2*a*b* e*n + 2*a^2*e)*x + 6*(4*b^2*d*n + 12*a*b*d + 9*(b^2*e*n + 2*a*b*e)*x)*log( c) + 6*(4*b^2*d*n^2 + 12*a*b*d*n + 9*(b^2*e*n^2 + 2*a*b*e*n)*x + 6*(3*b^2* e*n*x + 2*b^2*d*n)*log(c))*log(x))/x^3
Time = 0.40 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.70 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx=- \frac {a^{2} d}{3 x^{3}} - \frac {a^{2} e}{2 x^{2}} - \frac {2 a b d n}{9 x^{3}} - \frac {2 a b d \log {\left (c x^{n} \right )}}{3 x^{3}} - \frac {a b e n}{2 x^{2}} - \frac {a b e \log {\left (c x^{n} \right )}}{x^{2}} - \frac {2 b^{2} d n^{2}}{27 x^{3}} - \frac {2 b^{2} d n \log {\left (c x^{n} \right )}}{9 x^{3}} - \frac {b^{2} d \log {\left (c x^{n} \right )}^{2}}{3 x^{3}} - \frac {b^{2} e n^{2}}{4 x^{2}} - \frac {b^{2} e n \log {\left (c x^{n} \right )}}{2 x^{2}} - \frac {b^{2} e \log {\left (c x^{n} \right )}^{2}}{2 x^{2}} \] Input:
integrate((e*x+d)*(a+b*ln(c*x**n))**2/x**4,x)
Output:
-a**2*d/(3*x**3) - a**2*e/(2*x**2) - 2*a*b*d*n/(9*x**3) - 2*a*b*d*log(c*x* *n)/(3*x**3) - a*b*e*n/(2*x**2) - a*b*e*log(c*x**n)/x**2 - 2*b**2*d*n**2/( 27*x**3) - 2*b**2*d*n*log(c*x**n)/(9*x**3) - b**2*d*log(c*x**n)**2/(3*x**3 ) - b**2*e*n**2/(4*x**2) - b**2*e*n*log(c*x**n)/(2*x**2) - b**2*e*log(c*x* *n)**2/(2*x**2)
Time = 0.03 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.39 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx=-\frac {1}{4} \, b^{2} e {\left (\frac {n^{2}}{x^{2}} + \frac {2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} - \frac {2}{27} \, b^{2} d {\left (\frac {n^{2}}{x^{3}} + \frac {3 \, n \log \left (c x^{n}\right )}{x^{3}}\right )} - \frac {b^{2} e \log \left (c x^{n}\right )^{2}}{2 \, x^{2}} - \frac {a b e n}{2 \, x^{2}} - \frac {a b e \log \left (c x^{n}\right )}{x^{2}} - \frac {b^{2} d \log \left (c x^{n}\right )^{2}}{3 \, x^{3}} - \frac {2 \, a b d n}{9 \, x^{3}} - \frac {a^{2} e}{2 \, x^{2}} - \frac {2 \, a b d \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {a^{2} d}{3 \, x^{3}} \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2/x^4,x, algorithm="maxima")
Output:
-1/4*b^2*e*(n^2/x^2 + 2*n*log(c*x^n)/x^2) - 2/27*b^2*d*(n^2/x^3 + 3*n*log( c*x^n)/x^3) - 1/2*b^2*e*log(c*x^n)^2/x^2 - 1/2*a*b*e*n/x^2 - a*b*e*log(c*x ^n)/x^2 - 1/3*b^2*d*log(c*x^n)^2/x^3 - 2/9*a*b*d*n/x^3 - 1/2*a^2*e/x^2 - 2 /3*a*b*d*log(c*x^n)/x^3 - 1/3*a^2*d/x^3
Leaf count of result is larger than twice the leaf count of optimal. 195 vs. \(2 (97) = 194\).
Time = 0.12 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.79 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx=-\frac {{\left (3 \, b^{2} e n^{2} x + 2 \, b^{2} d n^{2}\right )} \log \left (x\right )^{2}}{6 \, x^{3}} - \frac {{\left (9 \, b^{2} e n^{2} x + 18 \, b^{2} e n x \log \left (c\right ) + 4 \, b^{2} d n^{2} + 18 \, a b e n x + 12 \, b^{2} d n \log \left (c\right ) + 12 \, a b d n\right )} \log \left (x\right )}{18 \, x^{3}} - \frac {27 \, b^{2} e n^{2} x + 54 \, b^{2} e n x \log \left (c\right ) + 54 \, b^{2} e x \log \left (c\right )^{2} + 8 \, b^{2} d n^{2} + 54 \, a b e n x + 24 \, b^{2} d n \log \left (c\right ) + 108 \, a b e x \log \left (c\right ) + 36 \, b^{2} d \log \left (c\right )^{2} + 24 \, a b d n + 54 \, a^{2} e x + 72 \, a b d \log \left (c\right ) + 36 \, a^{2} d}{108 \, x^{3}} \] Input:
integrate((e*x+d)*(a+b*log(c*x^n))^2/x^4,x, algorithm="giac")
Output:
-1/6*(3*b^2*e*n^2*x + 2*b^2*d*n^2)*log(x)^2/x^3 - 1/18*(9*b^2*e*n^2*x + 18 *b^2*e*n*x*log(c) + 4*b^2*d*n^2 + 18*a*b*e*n*x + 12*b^2*d*n*log(c) + 12*a* b*d*n)*log(x)/x^3 - 1/108*(27*b^2*e*n^2*x + 54*b^2*e*n*x*log(c) + 54*b^2*e *x*log(c)^2 + 8*b^2*d*n^2 + 54*a*b*e*n*x + 24*b^2*d*n*log(c) + 108*a*b*e*x *log(c) + 36*b^2*d*log(c)^2 + 24*a*b*d*n + 54*a^2*e*x + 72*a*b*d*log(c) + 36*a^2*d)/x^3
Time = 28.66 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.05 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx=-\frac {x\,\left (9\,e\,a^2+9\,e\,a\,b\,n+\frac {9\,e\,b^2\,n^2}{2}\right )+6\,a^2\,d+\frac {4\,b^2\,d\,n^2}{3}+4\,a\,b\,d\,n}{18\,x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {2\,b\,d\,\left (3\,a+b\,n\right )}{3}+\frac {3\,b\,e\,x\,\left (2\,a+b\,n\right )}{2}\right )}{3\,x^3}-\frac {{\ln \left (c\,x^n\right )}^2\,\left (\frac {b^2\,d}{3}+\frac {b^2\,e\,x}{2}\right )}{x^3} \] Input:
int(((a + b*log(c*x^n))^2*(d + e*x))/x^4,x)
Output:
- (x*(9*a^2*e + (9*b^2*e*n^2)/2 + 9*a*b*e*n) + 6*a^2*d + (4*b^2*d*n^2)/3 + 4*a*b*d*n)/(18*x^3) - (log(c*x^n)*((2*b*d*(3*a + b*n))/3 + (3*b*e*x*(2*a + b*n))/2))/(3*x^3) - (log(c*x^n)^2*((b^2*d)/3 + (b^2*e*x)/2))/x^3
Time = 0.17 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.19 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx=\frac {-36 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d -54 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e x -72 \,\mathrm {log}\left (x^{n} c \right ) a b d -108 \,\mathrm {log}\left (x^{n} c \right ) a b e x -24 \,\mathrm {log}\left (x^{n} c \right ) b^{2} d n -54 \,\mathrm {log}\left (x^{n} c \right ) b^{2} e n x -36 a^{2} d -54 a^{2} e x -24 a b d n -54 a b e n x -8 b^{2} d \,n^{2}-27 b^{2} e \,n^{2} x}{108 x^{3}} \] Input:
int((e*x+d)*(a+b*log(c*x^n))^2/x^4,x)
Output:
( - 36*log(x**n*c)**2*b**2*d - 54*log(x**n*c)**2*b**2*e*x - 72*log(x**n*c) *a*b*d - 108*log(x**n*c)*a*b*e*x - 24*log(x**n*c)*b**2*d*n - 54*log(x**n*c )*b**2*e*n*x - 36*a**2*d - 54*a**2*e*x - 24*a*b*d*n - 54*a*b*e*n*x - 8*b** 2*d*n**2 - 27*b**2*e*n**2*x)/(108*x**3)