Integrand size = 23, antiderivative size = 137 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx=-\frac {b^2 d^2 n^2}{4 x^2}-\frac {4 b^2 d e n^2}{x}-\frac {b d^2 n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {4 b d e n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \] Output:
-1/4*b^2*d^2*n^2/x^2-4*b^2*d*e*n^2/x-1/2*b*d^2*n*(a+b*ln(c*x^n))/x^2-4*b*d *e*n*(a+b*ln(c*x^n))/x-1/2*d^2*(a+b*ln(c*x^n))^2/x^2-2*d*e*(a+b*ln(c*x^n)) ^2/x+1/3*e^2*(a+b*ln(c*x^n))^3/b/n
Time = 0.11 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.85 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx=-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {4 b d e n \left (a+b n+b \log \left (c x^n\right )\right )}{x}-\frac {b d^2 n \left (2 a+b n+2 b \log \left (c x^n\right )\right )}{4 x^2} \] Input:
Integrate[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x^3,x]
Output:
-1/2*(d^2*(a + b*Log[c*x^n])^2)/x^2 - (2*d*e*(a + b*Log[c*x^n])^2)/x + (e^ 2*(a + b*Log[c*x^n])^3)/(3*b*n) - (4*b*d*e*n*(a + b*n + b*Log[c*x^n]))/x - (b*d^2*n*(2*a + b*n + 2*b*Log[c*x^n]))/(4*x^2)
Time = 0.42 (sec) , antiderivative size = 137, 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 \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx\) |
\(\Big \downarrow \) 2795 |
\(\displaystyle \int \left (\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x^2}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {b d^2 n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {4 b d e n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {b^2 d^2 n^2}{4 x^2}-\frac {4 b^2 d e n^2}{x}\) |
Input:
Int[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x^3,x]
Output:
-1/4*(b^2*d^2*n^2)/x^2 - (4*b^2*d*e*n^2)/x - (b*d^2*n*(a + b*Log[c*x^n]))/ (2*x^2) - (4*b*d*e*n*(a + b*Log[c*x^n]))/x - (d^2*(a + b*Log[c*x^n])^2)/(2 *x^2) - (2*d*e*(a + b*Log[c*x^n])^2)/x + (e^2*(a + b*Log[c*x^n])^3)/(3*b*n )
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.70 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.58
method | result | size |
parallelrisch | \(\frac {4 b^{2} e^{2} \ln \left (c \,x^{n}\right )^{3} x^{2}+12 \ln \left (x \right ) x^{2} a^{2} e^{2} n +12 a \,e^{2} b \ln \left (c \,x^{n}\right )^{2} x^{2}-24 x \ln \left (c \,x^{n}\right )^{2} b^{2} d e n -48 x \ln \left (c \,x^{n}\right ) b^{2} d e \,n^{2}-48 x \,b^{2} d e \,n^{3}-48 x \ln \left (c \,x^{n}\right ) a b d e n -48 x a b d e \,n^{2}-6 \ln \left (c \,x^{n}\right )^{2} b^{2} d^{2} n -6 \ln \left (c \,x^{n}\right ) b^{2} d^{2} n^{2}-3 b^{2} d^{2} n^{3}-24 x \,a^{2} d e n -12 \ln \left (c \,x^{n}\right ) a b \,d^{2} n -6 a b \,d^{2} n^{2}-6 a^{2} d^{2} n}{12 x^{2} n}\) | \(217\) |
risch | \(\text {Expression too large to display}\) | \(2520\) |
Input:
int((e*x+d)^2*(a+b*ln(c*x^n))^2/x^3,x,method=_RETURNVERBOSE)
Output:
1/12/x^2*(4*b^2*e^2*ln(c*x^n)^3*x^2+12*ln(x)*x^2*a^2*e^2*n+12*a*e^2*b*ln(c *x^n)^2*x^2-24*x*ln(c*x^n)^2*b^2*d*e*n-48*x*ln(c*x^n)*b^2*d*e*n^2-48*x*b^2 *d*e*n^3-48*x*ln(c*x^n)*a*b*d*e*n-48*x*a*b*d*e*n^2-6*ln(c*x^n)^2*b^2*d^2*n -6*ln(c*x^n)*b^2*d^2*n^2-3*b^2*d^2*n^3-24*x*a^2*d*e*n-12*ln(c*x^n)*a*b*d^2 *n-6*a*b*d^2*n^2-6*a^2*d^2*n)/n
Leaf count of result is larger than twice the leaf count of optimal. 291 vs. \(2 (129) = 258\).
Time = 0.10 (sec) , antiderivative size = 291, normalized size of antiderivative = 2.12 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx=\frac {4 \, b^{2} e^{2} n^{2} x^{2} \log \left (x\right )^{3} - 3 \, b^{2} d^{2} n^{2} - 6 \, a b d^{2} n - 6 \, a^{2} d^{2} - 6 \, {\left (4 \, b^{2} d e x + b^{2} d^{2}\right )} \log \left (c\right )^{2} + 6 \, {\left (2 \, b^{2} e^{2} n x^{2} \log \left (c\right ) - 4 \, b^{2} d e n^{2} x + 2 \, a b e^{2} n x^{2} - b^{2} d^{2} n^{2}\right )} \log \left (x\right )^{2} - 24 \, {\left (2 \, b^{2} d e n^{2} + 2 \, a b d e n + a^{2} d e\right )} x - 6 \, {\left (b^{2} d^{2} n + 2 \, a b d^{2} + 8 \, {\left (b^{2} d e n + a b d e\right )} x\right )} \log \left (c\right ) + 6 \, {\left (2 \, b^{2} e^{2} x^{2} \log \left (c\right )^{2} - b^{2} d^{2} n^{2} + 2 \, a^{2} e^{2} x^{2} - 2 \, a b d^{2} n - 8 \, {\left (b^{2} d e n^{2} + a b d e n\right )} x - 2 \, {\left (4 \, b^{2} d e n x - 2 \, a b e^{2} x^{2} + b^{2} d^{2} n\right )} \log \left (c\right )\right )} \log \left (x\right )}{12 \, x^{2}} \] Input:
integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^3,x, algorithm="fricas")
Output:
1/12*(4*b^2*e^2*n^2*x^2*log(x)^3 - 3*b^2*d^2*n^2 - 6*a*b*d^2*n - 6*a^2*d^2 - 6*(4*b^2*d*e*x + b^2*d^2)*log(c)^2 + 6*(2*b^2*e^2*n*x^2*log(c) - 4*b^2* d*e*n^2*x + 2*a*b*e^2*n*x^2 - b^2*d^2*n^2)*log(x)^2 - 24*(2*b^2*d*e*n^2 + 2*a*b*d*e*n + a^2*d*e)*x - 6*(b^2*d^2*n + 2*a*b*d^2 + 8*(b^2*d*e*n + a*b*d *e)*x)*log(c) + 6*(2*b^2*e^2*x^2*log(c)^2 - b^2*d^2*n^2 + 2*a^2*e^2*x^2 - 2*a*b*d^2*n - 8*(b^2*d*e*n^2 + a*b*d*e*n)*x - 2*(4*b^2*d*e*n*x - 2*a*b*e^2 *x^2 + b^2*d^2*n)*log(c))*log(x))/x^2
Time = 3.06 (sec) , antiderivative size = 258, normalized size of antiderivative = 1.88 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx=- \frac {a^{2} d^{2}}{2 x^{2}} - \frac {2 a^{2} d e}{x} + a^{2} e^{2} \log {\left (x \right )} - \frac {a b d^{2} n}{2 x^{2}} - \frac {a b d^{2} \log {\left (c x^{n} \right )}}{x^{2}} - \frac {4 a b d e n}{x} - \frac {4 a b d e \log {\left (c x^{n} \right )}}{x} - 2 a b e^{2} \left (\begin {cases} - \log {\left (c \right )} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {otherwise} \end {cases}\right ) - \frac {b^{2} d^{2} n^{2}}{4 x^{2}} - \frac {b^{2} d^{2} n \log {\left (c x^{n} \right )}}{2 x^{2}} - \frac {b^{2} d^{2} \log {\left (c x^{n} \right )}^{2}}{2 x^{2}} - \frac {4 b^{2} d e n^{2}}{x} - \frac {4 b^{2} d e n \log {\left (c x^{n} \right )}}{x} - \frac {2 b^{2} d e \log {\left (c x^{n} \right )}^{2}}{x} - b^{2} e^{2} \left (\begin {cases} - \log {\left (c \right )}^{2} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{3}}{3 n} & \text {otherwise} \end {cases}\right ) \] Input:
integrate((e*x+d)**2*(a+b*ln(c*x**n))**2/x**3,x)
Output:
-a**2*d**2/(2*x**2) - 2*a**2*d*e/x + a**2*e**2*log(x) - a*b*d**2*n/(2*x**2 ) - a*b*d**2*log(c*x**n)/x**2 - 4*a*b*d*e*n/x - 4*a*b*d*e*log(c*x**n)/x - 2*a*b*e**2*Piecewise((-log(c)*log(x), Eq(n, 0)), (-log(c*x**n)**2/(2*n), T rue)) - b**2*d**2*n**2/(4*x**2) - b**2*d**2*n*log(c*x**n)/(2*x**2) - b**2* d**2*log(c*x**n)**2/(2*x**2) - 4*b**2*d*e*n**2/x - 4*b**2*d*e*n*log(c*x**n )/x - 2*b**2*d*e*log(c*x**n)**2/x - b**2*e**2*Piecewise((-log(c)**2*log(x) , Eq(n, 0)), (-log(c*x**n)**3/(3*n), True))
Time = 0.03 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.53 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx=\frac {b^{2} e^{2} \log \left (c x^{n}\right )^{3}}{3 \, n} - 4 \, b^{2} d e {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} - \frac {1}{4} \, b^{2} d^{2} {\left (\frac {n^{2}}{x^{2}} + \frac {2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} + \frac {a b e^{2} \log \left (c x^{n}\right )^{2}}{n} - \frac {2 \, b^{2} d e \log \left (c x^{n}\right )^{2}}{x} + a^{2} e^{2} \log \left (x\right ) - \frac {4 \, a b d e n}{x} - \frac {4 \, a b d e \log \left (c x^{n}\right )}{x} - \frac {b^{2} d^{2} \log \left (c x^{n}\right )^{2}}{2 \, x^{2}} - \frac {a b d^{2} n}{2 \, x^{2}} - \frac {2 \, a^{2} d e}{x} - \frac {a b d^{2} \log \left (c x^{n}\right )}{x^{2}} - \frac {a^{2} d^{2}}{2 \, x^{2}} \] Input:
integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^3,x, algorithm="maxima")
Output:
1/3*b^2*e^2*log(c*x^n)^3/n - 4*b^2*d*e*(n^2/x + n*log(c*x^n)/x) - 1/4*b^2* d^2*(n^2/x^2 + 2*n*log(c*x^n)/x^2) + a*b*e^2*log(c*x^n)^2/n - 2*b^2*d*e*lo g(c*x^n)^2/x + a^2*e^2*log(x) - 4*a*b*d*e*n/x - 4*a*b*d*e*log(c*x^n)/x - 1 /2*b^2*d^2*log(c*x^n)^2/x^2 - 1/2*a*b*d^2*n/x^2 - 2*a^2*d*e/x - a*b*d^2*lo g(c*x^n)/x^2 - 1/2*a^2*d^2/x^2
Leaf count of result is larger than twice the leaf count of optimal. 290 vs. \(2 (129) = 258\).
Time = 0.14 (sec) , antiderivative size = 290, normalized size of antiderivative = 2.12 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx=\frac {1}{3} \, b^{2} e^{2} n^{2} \log \left (x\right )^{3} + b^{2} e^{2} n \log \left (c\right ) \log \left (x\right )^{2} - 2 \, b^{2} d e n^{2} {\left (\frac {\log \left (x\right )^{2}}{x} + \frac {2 \, \log \left (x\right )}{x} + \frac {2}{x}\right )} - \frac {1}{4} \, b^{2} d^{2} n^{2} {\left (\frac {2 \, \log \left (x\right )^{2}}{x^{2}} + \frac {2 \, \log \left (x\right )}{x^{2}} + \frac {1}{x^{2}}\right )} - 4 \, b^{2} d e n {\left (\frac {\log \left (x\right )}{x} + \frac {1}{x}\right )} \log \left (c\right ) - \frac {1}{2} \, b^{2} d^{2} n {\left (\frac {2 \, \log \left (x\right )}{x^{2}} + \frac {1}{x^{2}}\right )} \log \left (c\right ) + a b e^{2} n \log \left (x\right )^{2} + b^{2} e^{2} \log \left (c\right )^{2} \log \left ({\left | x \right |}\right ) - 4 \, a b d e n {\left (\frac {\log \left (x\right )}{x} + \frac {1}{x}\right )} - \frac {1}{2} \, a b d^{2} n {\left (\frac {2 \, \log \left (x\right )}{x^{2}} + \frac {1}{x^{2}}\right )} + 2 \, a b e^{2} \log \left (c\right ) \log \left ({\left | x \right |}\right ) - \frac {2 \, b^{2} d e \log \left (c\right )^{2}}{x} + a^{2} e^{2} \log \left ({\left | x \right |}\right ) - \frac {4 \, a b d e \log \left (c\right )}{x} - \frac {b^{2} d^{2} \log \left (c\right )^{2}}{2 \, x^{2}} - \frac {2 \, a^{2} d e}{x} - \frac {a b d^{2} \log \left (c\right )}{x^{2}} - \frac {a^{2} d^{2}}{2 \, x^{2}} \] Input:
integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^3,x, algorithm="giac")
Output:
1/3*b^2*e^2*n^2*log(x)^3 + b^2*e^2*n*log(c)*log(x)^2 - 2*b^2*d*e*n^2*(log( x)^2/x + 2*log(x)/x + 2/x) - 1/4*b^2*d^2*n^2*(2*log(x)^2/x^2 + 2*log(x)/x^ 2 + 1/x^2) - 4*b^2*d*e*n*(log(x)/x + 1/x)*log(c) - 1/2*b^2*d^2*n*(2*log(x) /x^2 + 1/x^2)*log(c) + a*b*e^2*n*log(x)^2 + b^2*e^2*log(c)^2*log(abs(x)) - 4*a*b*d*e*n*(log(x)/x + 1/x) - 1/2*a*b*d^2*n*(2*log(x)/x^2 + 1/x^2) + 2*a *b*e^2*log(c)*log(abs(x)) - 2*b^2*d*e*log(c)^2/x + a^2*e^2*log(abs(x)) - 4 *a*b*d*e*log(c)/x - 1/2*b^2*d^2*log(c)^2/x^2 - 2*a^2*d*e/x - a*b*d^2*log(c )/x^2 - 1/2*a^2*d^2/x^2
Time = 26.34 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.61 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx=\ln \left (x\right )\,\left (a^2\,e^2+3\,a\,b\,e^2\,n+\frac {9\,b^2\,e^2\,n^2}{2}\right )-\frac {x\,\left (4\,d\,e\,a^2+8\,d\,e\,a\,b\,n+8\,d\,e\,b^2\,n^2\right )+a^2\,d^2+\frac {b^2\,d^2\,n^2}{2}+a\,b\,d^2\,n}{2\,x^2}-{\ln \left (c\,x^n\right )}^2\,\left (\frac {\frac {b^2\,d^2}{2}+2\,b^2\,d\,e\,x+\frac {3\,b^2\,e^2\,x^2}{2}}{x^2}-\frac {b\,e^2\,\left (2\,a+3\,b\,n\right )}{2\,n}\right )-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,\left (2\,a+b\,n\right )\,d^2}{2}+4\,b\,\left (a+b\,n\right )\,d\,e\,x+\frac {3\,b\,\left (2\,a+3\,b\,n\right )\,e^2\,x^2}{2}\right )}{x^2}+\frac {b^2\,e^2\,{\ln \left (c\,x^n\right )}^3}{3\,n} \] Input:
int(((a + b*log(c*x^n))^2*(d + e*x)^2)/x^3,x)
Output:
log(x)*(a^2*e^2 + (9*b^2*e^2*n^2)/2 + 3*a*b*e^2*n) - (x*(4*a^2*d*e + 8*b^2 *d*e*n^2 + 8*a*b*d*e*n) + a^2*d^2 + (b^2*d^2*n^2)/2 + a*b*d^2*n)/(2*x^2) - log(c*x^n)^2*(((b^2*d^2)/2 + (3*b^2*e^2*x^2)/2 + 2*b^2*d*e*x)/x^2 - (b*e^ 2*(2*a + 3*b*n))/(2*n)) - (log(c*x^n)*((b*d^2*(2*a + b*n))/2 + (3*b*e^2*x^ 2*(2*a + 3*b*n))/2 + 4*b*d*e*x*(a + b*n)))/x^2 + (b^2*e^2*log(c*x^n)^3)/(3 *n)
Time = 0.17 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.58 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx=\frac {4 \mathrm {log}\left (x^{n} c \right )^{3} b^{2} e^{2} x^{2}+12 \mathrm {log}\left (x^{n} c \right )^{2} a b \,e^{2} x^{2}-6 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d^{2} n -24 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} d e n x -12 \,\mathrm {log}\left (x^{n} c \right ) a b \,d^{2} n -48 \,\mathrm {log}\left (x^{n} c \right ) a b d e n x -6 \,\mathrm {log}\left (x^{n} c \right ) b^{2} d^{2} n^{2}-48 \,\mathrm {log}\left (x^{n} c \right ) b^{2} d e \,n^{2} x +12 \,\mathrm {log}\left (x \right ) a^{2} e^{2} n \,x^{2}-6 a^{2} d^{2} n -24 a^{2} d e n x -6 a b \,d^{2} n^{2}-48 a b d e \,n^{2} x -3 b^{2} d^{2} n^{3}-48 b^{2} d e \,n^{3} x}{12 n \,x^{2}} \] Input:
int((e*x+d)^2*(a+b*log(c*x^n))^2/x^3,x)
Output:
(4*log(x**n*c)**3*b**2*e**2*x**2 + 12*log(x**n*c)**2*a*b*e**2*x**2 - 6*log (x**n*c)**2*b**2*d**2*n - 24*log(x**n*c)**2*b**2*d*e*n*x - 12*log(x**n*c)* a*b*d**2*n - 48*log(x**n*c)*a*b*d*e*n*x - 6*log(x**n*c)*b**2*d**2*n**2 - 4 8*log(x**n*c)*b**2*d*e*n**2*x + 12*log(x)*a**2*e**2*n*x**2 - 6*a**2*d**2*n - 24*a**2*d*e*n*x - 6*a*b*d**2*n**2 - 48*a*b*d*e*n**2*x - 3*b**2*d**2*n** 3 - 48*b**2*d*e*n**3*x)/(12*n*x**2)