\(\int \frac {(a+b \log (c x^n))^2 \log (d (e+f x^2)^m)}{x^5} \, dx\) [109]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [C] (warning: unable to verify)
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 28, antiderivative size = 356 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{x^5} \, dx=-\frac {7 b^2 f m n^2}{32 e x^2}-\frac {b^2 f^2 m n^2 \log (x)}{16 e^2}-\frac {3 b f m n \left (a+b \log \left (c x^n\right )\right )}{8 e x^2}+\frac {b f^2 m n \log \left (1+\frac {e}{f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )}{8 e^2}-\frac {f m \left (a+b \log \left (c x^n\right )\right )^2}{4 e x^2}+\frac {f^2 m \log \left (1+\frac {e}{f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )^2}{4 e^2}+\frac {b^2 f^2 m n^2 \log \left (e+f x^2\right )}{32 e^2}-\frac {b^2 n^2 \log \left (d \left (e+f x^2\right )^m\right )}{32 x^4}-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{8 x^4}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{4 x^4}-\frac {b^2 f^2 m n^2 \operatorname {PolyLog}\left (2,-\frac {e}{f x^2}\right )}{16 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^2}\right )}{4 e^2}-\frac {b^2 f^2 m n^2 \operatorname {PolyLog}\left (3,-\frac {e}{f x^2}\right )}{8 e^2} \] Output:

-7/32*b^2*f*m*n^2/e/x^2-1/16*b^2*f^2*m*n^2*ln(x)/e^2-3/8*b*f*m*n*(a+b*ln(c 
*x^n))/e/x^2+1/8*b*f^2*m*n*ln(1+e/f/x^2)*(a+b*ln(c*x^n))/e^2-1/4*f*m*(a+b* 
ln(c*x^n))^2/e/x^2+1/4*f^2*m*ln(1+e/f/x^2)*(a+b*ln(c*x^n))^2/e^2+1/32*b^2* 
f^2*m*n^2*ln(f*x^2+e)/e^2-1/32*b^2*n^2*ln(d*(f*x^2+e)^m)/x^4-1/8*b*n*(a+b* 
ln(c*x^n))*ln(d*(f*x^2+e)^m)/x^4-1/4*(a+b*ln(c*x^n))^2*ln(d*(f*x^2+e)^m)/x 
^4-1/16*b^2*f^2*m*n^2*polylog(2,-e/f/x^2)/e^2-1/4*b*f^2*m*n*(a+b*ln(c*x^n) 
)*polylog(2,-e/f/x^2)/e^2-1/8*b^2*f^2*m*n^2*polylog(3,-e/f/x^2)/e^2
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.55 (sec) , antiderivative size = 1111, normalized size of antiderivative = 3.12 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{x^5} \, dx =\text {Too large to display} \] Input:

Integrate[((a + b*Log[c*x^n])^2*Log[d*(e + f*x^2)^m])/x^5,x]
 

Output:

