Integrand size = 17, antiderivative size = 94 \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\frac {1}{2} i b x^2+x \coth ^{-1}(1-i d-d \cot (a+b x))-\frac {1}{2} x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )+\frac {i \operatorname {PolyLog}\left (2,(1-i d) e^{2 i a+2 i b x}\right )}{4 b} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {6393, 2215, 2221, 2317, 2438} \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\frac {i \operatorname {PolyLog}\left (2,(1-i d) e^{2 i a+2 i b x}\right )}{4 b}-\frac {1}{2} x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )+x \coth ^{-1}(d (-\cot (a+b x))-i d+1)+\frac {1}{2} i b x^2 \]
[In]
[Out]
Rule 2215
Rule 2221
Rule 2317
Rule 2438
Rule 6393
Rubi steps \begin{align*} \text {integral}& = x \coth ^{-1}(1-i d-d \cot (a+b x))+(i b) \int \frac {x}{1+(-1+i d) e^{2 i a+2 i b x}} \, dx \\ & = \frac {1}{2} i b x^2+x \coth ^{-1}(1-i d-d \cot (a+b x))+(b (i+d)) \int \frac {e^{2 i a+2 i b x} x}{1+(-1+i d) e^{2 i a+2 i b x}} \, dx \\ & = \frac {1}{2} i b x^2+x \coth ^{-1}(1-i d-d \cot (a+b x))-\frac {1}{2} x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )+\frac {1}{2} \int \log \left (1+(-1+i d) e^{2 i a+2 i b x}\right ) \, dx \\ & = \frac {1}{2} i b x^2+x \coth ^{-1}(1-i d-d \cot (a+b x))-\frac {1}{2} x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )-\frac {i \text {Subst}\left (\int \frac {\log (1+(-1+i d) x)}{x} \, dx,x,e^{2 i a+2 i b x}\right )}{4 b} \\ & = \frac {1}{2} i b x^2+x \coth ^{-1}(1-i d-d \cot (a+b x))-\frac {1}{2} x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )+\frac {i \operatorname {PolyLog}\left (2,(1-i d) e^{2 i a+2 i b x}\right )}{4 b} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(605\) vs. \(2(94)=188\).
Time = 1.84 (sec) , antiderivative size = 605, normalized size of antiderivative = 6.44 \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=x \coth ^{-1}(1-i d-d \cot (a+b x))+\frac {x \csc ^2(a+b x) \left (2 b x \log (2 \cos (b x) (\cos (b x)-i \sin (b x)))+i \log \left (\frac {\sec (b x) (\cos (a)-i \sin (a)) (d \cos (a+b x)+i (2 i+d) \sin (a+b x))}{2 (i+d)}\right ) \log (1-i \tan (b x))-i \log \left (\frac {i \sec (b x) (d \cos (a+b x)+i (2 i+d) \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \log (1+i \tan (b x))+i \operatorname {PolyLog}(2,-\cos (2 b x)+i \sin (2 b x))-i \operatorname {PolyLog}\left (2,\frac {1}{2} \sec (b x) ((2-i d) \cos (a)+d \sin (a)) (\cos (a+b x)+i \sin (a+b x))\right )+i \operatorname {PolyLog}\left (2,\frac {(\cos (a)-i \sin (a)) ((2-i d) \cos (a)+d \sin (a)) (i+\tan (b x))}{2 (i+d)}\right )\right ) (\cos (b x)-i \sin (b x)) (\cos (b x)+i \sin (b x))}{(i+\cot (a+b x)) (-2+i d+d \cot (a+b x)) \left (-\frac {\log (1-i \tan (b x)) \sec (b x) ((2 i+d) \cos (a)+i d \sin (a))}{d \cos (a+b x)+i (2 i+d) \sin (a+b x)}+\frac {\log (1+i \tan (b x)) \sec (b x) ((2 i+d) \cos (a)+i d \sin (a))}{d \cos (a+b x)+i (2 i+d) \sin (a+b x)}+\frac {\log \left (\frac {i \sec (b x) (d \cos (a+b x)+i (2 i+d) \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \sec ^2(b x)}{1+i \tan (b x)}-2 b x (i+\tan (b x))+i \log \left (1-\frac {1}{2} \sec (b x) ((2-i d) \cos (a)+d \sin (a)) (\cos (a+b x)+i \sin (a+b x))\right ) (i+\tan (b x))\right )} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 319 vs. \(2 (77 ) = 154\).
Time = 2.38 (sec) , antiderivative size = 320, normalized size of antiderivative = 3.40
method | result | size |
derivativedivides | \(-\frac {-\frac {i \operatorname {arccoth}\left (1-i d -d \cot \left (b x +a \right )\right ) d \ln \left (i d -d \cot \left (b x +a \right )\right )}{2}+\frac {i \operatorname {arccoth}\left (1-i d -d \cot \left (b x +a \right )\right ) d \ln \left (-i d -d \cot \left (b x +a \right )\right )}{2}-\frac {d^{2} \left (-\frac {i \left (-\frac {\operatorname {dilog}\left (1-\frac {i d}{2}-\frac {d \cot \left (b x +a \right )}{2}\right )}{2}-\frac {\ln \left (-i d -d \cot \left (b x +a \right )\right ) \ln \left (1-\frac {i d}{2}-\frac {d \cot \left (b x +a \right )}{2}\right )}{2}+\frac {\ln \left (-i d -d \cot \left (b x +a \right )\right )^{2}}{4}\right )}{d}+\frac {i \left (-\frac {\operatorname {dilog}\left (\frac {i \left (i d -d \cot \left (b x +a \right )-i \left (2 i+2 d \right )\right )}{2 i+2 d}\right )}{2}-\frac {\ln \left (i d -d \cot \left (b x +a \right )\right ) \ln \left (\frac {i \left (i d -d \cot \left (b x +a \right )-i \left (2 i+2 d \right )\right )}{2 i+2 d}\right )}{2}+\frac {\operatorname {dilog}\left (\frac {i \left (-i d -d \cot \left (b x +a \right )\right )}{2 d}\right )}{2}+\frac {\ln \left (i d -d \cot \left (b x +a \right )\right ) \ln \left (\frac {i \left (-i d -d \cot \left (b x +a \right )\right )}{2 d}\right )}{2}\right )}{d}\right )}{2}}{b d}\) | \(320\) |
default | \(-\frac {-\frac {i \operatorname {arccoth}\left (1-i d -d \cot \left (b x +a \right )\right ) d \ln \left (i d -d \cot \left (b x +a \right )\right )}{2}+\frac {i \operatorname {arccoth}\left (1-i d -d \cot \left (b x +a \right )\right ) d \ln \left (-i d -d \cot \left (b x +a \right )\right )}{2}-\frac {d^{2} \left (-\frac {i \left (-\frac {\operatorname {dilog}\left (1-\frac {i d}{2}-\frac {d \cot \left (b x +a \right )}{2}\right )}{2}-\frac {\ln \left (-i d -d \cot \left (b x +a \right )\right ) \ln \left (1-\frac {i d}{2}-\frac {d \cot \left (b x +a \right )}{2}\right )}{2}+\frac {\ln \left (-i d -d \cot \left (b x +a \right )\right )^{2}}{4}\right )}{d}+\frac {i \left (-\frac {\operatorname {dilog}\left (\frac {i \left (i d -d \cot \left (b x +a \right )-i \left (2 i+2 d \right )\right )}{2 i+2 d}\right )}{2}-\frac {\ln \left (i d -d \cot \left (b x +a \right )\right ) \ln \left (\frac {i \left (i d -d \cot \left (b x +a \right )-i \left (2 i+2 d \right )\right )}{2 i+2 d}\right )}{2}+\frac {\operatorname {dilog}\left (\frac {i \left (-i d -d \cot \left (b x +a \right )\right )}{2 d}\right )}{2}+\frac {\ln \left (i d -d \cot \left (b x +a \right )\right ) \ln \left (\frac {i \left (-i d -d \cot \left (b x +a \right )\right )}{2 d}\right )}{2}\right )}{d}\right )}{2}}{b d}\) | \(320\) |
risch | \(\text {Expression too large to display}\) | \(1618\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.29 \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\frac {2 i \, b^{2} x^{2} - 2 \, b x \log \left (\frac {d e^{\left (2 i \, b x + 2 i \, a\right )}}{{\left (d + i\right )} e^{\left (2 i \, b x + 2 i \, a\right )} - i}\right ) - 2 i \, a^{2} - 2 \, {\left (b x + a\right )} \log \left ({\left (i \, d - 1\right )} e^{\left (2 i \, b x + 2 i \, a\right )} + 1\right ) + 2 \, a \log \left (\frac {{\left (d + i\right )} e^{\left (2 i \, b x + 2 i \, a\right )} - i}{d + i}\right ) + i \, {\rm Li}_2\left (-{\left (i \, d - 1\right )} e^{\left (2 i \, b x + 2 i \, a\right )}\right )}{4 \, b} \]
[In]
[Out]
\[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=- \int \operatorname {acoth}{\left (d \cot {\left (a + b x \right )} + i d - 1 \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 288 vs. \(2 (67) = 134\).
Time = 0.31 (sec) , antiderivative size = 288, normalized size of antiderivative = 3.06 \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=-\frac {4 \, {\left (b x + a\right )} d {\left (\frac {\log \left ({\left (i \, d - 2\right )} \tan \left (b x + a\right ) + d\right )}{d} - \frac {\log \left (i \, \tan \left (b x + a\right ) + 1\right )}{d}\right )} - d {\left (\frac {2 i \, {\left (\log \left ({\left (i \, d - 2\right )} \tan \left (b x + a\right ) + d\right ) \log \left (\frac {{\left (d + 2 i\right )} \tan \left (b x + a\right ) - i \, d}{2 i \, d - 2} + 1\right ) + {\rm Li}_2\left (-\frac {{\left (d + 2 i\right )} \tan \left (b x + a\right ) - i \, d}{2 i \, d - 2}\right )\right )}}{d} + \frac {2 i \, {\left (\log \left (-\frac {1}{2} \, {\left (d + 2 i\right )} \tan \left (b x + a\right ) + \frac {1}{2} i \, d\right ) \log \left (i \, \tan \left (b x + a\right ) + 1\right ) + {\rm Li}_2\left (\frac {1}{2} \, {\left (d + 2 i\right )} \tan \left (b x + a\right ) - \frac {1}{2} i \, d + 1\right )\right )}}{d} - \frac {2 i \, \log \left ({\left (i \, d - 2\right )} \tan \left (b x + a\right ) + d\right ) \log \left (i \, \tan \left (b x + a\right ) + 1\right ) - i \, \log \left (i \, \tan \left (b x + a\right ) + 1\right )^{2}}{d} - \frac {2 i \, {\left (\log \left (i \, \tan \left (b x + a\right ) + 1\right ) \log \left (-\frac {1}{2} i \, \tan \left (b x + a\right ) + \frac {1}{2}\right ) + {\rm Li}_2\left (\frac {1}{2} i \, \tan \left (b x + a\right ) + \frac {1}{2}\right )\right )}}{d}\right )} + 8 \, {\left (b x + a\right )} \operatorname {arcoth}\left (i \, d + \frac {d}{\tan \left (b x + a\right )} - 1\right )}{8 \, b} \]
[In]
[Out]
\[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\int { \operatorname {arcoth}\left (-d \cot \left (b x + a\right ) - i \, d + 1\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\int -\mathrm {acoth}\left (d\,\mathrm {cot}\left (a+b\,x\right )-1+d\,1{}\mathrm {i}\right ) \,d x \]
[In]
[Out]