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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

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

c*(a+b*arctanh(c*x))^2-(a+b*arctanh(c*x))^2/x+2*b*c*(a+b*arctanh(c*x))*ln( 
2-2/(c*x+1))-b^2*c*polylog(2,-1+2/(c*x+1))
 

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.32 \[ \int \frac {(a+b \text {arctanh}(c x))^2}{x^2} \, dx=\frac {b^2 (-1+c x) \text {arctanh}(c x)^2+2 b \text {arctanh}(c x) \left (-a+b c x \log \left (1-e^{-2 \text {arctanh}(c x)}\right )\right )-a \left (a-2 b c x \log (c x)+b c x \log \left (1-c^2 x^2\right )\right )-b^2 c x \operatorname {PolyLog}\left (2,e^{-2 \text {arctanh}(c x)}\right )}{x} \] Input:

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

Output:

(b^2*(-1 + c*x)*ArcTanh[c*x]^2 + 2*b*ArcTanh[c*x]*(-a + b*c*x*Log[1 - E^(- 
2*ArcTanh[c*x])]) - a*(a - 2*b*c*x*Log[c*x] + b*c*x*Log[1 - c^2*x^2]) - b^ 
2*c*x*PolyLog[2, E^(-2*ArcTanh[c*x])])/x
 

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.08, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6452, 6550, 6494, 2897}

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} \, dx\)

\(\Big \downarrow \) 6452

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

\(\Big \downarrow \) 6550

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

\(\Big \downarrow \) 6494

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

\(\Big \downarrow \) 2897

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

Input:

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

Output:

-((a + b*ArcTanh[c*x])^2/x) + 2*b*c*((a + b*ArcTanh[c*x])^2/(2*b) + (a + b 
*ArcTanh[c*x])*Log[2 - 2/(1 + c*x)] - (b*PolyLog[2, -1 + 2/(1 + c*x)])/2)
 

Defintions of rubi rules used

rule 2897
Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[Pq^m*((1 - u)/ 
D[u, x])]}, Simp[C*PolyLog[2, 1 - u], x] /; FreeQ[C, x]] /; IntegerQ[m] && 
PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponents[u, 
 x][[2]], Expon[Pq, x]]
 

rule 6452
Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] : 
> Simp[x^(m + 1)*((a + b*ArcTanh[c*x^n])^p/(m + 1)), x] - Simp[b*c*n*(p/(m 
+ 1))   Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x 
], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1 
] && IntegerQ[m])) && NeQ[m, -1]
 

