\(\int \frac {(a+b \coth ^{-1}(c x^n)) (d+e \log (f x^m))}{x} \, dx\) [265]

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

Optimal result

Integrand size = 24, antiderivative size = 160 \[ \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx=a d \log (x)+\frac {a e \log ^2\left (f x^m\right )}{2 m}+\frac {b d \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{2 n}+\frac {b e \log \left (f x^m\right ) \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{2 n}-\frac {b d \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{2 n}-\frac {b e \log \left (f x^m\right ) \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{2 n}+\frac {b e m \operatorname {PolyLog}\left (3,-\frac {x^{-n}}{c}\right )}{2 n^2}-\frac {b e m \operatorname {PolyLog}\left (3,\frac {x^{-n}}{c}\right )}{2 n^2} \]

[Out]

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

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2338, 6874, 6036, 6032, 6219, 6217, 2421, 6724} \[ \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx=a d \log (x)+\frac {a e \log ^2\left (f x^m\right )}{2 m}+\frac {b d \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{2 n}-\frac {b d \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{2 n}+\frac {b e \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right ) \log \left (f x^m\right )}{2 n}-\frac {b e \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right ) \log \left (f x^m\right )}{2 n}+\frac {b e m \operatorname {PolyLog}\left (3,-\frac {x^{-n}}{c}\right )}{2 n^2}-\frac {b e m \operatorname {PolyLog}\left (3,\frac {x^{-n}}{c}\right )}{2 n^2} \]

[In]

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

[Out]

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

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6032

Int[((a_.) + ArcCoth[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Simp[(b/2)*PolyLog[2, -(c*x)^(
-1)], x] - Simp[(b/2)*PolyLog[2, 1/(c*x)], x]) /; FreeQ[{a, b, c}, x]

Rule 6036

Int[((a_.) + ArcCoth[(c_.)*(x_)^(n_)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/n, Subst[Int[(a + b*ArcCoth[c*x])
^p/x, x], x, x^n], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p, 0]

Rule 6217

Int[(ArcCoth[(c_.)*(x_)^(n_.)]*Log[(d_.)*(x_)^(m_.)])/(x_), x_Symbol] :> Dist[1/2, Int[Log[d*x^m]*(Log[1 + 1/(
c*x^n)]/x), x], x] - Dist[1/2, Int[Log[d*x^m]*(Log[1 - 1/(c*x^n)]/x), x], x] /; FreeQ[{c, d, m, n}, x]

Rule 6219

Int[(Log[(d_.)*(x_)^(m_.)]*(ArcCoth[(c_.)*(x_)^(n_.)]*(b_.) + (a_)))/(x_), x_Symbol] :> Dist[a, Int[Log[d*x^m]
/x, x], x] + Dist[b, Int[(Log[d*x^m]*ArcCoth[c*x^n])/x, x], x] /; FreeQ[{a, b, c, d, m, n}, x]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {d \left (a+b \coth ^{-1}\left (c x^n\right )\right )}{x}+\frac {e \left (a+b \coth ^{-1}\left (c x^n\right )\right ) \log \left (f x^m\right )}{x}\right ) \, dx \\ & = d \int \frac {a+b \coth ^{-1}\left (c x^n\right )}{x} \, dx+e \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \log \left (f x^m\right )}{x} \, dx \\ & = (a e) \int \frac {\log \left (f x^m\right )}{x} \, dx+(b e) \int \frac {\coth ^{-1}\left (c x^n\right ) \log \left (f x^m\right )}{x} \, dx+\frac {d \text {Subst}\left (\int \frac {a+b \coth ^{-1}(c x)}{x} \, dx,x,x^n\right )}{n} \\ & = a d \log (x)+\frac {a e \log ^2\left (f x^m\right )}{2 m}+\frac {b d \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{2 n}-\frac {b d \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{2 n}-\frac {1}{2} (b e) \int \frac {\log \left (f x^m\right ) \log \left (1-\frac {x^{-n}}{c}\right )}{x} \, dx+\frac {1}{2} (b e) \int \frac {\log \left (f x^m\right ) \log \left (1+\frac {x^{-n}}{c}\right )}{x} \, dx \\ & = a d \log (x)+\frac {a e \log ^2\left (f x^m\right )}{2 m}+\frac {b d \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{2 n}+\frac {b e \log \left (f x^m\right ) \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{2 n}-\frac {b d \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{2 n}-\frac {b e \log \left (f x^m\right ) \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{2 n}-\frac {(b e m) \int \frac {\operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{x} \, dx}{2 n}+\frac {(b e m) \int \frac {\operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{x} \, dx}{2 n} \\ & = a d \log (x)+\frac {a e \log ^2\left (f x^m\right )}{2 m}+\frac {b d \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{2 n}+\frac {b e \log \left (f x^m\right ) \operatorname {PolyLog}\left (2,-\frac {x^{-n}}{c}\right )}{2 n}-\frac {b d \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{2 n}-\frac {b e \log \left (f x^m\right ) \operatorname {PolyLog}\left (2,\frac {x^{-n}}{c}\right )}{2 n}+\frac {b e m \operatorname {PolyLog}\left (3,-\frac {x^{-n}}{c}\right )}{2 n^2}-\frac {b e m \operatorname {PolyLog}\left (3,\frac {x^{-n}}{c}\right )}{2 n^2} \\ \end{align*}

Mathematica [C] (verified)

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

Time = 0.22 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.82 \[ \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx=-\frac {b c e m x^n \, _4F_3\left (\frac {1}{2},\frac {1}{2},\frac {1}{2},1;\frac {3}{2},\frac {3}{2},\frac {3}{2};c^2 x^{2 n}\right )}{n^2}+\frac {b c x^n \, _3F_2\left (\frac {1}{2},\frac {1}{2},1;\frac {3}{2},\frac {3}{2};c^2 x^{2 n}\right ) \left (d+e \log \left (f x^m\right )\right )}{n}-\frac {1}{2} \left (a+b \coth ^{-1}\left (c x^n\right )-b \text {arctanh}\left (c x^n\right )\right ) \log (x) \left (e m \log (x)-2 \left (d+e \log \left (f x^m\right )\right )\right ) \]

[In]

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

[Out]

-((b*c*e*m*x^n*HypergeometricPFQ[{1/2, 1/2, 1/2, 1}, {3/2, 3/2, 3/2}, c^2*x^(2*n)])/n^2) + (b*c*x^n*Hypergeome
tricPFQ[{1/2, 1/2, 1}, {3/2, 3/2}, c^2*x^(2*n)]*(d + e*Log[f*x^m]))/n - ((a + b*ArcCoth[c*x^n] - b*ArcTanh[c*x
^n])*Log[x]*(e*m*Log[x] - 2*(d + e*Log[f*x^m])))/2

Maple [C] (warning: unable to verify)

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

Time = 146.70 (sec) , antiderivative size = 414, normalized size of antiderivative = 2.59

method result size
risch \(\frac {\left (-\frac {i e \pi \,\operatorname {csgn}\left (i f \right ) \operatorname {csgn}\left (i x^{m}\right ) \operatorname {csgn}\left (i f \,x^{m}\right )}{4}+\frac {i e \pi \,\operatorname {csgn}\left (i f \right ) \operatorname {csgn}\left (i f \,x^{m}\right )^{2}}{4}+\frac {i e \pi \,\operatorname {csgn}\left (i x^{m}\right ) \operatorname {csgn}\left (i f \,x^{m}\right )^{2}}{4}-\frac {i e \pi \operatorname {csgn}\left (i f \,x^{m}\right )^{3}}{4}+\frac {e \ln \left (f \right )}{2}+\frac {d}{2}\right ) \left (-b \operatorname {dilog}\left (c \,x^{n}+1\right )+2 a \ln \left (x^{n}\right )-\ln \left (c \,x^{n}\right ) \ln \left (c \,x^{n}-1\right ) b -\operatorname {dilog}\left (c \,x^{n}\right ) b \right )}{n}-\frac {e b m \ln \left (x \right ) \operatorname {polylog}\left (2, -c \,x^{n}\right )}{2 n}+\frac {b e m \operatorname {polylog}\left (3, -c \,x^{n}\right )}{2 n^{2}}+\frac {e b \operatorname {dilog}\left (c \,x^{n}+1\right ) m \ln \left (x \right )}{2 n}-\frac {e b \operatorname {dilog}\left (c \,x^{n}+1\right ) \ln \left (x^{m}\right )}{2 n}+\frac {e a \ln \left (x^{m}\right )^{2}}{2 m}+\frac {e b \ln \left (c \,x^{n}-1\right ) m \ln \left (x \right )^{2}}{4}-\frac {e b \ln \left (x \right ) \ln \left (x^{m}\right ) \ln \left (c \,x^{n}-1\right )}{2}-\frac {e b m \ln \left (x \right )^{2} \ln \left (1-c \,x^{n}\right )}{4}+\frac {e b m \ln \left (x \right ) \operatorname {polylog}\left (2, c \,x^{n}\right )}{2 n}-\frac {b e m \operatorname {polylog}\left (3, c \,x^{n}\right )}{2 n^{2}}+\frac {e b \ln \left (1-c \,x^{n}\right ) \ln \left (x \right ) \ln \left (x^{m}\right )}{2}+\frac {e b \ln \left (1-c \,x^{n}\right ) \ln \left (c \,x^{n}\right ) m \ln \left (x \right )}{2 n}-\frac {e b \ln \left (1-c \,x^{n}\right ) \ln \left (c \,x^{n}\right ) \ln \left (x^{m}\right )}{2 n}+\frac {e b \operatorname {dilog}\left (c \,x^{n}\right ) m \ln \left (x \right )}{2 n}-\frac {e b \operatorname {dilog}\left (c \,x^{n}\right ) \ln \left (x^{m}\right )}{2 n}\) \(414\)

[In]

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

[Out]

(-1/4*I*e*Pi*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)+1/4*I*e*Pi*csgn(I*f)*csgn(I*f*x^m)^2+1/4*I*e*Pi*csgn(I*x^m)*c
sgn(I*f*x^m)^2-1/4*I*e*Pi*csgn(I*f*x^m)^3+1/2*e*ln(f)+1/2*d)/n*(-b*dilog(c*x^n+1)+2*a*ln(x^n)-ln(c*x^n)*ln(c*x
^n-1)*b-dilog(c*x^n)*b)-1/2*e*b*m/n*ln(x)*polylog(2,-c*x^n)+1/2*b*e*m*polylog(3,-c*x^n)/n^2+1/2*e*b/n*dilog(c*
x^n+1)*m*ln(x)-1/2*e*b/n*dilog(c*x^n+1)*ln(x^m)+1/2*e*a/m*ln(x^m)^2+1/4*e*b*ln(c*x^n-1)*m*ln(x)^2-1/2*e*b*ln(x
)*ln(x^m)*ln(c*x^n-1)-1/4*e*b*m*ln(x)^2*ln(1-c*x^n)+1/2*e*b*m/n*ln(x)*polylog(2,c*x^n)-1/2*b*e*m*polylog(3,c*x
^n)/n^2+1/2*e*b*ln(1-c*x^n)*ln(x)*ln(x^m)+1/2*e*b/n*ln(1-c*x^n)*ln(c*x^n)*m*ln(x)-1/2*e*b/n*ln(1-c*x^n)*ln(c*x
^n)*ln(x^m)+1/2*e*b/n*dilog(c*x^n)*m*ln(x)-1/2*e*b/n*dilog(c*x^n)*ln(x^m)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 326 vs. \(2 (142) = 284\).

Time = 0.28 (sec) , antiderivative size = 326, normalized size of antiderivative = 2.04 \[ \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx=\frac {2 \, a e m n^{2} \log \left (x\right )^{2} - 2 \, b e m {\rm polylog}\left (3, c \cosh \left (n \log \left (x\right )\right ) + c \sinh \left (n \log \left (x\right )\right )\right ) + 2 \, b e m {\rm polylog}\left (3, -c \cosh \left (n \log \left (x\right )\right ) - c \sinh \left (n \log \left (x\right )\right )\right ) + 2 \, {\left (b e m n \log \left (x\right ) + b e n \log \left (f\right ) + b d n\right )} {\rm Li}_2\left (c \cosh \left (n \log \left (x\right )\right ) + c \sinh \left (n \log \left (x\right )\right )\right ) - 2 \, {\left (b e m n \log \left (x\right ) + b e n \log \left (f\right ) + b d n\right )} {\rm Li}_2\left (-c \cosh \left (n \log \left (x\right )\right ) - c \sinh \left (n \log \left (x\right )\right )\right ) - {\left (b e m n^{2} \log \left (x\right )^{2} + 2 \, {\left (b e n^{2} \log \left (f\right ) + b d n^{2}\right )} \log \left (x\right )\right )} \log \left (c \cosh \left (n \log \left (x\right )\right ) + c \sinh \left (n \log \left (x\right )\right ) + 1\right ) + {\left (b e m n^{2} \log \left (x\right )^{2} + 2 \, {\left (b e n^{2} \log \left (f\right ) + b d n^{2}\right )} \log \left (x\right )\right )} \log \left (-c \cosh \left (n \log \left (x\right )\right ) - c \sinh \left (n \log \left (x\right )\right ) + 1\right ) + 4 \, {\left (a e n^{2} \log \left (f\right ) + a d n^{2}\right )} \log \left (x\right ) + {\left (b e m n^{2} \log \left (x\right )^{2} + 2 \, {\left (b e n^{2} \log \left (f\right ) + b d n^{2}\right )} \log \left (x\right )\right )} \log \left (\frac {c \cosh \left (n \log \left (x\right )\right ) + c \sinh \left (n \log \left (x\right )\right ) + 1}{c \cosh \left (n \log \left (x\right )\right ) + c \sinh \left (n \log \left (x\right )\right ) - 1}\right )}{4 \, n^{2}} \]

[In]

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

[Out]

1/4*(2*a*e*m*n^2*log(x)^2 - 2*b*e*m*polylog(3, c*cosh(n*log(x)) + c*sinh(n*log(x))) + 2*b*e*m*polylog(3, -c*co
sh(n*log(x)) - c*sinh(n*log(x))) + 2*(b*e*m*n*log(x) + b*e*n*log(f) + b*d*n)*dilog(c*cosh(n*log(x)) + c*sinh(n
*log(x))) - 2*(b*e*m*n*log(x) + b*e*n*log(f) + b*d*n)*dilog(-c*cosh(n*log(x)) - c*sinh(n*log(x))) - (b*e*m*n^2
*log(x)^2 + 2*(b*e*n^2*log(f) + b*d*n^2)*log(x))*log(c*cosh(n*log(x)) + c*sinh(n*log(x)) + 1) + (b*e*m*n^2*log
(x)^2 + 2*(b*e*n^2*log(f) + b*d*n^2)*log(x))*log(-c*cosh(n*log(x)) - c*sinh(n*log(x)) + 1) + 4*(a*e*n^2*log(f)
 + a*d*n^2)*log(x) + (b*e*m*n^2*log(x)^2 + 2*(b*e*n^2*log(f) + b*d*n^2)*log(x))*log((c*cosh(n*log(x)) + c*sinh
(n*log(x)) + 1)/(c*cosh(n*log(x)) + c*sinh(n*log(x)) - 1)))/n^2

Sympy [F]

\[ \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx=\int \frac {\left (a + b \operatorname {acoth}{\left (c x^{n} \right )}\right ) \left (d + e \log {\left (f x^{m} \right )}\right )}{x}\, dx \]

[In]

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

[Out]

Integral((a + b*acoth(c*x**n))*(d + e*log(f*x**m))/x, x)

Maxima [F]

\[ \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx=\int { \frac {{\left (b \operatorname {arcoth}\left (c x^{n}\right ) + a\right )} {\left (e \log \left (f x^{m}\right ) + d\right )}}{x} \,d x } \]

[In]

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

[Out]

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

Giac [F]

\[ \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx=\int { \frac {{\left (b \operatorname {arcoth}\left (c x^{n}\right ) + a\right )} {\left (e \log \left (f x^{m}\right ) + d\right )}}{x} \,d x } \]

[In]

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

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \coth ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx=\int \frac {\left (a+b\,\mathrm {acoth}\left (c\,x^n\right )\right )\,\left (d+e\,\ln \left (f\,x^m\right )\right )}{x} \,d x \]

[In]

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

[Out]

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