-1/96*(24*a^2*e*f*m*x^2 + 36*a*b*e*f*m*n*x^2 + 21*b^2*e*f*m*n^2*x^2 + 48*a 
^2*f^2*m*x^4*Log[x] + 24*a*b*f^2*m*n*x^4*Log[x] + 6*b^2*f^2*m*n^2*x^4*Log[ 
x] - 48*a*b*f^2*m*n*x^4*Log[x]^2 - 12*b^2*f^2*m*n^2*x^4*Log[x]^2 + 16*b^2* 
f^2*m*n^2*x^4*Log[x]^3 + 48*a*b*e*f*m*x^2*Log[c*x^n] + 36*b^2*e*f*m*n*x^2* 
Log[c*x^n] + 96*a*b*f^2*m*x^4*Log[x]*Log[c*x^n] + 24*b^2*f^2*m*n*x^4*Log[x 
]*Log[c*x^n] - 48*b^2*f^2*m*n*x^4*Log[x]^2*Log[c*x^n] + 24*b^2*e*f*m*x^2*L 
og[c*x^n]^2 + 48*b^2*f^2*m*x^4*Log[x]*Log[c*x^n]^2 - 48*a*b*f^2*m*n*x^4*Lo 
g[x]*Log[1 - (I*Sqrt[f]*x)/Sqrt[e]] - 12*b^2*f^2*m*n^2*x^4*Log[x]*Log[1 - 
(I*Sqrt[f]*x)/Sqrt[e]] + 24*b^2*f^2*m*n^2*x^4*Log[x]^2*Log[1 - (I*Sqrt[f]* 
x)/Sqrt[e]] - 48*b^2*f^2*m*n*x^4*Log[x]*Log[c*x^n]*Log[1 - (I*Sqrt[f]*x)/S 
qrt[e]] - 48*a*b*f^2*m*n*x^4*Log[x]*Log[1 + (I*Sqrt[f]*x)/Sqrt[e]] - 12*b^ 
2*f^2*m*n^2*x^4*Log[x]*Log[1 + (I*Sqrt[f]*x)/Sqrt[e]] + 24*b^2*f^2*m*n^2*x 
^4*Log[x]^2*Log[1 + (I*Sqrt[f]*x)/Sqrt[e]] - 48*b^2*f^2*m*n*x^4*Log[x]*Log 
[c*x^n]*Log[1 + (I*Sqrt[f]*x)/Sqrt[e]] - 24*a^2*f^2*m*x^4*Log[e + f*x^2] - 
 12*a*b*f^2*m*n*x^4*Log[e + f*x^2] - 3*b^2*f^2*m*n^2*x^4*Log[e + f*x^2] + 
48*a*b*f^2*m*n*x^4*Log[x]*Log[e + f*x^2] + 12*b^2*f^2*m*n^2*x^4*Log[x]*Log 
[e + f*x^2] - 24*b^2*f^2*m*n^2*x^4*Log[x]^2*Log[e + f*x^2] - 48*a*b*f^2*m* 
x^4*Log[c*x^n]*Log[e + f*x^2] - 12*b^2*f^2*m*n*x^4*Log[c*x^n]*Log[e + f*x^ 
2] + 48*b^2*f^2*m*n*x^4*Log[x]*Log[c*x^n]*Log[e + f*x^2] - 24*b^2*f^2*m*x^ 
4*Log[c*x^n]^2*Log[e + f*x^2] + 24*a^2*e^2*Log[d*(e + f*x^2)^m] + 12*a*...
 

Rubi [A] (verified)

Time = 0.88 (sec) , antiderivative size = 334, normalized size of antiderivative = 0.94, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, 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 \left (e+f x^2\right )^m\right )}{x^5} \, dx\)

\(\Big \downarrow \) 2825

\(\displaystyle -2 f m \int \left (-\frac {b^2 n^2}{32 x^3 \left (f x^2+e\right )}-\frac {b \left (a+b \log \left (c x^n\right )\right ) n}{8 x^3 \left (f x^2+e\right )}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{4 x^3 \left (f x^2+e\right )}\right )dx-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{8 x^4}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{4 x^4}-\frac {b^2 n^2 \log \left (d \left (e+f x^2\right )^m\right )}{32 x^4}\)

\(\Big \downarrow \) 2009

