Integrand size = 7, antiderivative size = 79 \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=x \coth ^{-1}(\cot (a+b x))+i x \arctan \left (e^{2 i (a+b x)}\right )-\frac {i \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 79, 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 = {6385, 4266, 2317, 2438} \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=i x \arctan \left (e^{2 i (a+b x)}\right )-\frac {i \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b}+x \coth ^{-1}(\cot (a+b x)) \]
[In]
[Out]
Rule 2317
Rule 2438
Rule 4266
Rule 6385
Rubi steps \begin{align*} \text {integral}& = x \coth ^{-1}(\cot (a+b x))-b \int x \sec (2 a+2 b x) \, dx \\ & = x \coth ^{-1}(\cot (a+b x))+i x \arctan \left (e^{2 i (a+b x)}\right )+\frac {1}{2} \int \log \left (1-i e^{i (2 a+2 b x)}\right ) \, dx-\frac {1}{2} \int \log \left (1+i e^{i (2 a+2 b x)}\right ) \, dx \\ & = x \coth ^{-1}(\cot (a+b x))+i x \arctan \left (e^{2 i (a+b x)}\right )-\frac {i \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{4 b}+\frac {i \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{4 b} \\ & = x \coth ^{-1}(\cot (a+b x))+i x \arctan \left (e^{2 i (a+b x)}\right )-\frac {i \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b} \\ \end{align*}
Time = 0.02 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.61 \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=x \coth ^{-1}(\cot (a+b x))-\frac {(-4 a+\pi -4 b x) \left (\log \left (1-i e^{-2 i (a+b x)}\right )-\log \left (1+i e^{-2 i (a+b x)}\right )\right )-(-4 a+\pi ) \log \left (\cot \left (a+\frac {\pi }{4}+b x\right )\right )+2 i \left (\operatorname {PolyLog}\left (2,-i e^{-2 i (a+b x)}\right )-\operatorname {PolyLog}\left (2,i e^{-2 i (a+b x)}\right )\right )}{8 b} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (64 ) = 128\).
Time = 1.43 (sec) , antiderivative size = 188, normalized size of antiderivative = 2.38
method | result | size |
derivativedivides | \(\frac {-\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \operatorname {arccoth}\left (\cot \left (b x +a \right )\right )-\frac {\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \ln \left (1+\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{2}+\frac {\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \ln \left (1-\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{2}+\frac {i \operatorname {dilog}\left (1+\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{4}-\frac {i \operatorname {dilog}\left (1-\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{4}}{b}\) | \(188\) |
default | \(\frac {-\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \operatorname {arccoth}\left (\cot \left (b x +a \right )\right )-\frac {\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \ln \left (1+\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{2}+\frac {\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \ln \left (1-\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{2}+\frac {i \operatorname {dilog}\left (1+\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{4}-\frac {i \operatorname {dilog}\left (1-\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{4}}{b}\) | \(188\) |
risch | \(\text {Expression too large to display}\) | \(1161\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 388 vs. \(2 (57) = 114\).
Time = 0.29 (sec) , antiderivative size = 388, normalized size of antiderivative = 4.91 \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\frac {4 \, b x \log \left (\frac {\cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right ) + 1}{\cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right ) + 1}\right ) + 2 \, a \log \left (\cos \left (2 \, b x + 2 \, a\right ) + i \, \sin \left (2 \, b x + 2 \, a\right ) + i\right ) - 2 \, a \log \left (\cos \left (2 \, b x + 2 \, a\right ) - i \, \sin \left (2 \, b x + 2 \, a\right ) + i\right ) - 2 \, {\left (b x + a\right )} \log \left (i \, \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, {\left (b x + a\right )} \log \left (i \, \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) - 2 \, {\left (b x + a\right )} \log \left (-i \, \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, {\left (b x + a\right )} \log \left (-i \, \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, a \log \left (-\cos \left (2 \, b x + 2 \, a\right ) + i \, \sin \left (2 \, b x + 2 \, a\right ) + i\right ) - 2 \, a \log \left (-\cos \left (2 \, b x + 2 \, a\right ) - i \, \sin \left (2 \, b x + 2 \, a\right ) + i\right ) + i \, {\rm Li}_2\left (i \, \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right ) + i \, {\rm Li}_2\left (i \, \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right )\right ) - i \, {\rm Li}_2\left (-i \, \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right ) - i \, {\rm Li}_2\left (-i \, \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right )\right )}{8 \, b} \]
[In]
[Out]
\[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\int \operatorname {acoth}{\left (\cot {\left (a + b x \right )} \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 184 vs. \(2 (57) = 114\).
Time = 0.33 (sec) , antiderivative size = 184, normalized size of antiderivative = 2.33 \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\frac {4 \, {\left (b x + a\right )} \operatorname {arcoth}\left (\frac {1}{\tan \left (b x + a\right )}\right ) + {\left (\arctan \left (\frac {1}{2} \, \tan \left (b x + a\right ) + \frac {1}{2}, \frac {1}{2} \, \tan \left (b x + a\right ) + \frac {1}{2}\right ) - \arctan \left (\frac {1}{2} \, \tan \left (b x + a\right ) - \frac {1}{2}, -\frac {1}{2} \, \tan \left (b x + a\right ) + \frac {1}{2}\right )\right )} \log \left (\tan \left (b x + a\right )^{2} + 1\right ) - {\left (b x + a\right )} \log \left (\frac {1}{2} \, \tan \left (b x + a\right )^{2} + \tan \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b x + a\right )} \log \left (\frac {1}{2} \, \tan \left (b x + a\right )^{2} - \tan \left (b x + a\right ) + \frac {1}{2}\right ) - i \, {\rm Li}_2\left (\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \tan \left (b x + a\right ) - \frac {1}{2} i + \frac {1}{2}\right ) + i \, {\rm Li}_2\left (-\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \tan \left (b x + a\right ) + \frac {1}{2} i + \frac {1}{2}\right ) + i \, {\rm Li}_2\left (\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \tan \left (b x + a\right ) + \frac {1}{2} i + \frac {1}{2}\right ) - i \, {\rm Li}_2\left (-\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \tan \left (b x + a\right ) - \frac {1}{2} i + \frac {1}{2}\right )}{4 \, b} \]
[In]
[Out]
\[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\int { \operatorname {arcoth}\left (\cot \left (b x + a\right )\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\int \mathrm {acoth}\left (\mathrm {cot}\left (a+b\,x\right )\right ) \,d x \]
[In]
[Out]