\(\int \frac {(a+b \log (c x^n)) \log (d (\frac {1}{d}+f x^2))}{x^4} \, dx\) [37]

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 = 211 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^4} \, dx=-\frac {8 b d f n}{9 x}-\frac {2}{9} b d^{3/2} f^{3/2} n \arctan \left (\sqrt {d} \sqrt {f} x\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {2}{3} d^{3/2} f^{3/2} \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} i b d^{3/2} f^{3/2} n \operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-\frac {1}{3} i b d^{3/2} f^{3/2} n \operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right ) \] Output:

-8/9*b*d*f*n/x-2/9*b*d^(3/2)*f^(3/2)*n*arctan(d^(1/2)*f^(1/2)*x)-2/3*d*f*( 
a+b*ln(c*x^n))/x-2/3*d^(3/2)*f^(3/2)*arctan(d^(1/2)*f^(1/2)*x)*(a+b*ln(c*x 
^n))-1/9*b*n*ln(d*f*x^2+1)/x^3-1/3*(a+b*ln(c*x^n))*ln(d*f*x^2+1)/x^3+1/3*I 
*b*d^(3/2)*f^(3/2)*n*polylog(2,-I*d^(1/2)*f^(1/2)*x)-1/3*I*b*d^(3/2)*f^(3/ 
2)*n*polylog(2,I*d^(1/2)*f^(1/2)*x)
 

Mathematica [C] (verified)

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

Time = 0.26 (sec) , antiderivative size = 285, normalized size of antiderivative = 1.35 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^4} \, dx=-\frac {2 a d f \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-d f x^2\right )}{3 x}-\frac {2}{9} b d^{3/2} f^{3/2} \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (n+3 \left (-n \log (x)+\log \left (c x^n\right )\right )\right )-\frac {2 b \left (d f n+3 d f \left (-n \log (x)+\log \left (c x^n\right )\right )\right )}{9 x}-\frac {a \log \left (1+d f x^2\right )}{3 x^3}-\frac {b \left (n+3 n \log (x)+3 \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}+\frac {2}{3} b d f n \left (-\frac {1}{x}-\frac {\log (x)}{x}+\frac {1}{2} i \sqrt {d} \sqrt {f} \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )\right )-\frac {1}{2} i \sqrt {d} \sqrt {f} \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )\right )\right ) \] Input:

Integrate[((a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)])/x^4,x]
 

Output:

(-2*a*d*f*Hypergeometric2F1[-1/2, 1, 1/2, -(d*f*x^2)])/(3*x) - (2*b*d^(3/2 
)*f^(3/2)*ArcTan[Sqrt[d]*Sqrt[f]*x]*(n + 3*(-(n*Log[x]) + Log[c*x^n])))/9 
- (2*b*(d*f*n + 3*d*f*(-(n*Log[x]) + Log[c*x^n])))/(9*x) - (a*Log[1 + d*f* 
x^2])/(3*x^3) - (b*(n + 3*n*Log[x] + 3*(-(n*Log[x]) + Log[c*x^n]))*Log[1 + 
 d*f*x^2])/(9*x^3) + (2*b*d*f*n*(-x^(-1) - Log[x]/x + (I/2)*Sqrt[d]*Sqrt[f 
]*(Log[x]*Log[1 + I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x 
]) - (I/2)*Sqrt[d]*Sqrt[f]*(Log[x]*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + PolyLog[ 
2, I*Sqrt[d]*Sqrt[f]*x])))/3
 

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 206, normalized size of antiderivative = 0.98, 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 {\log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx\)

\(\Big \downarrow \) 2823

\(\displaystyle -b n \int \left (-\frac {2 d^{3/2} \arctan \left (\sqrt {d} \sqrt {f} x\right ) f^{3/2}}{3 x}-\frac {2 d f}{3 x^2}-\frac {\log \left (d f x^2+1\right )}{3 x^4}\right )dx-\frac {2}{3} d^{3/2} f^{3/2} \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{3 x^3}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2}{3} d^{3/2} f^{3/2} \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-b n \left (\frac {2}{9} d^{3/2} f^{3/2} \arctan \left (\sqrt {d} \sqrt {f} x\right )-\frac {1}{3} i d^{3/2} f^{3/2} \operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )+\frac {1}{3} i d^{3/2} f^{3/2} \operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )+\frac {\log \left (d f x^2+1\right )}{9 x^3}+\frac {8 d f}{9 x}\right )\)

Input:

Int[((a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)])/x^4,x]
 

Output:

(-2*d*f*(a + b*Log[c*x^n]))/(3*x) - (2*d^(3/2)*f^(3/2)*ArcTan[Sqrt[d]*Sqrt 
[f]*x]*(a + b*Log[c*x^n]))/3 - ((a + b*Log[c*x^n])*Log[1 + d*f*x^2])/(3*x^ 
3) - b*n*((8*d*f)/(9*x) + (2*d^(3/2)*f^(3/2)*ArcTan[Sqrt[d]*Sqrt[f]*x])/9 
+ Log[1 + d*f*x^2]/(9*x^3) - (I/3)*d^(3/2)*f^(3/2)*PolyLog[2, (-I)*Sqrt[d] 
*Sqrt[f]*x] + (I/3)*d^(3/2)*f^(3/2)*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x])
 

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 = 15.53 (sec) , antiderivative size = 369, normalized size of antiderivative = 1.75

