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

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

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

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.19 (sec) , antiderivative size = 298, normalized size of antiderivative = 1.53 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x^3} \, dx=-\frac {-4 a f m x^2 \log (x)-2 b f m n x^2 \log (x)+2 b f m n x^2 \log ^2(x)-4 b f m x^2 \log (x) \log \left (c x^n\right )+2 b f m n x^2 \log (x) \log \left (1-\frac {i \sqrt {f} x}{\sqrt {e}}\right )+2 b f m n x^2 \log (x) \log \left (1+\frac {i \sqrt {f} x}{\sqrt {e}}\right )+2 a f m x^2 \log \left (e+f x^2\right )+b f m n x^2 \log \left (e+f x^2\right )-2 b f m n x^2 \log (x) \log \left (e+f x^2\right )+2 b f m x^2 \log \left (c x^n\right ) \log \left (e+f x^2\right )+2 a e \log \left (d \left (e+f x^2\right )^m\right )+b e n \log \left (d \left (e+f x^2\right )^m\right )+2 b e \log \left (c x^n\right ) \log \left (d \left (e+f x^2\right )^m\right )+2 b f m n x^2 \operatorname {PolyLog}\left (2,-\frac {i \sqrt {f} x}{\sqrt {e}}\right )+2 b f m n x^2 \operatorname {PolyLog}\left (2,\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{4 e x^2} \] Input:

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

Output:

-1/4*(-4*a*f*m*x^2*Log[x] - 2*b*f*m*n*x^2*Log[x] + 2*b*f*m*n*x^2*Log[x]^2 
- 4*b*f*m*x^2*Log[x]*Log[c*x^n] + 2*b*f*m*n*x^2*Log[x]*Log[1 - (I*Sqrt[f]* 
x)/Sqrt[e]] + 2*b*f*m*n*x^2*Log[x]*Log[1 + (I*Sqrt[f]*x)/Sqrt[e]] + 2*a*f* 
m*x^2*Log[e + f*x^2] + b*f*m*n*x^2*Log[e + f*x^2] - 2*b*f*m*n*x^2*Log[x]*L 
og[e + f*x^2] + 2*b*f*m*x^2*Log[c*x^n]*Log[e + f*x^2] + 2*a*e*Log[d*(e + f 
*x^2)^m] + b*e*n*Log[d*(e + f*x^2)^m] + 2*b*e*Log[c*x^n]*Log[d*(e + f*x^2) 
^m] + 2*b*f*m*n*x^2*PolyLog[2, ((-I)*Sqrt[f]*x)/Sqrt[e]] + 2*b*f*m*n*x^2*P 
olyLog[2, (I*Sqrt[f]*x)/Sqrt[e]])/(e*x^2)
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 188, normalized size of antiderivative = 0.96, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {2823, 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 ) \log \left (d \left (e+f x^2\right )^m\right )}{x^3} \, dx\)

\(\Big \downarrow \) 2823

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(f*m*Log[x]*(a + b*Log[c*x^n]))/e - (f*m*(a + b*Log[c*x^n])*Log[e + f*x^2] 
)/(2*e) - ((a + b*Log[c*x^n])*Log[d*(e + f*x^2)^m])/(2*x^2) - b*n*(-1/2*(f 
*m*Log[x])/e + (f*m*Log[x]^2)/(2*e) + (f*m*Log[e + f*x^2])/(4*e) - (f*m*Lo 
g[-((f*x^2)/e)]*Log[e + f*x^2])/(4*e) + Log[d*(e + f*x^2)^m]/(4*x^2) - (f* 
m*PolyLog[2, 1 + (f*x^2)/e])/(4*e))
 

Defintions of rubi rules used

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

rule 2823
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q*Log[d* 
(e + f*x^m)^r], x]}, Simp[(a + b*Log[c*x^n])   u, x] - Simp[b*n   Int[1/x 
 u, x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q 
+ 1)/m] || (RationalQ[m] && RationalQ[q])) && NeQ[q, -1]
 
Maple [C] (warning: unable to verify)

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

Time = 19.70 (sec) , antiderivative size = 862, normalized size of antiderivative = 4.42

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

Input:

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

Output:

(-1/2*b/x^2*ln(x^n)-1/4*(I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*csgn(I* 
x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*b*csgn(I*c*x^n)^3+I*Pi*b*csgn(I*c*x^n)^2 
*csgn(I*c)+2*b*ln(c)+n*b+2*a)/x^2)*ln((f*x^2+e)^m)+(-1/4*I*Pi*csgn(I*d)*cs 
gn(I*(f*x^2+e)^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e*f)^(1/ 
2))/(-e*f)^(1/2))-1/2*m*f*b*n/e*ln(x)*ln((f*x+(-e*f)^(1/2))/(-e*f)^(1/2))+ 
1/2*b*f*m*n*ln(x)/e*ln(f*x^2+e)-1/2*m*f*b*n/e*dilog((-f*x+(-e*f)^(1/2))/(- 
e*f)^(1/2))-1/2*m*f*b*n/e*dilog((f*x+(-e*f)^(1/2))/(-e*f)^(1/2))
 

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

-1/4*(b*(n + 2*log(c)) + 2*b*log(x^n) + 2*a)*log((f*x^2 + e)^m)/x^2 + inte 
grate(1/2*(2*b*e*log(c)*log(d) + (2*(f*m + f*log(d))*a + (f*m*n + 2*(f*m + 
 f*log(d))*log(c))*b)*x^2 + 2*a*e*log(d) + 2*((f*m + f*log(d))*b*x^2 + b*e 
*log(d))*log(x^n))/(f*x^5 + e*x^3), x)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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