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]
________________________________________________________________________________________
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]
[Out]
Rule 44
Rule 207
Rule 627
Rule 5926
Rule 5928
Rule 5948
Rule 6742
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________