method result size
risch \(-\frac {b \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right )}{3 x^{3}}-\frac {2 b d f \ln \left (x^{n}\right )}{3 x}+\frac {2 b \,d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) n \ln \left (x \right )}{3 \sqrt {d f}}-\frac {2 b \,d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) \ln \left (x^{n}\right )}{3 \sqrt {d f}}-\frac {b n \ln \left (d f \,x^{2}+1\right )}{9 x^{3}}-\frac {8 b d f n}{9 x}-\frac {2 b n \,d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{9 \sqrt {d f}}+\frac {b n d f \ln \left (1+x \sqrt {-d f}\right ) \sqrt {-d f}\, \ln \left (x \right )}{3}-\frac {b n d f \ln \left (1-x \sqrt {-d f}\right ) \sqrt {-d f}\, \ln \left (x \right )}{3}+\frac {b n d f \operatorname {dilog}\left (1+x \sqrt {-d f}\right ) \sqrt {-d f}}{3}-\frac {b n d f \operatorname {dilog}\left (1-x \sqrt {-d f}\right ) \sqrt {-d f}}{3}+\left (\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}+b \ln \left (c \right )+a \right ) \left (-\frac {\ln \left (d f \,x^{2}+1\right )}{3 x^{3}}+\frac {2 d f \left (-\frac {1}{x}-\frac {d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}\right )}{3}\right )\) \(369\)

Input:

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

Output:

-1/3*b*ln(d*f*x^2+1)/x^3*ln(x^n)-2/3*b*d*f/x*ln(x^n)+2/3*b*d^2*f^2/(d*f)^( 
1/2)*arctan(x*d*f/(d*f)^(1/2))*n*ln(x)-2/3*b*d^2*f^2/(d*f)^(1/2)*arctan(x* 
d*f/(d*f)^(1/2))*ln(x^n)-1/9*b*n*ln(d*f*x^2+1)/x^3-8/9*b*d*f*n/x-2/9*b*n*d 
^2*f^2/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))+1/3*b*n*d*f*ln(1+x*(-d*f)^(1/ 
2))*(-d*f)^(1/2)*ln(x)-1/3*b*n*d*f*ln(1-x*(-d*f)^(1/2))*(-d*f)^(1/2)*ln(x) 
+1/3*b*n*d*f*dilog(1+x*(-d*f)^(1/2))*(-d*f)^(1/2)-1/3*b*n*d*f*dilog(1-x*(- 
d*f)^(1/2))*(-d*f)^(1/2)+(1/2*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*Pi* 
b*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I*Pi*b*csgn(I*c*x^n)^3+1/2*I*Pi* 
b*csgn(I*c*x^n)^2*csgn(I*c)+b*ln(c)+a)*(-1/3*ln(d*f*x^2+1)/x^3+2/3*d*f*(-1 
/x-d*f/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))))
 

Fricas [F]

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

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

Output:

integral((b*log(d*f*x^2 + 1)*log(c*x^n) + a*log(d*f*x^2 + 1))/x^4, x)
 

Sympy [F(-1)]

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

integrate((a+b*ln(c*x**n))*ln(d*(1/d+f*x**2))/x**4,x)
 

Output:

Timed out
 

Maxima [F]

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

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

Output:

-1/9*(b*(n + 3*log(c)) + 3*b*log(x^n) + 3*a)*log(d*f*x^2 + 1)/x^3 + integr 
ate(2/9*(3*b*d*f*log(x^n) + 3*a*d*f + (d*f*n + 3*d*f*log(c))*b)/(d*f*x^4 + 
 x^2), x)
 

Giac [F]

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

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

Output:

integrate((b*log(c*x^n) + a)*log((f*x^2 + 1/d)*d)/x^4, x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

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

int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)))/x^4,x)
 

Output:

int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)))/x^4, x)
 

Reduce [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^4} \, dx=\frac {-18 \sqrt {f}\, \sqrt {d}\, \mathit {atan} \left (\frac {d f x}{\sqrt {f}\, \sqrt {d}}\right ) a d f \,x^{3}-6 \sqrt {f}\, \sqrt {d}\, \mathit {atan} \left (\frac {d f x}{\sqrt {f}\, \sqrt {d}}\right ) b d f n \,x^{3}-18 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{d f \,x^{6}+x^{4}}d x \right ) b \,x^{3}-9 \,\mathrm {log}\left (d f \,x^{2}+1\right ) \mathrm {log}\left (x^{n} c \right ) b -9 \,\mathrm {log}\left (d f \,x^{2}+1\right ) a -3 \,\mathrm {log}\left (d f \,x^{2}+1\right ) b n -6 \,\mathrm {log}\left (x^{n} c \right ) b -18 a d f \,x^{2}-6 b d f n \,x^{2}-2 b n}{27 x^{3}} \] Input:

int((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^4,x)
 

Output:

( - 18*sqrt(f)*sqrt(d)*atan((d*f*x)/(sqrt(f)*sqrt(d)))*a*d*f*x**3 - 6*sqrt 
(f)*sqrt(d)*atan((d*f*x)/(sqrt(f)*sqrt(d)))*b*d*f*n*x**3 - 18*int(log(x**n 
*c)/(d*f*x**6 + x**4),x)*b*x**3 - 9*log(d*f*x**2 + 1)*log(x**n*c)*b - 9*lo 
g(d*f*x**2 + 1)*a - 3*log(d*f*x**2 + 1)*b*n - 6*log(x**n*c)*b - 18*a*d*f*x 
**2 - 6*b*d*f*n*x**2 - 2*b*n)/(27*x**3)