\(\int \frac {(a+b \text {arctanh}(c x^n)) (d+e \log (f x^m))}{x} \, dx\) [361]

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

Optimal result

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

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

Mathematica [C] (verified)

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

Time = 0.18 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.04 \[ \int \frac {\left (a+b \text {arctanh}\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} a \log (x) \left (2 d-e m \log (x)+2 e \log \left (f x^m\right )\right ) \] Input:

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

Output:

-((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*HypergeometricPFQ[{1/2, 1/2, 1}, {3/2, 3/2}, c^2 
*x^(2*n)]*(d + e*Log[f*x^m]))/n + (a*Log[x]*(2*d - e*m*Log[x] + 2*e*Log[f* 
x^m]))/2
 

Rubi [A] (verified)

Time = 0.75 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.24, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {7293, 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 \text {arctanh}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx\)

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [C] (warning: unable to verify)

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

Time = 179.31 (sec) , antiderivative size = 327, normalized size of antiderivative = 2.97

method result size
risch \(\frac {\left (\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 x^{m}\right ) \operatorname {csgn}\left (i f \,x^{m}\right ) \operatorname {csgn}\left (i f \right )}{4}-\frac {i e \pi \operatorname {csgn}\left (i f \,x^{m}\right )^{3}}{4}+\frac {i e \pi \operatorname {csgn}\left (i f \,x^{m}\right )^{2} \operatorname {csgn}\left (i f \right )}{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 )+b \operatorname {dilog}\left (1-c \,x^{n}\right )\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 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 (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}\) \(327\)

Input:

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

Output:

(1/4*I*e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2-1/4*I*e*Pi*csgn(I*x^m)*csgn(I*f*x^ 
m)*csgn(I*f)-1/4*I*e*Pi*csgn(I*f*x^m)^3+1/4*I*e*Pi*csgn(I*f*x^m)^2*csgn(I* 
f)+1/2*e*ln(f)+1/2*d)/n*(-b*dilog(c*x^n+1)+2*a*ln(x^n)+b*dilog(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 
/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/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*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. 327 vs. \(2 (98) = 196\).

Time = 0.10 (sec) , antiderivative size = 327, normalized size of antiderivative = 2.97 \[ \int \frac {\left (a+b \text {arctanh}\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}} \] Input:

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

Output:

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*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*l 
og(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*lo 
g(x)) + 1)/(c*cosh(n*log(x)) + c*sinh(n*log(x)) - 1)))/n^2
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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)*l 
og(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) + int 
egrate(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*l 
og(f) + d*n)*b*c*log(x))*x^n)/(c^2*x*x^(2*n) - x), x)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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