Integrand size = 16, antiderivative size = 93 \[ \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.12 (sec) , antiderivative size = 93, 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.312, 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,(i d+1) 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. \(709\) vs. \(2(93)=186\).
Time = 2.15 (sec) , antiderivative size = 709, normalized size of antiderivative = 7.62 \[ \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)+(2+i d) \sin (a+b x))}{2 (-i+d)}\right ) \log (1-i \tan (b x))-i \log \left (\frac {1}{2} \sec (b x) (-i \cos (a)+\sin (a)) (d \cos (a+b x)+(2+i d) \sin (a+b x))\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 (2 i b x+\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 )-\log \left (\frac {1}{2} \sec (b x) (-i \cos (a)+\sin (a)) (d \cos (a+b x)+(2+i d) \sin (a+b x))\right )+\frac {(-2 i+d) \cos (a+b x) (\log (1-i \tan (b x))-\log (1+i \tan (b x)))}{d \cos (a+b x)+(2+i d) \sin (a+b x)}+\frac {d (\log (1-i \tan (b x))-\log (1+i \tan (b x))) \sin (a+b x)}{-i d \cos (a+b x)+(-2 i+d) \sin (a+b x)}+2 b x \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 ) \tan (b x)+i \log \left (\frac {1}{2} \sec (b x) (-i \cos (a)+\sin (a)) (d \cos (a+b x)+(2+i d) \sin (a+b x))\right ) \tan (b x)-i \log (1-i \tan (b x)) \tan (b x)+i \log (1+i \tan (b x)) \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. 306 vs. \(2 (76 ) = 152\).
Time = 2.55 (sec) , antiderivative size = 307, normalized size of antiderivative = 3.30
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 )\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}-\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}\right )}{d}\right )}{2}}{b d}\) | \(307\) |
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 )\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}-\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}\right )}{d}\right )}{2}}{b d}\) | \(307\) |
risch | \(\text {Expression too large to display}\) | \(1650\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.30 \[ \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 {{\left ({\left (d - i\right )} e^{\left (2 i \, b x + 2 i \, a\right )} + i\right )} e^{\left (-2 i \, b x - 2 i \, a\right )}}{d}\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. 286 vs. \(2 (66) = 132\).
Time = 0.28 (sec) , antiderivative size = 286, normalized size of antiderivative = 3.08 \[ \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]