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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.72 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.19, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6436, 6546, 6470, 2849, 2752}

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 (a+b \text {arctanh}(c x))^2 \, dx\)

\(\Big \downarrow \) 6436

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

\(\Big \downarrow \) 6546

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

\(\Big \downarrow \) 6470

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

\(\Big \downarrow \) 2849

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

\(\Big \downarrow \) 2752

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 2752
Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLo 
g[2, 1 - c*x], x] /; FreeQ[{c, d, e}, x] && EqQ[e + c*d, 0]
 

rule 2849
Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> Simp 
[-e/g   Subst[Int[Log[2*d*x]/(1 - 2*d*x), x], x, 1/(d + e*x)], x] /; FreeQ[ 
{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]
 

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

rule 6470
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol 
] :> Simp[(-(a + b*ArcTanh[c*x])^p)*(Log[2/(1 + e*(x/d))]/e), x] + Simp[b*c 
*(p/e)   Int[(a + b*ArcTanh[c*x])^(p - 1)*(Log[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 6546
Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), 
 x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p + 1)/(b*e*(p + 1)), x] + Simp[1/ 
(c*d)   Int[(a + b*ArcTanh[c*x])^p/(1 - c*x), x], x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[c^2*d + e, 0] && IGtQ[p, 0]
 
Maple [A] (verified)

Time = 0.69 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.55

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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