Optimal. Leaf size=74 \[ x \cot ^{-1}(\coth (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.04, antiderivative size = 74, 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 = {5290, 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}(\coth (a+b x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4265
Rule 5290
Rubi steps
\begin {align*} \int \cot ^{-1}(\coth (a+b x)) \, dx &=x \cot ^{-1}(\coth (a+b x))-b \int x \text {sech}(2 a+2 b x) \, dx\\ &=x \cot ^{-1}(\coth (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}(\coth (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}(\coth (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.78 \begin {gather*} x \cot ^{-1}(\coth (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 (63 ) = 126\).
time = 0.68, size = 184, normalized size = 2.49
method | result | size |
derivativedivides | \(\frac {\arctanh \left (\coth \left (b x +a \right )\right ) \mathrm {arccot}\left (\coth \left (b x +a \right )\right )+\arctan \left (\coth \left (b x +a \right )\right ) \arctanh \left (\coth \left (b x +a \right )\right )+\frac {\arctan \left (\coth \left (b x +a \right )\right ) \ln \left (1+\frac {i \left (1+i \coth \left (b x +a \right )\right )^{2}}{\coth ^{2}\left (b x +a \right )+1}\right )}{2}-\frac {\arctan \left (\coth \left (b x +a \right )\right ) \ln \left (1-\frac {i \left (1+i \coth \left (b x +a \right )\right )^{2}}{\coth ^{2}\left (b x +a \right )+1}\right )}{2}-\frac {i \dilog \left (1+\frac {i \left (1+i \coth \left (b x +a \right )\right )^{2}}{\coth ^{2}\left (b x +a \right )+1}\right )}{4}+\frac {i \dilog \left (1-\frac {i \left (1+i \coth \left (b x +a \right )\right )^{2}}{\coth ^{2}\left (b x +a \right )+1}\right )}{4}}{b}\) | \(184\) |
default | \(\frac {\arctanh \left (\coth \left (b x +a \right )\right ) \mathrm {arccot}\left (\coth \left (b x +a \right )\right )+\arctan \left (\coth \left (b x +a \right )\right ) \arctanh \left (\coth \left (b x +a \right )\right )+\frac {\arctan \left (\coth \left (b x +a \right )\right ) \ln \left (1+\frac {i \left (1+i \coth \left (b x +a \right )\right )^{2}}{\coth ^{2}\left (b x +a \right )+1}\right )}{2}-\frac {\arctan \left (\coth \left (b x +a \right )\right ) \ln \left (1-\frac {i \left (1+i \coth \left (b x +a \right )\right )^{2}}{\coth ^{2}\left (b x +a \right )+1}\right )}{2}-\frac {i \dilog \left (1+\frac {i \left (1+i \coth \left (b x +a \right )\right )^{2}}{\coth ^{2}\left (b x +a \right )+1}\right )}{4}+\frac {i \dilog \left (1-\frac {i \left (1+i \coth \left (b x +a \right )\right )^{2}}{\coth ^{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 (57) = 114\).
time = 2.32, size = 334, normalized size = 4.51 \begin {gather*} \frac {2 \, b x \arctan \left (\frac {\sinh \left (b x + a\right )}{\cosh \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 (\coth {\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 {coth}\left (a+b\,x\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________