3.285 \(\int x \tanh ^{-1}(c+d \tanh (a+b x)) \, dx\)

Optimal. Leaf size=231 \[ -\frac{\text{PolyLog}\left (3,-\frac{(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{8 b^2}+\frac{\text{PolyLog}\left (3,-\frac{(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{8 b^2}+\frac{x \text{PolyLog}\left (2,-\frac{(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{4 b}-\frac{x \text{PolyLog}\left (2,-\frac{(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{4 b}+\frac{1}{4} x^2 \log \left (\frac{(-c-d+1) e^{2 a+2 b x}}{-c+d+1}+1\right )-\frac{1}{4} x^2 \log \left (\frac{(c+d+1) e^{2 a+2 b x}}{c-d+1}+1\right )+\frac{1}{2} x^2 \tanh ^{-1}(d \tanh (a+b x)+c) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.370669, antiderivative size = 231, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {6243, 2190, 2531, 2282, 6589} \[ -\frac{\text{PolyLog}\left (3,-\frac{(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{8 b^2}+\frac{\text{PolyLog}\left (3,-\frac{(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{8 b^2}+\frac{x \text{PolyLog}\left (2,-\frac{(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{4 b}-\frac{x \text{PolyLog}\left (2,-\frac{(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{4 b}+\frac{1}{4} x^2 \log \left (\frac{(-c-d+1) e^{2 a+2 b x}}{-c+d+1}+1\right )-\frac{1}{4} x^2 \log \left (\frac{(c+d+1) e^{2 a+2 b x}}{c-d+1}+1\right )+\frac{1}{2} x^2 \tanh ^{-1}(d \tanh (a+b x)+c) \]

Antiderivative was successfully verified.

[In]

Int[x*ArcTanh[c + d*Tanh[a + b*x]],x]

[Out]

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

Rule 6243

Int[ArcTanh[(c_.) + (d_.)*Tanh[(a_.) + (b_.)*(x_)]]*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[((e + f*x)^(
m + 1)*ArcTanh[c + d*Tanh[a + b*x]])/(f*(m + 1)), x] + (Dist[(b*(1 - c - d))/(f*(m + 1)), Int[((e + f*x)^(m +
1)*E^(2*a + 2*b*x))/(1 - c + d + (1 - c - d)*E^(2*a + 2*b*x)), x], x] - Dist[(b*(1 + c + d))/(f*(m + 1)), Int[
((e + f*x)^(m + 1)*E^(2*a + 2*b*x))/(1 + c - d + (1 + c + d)*E^(2*a + 2*b*x)), x], x]) /; FreeQ[{a, b, c, d, e
, f}, x] && IGtQ[m, 0] && NeQ[(c - d)^2, 1]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2531

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> -Simp[((
f + g*x)^m*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)])/(b*c*n*Log[F]), x] + Dist[(g*m)/(b*c*n*Log[F]), Int[(f + g*x)
^(m - 1)*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin{align*} \int x \tanh ^{-1}(c+d \tanh (a+b x)) \, dx &=\frac{1}{2} x^2 \tanh ^{-1}(c+d \tanh (a+b x))+\frac{1}{2} (b (1-c-d)) \int \frac{e^{2 a+2 b x} x^2}{1-c+d+(1-c-d) e^{2 a+2 b x}} \, dx-\frac{1}{2} (b (1+c+d)) \int \frac{e^{2 a+2 b x} x^2}{1+c-d+(1+c+d) e^{2 a+2 b x}} \, dx\\ &=\frac{1}{2} x^2 \tanh ^{-1}(c+d \tanh (a+b x))+\frac{1}{4} x^2 \log \left (1+\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac{1}{4} x^2 \log \left (1+\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )-\frac{1}{2} \int x \log \left (1+\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right ) \, dx+\frac{1}{2} \int x \log \left (1+\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right ) \, dx\\ &=\frac{1}{2} x^2 \tanh ^{-1}(c+d \tanh (a+b x))+\frac{1}{4} x^2 \log \left (1+\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac{1}{4} x^2 \log \left (1+\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac{x \text{Li}_2\left (-\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac{x \text{Li}_2\left (-\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac{\int \text{Li}_2\left (-\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right ) \, dx}{4 b}+\frac{\int \text{Li}_2\left (-\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right ) \, dx}{4 b}\\ &=\frac{1}{2} x^2 \tanh ^{-1}(c+d \tanh (a+b x))+\frac{1}{4} x^2 \log \left (1+\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac{1}{4} x^2 \log \left (1+\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac{x \text{Li}_2\left (-\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac{x \text{Li}_2\left (-\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac{\operatorname{Subst}\left (\int \frac{\text{Li}_2\left (-\frac{(-1+c+d) x}{-1+c-d}\right )}{x} \, dx,x,e^{2 a+2 b x}\right )}{8 b^2}+\frac{\operatorname{Subst}\left (\int \frac{\text{Li}_2\left (-\frac{(1+c+d) x}{1+c-d}\right )}{x} \, dx,x,e^{2 a+2 b x}\right )}{8 b^2}\\ &=\frac{1}{2} x^2 \tanh ^{-1}(c+d \tanh (a+b x))+\frac{1}{4} x^2 \log \left (1+\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac{1}{4} x^2 \log \left (1+\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac{x \text{Li}_2\left (-\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac{x \text{Li}_2\left (-\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac{\text{Li}_3\left (-\frac{(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{8 b^2}+\frac{\text{Li}_3\left (-\frac{(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{8 b^2}\\ \end{align*}

Mathematica [A]  time = 9.42936, size = 259, normalized size = 1.12 \[ \frac{-2 b x \text{PolyLog}\left (2,\frac{(c-d-1) (\sinh (2 (a+b x))-\cosh (2 (a+b x)))}{c+d-1}\right )+2 b x \text{PolyLog}\left (2,\frac{(c-d+1) (\sinh (2 (a+b x))-\cosh (2 (a+b x)))}{c+d+1}\right )-\text{PolyLog}\left (3,\frac{(c-d-1) (\sinh (2 (a+b x))-\cosh (2 (a+b x)))}{c+d-1}\right )+\text{PolyLog}\left (3,\frac{(c-d+1) (\sinh (2 (a+b x))-\cosh (2 (a+b x)))}{c+d+1}\right )+2 b^2 x^2 \log \left (\frac{(c-d-1) (\cosh (2 (a+b x))-\sinh (2 (a+b x)))}{c+d-1}+1\right )-2 b^2 x^2 \log \left (\frac{(c-d+1) (\cosh (2 (a+b x))-\sinh (2 (a+b x)))}{c+d+1}+1\right )}{8 b^2}+\frac{1}{2} x^2 \tanh ^{-1}(d \tanh (a+b x)+c) \]

Antiderivative was successfully verified.

[In]

Integrate[x*ArcTanh[c + d*Tanh[a + b*x]],x]

[Out]

(x^2*ArcTanh[c + d*Tanh[a + b*x]])/2 + (2*b^2*x^2*Log[1 + ((-1 + c - d)*(Cosh[2*(a + b*x)] - Sinh[2*(a + b*x)]
))/(-1 + c + d)] - 2*b^2*x^2*Log[1 + ((1 + c - d)*(Cosh[2*(a + b*x)] - Sinh[2*(a + b*x)]))/(1 + c + d)] - 2*b*
x*PolyLog[2, ((-1 + c - d)*(-Cosh[2*(a + b*x)] + Sinh[2*(a + b*x)]))/(-1 + c + d)] + 2*b*x*PolyLog[2, ((1 + c
- d)*(-Cosh[2*(a + b*x)] + Sinh[2*(a + b*x)]))/(1 + c + d)] - PolyLog[3, ((-1 + c - d)*(-Cosh[2*(a + b*x)] + S
inh[2*(a + b*x)]))/(-1 + c + d)] + PolyLog[3, ((1 + c - d)*(-Cosh[2*(a + b*x)] + Sinh[2*(a + b*x)]))/(1 + c +
d)])/(8*b^2)

________________________________________________________________________________________

Maple [C]  time = 5.313, size = 5062, normalized size = 21.9 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*arctanh(c+d*tanh(b*x+a)),x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [A]  time = 2.1098, size = 290, normalized size = 1.26 \begin{align*} -\frac{1}{8} \, b d{\left (\frac{2 \, b^{2} x^{2} \log \left (\frac{{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1} + 1\right ) + 2 \, b x{\rm Li}_2\left (-\frac{{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1}\right ) -{\rm Li}_{3}(-\frac{{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1})}{b^{3} d} - \frac{2 \, b^{2} x^{2} \log \left (\frac{{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1} + 1\right ) + 2 \, b x{\rm Li}_2\left (-\frac{{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1}\right ) -{\rm Li}_{3}(-\frac{{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1})}{b^{3} d}\right )} + \frac{1}{2} \, x^{2} \operatorname{artanh}\left (d \tanh \left (b x + a\right ) + c\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8*b*d*((2*b^2*x^2*log((c + d + 1)*e^(2*b*x + 2*a)/(c - d + 1) + 1) + 2*b*x*dilog(-(c + d + 1)*e^(2*b*x + 2*
a)/(c - d + 1)) - polylog(3, -(c + d + 1)*e^(2*b*x + 2*a)/(c - d + 1)))/(b^3*d) - (2*b^2*x^2*log((c + d - 1)*e
^(2*b*x + 2*a)/(c - d - 1) + 1) + 2*b*x*dilog(-(c + d - 1)*e^(2*b*x + 2*a)/(c - d - 1)) - polylog(3, -(c + d -
 1)*e^(2*b*x + 2*a)/(c - d - 1)))/(b^3*d)) + 1/2*x^2*arctanh(d*tanh(b*x + a) + c)

________________________________________________________________________________________

Fricas [C]  time = 2.2615, size = 2115, normalized size = 9.16 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(b^2*x^2*log(-((c + 1)*cosh(b*x + a) + d*sinh(b*x + a))/((c - 1)*cosh(b*x + a) + d*sinh(b*x + a))) - 2*b*x
*dilog(sqrt(-(c + d + 1)/(c - d + 1))*(cosh(b*x + a) + sinh(b*x + a))) - 2*b*x*dilog(-sqrt(-(c + d + 1)/(c - d
 + 1))*(cosh(b*x + a) + sinh(b*x + a))) + 2*b*x*dilog(sqrt(-(c + d - 1)/(c - d - 1))*(cosh(b*x + a) + sinh(b*x
 + a))) + 2*b*x*dilog(-sqrt(-(c + d - 1)/(c - d - 1))*(cosh(b*x + a) + sinh(b*x + a))) - a^2*log(2*(c + d + 1)
*cosh(b*x + a) + 2*(c + d + 1)*sinh(b*x + a) + 2*(c - d + 1)*sqrt(-(c + d + 1)/(c - d + 1))) - a^2*log(2*(c +
d + 1)*cosh(b*x + a) + 2*(c + d + 1)*sinh(b*x + a) - 2*(c - d + 1)*sqrt(-(c + d + 1)/(c - d + 1))) + a^2*log(2
*(c + d - 1)*cosh(b*x + a) + 2*(c + d - 1)*sinh(b*x + a) + 2*(c - d - 1)*sqrt(-(c + d - 1)/(c - d - 1))) + a^2
*log(2*(c + d - 1)*cosh(b*x + a) + 2*(c + d - 1)*sinh(b*x + a) - 2*(c - d - 1)*sqrt(-(c + d - 1)/(c - d - 1)))
 - (b^2*x^2 - a^2)*log(sqrt(-(c + d + 1)/(c - d + 1))*(cosh(b*x + a) + sinh(b*x + a)) + 1) - (b^2*x^2 - a^2)*l
og(-sqrt(-(c + d + 1)/(c - d + 1))*(cosh(b*x + a) + sinh(b*x + a)) + 1) + (b^2*x^2 - a^2)*log(sqrt(-(c + d - 1
)/(c - d - 1))*(cosh(b*x + a) + sinh(b*x + a)) + 1) + (b^2*x^2 - a^2)*log(-sqrt(-(c + d - 1)/(c - d - 1))*(cos
h(b*x + a) + sinh(b*x + a)) + 1) + 2*polylog(3, sqrt(-(c + d + 1)/(c - d + 1))*(cosh(b*x + a) + sinh(b*x + a))
) + 2*polylog(3, -sqrt(-(c + d + 1)/(c - d + 1))*(cosh(b*x + a) + sinh(b*x + a))) - 2*polylog(3, sqrt(-(c + d
- 1)/(c - d - 1))*(cosh(b*x + a) + sinh(b*x + a))) - 2*polylog(3, -sqrt(-(c + d - 1)/(c - d - 1))*(cosh(b*x +
a) + sinh(b*x + a))))/b^2

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x \operatorname{artanh}\left (d \tanh \left (b x + a\right ) + c\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x*arctanh(d*tanh(b*x + a) + c), x)