\(\int \frac {(a+b \text {arctanh}(c x))^2}{x^2 (d+c d x)^2} \, dx\) [109]

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

Optimal result

Integrand size = 22, antiderivative size = 371 \[ \int \frac {(a+b \text {arctanh}(c x))^2}{x^2 (d+c d x)^2} \, dx=-\frac {b^2 c}{2 d^2 (1+c x)}+\frac {b^2 c \text {arctanh}(c x)}{2 d^2}-\frac {b c (a+b \text {arctanh}(c x))}{d^2 (1+c x)}+\frac {3 c (a+b \text {arctanh}(c x))^2}{2 d^2}-\frac {(a+b \text {arctanh}(c x))^2}{d^2 x}-\frac {c (a+b \text {arctanh}(c x))^2}{d^2 (1+c x)}-\frac {4 c (a+b \text {arctanh}(c x))^2 \text {arctanh}\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {2 c (a+b \text {arctanh}(c x))^2 \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {2 b c (a+b \text {arctanh}(c x)) \log \left (2-\frac {2}{1+c x}\right )}{d^2}+\frac {2 b c (a+b \text {arctanh}(c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{d^2}-\frac {2 b c (a+b \text {arctanh}(c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1-c x}\right )}{d^2}+\frac {2 b c (a+b \text {arctanh}(c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+c x}\right )}{d^2}-\frac {b^2 c \operatorname {PolyLog}\left (2,-1+\frac {2}{1+c x}\right )}{d^2}-\frac {b^2 c \operatorname {PolyLog}\left (3,1-\frac {2}{1-c x}\right )}{d^2}+\frac {b^2 c \operatorname {PolyLog}\left (3,-1+\frac {2}{1-c x}\right )}{d^2}+\frac {b^2 c \operatorname {PolyLog}\left (3,1-\frac {2}{1+c x}\right )}{d^2} \] Output:

-1/2*b^2*c/d^2/(c*x+1)+1/2*b^2*c*arctanh(c*x)/d^2-b*c*(a+b*arctanh(c*x))/d 
^2/(c*x+1)+3/2*c*(a+b*arctanh(c*x))^2/d^2-(a+b*arctanh(c*x))^2/d^2/x-c*(a+ 
b*arctanh(c*x))^2/d^2/(c*x+1)+4*c*(a+b*arctanh(c*x))^2*arctanh(-1+2/(-c*x+ 
1))/d^2-2*c*(a+b*arctanh(c*x))^2*ln(2/(c*x+1))/d^2+2*b*c*(a+b*arctanh(c*x) 
)*ln(2-2/(c*x+1))/d^2+2*b*c*(a+b*arctanh(c*x))*polylog(2,1-2/(-c*x+1))/d^2 
-2*b*c*(a+b*arctanh(c*x))*polylog(2,-1+2/(-c*x+1))/d^2+2*b*c*(a+b*arctanh( 
c*x))*polylog(2,1-2/(c*x+1))/d^2-b^2*c*polylog(2,-1+2/(c*x+1))/d^2-b^2*c*p 
olylog(3,1-2/(-c*x+1))/d^2+b^2*c*polylog(3,-1+2/(-c*x+1))/d^2+b^2*c*polylo 
g(3,1-2/(c*x+1))/d^2
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 1.21 (sec) , antiderivative size = 347, normalized size of antiderivative = 0.94 \[ \int \frac {(a+b \text {arctanh}(c x))^2}{x^2 (d+c d x)^2} \, dx=\frac {-\frac {12 a^2}{x}-\frac {12 a^2 c}{1+c x}-24 a^2 c \log (x)+24 a^2 c \log (1+c x)+b^2 c \left (-i \pi ^3+12 \text {arctanh}(c x)^2-\frac {12 \text {arctanh}(c x)^2}{c x}+16 \text {arctanh}(c x)^3-3 \cosh (2 \text {arctanh}(c x))-6 \text {arctanh}(c x) \cosh (2 \text {arctanh}(c x))-6 \text {arctanh}(c x)^2 \cosh (2 \text {arctanh}(c x))+24 \text {arctanh}(c x) \log \left (1-e^{-2 \text {arctanh}(c x)}\right )-24 \text {arctanh}(c x)^2 \log \left (1-e^{2 \text {arctanh}(c x)}\right )-12 \operatorname {PolyLog}\left (2,e^{-2 \text {arctanh}(c x)}\right )-24 \text {arctanh}(c x) \operatorname {PolyLog}\left (2,e^{2 \text {arctanh}(c x)}\right )+12 \operatorname {PolyLog}\left (3,e^{2 \text {arctanh}(c x)}\right )+3 \sinh (2 \text {arctanh}(c x))+6 \text {arctanh}(c x) \sinh (2 \text {arctanh}(c x))+6 \text {arctanh}(c x)^2 \sinh (2 \text {arctanh}(c x))\right )+6 a b c \left (-\cosh (2 \text {arctanh}(c x))+4 \log \left (\frac {c x}{\sqrt {1-c^2 x^2}}\right )+4 \operatorname {PolyLog}\left (2,e^{-2 \text {arctanh}(c x)}\right )+\sinh (2 \text {arctanh}(c x))+\text {arctanh}(c x) \left (-\frac {4}{c x}-2 \cosh (2 \text {arctanh}(c x))-8 \log \left (1-e^{-2 \text {arctanh}(c x)}\right )+2 \sinh (2 \text {arctanh}(c x))\right )\right )}{12 d^2} \] Input:

Integrate[(a + b*ArcTanh[c*x])^2/(x^2*(d + c*d*x)^2),x]
 

Output:

((-12*a^2)/x - (12*a^2*c)/(1 + c*x) - 24*a^2*c*Log[x] + 24*a^2*c*Log[1 + c 
*x] + b^2*c*((-I)*Pi^3 + 12*ArcTanh[c*x]^2 - (12*ArcTanh[c*x]^2)/(c*x) + 1 
6*ArcTanh[c*x]^3 - 3*Cosh[2*ArcTanh[c*x]] - 6*ArcTanh[c*x]*Cosh[2*ArcTanh[ 
c*x]] - 6*ArcTanh[c*x]^2*Cosh[2*ArcTanh[c*x]] + 24*ArcTanh[c*x]*Log[1 - E^ 
(-2*ArcTanh[c*x])] - 24*ArcTanh[c*x]^2*Log[1 - E^(2*ArcTanh[c*x])] - 12*Po 
lyLog[2, E^(-2*ArcTanh[c*x])] - 24*ArcTanh[c*x]*PolyLog[2, E^(2*ArcTanh[c* 
x])] + 12*PolyLog[3, E^(2*ArcTanh[c*x])] + 3*Sinh[2*ArcTanh[c*x]] + 6*ArcT 
anh[c*x]*Sinh[2*ArcTanh[c*x]] + 6*ArcTanh[c*x]^2*Sinh[2*ArcTanh[c*x]]) + 6 
*a*b*c*(-Cosh[2*ArcTanh[c*x]] + 4*Log[(c*x)/Sqrt[1 - c^2*x^2]] + 4*PolyLog 
[2, E^(-2*ArcTanh[c*x])] + Sinh[2*ArcTanh[c*x]] + ArcTanh[c*x]*(-4/(c*x) - 
 2*Cosh[2*ArcTanh[c*x]] - 8*Log[1 - E^(-2*ArcTanh[c*x])] + 2*Sinh[2*ArcTan 
h[c*x]])))/(12*d^2)
 

Rubi [A] (verified)

Time = 1.21 (sec) , antiderivative size = 371, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {6502, 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 {(a+b \text {arctanh}(c x))^2}{x^2 (c d x+d)^2} \, dx\)

\(\Big \downarrow \) 6502

\(\displaystyle \int \left (\frac {2 c^2 (a+b \text {arctanh}(c x))^2}{d^2 (c x+1)}+\frac {c^2 (a+b \text {arctanh}(c x))^2}{d^2 (c x+1)^2}+\frac {(a+b \text {arctanh}(c x))^2}{d^2 x^2}-\frac {2 c (a+b \text {arctanh}(c x))^2}{d^2 x}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 b c \operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))}{d^2}-\frac {2 b c \operatorname {PolyLog}\left (2,\frac {2}{1-c x}-1\right ) (a+b \text {arctanh}(c x))}{d^2}+\frac {2 b c \operatorname {PolyLog}\left (2,1-\frac {2}{c x+1}\right ) (a+b \text {arctanh}(c x))}{d^2}-\frac {b c (a+b \text {arctanh}(c x))}{d^2 (c x+1)}-\frac {(a+b \text {arctanh}(c x))^2}{d^2 x}-\frac {c (a+b \text {arctanh}(c x))^2}{d^2 (c x+1)}+\frac {3 c (a+b \text {arctanh}(c x))^2}{2 d^2}-\frac {4 c \text {arctanh}\left (1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))^2}{d^2}+\frac {2 b c \log \left (2-\frac {2}{c x+1}\right ) (a+b \text {arctanh}(c x))}{d^2}-\frac {2 c \log \left (\frac {2}{c x+1}\right ) (a+b \text {arctanh}(c x))^2}{d^2}+\frac {b^2 c \text {arctanh}(c x)}{2 d^2}-\frac {b^2 c \operatorname {PolyLog}\left (2,\frac {2}{c x+1}-1\right )}{d^2}-\frac {b^2 c \operatorname {PolyLog}\left (3,1-\frac {2}{1-c x}\right )}{d^2}+\frac {b^2 c \operatorname {PolyLog}\left (3,\frac {2}{1-c x}-1\right )}{d^2}+\frac {b^2 c \operatorname {PolyLog}\left (3,1-\frac {2}{c x+1}\right )}{d^2}-\frac {b^2 c}{2 d^2 (c x+1)}\)

Input:

Int[(a + b*ArcTanh[c*x])^2/(x^2*(d + c*d*x)^2),x]
 

Output:

-1/2*(b^2*c)/(d^2*(1 + c*x)) + (b^2*c*ArcTanh[c*x])/(2*d^2) - (b*c*(a + b* 
ArcTanh[c*x]))/(d^2*(1 + c*x)) + (3*c*(a + b*ArcTanh[c*x])^2)/(2*d^2) - (a 
 + b*ArcTanh[c*x])^2/(d^2*x) - (c*(a + b*ArcTanh[c*x])^2)/(d^2*(1 + c*x)) 
- (4*c*(a + b*ArcTanh[c*x])^2*ArcTanh[1 - 2/(1 - c*x)])/d^2 - (2*c*(a + b* 
ArcTanh[c*x])^2*Log[2/(1 + c*x)])/d^2 + (2*b*c*(a + b*ArcTanh[c*x])*Log[2 
- 2/(1 + c*x)])/d^2 + (2*b*c*(a + b*ArcTanh[c*x])*PolyLog[2, 1 - 2/(1 - c* 
x)])/d^2 - (2*b*c*(a + b*ArcTanh[c*x])*PolyLog[2, -1 + 2/(1 - c*x)])/d^2 + 
 (2*b*c*(a + b*ArcTanh[c*x])*PolyLog[2, 1 - 2/(1 + c*x)])/d^2 - (b^2*c*Pol 
yLog[2, -1 + 2/(1 + c*x)])/d^2 - (b^2*c*PolyLog[3, 1 - 2/(1 - c*x)])/d^2 + 
 (b^2*c*PolyLog[3, -1 + 2/(1 - c*x)])/d^2 + (b^2*c*PolyLog[3, 1 - 2/(1 + c 
*x)])/d^2
 

Defintions of rubi rules used

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

rule 6502
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e 
_.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^p, ( 
f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] 
 && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
 
Maple [C] (warning: unable to verify)

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

Time = 2.43 (sec) , antiderivative size = 4256, normalized size of antiderivative = 11.47

method result size
parts \(\text {Expression too large to display}\) \(4256\)
derivativedivides \(\text {Expression too large to display}\) \(4258\)
default \(\text {Expression too large to display}\) \(4258\)

Input:

int((a+b*arctanh(c*x))^2/x^2/(c*d*x+d)^2,x,method=_RETURNVERBOSE)
 

Output:

a^2/d^2*(-c/(c*x+1)+2*c*ln(c*x+1)-1/x-2*c*ln(x))+b^2/d^2*c*(-2*arctanh(c*x 
)^2*ln(1-(c*x+1)/(-c^2*x^2+1)^(1/2))-4*arctanh(c*x)*polylog(2,(c*x+1)/(-c^ 
2*x^2+1)^(1/2))-2*arctanh(c*x)^2*ln(1+(c*x+1)/(-c^2*x^2+1)^(1/2))-4*arctan 
h(c*x)*polylog(2,-(c*x+1)/(-c^2*x^2+1)^(1/2))+2*arctanh(c*x)^2*ln((c*x+1)^ 
2/(-c^2*x^2+1)-1)+I*Pi*csgn(I*(c*x+1)^2/(c^2*x^2-1))*csgn(I*(c*x+1)^2/(c^2 
*x^2-1)/(1-(c*x+1)^2/(c^2*x^2-1)))*csgn(I/(1-(c*x+1)^2/(c^2*x^2-1)))*(arct 
anh(c*x)^2-arctanh(c*x)*ln(1-(c*x+1)/(-c^2*x^2+1)^(1/2))-arctanh(c*x)*ln(1 
+(c*x+1)/(-c^2*x^2+1)^(1/2))-polylog(2,(c*x+1)/(-c^2*x^2+1)^(1/2))-polylog 
(2,-(c*x+1)/(-c^2*x^2+1)^(1/2)))-2*arctanh(c*x)^2*ln(c*x)+2*ln(2)*dilog((c 
*x+1)/(-c^2*x^2+1)^(1/2))-2*ln(2)*dilog(1+(c*x+1)/(-c^2*x^2+1)^(1/2))+2*ln 
(2)*polylog(2,(c*x+1)/(-c^2*x^2+1)^(1/2))+2*ln(2)*polylog(2,-(c*x+1)/(-c^2 
*x^2+1)^(1/2))+2*arctanh(c*x)^2*ln(c*x+1)+1/2*arctanh(c*x)*ln(1-(c*x+1)/(- 
c^2*x^2+1)^(1/2))+2*arctanh(c*x)*ln(1+(c*x+1)/(-c^2*x^2+1)^(1/2))+4/3*arct 
anh(c*x)^3+I*Pi*csgn(I*(c*x+1)^2/(c^2*x^2-1))*csgn(I*(c*x+1)^2/(c^2*x^2-1) 
/(1-(c*x+1)^2/(c^2*x^2-1)))*csgn(I/(1-(c*x+1)^2/(c^2*x^2-1)))*(arctanh(c*x 
)*ln(1+(c*x+1)/(-c^2*x^2+1)^(1/2))+dilog(1+(c*x+1)/(-c^2*x^2+1)^(1/2))-dil 
og((c*x+1)/(-c^2*x^2+1)^(1/2)))-I*Pi*csgn(I/(1-(c*x+1)^2/(c^2*x^2-1)))*csg 
n(I*(-(c*x+1)^2/(c^2*x^2-1)-1))*csgn(I*(-(c*x+1)^2/(c^2*x^2-1)-1)/(1-(c*x+ 
1)^2/(c^2*x^2-1)))*(arctanh(c*x)^2-arctanh(c*x)*ln(1-(c*x+1)/(-c^2*x^2+1)^ 
(1/2))-arctanh(c*x)*ln(1+(c*x+1)/(-c^2*x^2+1)^(1/2))-polylog(2,(c*x+1)/...
 

Fricas [F]

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

integrate((a+b*arctanh(c*x))^2/x^2/(c*d*x+d)^2,x, algorithm="fricas")
 

Output:

integral((b^2*arctanh(c*x)^2 + 2*a*b*arctanh(c*x) + a^2)/(c^2*d^2*x^4 + 2* 
c*d^2*x^3 + d^2*x^2), x)
 

Sympy [F]

\[ \int \frac {(a+b \text {arctanh}(c x))^2}{x^2 (d+c d x)^2} \, dx=\frac {\int \frac {a^{2}}{c^{2} x^{4} + 2 c x^{3} + x^{2}}\, dx + \int \frac {b^{2} \operatorname {atanh}^{2}{\left (c x \right )}}{c^{2} x^{4} + 2 c x^{3} + x^{2}}\, dx + \int \frac {2 a b \operatorname {atanh}{\left (c x \right )}}{c^{2} x^{4} + 2 c x^{3} + x^{2}}\, dx}{d^{2}} \] Input:

integrate((a+b*atanh(c*x))**2/x**2/(c*d*x+d)**2,x)
 

Output:

(Integral(a**2/(c**2*x**4 + 2*c*x**3 + x**2), x) + Integral(b**2*atanh(c*x 
)**2/(c**2*x**4 + 2*c*x**3 + x**2), x) + Integral(2*a*b*atanh(c*x)/(c**2*x 
**4 + 2*c*x**3 + x**2), x))/d**2
 

Maxima [F]

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

integrate((a+b*arctanh(c*x))^2/x^2/(c*d*x+d)^2,x, algorithm="maxima")
 

Output:

-a^2*((2*c*x + 1)/(c*d^2*x^2 + d^2*x) - 2*c*log(c*x + 1)/d^2 + 2*c*log(x)/ 
d^2) - 1/4*(2*b^2*c*x + b^2 - 2*(b^2*c^2*x^2 + b^2*c*x)*log(c*x + 1))*log( 
-c*x + 1)^2/(c*d^2*x^2 + d^2*x) - integrate(-1/4*((b^2*c*x - b^2)*log(c*x 
+ 1)^2 + 4*(a*b*c*x - a*b)*log(c*x + 1) + 2*(2*b^2*c^3*x^3 + 3*b^2*c^2*x^2 
 + 2*a*b - (2*a*b*c - b^2*c)*x - (2*b^2*c^4*x^4 + 4*b^2*c^3*x^3 + 2*b^2*c^ 
2*x^2 + b^2*c*x - b^2)*log(c*x + 1))*log(-c*x + 1))/(c^3*d^2*x^5 + c^2*d^2 
*x^4 - c*d^2*x^3 - d^2*x^2), x)
 

Giac [F]

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

integrate((a+b*arctanh(c*x))^2/x^2/(c*d*x+d)^2,x, algorithm="giac")
 

Output:

integrate((b*arctanh(c*x) + a)^2/((c*d*x + d)^2*x^2), x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

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

int((a + b*atanh(c*x))^2/(x^2*(d + c*d*x)^2),x)
 

Output:

int((a + b*atanh(c*x))^2/(x^2*(d + c*d*x)^2), x)
 

Reduce [F]

\[ \int \frac {(a+b \text {arctanh}(c x))^2}{x^2 (d+c d x)^2} \, dx =\text {Too large to display} \] Input:

int((a+b*atanh(c*x))^2/x^2/(c*d*x+d)^2,x)
 

Output:

( - 4*atanh(c*x)**3*b**2*c**2*x**2 - 4*atanh(c*x)**3*b**2*c*x - 12*atanh(c 
*x)**2*a*b*c**2*x**2 - 12*atanh(c*x)**2*a*b*c*x - 18*atanh(c*x)**2*b**2*c* 
*2*x**2 - 6*atanh(c*x)**2*b**2*c*x + 12*atanh(c*x)**2*b**2 - 24*atanh(c*x) 
*a*b*c**2*x**2 + 24*atanh(c*x)*a*b - 36*atanh(c*x)*b**2*c**2*x**2 + 24*ata 
nh(c*x)*b**2 - 48*int(atanh(c*x)/(c**3*x**5 + c**2*x**4 - c*x**3 - x**2),x 
)*a*b*c*x**2 - 48*int(atanh(c*x)/(c**3*x**5 + c**2*x**4 - c*x**3 - x**2),x 
)*a*b*x - 24*int(atanh(c*x)/(c**3*x**5 + c**2*x**4 - c*x**3 - x**2),x)*b** 
2*c*x**2 - 24*int(atanh(c*x)/(c**3*x**5 + c**2*x**4 - c*x**3 - x**2),x)*b* 
*2*x - 24*int(atanh(c*x)**2/(c**3*x**5 + c**2*x**4 - c*x**3 - x**2),x)*b** 
2*c*x**2 - 24*int(atanh(c*x)**2/(c**3*x**5 + c**2*x**4 - c*x**3 - x**2),x) 
*b**2*x - 3*log(c*x - 1)*b**2*c**2*x**2 - 3*log(c*x - 1)*b**2*c*x + 24*log 
(c*x + 1)*a**2*c**2*x**2 + 24*log(c*x + 1)*a**2*c*x + 24*log(c*x + 1)*a*b* 
c**2*x**2 + 24*log(c*x + 1)*a*b*c*x + 27*log(c*x + 1)*b**2*c**2*x**2 + 27* 
log(c*x + 1)*b**2*c*x - 24*log(x)*a**2*c**2*x**2 - 24*log(x)*a**2*c*x - 24 
*log(x)*a*b*c**2*x**2 - 24*log(x)*a*b*c*x - 24*log(x)*b**2*c**2*x**2 - 24* 
log(x)*b**2*c*x + 24*a**2*c**2*x**2 - 12*a**2 - 6*b**2*c**2*x**2)/(12*d**2 
*x*(c*x + 1))