3.538 \(\int \frac {\tanh ^{-1}(c x) (a+b \tanh ^{-1}(c x))}{(1+c x)^2} \, dx\)

Optimal. Leaf size=78 \[ -\frac {a+b}{2 c (c x+1)}+\frac {(a+b) \tanh ^{-1}(c x)}{2 c}-\frac {(a+b) \tanh ^{-1}(c x)}{c (c x+1)}-\frac {b (1-c x) \tanh ^{-1}(c x)^2}{2 c (c x+1)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.29, antiderivative size = 122, normalized size of antiderivative = 1.56, number of steps used = 16, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {5926, 627, 44, 207, 6742, 5928, 5948} \[ -\frac {a}{2 c (c x+1)}+\frac {a \tanh ^{-1}(c x)}{2 c}-\frac {a \tanh ^{-1}(c x)}{c (c x+1)}-\frac {b}{2 c (c x+1)}+\frac {b \tanh ^{-1}(c x)^2}{2 c}-\frac {b \tanh ^{-1}(c x)^2}{c (c x+1)}+\frac {b \tanh ^{-1}(c x)}{2 c}-\frac {b \tanh ^{-1}(c x)}{c (c x+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 627

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c*x)/e)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 5926

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(a + b
*ArcTanh[c*x]))/(e*(q + 1)), x] - Dist[(b*c)/(e*(q + 1)), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 5928

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(
a + b*ArcTanh[c*x])^p)/(e*(q + 1)), x] - Dist[(b*c*p)/(e*(q + 1)), Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^(p
 - 1), (d + e*x)^(q + 1)/(1 - c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] &
& NeQ[q, -1]

Rule 5948

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> 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 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {\tanh ^{-1}(c x) \left (a+b \tanh ^{-1}(c x)\right )}{(1+c x)^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\tanh ^{-1}(x) \left (a+b \tanh ^{-1}(x)\right )}{(1+x)^2} \, dx,x,c x\right )}{c}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {a \tanh ^{-1}(x)}{(1+x)^2}+\frac {b \tanh ^{-1}(x)^2}{(1+x)^2}\right ) \, dx,x,c x\right )}{c}\\ &=\frac {a \operatorname {Subst}\left (\int \frac {\tanh ^{-1}(x)}{(1+x)^2} \, dx,x,c x\right )}{c}+\frac {b \operatorname {Subst}\left (\int \frac {\tanh ^{-1}(x)^2}{(1+x)^2} \, dx,x,c x\right )}{c}\\ &=-\frac {a \tanh ^{-1}(c x)}{c (1+c x)}-\frac {b \tanh ^{-1}(c x)^2}{c (1+c x)}+\frac {a \operatorname {Subst}\left (\int \frac {1}{(1+x) \left (1-x^2\right )} \, dx,x,c x\right )}{c}+\frac {(2 b) \operatorname {Subst}\left (\int \left (\frac {\tanh ^{-1}(x)}{2 (1+x)^2}-\frac {\tanh ^{-1}(x)}{2 \left (-1+x^2\right )}\right ) \, dx,x,c x\right )}{c}\\ &=-\frac {a \tanh ^{-1}(c x)}{c (1+c x)}-\frac {b \tanh ^{-1}(c x)^2}{c (1+c x)}+\frac {a \operatorname {Subst}\left (\int \frac {1}{(1-x) (1+x)^2} \, dx,x,c x\right )}{c}+\frac {b \operatorname {Subst}\left (\int \frac {\tanh ^{-1}(x)}{(1+x)^2} \, dx,x,c x\right )}{c}-\frac {b \operatorname {Subst}\left (\int \frac {\tanh ^{-1}(x)}{-1+x^2} \, dx,x,c x\right )}{c}\\ &=-\frac {a \tanh ^{-1}(c x)}{c (1+c x)}-\frac {b \tanh ^{-1}(c x)}{c (1+c x)}+\frac {b \tanh ^{-1}(c x)^2}{2 c}-\frac {b \tanh ^{-1}(c x)^2}{c (1+c x)}+\frac {a \operatorname {Subst}\left (\int \left (\frac {1}{2 (1+x)^2}-\frac {1}{2 \left (-1+x^2\right )}\right ) \, dx,x,c x\right )}{c}+\frac {b \operatorname {Subst}\left (\int \frac {1}{(1+x) \left (1-x^2\right )} \, dx,x,c x\right )}{c}\\ &=-\frac {a}{2 c (1+c x)}-\frac {a \tanh ^{-1}(c x)}{c (1+c x)}-\frac {b \tanh ^{-1}(c x)}{c (1+c x)}+\frac {b \tanh ^{-1}(c x)^2}{2 c}-\frac {b \tanh ^{-1}(c x)^2}{c (1+c x)}-\frac {a \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,c x\right )}{2 c}+\frac {b \operatorname {Subst}\left (\int \frac {1}{(1-x) (1+x)^2} \, dx,x,c x\right )}{c}\\ &=-\frac {a}{2 c (1+c x)}+\frac {a \tanh ^{-1}(c x)}{2 c}-\frac {a \tanh ^{-1}(c x)}{c (1+c x)}-\frac {b \tanh ^{-1}(c x)}{c (1+c x)}+\frac {b \tanh ^{-1}(c x)^2}{2 c}-\frac {b \tanh ^{-1}(c x)^2}{c (1+c x)}+\frac {b \operatorname {Subst}\left (\int \left (\frac {1}{2 (1+x)^2}-\frac {1}{2 \left (-1+x^2\right )}\right ) \, dx,x,c x\right )}{c}\\ &=-\frac {a}{2 c (1+c x)}-\frac {b}{2 c (1+c x)}+\frac {a \tanh ^{-1}(c x)}{2 c}-\frac {a \tanh ^{-1}(c x)}{c (1+c x)}-\frac {b \tanh ^{-1}(c x)}{c (1+c x)}+\frac {b \tanh ^{-1}(c x)^2}{2 c}-\frac {b \tanh ^{-1}(c x)^2}{c (1+c x)}-\frac {b \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,c x\right )}{2 c}\\ &=-\frac {a}{2 c (1+c x)}-\frac {b}{2 c (1+c x)}+\frac {a \tanh ^{-1}(c x)}{2 c}+\frac {b \tanh ^{-1}(c x)}{2 c}-\frac {a \tanh ^{-1}(c x)}{c (1+c x)}-\frac {b \tanh ^{-1}(c x)}{c (1+c x)}+\frac {b \tanh ^{-1}(c x)^2}{2 c}-\frac {b \tanh ^{-1}(c x)^2}{c (1+c x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 70, normalized size = 0.90 \[ -\frac {(a+b) ((c x+1) \log (1-c x)-(c x+1) \log (c x+1)+2)+4 (a+b) \tanh ^{-1}(c x)-2 b (c x-1) \tanh ^{-1}(c x)^2}{4 c (c x+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 74, normalized size = 0.95 \[ \frac {{\left (b c x - b\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )^{2} + 2 \, {\left ({\left (a + b\right )} c x - a - b\right )} \log \left (-\frac {c x + 1}{c x - 1}\right ) - 4 \, a - 4 \, b}{8 \, {\left (c^{2} x + c\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.17, size = 93, normalized size = 1.19 \[ \frac {1}{8} \, c {\left (\frac {{\left (c x - 1\right )} b \log \left (-\frac {c x + 1}{c x - 1}\right )^{2}}{{\left (c x + 1\right )} c^{2}} + \frac {2 \, {\left (c x - 1\right )} {\left (a + b\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{{\left (c x + 1\right )} c^{2}} + \frac {2 \, {\left (c x - 1\right )} {\left (a + b\right )}}{{\left (c x + 1\right )} c^{2}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.07, size = 247, normalized size = 3.17 \[ -\frac {a \arctanh \left (c x \right )}{c \left (c x +1\right )}-\frac {a \ln \left (c x -1\right )}{4 c}-\frac {a}{2 c \left (c x +1\right )}+\frac {a \ln \left (c x +1\right )}{4 c}-\frac {b \arctanh \left (c x \right )^{2}}{c \left (c x +1\right )}-\frac {b \arctanh \left (c x \right ) \ln \left (c x -1\right )}{2 c}-\frac {b \arctanh \left (c x \right )}{c \left (c x +1\right )}+\frac {b \arctanh \left (c x \right ) \ln \left (c x +1\right )}{2 c}-\frac {b \ln \left (c x -1\right )^{2}}{8 c}+\frac {b \ln \left (c x -1\right ) \ln \left (\frac {1}{2}+\frac {c x}{2}\right )}{4 c}-\frac {b \ln \left (c x -1\right )}{4 c}-\frac {b}{2 c \left (c x +1\right )}+\frac {b \ln \left (c x +1\right )}{4 c}-\frac {b \ln \left (c x +1\right )^{2}}{8 c}-\frac {b \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (\frac {1}{2}+\frac {c x}{2}\right )}{4 c}+\frac {b \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (c x +1\right )}{4 c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.40, size = 226, normalized size = 2.90 \[ -\frac {1}{8} \, {\left (b c {\left (\frac {2}{c^{4} x + c^{3}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )} + 2 \, a {\left (\frac {2}{c^{3} x + c^{2}} - \frac {\log \left (c x + 1\right )}{c^{2}} + \frac {\log \left (c x - 1\right )}{c^{2}}\right )} + \frac {-2 i \, \pi b + {\left (i \, \pi b + {\left (i \, \pi b c - b c\right )} x + b\right )} \log \left (c x + 1\right ) + {\left (-i \, \pi b + {\left (-i \, \pi b c + b c\right )} x - b\right )} \log \left (c x - 1\right ) + 2 \, b}{c^{3} x + c^{2}}\right )} c - \frac {1}{4} \, {\left ({\left (c {\left (\frac {2}{c^{3} x + c^{2}} - \frac {\log \left (c x + 1\right )}{c^{2}} + \frac {\log \left (c x - 1\right )}{c^{2}}\right )} + \frac {4 \, \operatorname {artanh}\left (c x\right )}{c^{2} x + c}\right )} b + \frac {4 \, a}{c^{2} x + c}\right )} \operatorname {artanh}\left (c x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.15, size = 67, normalized size = 0.86 \[ \frac {a\,\mathrm {atanh}\left (c\,x\right )+b\,\mathrm {atanh}\left (c\,x\right )+b\,{\mathrm {atanh}\left (c\,x\right )}^2}{2\,c}-\frac {a+b+2\,a\,\mathrm {atanh}\left (c\,x\right )+2\,b\,\mathrm {atanh}\left (c\,x\right )+2\,b\,{\mathrm {atanh}\left (c\,x\right )}^2}{2\,x\,c^2+2\,c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \operatorname {atanh}{\left (c x \right )}\right ) \operatorname {atanh}{\left (c x \right )}}{\left (c x + 1\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________