Optimal. Leaf size=102 \[ -\frac {2 b}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))}+\frac {1}{x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))}+\frac {2 b \log (x)}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3}-\frac {2 b \log \left (\tanh ^{-1}(\tanh (a+b x))\right )}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2202, 2194,
2191, 2188, 29} \begin {gather*} -\frac {2 b}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))}+\frac {1}{x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))}+\frac {2 b \log (x)}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3}-\frac {2 b \log \left (\tanh ^{-1}(\tanh (a+b x))\right )}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 2188
Rule 2191
Rule 2194
Rule 2202
Rubi steps
\begin {align*} \int \frac {1}{x^2 \tanh ^{-1}(\tanh (a+b x))^2} \, dx &=\frac {1}{x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))}-\frac {(2 b) \int \frac {1}{x \tanh ^{-1}(\tanh (a+b x))^2} \, dx}{-b x+\tanh ^{-1}(\tanh (a+b x))}\\ &=-\frac {2 b}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))}+\frac {1}{x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))}-\frac {(2 b) \int \frac {1}{x \tanh ^{-1}(\tanh (a+b x))} \, dx}{\left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )^2}\\ &=-\frac {2 b}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))}+\frac {1}{x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))}+\frac {(2 b) \int \frac {1}{x} \, dx}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )^2}-\frac {\left (2 b^2\right ) \int \frac {1}{\tanh ^{-1}(\tanh (a+b x))} \, dx}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )^2}\\ &=-\frac {2 b}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))}+\frac {1}{x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))}+\frac {2 b \log (x)}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3}-\frac {(2 b) \text {Subst}\left (\int \frac {1}{x} \, dx,x,\tanh ^{-1}(\tanh (a+b x))\right )}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )^2}\\ &=-\frac {2 b}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))}+\frac {1}{x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))}+\frac {2 b \log (x)}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3}-\frac {2 b \log \left (\tanh ^{-1}(\tanh (a+b x))\right )}{\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 70, normalized size = 0.69 \begin {gather*} \frac {-b^2 x^2+\tanh ^{-1}(\tanh (a+b x))^2+2 b x \tanh ^{-1}(\tanh (a+b x)) \left (\log (x)-\log \left (\tanh ^{-1}(\tanh (a+b x))\right )\right )}{x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3 \tanh ^{-1}(\tanh (a+b x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 91, normalized size = 0.89 \[-\frac {b}{\left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x \right )^{2} \arctanh \left (\tanh \left (b x +a \right )\right )}+\frac {2 b \ln \left (\arctanh \left (\tanh \left (b x +a \right )\right )\right )}{\left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x \right )^{3}}-\frac {1}{\left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x \right )^{2} x}-\frac {2 b \ln \left (x \right )}{\left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x \right )^{3}}\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.65, size = 45, normalized size = 0.44 \begin {gather*} -\frac {2 \, b x + a}{a^{2} b x^{2} + a^{3} x} + \frac {2 \, b \log \left (b x + a\right )}{a^{3}} - \frac {2 \, b \log \left (x\right )}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 63, normalized size = 0.62 \begin {gather*} -\frac {2 \, a b x + a^{2} - 2 \, {\left (b^{2} x^{2} + a b x\right )} \log \left (b x + a\right ) + 2 \, {\left (b^{2} x^{2} + a b x\right )} \log \left (x\right )}{a^{3} b x^{2} + a^{4} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{x^{2} \operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.38, size = 45, normalized size = 0.44 \begin {gather*} \frac {2 \, b \log \left ({\left | b x + a \right |}\right )}{a^{3}} - \frac {2 \, b \log \left ({\left | x \right |}\right )}{a^{3}} - \frac {2 \, b x + a}{{\left (b x^{2} + a x\right )} a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.44, size = 432, normalized size = 4.24 \begin {gather*} -\frac {4\,{\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )}^2-\ln \left (\frac {{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )\,\left (8\,\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+b\,x\,\mathrm {atan}\left (\frac {-\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )\,1{}\mathrm {i}+\ln \left (\frac {{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )\,1{}\mathrm {i}+b\,x\,2{}\mathrm {i}}{\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x}\right )\,32{}\mathrm {i}\right )+4\,{\ln \left (\frac {{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )}^2-16\,b^2\,x^2+b\,x\,\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )\,\mathrm {atan}\left (\frac {-\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )\,1{}\mathrm {i}+\ln \left (\frac {{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )\,1{}\mathrm {i}+b\,x\,2{}\mathrm {i}}{\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x}\right )\,32{}\mathrm {i}}{x\,\left (\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )\right )\,{\left (\ln \left (\frac {1}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________