rule 6494
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x 
_Symbol] :> Simp[(a + b*ArcTanh[c*x])^p*(Log[2 - 2/(1 + e*(x/d))]/d), x] - 
Simp[b*c*(p/d)   Int[(a + b*ArcTanh[c*x])^(p - 1)*(Log[2 - 2/(1 + e*(x/d))] 
/(1 - c^2*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c 
^2*d^2 - e^2, 0]
 

rule 6550
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^2)), 
 x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p + 1)/(b*d*(p + 1)), x] + Simp[1/ 
d   Int[(a + b*ArcTanh[c*x])^p/(x*(1 + c*x)), x], x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[c^2*d + e, 0] && GtQ[p, 0]
 
Maple [B] (verified)

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

Time = 0.53 (sec) , antiderivative size = 195, normalized size of antiderivative = 2.75

method result size
parts \(-\frac {a^{2}}{x}+b^{2} c \left (-\frac {\operatorname {arctanh}\left (c x \right )^{2}}{c x}+2 \ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )-\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )-\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )-\frac {\ln \left (c x -1\right )^{2}}{4}+\operatorname {dilog}\left (\frac {c x}{2}+\frac {1}{2}\right )+\frac {\ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{2}+\frac {\ln \left (c x +1\right )^{2}}{4}-\frac {\left (\ln \left (c x +1\right )-\ln \left (\frac {c x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c x}{2}+\frac {1}{2}\right )}{2}-\operatorname {dilog}\left (c x +1\right )-\ln \left (c x \right ) \ln \left (c x +1\right )-\operatorname {dilog}\left (c x \right )\right )+2 a b c \left (-\frac {\operatorname {arctanh}\left (c x \right )}{c x}+\ln \left (c x \right )-\frac {\ln \left (c x +1\right )}{2}-\frac {\ln \left (c x -1\right )}{2}\right )\) \(195\)
derivativedivides \(c \left (-\frac {a^{2}}{c x}+b^{2} \left (-\frac {\operatorname {arctanh}\left (c x \right )^{2}}{c x}+2 \ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )-\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )-\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )-\frac {\ln \left (c x -1\right )^{2}}{4}+\operatorname {dilog}\left (\frac {c x}{2}+\frac {1}{2}\right )+\frac {\ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{2}+\frac {\ln \left (c x +1\right )^{2}}{4}-\frac {\left (\ln \left (c x +1\right )-\ln \left (\frac {c x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c x}{2}+\frac {1}{2}\right )}{2}-\operatorname {dilog}\left (c x +1\right )-\ln \left (c x \right ) \ln \left (c x +1\right )-\operatorname {dilog}\left (c x \right )\right )+2 a b \left (-\frac {\operatorname {arctanh}\left (c x \right )}{c x}+\ln \left (c x \right )-\frac {\ln \left (c x +1\right )}{2}-\frac {\ln \left (c x -1\right )}{2}\right )\right )\) \(198\)
default \(c \left (-\frac {a^{2}}{c x}+b^{2} \left (-\frac {\operatorname {arctanh}\left (c x \right )^{2}}{c x}+2 \ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )-\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )-\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )-\frac {\ln \left (c x -1\right )^{2}}{4}+\operatorname {dilog}\left (\frac {c x}{2}+\frac {1}{2}\right )+\frac {\ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{2}+\frac {\ln \left (c x +1\right )^{2}}{4}-\frac {\left (\ln \left (c x +1\right )-\ln \left (\frac {c x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c x}{2}+\frac {1}{2}\right )}{2}-\operatorname {dilog}\left (c x +1\right )-\ln \left (c x \right ) \ln \left (c x +1\right )-\operatorname {dilog}\left (c x \right )\right )+2 a b \left (-\frac {\operatorname {arctanh}\left (c x \right )}{c x}+\ln \left (c x \right )-\frac {\ln \left (c x +1\right )}{2}-\frac {\ln \left (c x -1\right )}{2}\right )\right )\) \(198\)

Input:

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

Output:

-1/x*a^2+b^2*c*(-1/c/x*arctanh(c*x)^2+2*ln(c*x)*arctanh(c*x)-arctanh(c*x)* 
ln(c*x+1)-arctanh(c*x)*ln(c*x-1)-1/4*ln(c*x-1)^2+dilog(1/2*c*x+1/2)+1/2*ln 
(c*x-1)*ln(1/2*c*x+1/2)+1/4*ln(c*x+1)^2-1/2*(ln(c*x+1)-ln(1/2*c*x+1/2))*ln 
(-1/2*c*x+1/2)-dilog(c*x+1)-ln(c*x)*ln(c*x+1)-dilog(c*x))+2*a*b*c*(-1/c/x* 
arctanh(c*x)+ln(c*x)-1/2*ln(c*x+1)-1/2*ln(c*x-1))
 

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

-(c*(log(c^2*x^2 - 1) - log(x^2)) + 2*arctanh(c*x)/x)*a*b - 1/4*b^2*(log(- 
c*x + 1)^2/x + integrate(-((c*x - 1)*log(c*x + 1)^2 + 2*(c*x - (c*x - 1)*l 
og(c*x + 1))*log(-c*x + 1))/(c*x^3 - x^2), x)) - a^2/x
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

( - atanh(c*x)**2*b**2 - 2*atanh(c*x)*a*b*c*x - 2*atanh(c*x)*a*b - 2*int(a 
tanh(c*x)/(c**2*x**3 - x),x)*b**2*c*x - 2*log(c**2*x - c)*a*b*c*x + 2*log( 
x)*a*b*c*x - a**2)/x