Integrand size = 17, antiderivative size = 94 \[ \int \coth ^{-1}(1+i d-d \tan (a+b x)) \, dx=\frac {1}{2} i b x^2+x \coth ^{-1}(1+i d-d \tan (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,-\left ((1+i d) e^{2 i a+2 i b x}\right )\right )}{4 b} \]
[Out]
Time = 0.12 (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 = {6391, 2215, 2221, 2317, 2438} \[ \int \coth ^{-1}(1+i d-d \tan (a+b x)) \, dx=\frac {i \operatorname {PolyLog}\left (2,-\left ((i d+1) e^{2 i a+2 i b x}\right )\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 (-\tan (a+b x))+i d+1)+\frac {1}{2} i b x^2 \]
[In]
[Out]
Rule 2215
Rule 2221
Rule 2317
Rule 2438
Rule 6391
Rubi steps \begin{align*} \text {integral}& = x \coth ^{-1}(1+i d-d \tan (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 \tan (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 \tan (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 \tan (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 \tan (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,-\left ((1+i d) e^{2 i a+2 i b x}\right )\right )}{4 b} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(723\) vs. \(2(94)=188\).
Time = 1.67 (sec) , antiderivative size = 723, normalized size of antiderivative = 7.69 \[ \int \coth ^{-1}(1+i d-d \tan (a+b x)) \, dx=x \coth ^{-1}(1+i d-d \tan (a+b x))-\frac {x \left (-2 i b x \log (2 \cos (b x) (\cos (b x)-i \sin (b x)))+\log \left (\frac {\sec (b x) (\cos (a)-i \sin (a)) ((-2 i+d) \cos (a+b x)+i d \sin (a+b x))}{2 (-i+d)}\right ) \log (1-i \tan (b x))-\log \left (\frac {\sec (b x) ((2+i d) \cos (a+b x)-d \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \log (1+i \tan (b x))+\operatorname {PolyLog}(2,-\cos (2 b x)+i \sin (2 b x))+\operatorname {PolyLog}\left (2,\frac {\sec (b x) (d \cos (a)+(2+i d) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 (-i+d)}\right )-\operatorname {PolyLog}\left (2,\frac {1}{2} (\cos (a)+i \sin (a)) (d \cos (a)+(2+i d) \sin (a)) (-i+\tan (b x))\right )\right ) \sec (a+b x) (\cos (b x)+i \sin (b x)) (i \cos (b x)+\sin (b x))}{((-2 i+d) \cos (a+b x)+i d \sin (a+b x)) \left (\frac {i \log (1-i \tan (b x)) \sec (b x) (d \cos (a)+(2+i d) \sin (a))}{(-2 i+d) \cos (a+b x)+i d \sin (a+b x)}+\frac {\log (1+i \tan (b x)) \sec (b x) (-i d \cos (a)+(-2 i+d) \sin (a))}{(-2 i+d) \cos (a+b x)+i d \sin (a+b x)}-\frac {\log \left (\frac {\sec (b x) ((2+i d) \cos (a+b x)-d \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \sec ^2(b x)}{-i+\tan (b x)}+\frac {\log \left (1-\frac {1}{2} (\cos (a)+i \sin (a)) (d \cos (a)+(2+i d) \sin (a)) (-i+\tan (b x))\right ) \sec ^2(b x)}{-i+\tan (b x)}-\log \left (1-\frac {\sec (b x) (d \cos (a)+(2+i d) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 (-i+d)}\right ) (-i+\tan (b x))+\frac {\log \left (\frac {\sec (b x) (\cos (a)-i \sin (a)) ((-2 i+d) \cos (a+b x)+i d \sin (a+b x))}{2 (-i+d)}\right ) \sec ^2(b x)}{i+\tan (b x)}+2 i b x (i+\tan (b x))\right ) (-i+\tan (a+b x))} \]
[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.50 (sec) , antiderivative size = 320, normalized size of antiderivative = 3.40
method | result | size |
derivativedivides | \(-\frac {\frac {i \operatorname {arccoth}\left (1+i d -d \tan \left (b x +a \right )\right ) d \ln \left (i d -d \tan \left (b x +a \right )\right )}{2}-\frac {i \operatorname {arccoth}\left (1+i d -d \tan \left (b x +a \right )\right ) d \ln \left (-i d -d \tan \left (b x +a \right )\right )}{2}-\frac {d^{2} \left (-\frac {i \left (\frac {\ln \left (i d -d \tan \left (b x +a \right )\right )^{2}}{4}-\frac {\operatorname {dilog}\left (1+\frac {i d}{2}-\frac {d \tan \left (b x +a \right )}{2}\right )}{2}-\frac {\ln \left (i d -d \tan \left (b x +a \right )\right ) \ln \left (1+\frac {i d}{2}-\frac {d \tan \left (b x +a \right )}{2}\right )}{2}\right )}{d}+\frac {i \left (\frac {\operatorname {dilog}\left (-\frac {i \left (i d -d \tan \left (b x +a \right )\right )}{2 d}\right )}{2}+\frac {\ln \left (-i d -d \tan \left (b x +a \right )\right ) \ln \left (-\frac {i \left (i d -d \tan \left (b x +a \right )\right )}{2 d}\right )}{2}-\frac {\operatorname {dilog}\left (\frac {i \left (-i d -d \tan \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 \tan \left (b x +a \right )\right ) \ln \left (\frac {i \left (-i d -d \tan \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}\) | \(320\) |
default | \(-\frac {\frac {i \operatorname {arccoth}\left (1+i d -d \tan \left (b x +a \right )\right ) d \ln \left (i d -d \tan \left (b x +a \right )\right )}{2}-\frac {i \operatorname {arccoth}\left (1+i d -d \tan \left (b x +a \right )\right ) d \ln \left (-i d -d \tan \left (b x +a \right )\right )}{2}-\frac {d^{2} \left (-\frac {i \left (\frac {\ln \left (i d -d \tan \left (b x +a \right )\right )^{2}}{4}-\frac {\operatorname {dilog}\left (1+\frac {i d}{2}-\frac {d \tan \left (b x +a \right )}{2}\right )}{2}-\frac {\ln \left (i d -d \tan \left (b x +a \right )\right ) \ln \left (1+\frac {i d}{2}-\frac {d \tan \left (b x +a \right )}{2}\right )}{2}\right )}{d}+\frac {i \left (\frac {\operatorname {dilog}\left (-\frac {i \left (i d -d \tan \left (b x +a \right )\right )}{2 d}\right )}{2}+\frac {\ln \left (-i d -d \tan \left (b x +a \right )\right ) \ln \left (-\frac {i \left (i d -d \tan \left (b x +a \right )\right )}{2 d}\right )}{2}-\frac {\operatorname {dilog}\left (\frac {i \left (-i d -d \tan \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 \tan \left (b x +a \right )\right ) \ln \left (\frac {i \left (-i d -d \tan \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}\) | \(320\) |
risch | \(\text {Expression too large to display}\) | \(1650\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (66) = 132\).
Time = 0.26 (sec) , antiderivative size = 218, normalized size of antiderivative = 2.32 \[ \int \coth ^{-1}(1+i d-d \tan (a+b x)) \, dx=\frac {i \, b^{2} x^{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 ) - i \, a^{2} - {\left (b x + a\right )} \log \left (\frac {1}{2} \, \sqrt {-4 i \, d - 4} e^{\left (i \, b x + i \, a\right )} + 1\right ) - {\left (b x + a\right )} \log \left (-\frac {1}{2} \, \sqrt {-4 i \, d - 4} e^{\left (i \, b x + i \, a\right )} + 1\right ) + a \log \left (\frac {2 \, {\left (d - i\right )} e^{\left (i \, b x + i \, a\right )} + i \, \sqrt {-4 i \, d - 4}}{2 \, {\left (d - i\right )}}\right ) + a \log \left (\frac {2 \, {\left (d - i\right )} e^{\left (i \, b x + i \, a\right )} - i \, \sqrt {-4 i \, d - 4}}{2 \, {\left (d - i\right )}}\right ) + i \, {\rm Li}_2\left (\frac {1}{2} \, \sqrt {-4 i \, d - 4} e^{\left (i \, b x + i \, a\right )}\right ) + i \, {\rm Li}_2\left (-\frac {1}{2} \, \sqrt {-4 i \, d - 4} e^{\left (i \, b x + i \, a\right )}\right )}{2 \, b} \]
[In]
[Out]
\[ \int \coth ^{-1}(1+i d-d \tan (a+b x)) \, dx=\int \operatorname {acoth}{\left (- d \tan {\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. 260 vs. \(2 (66) = 132\).
Time = 0.28 (sec) , antiderivative size = 260, normalized size of antiderivative = 2.77 \[ \int \coth ^{-1}(1+i d-d \tan (a+b x)) \, dx=-\frac {4 \, {\left (b x + a\right )} d {\left (\frac {\log \left (d \tan \left (b x + a\right ) - i \, d - 2\right )}{d} - \frac {\log \left (\tan \left (b x + a\right ) - i\right )}{d}\right )} + d {\left (-\frac {2 i \, {\left (\log \left (d \tan \left (b x + a\right ) - i \, d - 2\right ) \log \left (-\frac {i \, d \tan \left (b x + a\right ) + d - 2 i}{2 \, {\left (d - i\right )}} + 1\right ) + {\rm Li}_2\left (\frac {i \, d \tan \left (b x + a\right ) + d - 2 i}{2 \, {\left (d - i\right )}}\right )\right )}}{d} + \frac {2 i \, \log \left (d \tan \left (b x + a\right ) - i \, d - 2\right ) \log \left (\tan \left (b x + a\right ) - i\right ) - i \, \log \left (\tan \left (b x + a\right ) - i\right )^{2}}{d} - \frac {2 i \, {\left (\log \left (-\frac {1}{2} \, d \tan \left (b x + a\right ) + \frac {1}{2} i \, d + 1\right ) \log \left (\tan \left (b x + a\right ) - i\right ) + {\rm Li}_2\left (\frac {1}{2} \, d \tan \left (b x + a\right ) - \frac {1}{2} i \, d\right )\right )}}{d} + \frac {2 i \, {\left (\log \left (\tan \left (b x + a\right ) - i\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 (d \tan \left (b x + a\right ) - i \, d - 1\right )}{8 \, b} \]
[In]
[Out]
\[ \int \coth ^{-1}(1+i d-d \tan (a+b x)) \, dx=\int { \operatorname {arcoth}\left (-d \tan \left (b x + a\right ) + i \, d + 1\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \coth ^{-1}(1+i d-d \tan (a+b x)) \, dx=\int \mathrm {acoth}\left (1-d\,\mathrm {tan}\left (a+b\,x\right )+d\,1{}\mathrm {i}\right ) \,d x \]
[In]
[Out]