Integrand size = 18, antiderivative size = 86 \[ \int \cot ^{-1}(c-(1-i c) \tan (a+b x)) \, dx=-\frac {b x^2}{2}+x \cot ^{-1}(c-(1-i c) \tan (a+b x))-\frac {1}{2} i x \log \left (1+i c e^{2 i a+2 i b x}\right )-\frac {\operatorname {PolyLog}\left (2,-i c e^{2 i a+2 i b x}\right )}{4 b} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 86, 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.278, Rules used = {5272, 2215, 2221, 2317, 2438} \[ \int \cot ^{-1}(c-(1-i c) \tan (a+b x)) \, dx=-\frac {\operatorname {PolyLog}\left (2,-i c e^{2 i a+2 i b x}\right )}{4 b}-\frac {1}{2} i x \log \left (1+i c e^{2 i a+2 i b x}\right )+x \cot ^{-1}(c-(1-i c) \tan (a+b x))-\frac {b x^2}{2} \]
[In]
[Out]
Rule 2215
Rule 2221
Rule 2317
Rule 2438
Rule 5272
Rubi steps \begin{align*} \text {integral}& = x \cot ^{-1}(c-(1-i c) \tan (a+b x))+(i b) \int \frac {x}{i (-1+i c)+c+c e^{2 i a+2 i b x}} \, dx \\ & = -\frac {b x^2}{2}+x \cot ^{-1}(c-(1-i c) \tan (a+b x))+(b c) \int \frac {e^{2 i a+2 i b x} x}{i (-1+i c)+c+c e^{2 i a+2 i b x}} \, dx \\ & = -\frac {b x^2}{2}+x \cot ^{-1}(c-(1-i c) \tan (a+b x))-\frac {1}{2} i x \log \left (1+i c e^{2 i a+2 i b x}\right )+\frac {1}{2} i \int \log \left (1+\frac {c e^{2 i a+2 i b x}}{i (-1+i c)+c}\right ) \, dx \\ & = -\frac {b x^2}{2}+x \cot ^{-1}(c-(1-i c) \tan (a+b x))-\frac {1}{2} i x \log \left (1+i c e^{2 i a+2 i b x}\right )+\frac {\text {Subst}\left (\int \frac {\log \left (1+\frac {c x}{i (-1+i c)+c}\right )}{x} \, dx,x,e^{2 i a+2 i b x}\right )}{4 b} \\ & = -\frac {b x^2}{2}+x \cot ^{-1}(c-(1-i c) \tan (a+b x))-\frac {1}{2} i x \log \left (1+i c e^{2 i a+2 i b x}\right )-\frac {\operatorname {PolyLog}\left (2,-i c 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. \(847\) vs. \(2(86)=172\).
Time = 2.35 (sec) , antiderivative size = 847, normalized size of antiderivative = 9.85 \[ \int \cot ^{-1}(c-(1-i c) \tan (a+b x)) \, dx=x \cot ^{-1}(c+i (i+c) \tan (a+b x))-\frac {i 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)) ((-i+c) \cos (a+b x)+i (i+c) \sin (a+b x))}{2 c}\right ) \log (1-i \tan (b x))-\log \left (\frac {1}{2} \sec (b x) (\cos (a)+i \sin (a)) ((1+i c) \cos (a+b x)-(i+c) \sin (a+b x))\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) ((i+c) \cos (a)+(1+i c) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right )-\operatorname {PolyLog}\left (2,\frac {1}{2} (\cos (a)+i \sin (a)) ((i+c) \cos (a)+(1+i c) \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))}{((-i+c) \cos (a+b x)+i (i+c) \sin (a+b x)) \left (-2 b x+i \log \left (1-\frac {\sec (b x) ((i+c) \cos (a)+(1+i c) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right )+\frac {i (i+c) \cos (a+b x) (\log (1-i \tan (b x))-\log (1+i \tan (b x)))}{(-i+c) \cos (a+b x)+i (i+c) \sin (a+b x)}+\frac {(1+i c) (\log (1-i \tan (b x))-\log (1+i \tan (b x))) \sin (a+b x)}{(-1-i c) \cos (a+b x)+(i+c) \sin (a+b x)}+2 i b x \tan (b x)-\log \left (1-\frac {\sec (b x) ((i+c) \cos (a)+(1+i c) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right ) \tan (b x)+\log (1-i \tan (b x)) \tan (b x)-\log (1+i \tan (b x)) \tan (b x)-\frac {\log \left (\frac {1}{2} \sec (b x) (\cos (a)+i \sin (a)) ((1+i c) \cos (a+b x)-(i+c) \sin (a+b x))\right ) \sec ^2(b x)}{-i+\tan (b x)}+\frac {\log \left (1-\frac {1}{2} (\cos (a)+i \sin (a)) ((i+c) \cos (a)+(1+i c) \sin (a)) (-i+\tan (b x))\right ) \sec ^2(b x)}{-i+\tan (b x)}+\frac {\log \left (\frac {\sec (b x) (\cos (a)-i \sin (a)) ((-i+c) \cos (a+b x)+i (i+c) \sin (a+b x))}{2 c}\right ) \sec ^2(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. 594 vs. \(2 (70 ) = 140\).
Time = 2.14 (sec) , antiderivative size = 595, normalized size of antiderivative = 6.92
method | result | size |
derivativedivides | \(\frac {\frac {\operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) c^{2}}{2 i+2 c}+\frac {2 i \operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) c}{2 i+2 c}-\frac {\operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )}{2 i+2 c}-\frac {\operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right ) c^{2}}{2 i+2 c}-\frac {2 i \operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right ) c}{2 i+2 c}+\frac {\operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right )}{2 i+2 c}-\left (i c -1\right )^{2} \left (\frac {\frac {i \ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )^{2}}{4}-\frac {i \left (\left (\ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )-\ln \left (-\frac {i \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )}{2}\right )\right ) \ln \left (-\frac {i \left (i-c -\left (i c -1\right ) \tan \left (b x +a \right )\right )}{2}\right )-\operatorname {dilog}\left (-\frac {i \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )}{2}\right )\right )}{2}}{2 i+2 c}-\frac {\frac {i \left (\operatorname {dilog}\left (\frac {-i-c -\left (i c -1\right ) \tan \left (b x +a \right )}{-2 i-2 c}\right )+\ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right ) \ln \left (\frac {-i-c -\left (i c -1\right ) \tan \left (b x +a \right )}{-2 i-2 c}\right )\right )}{2}-\frac {i \left (\operatorname {dilog}\left (-\frac {i-c -\left (i c -1\right ) \tan \left (b x +a \right )}{2 c}\right )+\ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right ) \ln \left (-\frac {i-c -\left (i c -1\right ) \tan \left (b x +a \right )}{2 c}\right )\right )}{2}}{2 \left (i+c \right )}\right )}{b \left (i c -1\right )}\) | \(595\) |
default | \(\frac {\frac {\operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) c^{2}}{2 i+2 c}+\frac {2 i \operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) c}{2 i+2 c}-\frac {\operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )}{2 i+2 c}-\frac {\operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right ) c^{2}}{2 i+2 c}-\frac {2 i \operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right ) c}{2 i+2 c}+\frac {\operatorname {arccot}\left (c +\left (i c -1\right ) \tan \left (b x +a \right )\right ) \ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right )}{2 i+2 c}-\left (i c -1\right )^{2} \left (\frac {\frac {i \ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )^{2}}{4}-\frac {i \left (\left (\ln \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )-\ln \left (-\frac {i \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )}{2}\right )\right ) \ln \left (-\frac {i \left (i-c -\left (i c -1\right ) \tan \left (b x +a \right )\right )}{2}\right )-\operatorname {dilog}\left (-\frac {i \left (i+c +\left (i c -1\right ) \tan \left (b x +a \right )\right )}{2}\right )\right )}{2}}{2 i+2 c}-\frac {\frac {i \left (\operatorname {dilog}\left (\frac {-i-c -\left (i c -1\right ) \tan \left (b x +a \right )}{-2 i-2 c}\right )+\ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right ) \ln \left (\frac {-i-c -\left (i c -1\right ) \tan \left (b x +a \right )}{-2 i-2 c}\right )\right )}{2}-\frac {i \left (\operatorname {dilog}\left (-\frac {i-c -\left (i c -1\right ) \tan \left (b x +a \right )}{2 c}\right )+\ln \left (c -\left (i c -1\right ) \tan \left (b x +a \right )+i\right ) \ln \left (-\frac {i-c -\left (i c -1\right ) \tan \left (b x +a \right )}{2 c}\right )\right )}{2}}{2 \left (i+c \right )}\right )}{b \left (i c -1\right )}\) | \(595\) |
risch | \(\text {Expression too large to display}\) | \(1244\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (61) = 122\).
Time = 0.26 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.34 \[ \int \cot ^{-1}(c-(1-i c) \tan (a+b x)) \, dx=-\frac {b^{2} x^{2} + i \, b x \log \left (\frac {{\left (c + i\right )} e^{\left (2 i \, b x + 2 i \, a\right )}}{c e^{\left (2 i \, b x + 2 i \, a\right )} - i}\right ) - a^{2} - {\left (-i \, b x - i \, a\right )} \log \left (\frac {1}{2} \, \sqrt {-4 i \, c} e^{\left (i \, b x + i \, a\right )} + 1\right ) - {\left (-i \, b x - i \, a\right )} \log \left (-\frac {1}{2} \, \sqrt {-4 i \, c} e^{\left (i \, b x + i \, a\right )} + 1\right ) - i \, a \log \left (\frac {2 \, c e^{\left (i \, b x + i \, a\right )} + i \, \sqrt {-4 i \, c}}{2 \, c}\right ) - i \, a \log \left (\frac {2 \, c e^{\left (i \, b x + i \, a\right )} - i \, \sqrt {-4 i \, c}}{2 \, c}\right ) + {\rm Li}_2\left (\frac {1}{2} \, \sqrt {-4 i \, c} e^{\left (i \, b x + i \, a\right )}\right ) + {\rm Li}_2\left (-\frac {1}{2} \, \sqrt {-4 i \, c} e^{\left (i \, b x + i \, a\right )}\right )}{2 \, b} \]
[In]
[Out]
Exception generated. \[ \int \cot ^{-1}(c-(1-i c) \tan (a+b x)) \, dx=\text {Exception raised: CoercionFailed} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 450 vs. \(2 (61) = 122\).
Time = 0.29 (sec) , antiderivative size = 450, normalized size of antiderivative = 5.23 \[ \int \cot ^{-1}(c-(1-i c) \tan (a+b x)) \, dx=\frac {{\left (i \, c - 1\right )} {\left (\frac {4 i \, {\left (b x + a\right )} \log \left (-\frac {2 \, {\left (-i \, c^{2} + {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) - i\right )}}{2 i \, c^{2} - 2 \, {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) - 4 \, c - 2 i}\right )}{i \, c - 1} + \frac {i \, {\left (4 \, {\left (b x + a\right )} {\left (\log \left (-i \, c^{2} + {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) + 2 \, c + i\right ) - \log \left (-i \, c^{2} + {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) - i\right )\right )} + i \, \log \left (-i \, c^{2} + {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) + 2 \, c + i\right )^{2} - 2 i \, \log \left (-i \, c^{2} + {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) - i\right ) \log \left (\frac {1}{2} \, {\left (c + i\right )} \tan \left (b x + a\right ) - \frac {1}{2} i \, c + \frac {1}{2}\right ) + 2 i \, \log \left (-i \, c^{2} + {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) - i\right ) \log \left (-\frac {{\left (i \, c - 1\right )} \tan \left (b x + a\right ) + c - i}{2 \, c} + 1\right ) - 2 i \, \log \left (-i \, c^{2} + {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) + 2 \, c + i\right ) \log \left (-\frac {1}{2} i \, \tan \left (b x + a\right ) + \frac {1}{2}\right ) - 2 i \, {\rm Li}_2\left (-\frac {1}{2} \, {\left (c + i\right )} \tan \left (b x + a\right ) + \frac {1}{2} i \, c + \frac {1}{2}\right ) + 2 i \, {\rm Li}_2\left (\frac {{\left (i \, c - 1\right )} \tan \left (b x + a\right ) + c - i}{2 \, c}\right ) - 2 i \, {\rm Li}_2\left (\frac {1}{2} i \, \tan \left (b x + a\right ) + \frac {1}{2}\right )\right )}}{i \, c - 1}\right )} - 8 \, {\left (b x + a\right )} \operatorname {arccot}\left ({\left (-i \, c + 1\right )} \tan \left (b x + a\right ) - c\right ) + 4 \, {\left (-i \, b x - i \, a\right )} \log \left (-\frac {2 \, {\left (-i \, c^{2} + {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) - i\right )}}{2 i \, c^{2} - 2 \, {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) - 4 \, c - 2 i}\right )}{8 \, b} \]
[In]
[Out]
\[ \int \cot ^{-1}(c-(1-i c) \tan (a+b x)) \, dx=\int { \operatorname {arccot}\left (-{\left (-i \, c + 1\right )} \tan \left (b x + a\right ) + c\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \cot ^{-1}(c-(1-i c) \tan (a+b x)) \, dx=\int \mathrm {acot}\left (c+\mathrm {tan}\left (a+b\,x\right )\,\left (-1+c\,1{}\mathrm {i}\right )\right ) \,d x \]
[In]
[Out]