\(\displaystyle -2 f m \left (\frac {b f n \operatorname {PolyLog}\left (2,-\frac {e}{f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )}{8 e^2}-\frac {b f n \log \left (\frac {e}{f x^2}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{16 e^2}-\frac {f \log \left (\frac {e}{f x^2}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{8 e^2}+\frac {3 b n \left (a+b \log \left (c x^n\right )\right )}{16 e x^2}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{8 e x^2}+\frac {b^2 f n^2 \operatorname {PolyLog}\left (2,-\frac {e}{f x^2}\right )}{32 e^2}+\frac {b^2 f n^2 \operatorname {PolyLog}\left (3,-\frac {e}{f x^2}\right )}{16 e^2}-\frac {b^2 f n^2 \log \left (e+f x^2\right )}{64 e^2}+\frac {b^2 f n^2 \log (x)}{32 e^2}+\frac {7 b^2 n^2}{64 e x^2}\right )-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{8 x^4}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{4 x^4}-\frac {b^2 n^2 \log \left (d \left (e+f x^2\right )^m\right )}{32 x^4}\)

Input:

Int[((a + b*Log[c*x^n])^2*Log[d*(e + f*x^2)^m])/x^5,x]
 

Output:

-1/32*(b^2*n^2*Log[d*(e + f*x^2)^m])/x^4 - (b*n*(a + b*Log[c*x^n])*Log[d*( 
e + f*x^2)^m])/(8*x^4) - ((a + b*Log[c*x^n])^2*Log[d*(e + f*x^2)^m])/(4*x^ 
4) - 2*f*m*((7*b^2*n^2)/(64*e*x^2) + (b^2*f*n^2*Log[x])/(32*e^2) + (3*b*n* 
(a + b*Log[c*x^n]))/(16*e*x^2) - (b*f*n*Log[1 + e/(f*x^2)]*(a + b*Log[c*x^ 
n]))/(16*e^2) + (a + b*Log[c*x^n])^2/(8*e*x^2) - (f*Log[1 + e/(f*x^2)]*(a 
+ b*Log[c*x^n])^2)/(8*e^2) - (b^2*f*n^2*Log[e + f*x^2])/(64*e^2) + (b^2*f* 
n^2*PolyLog[2, -(e/(f*x^2))])/(32*e^2) + (b*f*n*(a + b*Log[c*x^n])*PolyLog 
[2, -(e/(f*x^2))])/(8*e^2) + (b^2*f*n^2*PolyLog[3, -(e/(f*x^2))])/(16*e^2) 
)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2825
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]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 93.82 (sec) , antiderivative size = 6432, normalized size of antiderivative = 18.07

method result size
risch \(\text {Expression too large to display}\) \(6432\)

Input:

int((a+b*ln(c*x^n))^2*ln(d*(f*x^2+e)^m)/x^5,x,method=_RETURNVERBOSE)
 

Output:

result too large to display
 

Fricas [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{x^5} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x^{2} + e\right )}^{m} d\right )}{x^{5}} \,d x } \] Input:

integrate((a+b*log(c*x^n))^2*log(d*(f*x^2+e)^m)/x^5,x, algorithm="fricas")
 

Output:

integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)*log((f*x^2 + e)^m*d)/ 
x^5, x)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{x^5} \, dx=\text {Timed out} \] Input:

integrate((a+b*ln(c*x**n))**2*ln(d*(f*x**2+e)**m)/x**5,x)
 

Output:

Timed out
 

Maxima [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{x^5} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x^{2} + e\right )}^{m} d\right )}{x^{5}} \,d x } \] Input:

integrate((a+b*log(c*x^n))^2*log(d*(f*x^2+e)^m)/x^5,x, algorithm="maxima")
 

Output:

-1/32*(8*b^2*log(x^n)^2 + (n^2 + 4*n*log(c) + 8*log(c)^2)*b^2 + 4*a*b*(n + 
 4*log(c)) + 8*a^2 + 4*(b^2*(n + 4*log(c)) + 4*a*b)*log(x^n))*log((f*x^2 + 
 e)^m)/x^4 + integrate(1/16*(16*b^2*e*log(c)^2*log(d) + 32*a*b*e*log(c)*lo 
g(d) + 16*a^2*e*log(d) + (8*(f*m + 2*f*log(d))*a^2 + 4*(f*m*n + 4*(f*m + 2 
*f*log(d))*log(c))*a*b + (f*m*n^2 + 4*f*m*n*log(c) + 8*(f*m + 2*f*log(d))* 
log(c)^2)*b^2)*x^2 + 8*((f*m + 2*f*log(d))*b^2*x^2 + 2*b^2*e*log(d))*log(x 
^n)^2 + 4*(8*b^2*e*log(c)*log(d) + 8*a*b*e*log(d) + (4*(f*m + 2*f*log(d))* 
a*b + (f*m*n + 4*(f*m + 2*f*log(d))*log(c))*b^2)*x^2)*log(x^n))/(f*x^7 + e 
*x^5), x)
 

Giac [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{x^5} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x^{2} + e\right )}^{m} d\right )}{x^{5}} \,d x } \] Input:

integrate((a+b*log(c*x^n))^2*log(d*(f*x^2+e)^m)/x^5,x, algorithm="giac")
 

Output:

integrate((b*log(c*x^n) + a)^2*log((f*x^2 + e)^m*d)/x^5, x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{x^5} \, dx=\int \frac {\ln \left (d\,{\left (f\,x^2+e\right )}^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^5} \,d x \] Input:

int((log(d*(e + f*x^2)^m)*(a + b*log(c*x^n))^2)/x^5,x)
 

Output:

int((log(d*(e + f*x^2)^m)*(a + b*log(c*x^n))^2)/x^5, x)
 

Reduce [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (e+f x^2\right )^m\right )}{x^5} \, dx=\frac {-16 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )^{2}}{f \,x^{7}+e \,x^{5}}d x \right ) b^{2} e^{3} m \,x^{4}-32 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{f \,x^{7}+e \,x^{5}}d x \right ) a b \,e^{3} m \,x^{4}-8 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{f \,x^{7}+e \,x^{5}}d x \right ) b^{2} e^{3} m n \,x^{4}-8 \,\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e^{2}-16 \,\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) \mathrm {log}\left (x^{n} c \right ) a b \,e^{2}-4 \,\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) \mathrm {log}\left (x^{n} c \right ) b^{2} e^{2} n -8 \,\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) a^{2} e^{2}+8 \,\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) a^{2} f^{2} x^{4}-4 \,\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) a b \,e^{2} n +4 \,\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) a b \,f^{2} n \,x^{4}-\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) b^{2} e^{2} n^{2}+\mathrm {log}\left (\left (f \,x^{2}+e \right )^{m} d \right ) b^{2} f^{2} n^{2} x^{4}-4 \mathrm {log}\left (x^{n} c \right )^{2} b^{2} e^{2} m -8 \,\mathrm {log}\left (x^{n} c \right ) a b \,e^{2} m -4 \,\mathrm {log}\left (x^{n} c \right ) b^{2} e^{2} m n -16 \,\mathrm {log}\left (x \right ) a^{2} f^{2} m \,x^{4}-8 \,\mathrm {log}\left (x \right ) a b \,f^{2} m n \,x^{4}-2 \,\mathrm {log}\left (x \right ) b^{2} f^{2} m \,n^{2} x^{4}-8 a^{2} e f m \,x^{2}-2 a b \,e^{2} m n -4 a b e f m n \,x^{2}-b^{2} e^{2} m \,n^{2}-b^{2} e f m \,n^{2} x^{2}}{32 e^{2} x^{4}} \] Input:

int((a+b*log(c*x^n))^2*log(d*(f*x^2+e)^m)/x^5,x)
 

Output:

( - 16*int(log(x**n*c)**2/(e*x**5 + f*x**7),x)*b**2*e**3*m*x**4 - 32*int(l 
og(x**n*c)/(e*x**5 + f*x**7),x)*a*b*e**3*m*x**4 - 8*int(log(x**n*c)/(e*x** 
5 + f*x**7),x)*b**2*e**3*m*n*x**4 - 8*log((e + f*x**2)**m*d)*log(x**n*c)** 
2*b**2*e**2 - 16*log((e + f*x**2)**m*d)*log(x**n*c)*a*b*e**2 - 4*log((e + 
f*x**2)**m*d)*log(x**n*c)*b**2*e**2*n - 8*log((e + f*x**2)**m*d)*a**2*e**2 
 + 8*log((e + f*x**2)**m*d)*a**2*f**2*x**4 - 4*log((e + f*x**2)**m*d)*a*b* 
e**2*n + 4*log((e + f*x**2)**m*d)*a*b*f**2*n*x**4 - log((e + f*x**2)**m*d) 
*b**2*e**2*n**2 + log((e + f*x**2)**m*d)*b**2*f**2*n**2*x**4 - 4*log(x**n* 
c)**2*b**2*e**2*m - 8*log(x**n*c)*a*b*e**2*m - 4*log(x**n*c)*b**2*e**2*m*n 
 - 16*log(x)*a**2*f**2*m*x**4 - 8*log(x)*a*b*f**2*m*n*x**4 - 2*log(x)*b**2 
*f**2*m*n**2*x**4 - 8*a**2*e*f*m*x**2 - 2*a*b*e**2*m*n - 4*a*b*e*f*m*n*x** 
2 - b**2*e**2*m*n**2 - b**2*e*f*m*n**2*x**2)/(32*e**2*x**4)