Optimal. Leaf size=73 \[ x \cot ^{-1}(\tanh (a+b x))+x \text {ArcTan}\left (e^{2 a+2 b x}\right )-\frac {i \text {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}+\frac {i \text {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {5288, 4265,
2317, 2438} \begin {gather*} x \text {ArcTan}\left (e^{2 a+2 b x}\right )-\frac {i \text {Li}_2\left (-i e^{2 a+2 b x}\right )}{4 b}+\frac {i \text {Li}_2\left (i e^{2 a+2 b x}\right )}{4 b}+x \cot ^{-1}(\tanh (a+b x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4265
Rule 5288
Rubi steps
\begin {align*} \int \cot ^{-1}(\tanh (a+b x)) \, dx &=x \cot ^{-1}(\tanh (a+b x))+b \int x \text {sech}(2 a+2 b x) \, dx\\ &=x \cot ^{-1}(\tanh (a+b x))+x \tan ^{-1}\left (e^{2 a+2 b x}\right )-\frac {1}{2} i \int \log \left (1-i e^{2 a+2 b x}\right ) \, dx+\frac {1}{2} i \int \log \left (1+i e^{2 a+2 b x}\right ) \, dx\\ &=x \cot ^{-1}(\tanh (a+b x))+x \tan ^{-1}\left (e^{2 a+2 b x}\right )-\frac {i \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{2 a+2 b x}\right )}{4 b}+\frac {i \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{2 a+2 b x}\right )}{4 b}\\ &=x \cot ^{-1}(\tanh (a+b x))+x \tan ^{-1}\left (e^{2 a+2 b x}\right )-\frac {i \text {Li}_2\left (-i e^{2 a+2 b x}\right )}{4 b}+\frac {i \text {Li}_2\left (i e^{2 a+2 b x}\right )}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 132, normalized size = 1.81 \begin {gather*} x \cot ^{-1}(\tanh (a+b x))+\frac {-\left ((-4 i a+\pi -4 i b x) \left (\log \left (1-i e^{2 (a+b x)}\right )-\log \left (1+i e^{2 (a+b x)}\right )\right )\right )+(-4 i a+\pi ) \log \left (\cot \left (\frac {1}{4} (4 i a+\pi +4 i b x)\right )\right )-2 i \left (\text {PolyLog}\left (2,-i e^{2 (a+b x)}\right )-\text {PolyLog}\left (2,i e^{2 (a+b x)}\right )\right )}{8 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 183 vs. \(2 (62 ) = 124\).
time = 0.64, size = 184, normalized size = 2.52
method | result | size |
derivativedivides | \(\frac {\arctanh \left (\tanh \left (b x +a \right )\right ) \mathrm {arccot}\left (\tanh \left (b x +a \right )\right )+\arctanh \left (\tanh \left (b x +a \right )\right ) \arctan \left (\tanh \left (b x +a \right )\right )+\frac {\arctan \left (\tanh \left (b x +a \right )\right ) \ln \left (1+\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh ^{2}\left (b x +a \right )+1}\right )}{2}-\frac {\arctan \left (\tanh \left (b x +a \right )\right ) \ln \left (1-\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh ^{2}\left (b x +a \right )+1}\right )}{2}-\frac {i \dilog \left (1+\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh ^{2}\left (b x +a \right )+1}\right )}{4}+\frac {i \dilog \left (1-\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh ^{2}\left (b x +a \right )+1}\right )}{4}}{b}\) | \(184\) |
default | \(\frac {\arctanh \left (\tanh \left (b x +a \right )\right ) \mathrm {arccot}\left (\tanh \left (b x +a \right )\right )+\arctanh \left (\tanh \left (b x +a \right )\right ) \arctan \left (\tanh \left (b x +a \right )\right )+\frac {\arctan \left (\tanh \left (b x +a \right )\right ) \ln \left (1+\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh ^{2}\left (b x +a \right )+1}\right )}{2}-\frac {\arctan \left (\tanh \left (b x +a \right )\right ) \ln \left (1-\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh ^{2}\left (b x +a \right )+1}\right )}{2}-\frac {i \dilog \left (1+\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh ^{2}\left (b x +a \right )+1}\right )}{4}+\frac {i \dilog \left (1-\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh ^{2}\left (b x +a \right )+1}\right )}{4}}{b}\) | \(184\) |
risch | \(\text {Expression too large to display}\) | \(1111\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 334 vs. \(2 (56) = 112\).
time = 2.42, size = 334, normalized size = 4.58 \begin {gather*} \frac {2 \, b x \arctan \left (\frac {\cosh \left (b x + a\right )}{\sinh \left (b x + a\right )}\right ) + {\left (i \, b x + i \, a\right )} \log \left (\frac {1}{2} \, \sqrt {4 i} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) + {\left (i \, b x + i \, a\right )} \log \left (-\frac {1}{2} \, \sqrt {4 i} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) + {\left (-i \, b x - i \, a\right )} \log \left (\frac {1}{2} \, \sqrt {-4 i} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) + {\left (-i \, b x - i \, a\right )} \log \left (-\frac {1}{2} \, \sqrt {-4 i} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) - i \, a \log \left (i \, \sqrt {4 i} + 2 \, \cosh \left (b x + a\right ) + 2 \, \sinh \left (b x + a\right )\right ) - i \, a \log \left (-i \, \sqrt {4 i} + 2 \, \cosh \left (b x + a\right ) + 2 \, \sinh \left (b x + a\right )\right ) + i \, a \log \left (i \, \sqrt {-4 i} + 2 \, \cosh \left (b x + a\right ) + 2 \, \sinh \left (b x + a\right )\right ) + i \, a \log \left (-i \, \sqrt {-4 i} + 2 \, \cosh \left (b x + a\right ) + 2 \, \sinh \left (b x + a\right )\right ) + i \, {\rm Li}_2\left (\frac {1}{2} \, \sqrt {4 i} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) + i \, {\rm Li}_2\left (-\frac {1}{2} \, \sqrt {4 i} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - i \, {\rm Li}_2\left (\frac {1}{2} \, \sqrt {-4 i} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - i \, {\rm Li}_2\left (-\frac {1}{2} \, \sqrt {-4 i} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right )}{2 \, b} \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 \operatorname {acot}{\left (\tanh {\left (a + b x \right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \mathrm {acot}\left (\mathrm {tanh}\left (a+b\,x\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________