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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

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

a*b*x/c+b^2*x*arctanh(c*x)/c-1/2*(a+b*arctanh(c*x))^2/c^2+1/2*x^2*(a+b*arc 
tanh(c*x))^2+1/2*b^2*ln(-c^2*x^2+1)/c^2
 

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.20 \[ \int x (a+b \text {arctanh}(c x))^2 \, dx=\frac {2 a b c x+a^2 c^2 x^2+2 b c x (b+a c x) \text {arctanh}(c x)+b^2 \left (-1+c^2 x^2\right ) \text {arctanh}(c x)^2+b (a+b) \log (1-c x)-a b \log (1+c x)+b^2 \log (1+c x)}{2 c^2} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.04, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6452, 6542, 2009, 6510}

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

\(\Big \downarrow \) 6452

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

\(\Big \downarrow \) 6542

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

\(\Big \downarrow \) 2009

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

\(\Big \downarrow \) 6510

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

Input:

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

Output:

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

Defintions of rubi rules used

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

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 6510
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symb 
ol] :> Simp[(a + b*ArcTanh[c*x])^(p + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b 
, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]
 

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

Time = 0.46 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.41

method result size
parallelrisch \(\frac {b^{2} \operatorname {arctanh}\left (c x \right )^{2} x^{2} c^{2}+2 x^{2} \operatorname {arctanh}\left (c x \right ) a b \,c^{2}+a^{2} c^{2} x^{2}+2 b^{2} \operatorname {arctanh}\left (c x \right ) x c +2 a b c x -b^{2} \operatorname {arctanh}\left (c x \right )^{2}+2 \ln \left (c x -1\right ) b^{2}-2 \,\operatorname {arctanh}\left (c x \right ) a b +2 \,\operatorname {arctanh}\left (c x \right ) b^{2}+a^{2}}{2 c^{2}}\) \(106\)
parts \(\frac {a^{2} x^{2}}{2}+\frac {b^{2} \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )^{2}}{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )}{2}-\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )}{2}+\frac {\ln \left (c x -1\right )^{2}}{8}-\frac {\ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (c x -1\right )}{2}+\frac {\ln \left (c x +1\right )}{2}+\frac {\ln \left (c x +1\right )^{2}}{8}-\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 )}{4}\right )}{c^{2}}+\frac {2 a b \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )}{2}+\frac {c x}{2}+\frac {\ln \left (c x -1\right )}{4}-\frac {\ln \left (c x +1\right )}{4}\right )}{c^{2}}\) \(179\)
derivativedivides \(\frac {\frac {a^{2} c^{2} x^{2}}{2}+b^{2} \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )^{2}}{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )}{2}-\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )}{2}+\frac {\ln \left (c x -1\right )^{2}}{8}-\frac {\ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (c x -1\right )}{2}+\frac {\ln \left (c x +1\right )}{2}+\frac {\ln \left (c x +1\right )^{2}}{8}-\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 )}{4}\right )+2 a b \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )}{2}+\frac {c x}{2}+\frac {\ln \left (c x -1\right )}{4}-\frac {\ln \left (c x +1\right )}{4}\right )}{c^{2}}\) \(180\)
default \(\frac {\frac {a^{2} c^{2} x^{2}}{2}+b^{2} \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )^{2}}{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )}{2}-\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )}{2}+\frac {\ln \left (c x -1\right )^{2}}{8}-\frac {\ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (c x -1\right )}{2}+\frac {\ln \left (c x +1\right )}{2}+\frac {\ln \left (c x +1\right )^{2}}{8}-\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 )}{4}\right )+2 a b \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )}{2}+\frac {c x}{2}+\frac {\ln \left (c x -1\right )}{4}-\frac {\ln \left (c x +1\right )}{4}\right )}{c^{2}}\) \(180\)
risch \(\frac {b^{2} \left (c^{2} x^{2}-1\right ) \ln \left (c x +1\right )^{2}}{8 c^{2}}+\frac {b \left (-x^{2} b \ln \left (-c x +1\right ) c^{2}+2 a \,c^{2} x^{2}+2 b c x +b \ln \left (-c x +1\right )\right ) \ln \left (c x +1\right )}{4 c^{2}}+\frac {\ln \left (-c x +1\right )^{2} b^{2} x^{2}}{8}-\frac {\ln \left (-c x +1\right ) a b \,x^{2}}{2}+\frac {a^{2} x^{2}}{2}-\frac {b^{2} x \ln \left (-c x +1\right )}{2 c}-\frac {b^{2} \ln \left (-c x +1\right )^{2}}{8 c^{2}}+\frac {a b x}{c}-\frac {b \ln \left (c x +1\right ) a}{2 c^{2}}+\frac {b^{2} \ln \left (c x +1\right )}{2 c^{2}}+\frac {b \ln \left (-c x +1\right ) a}{2 c^{2}}+\frac {b^{2} \ln \left (-c x +1\right )}{2 c^{2}}\) \(214\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.63 \[ \int x (a+b \text {arctanh}(c x))^2 \, dx=\frac {4 \, a^{2} c^{2} x^{2} + 8 \, a b c x + {\left (b^{2} c^{2} x^{2} - b^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )^{2} - 4 \, {\left (a b - b^{2}\right )} \log \left (c x + 1\right ) + 4 \, {\left (a b + b^{2}\right )} \log \left (c x - 1\right ) + 4 \, {\left (a b c^{2} x^{2} + b^{2} c x\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{8 \, c^{2}} \] Input:

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

Output:

1/8*(4*a^2*c^2*x^2 + 8*a*b*c*x + (b^2*c^2*x^2 - b^2)*log(-(c*x + 1)/(c*x - 
 1))^2 - 4*(a*b - b^2)*log(c*x + 1) + 4*(a*b + b^2)*log(c*x - 1) + 4*(a*b* 
c^2*x^2 + b^2*c*x)*log(-(c*x + 1)/(c*x - 1)))/c^2
 

Sympy [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.52 \[ \int x (a+b \text {arctanh}(c x))^2 \, dx=\begin {cases} \frac {a^{2} x^{2}}{2} + a b x^{2} \operatorname {atanh}{\left (c x \right )} + \frac {a b x}{c} - \frac {a b \operatorname {atanh}{\left (c x \right )}}{c^{2}} + \frac {b^{2} x^{2} \operatorname {atanh}^{2}{\left (c x \right )}}{2} + \frac {b^{2} x \operatorname {atanh}{\left (c x \right )}}{c} + \frac {b^{2} \log {\left (x - \frac {1}{c} \right )}}{c^{2}} - \frac {b^{2} \operatorname {atanh}^{2}{\left (c x \right )}}{2 c^{2}} + \frac {b^{2} \operatorname {atanh}{\left (c x \right )}}{c^{2}} & \text {for}\: c \neq 0 \\\frac {a^{2} x^{2}}{2} & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((a**2*x**2/2 + a*b*x**2*atanh(c*x) + a*b*x/c - a*b*atanh(c*x)/c* 
*2 + b**2*x**2*atanh(c*x)**2/2 + b**2*x*atanh(c*x)/c + b**2*log(x - 1/c)/c 
**2 - b**2*atanh(c*x)**2/(2*c**2) + b**2*atanh(c*x)/c**2, Ne(c, 0)), (a**2 
*x**2/2, True))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (69) = 138\).

Time = 0.03 (sec) , antiderivative size = 158, normalized size of antiderivative = 2.11 \[ \int x (a+b \text {arctanh}(c x))^2 \, dx=\frac {1}{2} \, b^{2} x^{2} \operatorname {artanh}\left (c x\right )^{2} + \frac {1}{2} \, a^{2} x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} a b + \frac {1}{8} \, {\left (4 \, c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )} \operatorname {artanh}\left (c x\right ) - \frac {2 \, {\left (\log \left (c x - 1\right ) - 2\right )} \log \left (c x + 1\right ) - \log \left (c x + 1\right )^{2} - \log \left (c x - 1\right )^{2} - 4 \, \log \left (c x - 1\right )}{c^{2}}\right )} b^{2} \] Input:

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

Output:

1/2*b^2*x^2*arctanh(c*x)^2 + 1/2*a^2*x^2 + 1/2*(2*x^2*arctanh(c*x) + c*(2* 
x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3))*a*b + 1/8*(4*c*(2*x/c^2 - lo 
g(c*x + 1)/c^3 + log(c*x - 1)/c^3)*arctanh(c*x) - (2*(log(c*x - 1) - 2)*lo 
g(c*x + 1) - log(c*x + 1)^2 - log(c*x - 1)^2 - 4*log(c*x - 1))/c^2)*b^2
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 301 vs. \(2 (69) = 138\).

Time = 0.13 (sec) , antiderivative size = 301, normalized size of antiderivative = 4.01 \[ \int x (a+b \text {arctanh}(c x))^2 \, dx=\frac {1}{2} \, {\left (\frac {{\left (c x + 1\right )} b^{2} \log \left (-\frac {c x + 1}{c x - 1}\right )^{2}}{{\left (\frac {{\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}\right )} {\left (c x - 1\right )}} + \frac {2 \, {\left (\frac {2 \, {\left (c x + 1\right )} a b}{c x - 1} + \frac {{\left (c x + 1\right )} b^{2}}{c x - 1} - b^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}} + \frac {4 \, {\left (\frac {{\left (c x + 1\right )} a^{2}}{c x - 1} + \frac {{\left (c x + 1\right )} a b}{c x - 1} - a b\right )}}{\frac {{\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}} - \frac {2 \, b^{2} \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{3}} + \frac {2 \, b^{2} \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{3}}\right )} c \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 3.85 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.19 \[ \int x (a+b \text {arctanh}(c x))^2 \, dx=\frac {a^2\,x^2}{2}-\frac {\frac {b^2\,{\mathrm {atanh}\left (c\,x\right )}^2}{2}-\frac {b^2\,\ln \left (c^2\,x^2-1\right )}{2}-c\,\left (x\,\mathrm {atanh}\left (c\,x\right )\,b^2+a\,x\,b\right )+a\,b\,\mathrm {atanh}\left (c\,x\right )}{c^2}+\frac {b^2\,x^2\,{\mathrm {atanh}\left (c\,x\right )}^2}{2}+a\,b\,x^2\,\mathrm {atanh}\left (c\,x\right ) \] Input:

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

Output:

(a^2*x^2)/2 - ((b^2*atanh(c*x)^2)/2 - (b^2*log(c^2*x^2 - 1))/2 - c*(b^2*x* 
atanh(c*x) + a*b*x) + a*b*atanh(c*x))/c^2 + (b^2*x^2*atanh(c*x)^2)/2 + a*b 
*x^2*atanh(c*x)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.41 \[ \int x (a+b \text {arctanh}(c x))^2 \, dx=\frac {\mathit {atanh} \left (c x \right )^{2} b^{2} c^{2} x^{2}-\mathit {atanh} \left (c x \right )^{2} b^{2}+2 \mathit {atanh} \left (c x \right ) a b \,c^{2} x^{2}-2 \mathit {atanh} \left (c x \right ) a b +2 \mathit {atanh} \left (c x \right ) b^{2} c x +2 \mathit {atanh} \left (c x \right ) b^{2}+2 \,\mathrm {log}\left (c^{2} x -c \right ) b^{2}+a^{2} c^{2} x^{2}+2 a b c x}{2 c^{2}} \] Input:

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

Output:

(atanh(c*x)**2*b**2*c**2*x**2 - atanh(c*x)**2*b**2 + 2*atanh(c*x)*a*b*c**2 
*x**2 - 2*atanh(c*x)*a*b + 2*atanh(c*x)*b**2*c*x + 2*atanh(c*x)*b**2 + 2*l 
og(c**2*x - c)*b**2 + a**2*c**2*x**2 + 2*a*b*c*x)/(2*c**2)