Integrand size = 7, antiderivative size = 73 \[ \int \cot ^{-1}(\tanh (a+b x)) \, dx=x \cot ^{-1}(\tanh (a+b x))+x \arctan \left (e^{2 a+2 b x}\right )-\frac {i \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}+\frac {i \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b} \]
[Out]
Time = 0.03 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {5288, 4265, 2317, 2438} \[ \int \cot ^{-1}(\tanh (a+b x)) \, dx=x \arctan \left (e^{2 a+2 b x}\right )-\frac {i \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}+\frac {i \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}+x \cot ^{-1}(\tanh (a+b x)) \]
[In]
[Out]
Rule 2317
Rule 2438
Rule 4265
Rule 5288
Rubi steps \begin{align*} \text {integral}& = 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 \arctan \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 \arctan \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 \arctan \left (e^{2 a+2 b x}\right )-\frac {i \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}+\frac {i \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b} \\ \end{align*}
Time = 0.02 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.25 \[ \int \cot ^{-1}(\tanh (a+b x)) \, dx=x \cot ^{-1}(\tanh (a+b x))+\frac {i \left (2 b x \left (\log \left (1-i e^{2 (a+b x)}\right )-\log \left (1+i e^{2 (a+b x)}\right )\right )-\operatorname {PolyLog}\left (2,-i e^{2 (a+b x)}\right )+\operatorname {PolyLog}\left (2,i e^{2 (a+b x)}\right )\right )}{4 b} \]
[In]
[Out]
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 = 1.74 (sec) , antiderivative size = 184, normalized size of antiderivative = 2.52
method | result | size |
derivativedivides | \(\frac {\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right ) \operatorname {arccot}\left (\tanh \left (b x +a \right )\right )+\arctan \left (\tanh \left (b x +a \right )\right ) \operatorname {arctanh}\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 \left (b x +a \right )^{2}+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 \left (b x +a \right )^{2}+1}\right )}{2}-\frac {i \operatorname {dilog}\left (1+\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh \left (b x +a \right )^{2}+1}\right )}{4}+\frac {i \operatorname {dilog}\left (1-\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh \left (b x +a \right )^{2}+1}\right )}{4}}{b}\) | \(184\) |
default | \(\frac {\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right ) \operatorname {arccot}\left (\tanh \left (b x +a \right )\right )+\arctan \left (\tanh \left (b x +a \right )\right ) \operatorname {arctanh}\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 \left (b x +a \right )^{2}+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 \left (b x +a \right )^{2}+1}\right )}{2}-\frac {i \operatorname {dilog}\left (1+\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh \left (b x +a \right )^{2}+1}\right )}{4}+\frac {i \operatorname {dilog}\left (1-\frac {i \left (1+i \tanh \left (b x +a \right )\right )^{2}}{\tanh \left (b x +a \right )^{2}+1}\right )}{4}}{b}\) | \(184\) |
risch | \(\text {Expression too large to display}\) | \(1111\) |
[In]
[Out]
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 = 0.30 (sec) , antiderivative size = 334, normalized size of antiderivative = 4.58 \[ \int \cot ^{-1}(\tanh (a+b x)) \, dx=\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} \]
[In]
[Out]
\[ \int \cot ^{-1}(\tanh (a+b x)) \, dx=\int \operatorname {acot}{\left (\tanh {\left (a + b x \right )} \right )}\, dx \]
[In]
[Out]
\[ \int \cot ^{-1}(\tanh (a+b x)) \, dx=\int { \operatorname {arccot}\left (\tanh \left (b x + a\right )\right ) \,d x } \]
[In]
[Out]
\[ \int \cot ^{-1}(\tanh (a+b x)) \, dx=\int { \operatorname {arccot}\left (\tanh \left (b x + a\right )\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \cot ^{-1}(\tanh (a+b x)) \, dx=\int \mathrm {acot}\left (\mathrm {tanh}\left (a+b\,x\right )\right ) \,d x \]
[In]
[Out]