Integrand size = 26, antiderivative size = 344 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx=-\frac {7 b^2 f m n^2}{4 e x}-\frac {b^2 f^2 m n^2 \log (x)}{4 e^2}-\frac {3 b f m n \left (a+b \log \left (c x^n\right )\right )}{2 e x}+\frac {b f^2 m n \log \left (1+\frac {e}{f x}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2}-\frac {f m \left (a+b \log \left (c x^n\right )\right )^2}{2 e x}+\frac {f^2 m \log \left (1+\frac {e}{f x}\right ) \left (a+b \log \left (c x^n\right )\right )^2}{2 e^2}+\frac {b^2 f^2 m n^2 \log (e+f x)}{4 e^2}-\frac {b^2 n^2 \log \left (d (e+f x)^m\right )}{4 x^2}-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{2 x^2}-\frac {b^2 f^2 m n^2 \operatorname {PolyLog}\left (2,-\frac {e}{f x}\right )}{2 e^2}-\frac {b f^2 m n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {e}{f x}\right )}{e^2}-\frac {b^2 f^2 m n^2 \operatorname {PolyLog}\left (3,-\frac {e}{f x}\right )}{e^2} \] Output:
-7/4*b^2*f*m*n^2/e/x-1/4*b^2*f^2*m*n^2*ln(x)/e^2-3/2*b*f*m*n*(a+b*ln(c*x^n ))/e/x+1/2*b*f^2*m*n*ln(1+e/f/x)*(a+b*ln(c*x^n))/e^2-1/2*f*m*(a+b*ln(c*x^n ))^2/e/x+1/2*f^2*m*ln(1+e/f/x)*(a+b*ln(c*x^n))^2/e^2+1/4*b^2*f^2*m*n^2*ln( f*x+e)/e^2-1/4*b^2*n^2*ln(d*(f*x+e)^m)/x^2-1/2*b*n*(a+b*ln(c*x^n))*ln(d*(f *x+e)^m)/x^2-1/2*(a+b*ln(c*x^n))^2*ln(d*(f*x+e)^m)/x^2-1/2*b^2*f^2*m*n^2*p olylog(2,-e/f/x)/e^2-b*f^2*m*n*(a+b*ln(c*x^n))*polylog(2,-e/f/x)/e^2-b^2*f ^2*m*n^2*polylog(3,-e/f/x)/e^2
Leaf count is larger than twice the leaf count of optimal. \(796\) vs. \(2(344)=688\).
Time = 0.45 (sec) , antiderivative size = 796, normalized size of antiderivative = 2.31 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx=-\frac {6 a^2 e f m x+18 a b e f m n x+21 b^2 e f m n^2 x+6 a^2 f^2 m x^2 \log (x)+6 a b f^2 m n x^2 \log (x)+3 b^2 f^2 m n^2 x^2 \log (x)-6 a b f^2 m n x^2 \log ^2(x)-3 b^2 f^2 m n^2 x^2 \log ^2(x)+2 b^2 f^2 m n^2 x^2 \log ^3(x)+12 a b e f m x \log \left (c x^n\right )+18 b^2 e f m n x \log \left (c x^n\right )+12 a b f^2 m x^2 \log (x) \log \left (c x^n\right )+6 b^2 f^2 m n x^2 \log (x) \log \left (c x^n\right )-6 b^2 f^2 m n x^2 \log ^2(x) \log \left (c x^n\right )+6 b^2 e f m x \log ^2\left (c x^n\right )+6 b^2 f^2 m x^2 \log (x) \log ^2\left (c x^n\right )-6 a^2 f^2 m x^2 \log (e+f x)-6 a b f^2 m n x^2 \log (e+f x)-3 b^2 f^2 m n^2 x^2 \log (e+f x)+12 a b f^2 m n x^2 \log (x) \log (e+f x)+6 b^2 f^2 m n^2 x^2 \log (x) \log (e+f x)-6 b^2 f^2 m n^2 x^2 \log ^2(x) \log (e+f x)-12 a b f^2 m x^2 \log \left (c x^n\right ) \log (e+f x)-6 b^2 f^2 m n x^2 \log \left (c x^n\right ) \log (e+f x)+12 b^2 f^2 m n x^2 \log (x) \log \left (c x^n\right ) \log (e+f x)-6 b^2 f^2 m x^2 \log ^2\left (c x^n\right ) \log (e+f x)+6 a^2 e^2 \log \left (d (e+f x)^m\right )+6 a b e^2 n \log \left (d (e+f x)^m\right )+3 b^2 e^2 n^2 \log \left (d (e+f x)^m\right )+12 a b e^2 \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+6 b^2 e^2 n \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+6 b^2 e^2 \log ^2\left (c x^n\right ) \log \left (d (e+f x)^m\right )-12 a b f^2 m n x^2 \log (x) \log \left (1+\frac {f x}{e}\right )-6 b^2 f^2 m n^2 x^2 \log (x) \log \left (1+\frac {f x}{e}\right )+6 b^2 f^2 m n^2 x^2 \log ^2(x) \log \left (1+\frac {f x}{e}\right )-12 b^2 f^2 m n x^2 \log (x) \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )-6 b f^2 m n x^2 \left (2 a+b n+2 b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )+12 b^2 f^2 m n^2 x^2 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{12 e^2 x^2} \] Input:
Integrate[((a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m])/x^3,x]
Output:
-1/12*(6*a^2*e*f*m*x + 18*a*b*e*f*m*n*x + 21*b^2*e*f*m*n^2*x + 6*a^2*f^2*m *x^2*Log[x] + 6*a*b*f^2*m*n*x^2*Log[x] + 3*b^2*f^2*m*n^2*x^2*Log[x] - 6*a* b*f^2*m*n*x^2*Log[x]^2 - 3*b^2*f^2*m*n^2*x^2*Log[x]^2 + 2*b^2*f^2*m*n^2*x^ 2*Log[x]^3 + 12*a*b*e*f*m*x*Log[c*x^n] + 18*b^2*e*f*m*n*x*Log[c*x^n] + 12* a*b*f^2*m*x^2*Log[x]*Log[c*x^n] + 6*b^2*f^2*m*n*x^2*Log[x]*Log[c*x^n] - 6* b^2*f^2*m*n*x^2*Log[x]^2*Log[c*x^n] + 6*b^2*e*f*m*x*Log[c*x^n]^2 + 6*b^2*f ^2*m*x^2*Log[x]*Log[c*x^n]^2 - 6*a^2*f^2*m*x^2*Log[e + f*x] - 6*a*b*f^2*m* n*x^2*Log[e + f*x] - 3*b^2*f^2*m*n^2*x^2*Log[e + f*x] + 12*a*b*f^2*m*n*x^2 *Log[x]*Log[e + f*x] + 6*b^2*f^2*m*n^2*x^2*Log[x]*Log[e + f*x] - 6*b^2*f^2 *m*n^2*x^2*Log[x]^2*Log[e + f*x] - 12*a*b*f^2*m*x^2*Log[c*x^n]*Log[e + f*x ] - 6*b^2*f^2*m*n*x^2*Log[c*x^n]*Log[e + f*x] + 12*b^2*f^2*m*n*x^2*Log[x]* Log[c*x^n]*Log[e + f*x] - 6*b^2*f^2*m*x^2*Log[c*x^n]^2*Log[e + f*x] + 6*a^ 2*e^2*Log[d*(e + f*x)^m] + 6*a*b*e^2*n*Log[d*(e + f*x)^m] + 3*b^2*e^2*n^2* Log[d*(e + f*x)^m] + 12*a*b*e^2*Log[c*x^n]*Log[d*(e + f*x)^m] + 6*b^2*e^2* n*Log[c*x^n]*Log[d*(e + f*x)^m] + 6*b^2*e^2*Log[c*x^n]^2*Log[d*(e + f*x)^m ] - 12*a*b*f^2*m*n*x^2*Log[x]*Log[1 + (f*x)/e] - 6*b^2*f^2*m*n^2*x^2*Log[x ]*Log[1 + (f*x)/e] + 6*b^2*f^2*m*n^2*x^2*Log[x]^2*Log[1 + (f*x)/e] - 12*b^ 2*f^2*m*n*x^2*Log[x]*Log[c*x^n]*Log[1 + (f*x)/e] - 6*b*f^2*m*n*x^2*(2*a + b*n + 2*b*Log[c*x^n])*PolyLog[2, -((f*x)/e)] + 12*b^2*f^2*m*n^2*x^2*PolyLo g[3, -((f*x)/e)])/(e^2*x^2)
Time = 0.83 (sec) , antiderivative size = 320, normalized size of antiderivative = 0.93, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {2825, 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 {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx\) |
\(\Big \downarrow \) 2825 |
\(\displaystyle -f m \int \left (-\frac {b^2 n^2}{4 x^2 (e+f x)}-\frac {b \left (a+b \log \left (c x^n\right )\right ) n}{2 x^2 (e+f x)}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2 (e+f x)}\right )dx-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{2 x^2}-\frac {b^2 n^2 \log \left (d (e+f x)^m\right )}{4 x^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -f m \left (\frac {b f n \operatorname {PolyLog}\left (2,-\frac {e}{f x}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^2}-\frac {b f n \log \left (\frac {e}{f x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2}-\frac {f \log \left (\frac {e}{f x}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{2 e^2}+\frac {3 b n \left (a+b \log \left (c x^n\right )\right )}{2 e x}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 e x}+\frac {b^2 f n^2 \operatorname {PolyLog}\left (2,-\frac {e}{f x}\right )}{2 e^2}+\frac {b^2 f n^2 \operatorname {PolyLog}\left (3,-\frac {e}{f x}\right )}{e^2}+\frac {b^2 f n^2 \log (x)}{4 e^2}-\frac {b^2 f n^2 \log (e+f x)}{4 e^2}+\frac {7 b^2 n^2}{4 e x}\right )-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{2 x^2}-\frac {b^2 n^2 \log \left (d (e+f x)^m\right )}{4 x^2}\) |
Input:
Int[((a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m])/x^3,x]
Output:
-1/4*(b^2*n^2*Log[d*(e + f*x)^m])/x^2 - (b*n*(a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/(2*x^2) - ((a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m])/(2*x^2) - f* m*((7*b^2*n^2)/(4*e*x) + (b^2*f*n^2*Log[x])/(4*e^2) + (3*b*n*(a + b*Log[c* x^n]))/(2*e*x) - (b*f*n*Log[1 + e/(f*x)]*(a + b*Log[c*x^n]))/(2*e^2) + (a + b*Log[c*x^n])^2/(2*e*x) - (f*Log[1 + e/(f*x)]*(a + b*Log[c*x^n])^2)/(2*e ^2) - (b^2*f*n^2*Log[e + f*x])/(4*e^2) + (b^2*f*n^2*PolyLog[2, -(e/(f*x))] )/(2*e^2) + (b*f*n*(a + b*Log[c*x^n])*PolyLog[2, -(e/(f*x))])/e^2 + (b^2*f *n^2*PolyLog[3, -(e/(f*x))])/e^2)
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. )]*(b_.))^(p_.)*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q* (a + b*Log[c*x^n])^p, x]}, Simp[Log[d*(e + f*x^m)^r] u, x] - Simp[f*m*r Int[x^(m - 1)/(e + f*x^m) u, x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m , n, q}, x] && IGtQ[p, 0] && RationalQ[m] && RationalQ[q]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 65.48 (sec) , antiderivative size = 5174, normalized size of antiderivative = 15.04
Input:
int((a+b*ln(c*x^n))^2*ln(d*(f*x+e)^m)/x^3,x,method=_RETURNVERBOSE)
Output:
result too large to display
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x + e\right )}^{m} d\right )}{x^{3}} \,d x } \] Input:
integrate((a+b*log(c*x^n))^2*log(d*(f*x+e)^m)/x^3,x, algorithm="fricas")
Output:
integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)*log((f*x + e)^m*d)/x^ 3, x)
Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx=\text {Timed out} \] Input:
integrate((a+b*ln(c*x**n))**2*ln(d*(f*x+e)**m)/x**3,x)
Output:
Timed out
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x + e\right )}^{m} d\right )}{x^{3}} \,d x } \] Input:
integrate((a+b*log(c*x^n))^2*log(d*(f*x+e)^m)/x^3,x, algorithm="maxima")
Output:
1/4*(2*(b^2*f^2*m*x^2*log(f*x + e) - b^2*f^2*m*x^2*log(x) - b^2*e*f*m*x - b^2*e^2*log(d))*log(x^n)^2 - (2*b^2*e^2*log(x^n)^2 + 2*a^2*e^2 + 2*(e^2*n + 2*e^2*log(c))*a*b + (e^2*n^2 + 2*e^2*n*log(c) + 2*e^2*log(c)^2)*b^2 + 2* (2*a*b*e^2 + (e^2*n + 2*e^2*log(c))*b^2)*log(x^n))*log((f*x + e)^m))/(e^2* x^2) - integrate(-1/4*(4*b^2*e^3*log(c)^2*log(d) + 8*a*b*e^3*log(c)*log(d) + 4*a^2*e^3*log(d) + (2*(e^2*f*m + 2*e^2*f*log(d))*a^2 + 2*(e^2*f*m*n + 2 *(e^2*f*m + 2*e^2*f*log(d))*log(c))*a*b + (e^2*f*m*n^2 + 2*e^2*f*m*n*log(c ) + 2*(e^2*f*m + 2*e^2*f*log(d))*log(c)^2)*b^2)*x + 2*(2*b^2*e*f^2*m*n*x^2 + 4*a*b*e^3*log(d) + 2*(e^3*n*log(d) + 2*e^3*log(c)*log(d))*b^2 + (2*(e^2 *f*m + 2*e^2*f*log(d))*a*b + (3*e^2*f*m*n + 2*e^2*f*n*log(d) + 2*(e^2*f*m + 2*e^2*f*log(d))*log(c))*b^2)*x - 2*(b^2*f^3*m*n*x^3 + b^2*e*f^2*m*n*x^2) *log(f*x + e) + 2*(b^2*f^3*m*n*x^3 + b^2*e*f^2*m*n*x^2)*log(x))*log(x^n))/ (e^2*f*x^4 + e^3*x^3), x)
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x + e\right )}^{m} d\right )}{x^{3}} \,d x } \] Input:
integrate((a+b*log(c*x^n))^2*log(d*(f*x+e)^m)/x^3,x, algorithm="giac")
Output:
integrate((b*log(c*x^n) + a)^2*log((f*x + e)^m*d)/x^3, x)
Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx=\int \frac {\ln \left (d\,{\left (e+f\,x\right )}^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^3} \,d x \] Input:
int((log(d*(e + f*x)^m)*(a + b*log(c*x^n))^2)/x^3,x)
Output:
int((log(d*(e + f*x)^m)*(a + b*log(c*x^n))^2)/x^3, x)
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^3} \, dx=\frac {-2 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )^{2}}{f \,x^{4}+e \,x^{3}}d x \right ) b^{2} e^{3} m \,x^{2}-4 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{f \,x^{4}+e \,x^{3}}d x \right ) a b \,e^{3} m \,x^{2}-2 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{f \,x^{4}+e \,x^{3}}d x \right ) b^{2} e^{3} m n \,x^{2}-2 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e^{2}-4 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) \mathrm {log}\left (x^{n} c \right ) a b \,e^{2}-2 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) \mathrm {log}\left (x^{n} c \right ) b^{2} e^{2} n -2 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) a^{2} e^{2}+2 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) a^{2} f^{2} x^{2}-2 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) a b \,e^{2} n +2 \,\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) a b \,f^{2} n \,x^{2}-\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) b^{2} e^{2} n^{2}+\mathrm {log}\left (\left (f x +e \right )^{m} d \right ) b^{2} f^{2} n^{2} x^{2}-\mathrm {log}\left (x^{n} c \right )^{2} b^{2} e^{2} m -2 \,\mathrm {log}\left (x^{n} c \right ) a b \,e^{2} m -2 \,\mathrm {log}\left (x^{n} c \right ) b^{2} e^{2} m n -2 \,\mathrm {log}\left (x \right ) a^{2} f^{2} m \,x^{2}-2 \,\mathrm {log}\left (x \right ) a b \,f^{2} m n \,x^{2}-\mathrm {log}\left (x \right ) b^{2} f^{2} m \,n^{2} x^{2}-2 a^{2} e f m x -a b \,e^{2} m n -2 a b e f m n x -b^{2} e^{2} m \,n^{2}-b^{2} e f m \,n^{2} x}{4 e^{2} x^{2}} \] Input:
int((a+b*log(c*x^n))^2*log(d*(f*x+e)^m)/x^3,x)
Output:
( - 2*int(log(x**n*c)**2/(e*x**3 + f*x**4),x)*b**2*e**3*m*x**2 - 4*int(log (x**n*c)/(e*x**3 + f*x**4),x)*a*b*e**3*m*x**2 - 2*int(log(x**n*c)/(e*x**3 + f*x**4),x)*b**2*e**3*m*n*x**2 - 2*log((e + f*x)**m*d)*log(x**n*c)**2*b** 2*e**2 - 4*log((e + f*x)**m*d)*log(x**n*c)*a*b*e**2 - 2*log((e + f*x)**m*d )*log(x**n*c)*b**2*e**2*n - 2*log((e + f*x)**m*d)*a**2*e**2 + 2*log((e + f *x)**m*d)*a**2*f**2*x**2 - 2*log((e + f*x)**m*d)*a*b*e**2*n + 2*log((e + f *x)**m*d)*a*b*f**2*n*x**2 - log((e + f*x)**m*d)*b**2*e**2*n**2 + log((e + f*x)**m*d)*b**2*f**2*n**2*x**2 - log(x**n*c)**2*b**2*e**2*m - 2*log(x**n*c )*a*b*e**2*m - 2*log(x**n*c)*b**2*e**2*m*n - 2*log(x)*a**2*f**2*m*x**2 - 2 *log(x)*a*b*f**2*m*n*x**2 - log(x)*b**2*f**2*m*n**2*x**2 - 2*a**2*e*f*m*x - a*b*e**2*m*n - 2*a*b*e*f*m*n*x - b**2*e**2*m*n**2 - b**2*e*f*m*n**2*x)/( 4*e**2*x**2)