Integrand size = 18, antiderivative size = 82 \[ \int \cot ^{-1}(c-(i-c) \tanh (a+b x)) \, dx=-\frac {1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \tanh (a+b x))+\frac {1}{2} i x \log \left (1-i c e^{2 a+2 b x}\right )+\frac {i \operatorname {PolyLog}\left (2,i c e^{2 a+2 b x}\right )}{4 b} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 82, 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 = {5296, 2215, 2221, 2317, 2438} \[ \int \cot ^{-1}(c-(i-c) \tanh (a+b x)) \, dx=\frac {i \operatorname {PolyLog}\left (2,i c e^{2 a+2 b x}\right )}{4 b}+\frac {1}{2} i x \log \left (1-i c e^{2 a+2 b x}\right )+x \cot ^{-1}(c-(-c+i) \tanh (a+b x))-\frac {1}{2} i b x^2 \]
[In]
[Out]
Rule 2215
Rule 2221
Rule 2317
Rule 2438
Rule 5296
Rubi steps \begin{align*} \text {integral}& = x \cot ^{-1}(c-(i-c) \tanh (a+b x))+b \int \frac {x}{i+c e^{2 a+2 b x}} \, dx \\ & = -\frac {1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \tanh (a+b x))+(i b c) \int \frac {e^{2 a+2 b x} x}{i+c e^{2 a+2 b x}} \, dx \\ & = -\frac {1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \tanh (a+b x))+\frac {1}{2} i x \log \left (1-i c e^{2 a+2 b x}\right )-\frac {1}{2} i \int \log \left (1-i c e^{2 a+2 b x}\right ) \, dx \\ & = -\frac {1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \tanh (a+b x))+\frac {1}{2} i x \log \left (1-i c e^{2 a+2 b x}\right )-\frac {i \text {Subst}\left (\int \frac {\log (1-i c x)}{x} \, dx,x,e^{2 a+2 b x}\right )}{4 b} \\ & = -\frac {1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \tanh (a+b x))+\frac {1}{2} i x \log \left (1-i c e^{2 a+2 b x}\right )+\frac {i \operatorname {PolyLog}\left (2,i c e^{2 a+2 b x}\right )}{4 b} \\ \end{align*}
Time = 0.09 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.87 \[ \int \cot ^{-1}(c-(i-c) \tanh (a+b x)) \, dx=x \cot ^{-1}(c+(-i+c) \tanh (a+b x))+\frac {i \left (2 b x \log \left (1+\frac {i e^{-2 (a+b x)}}{c}\right )-\operatorname {PolyLog}\left (2,-\frac {i e^{-2 (a+b x)}}{c}\right )\right )}{4 b} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 516 vs. \(2 (68 ) = 136\).
Time = 1.86 (sec) , antiderivative size = 517, normalized size of antiderivative = 6.30
method | result | size |
derivativedivides | \(\frac {-\frac {\operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right )}{2 i-2 c}-\frac {2 i \operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right ) c}{2 i-2 c}+\frac {\operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right ) c^{2}}{2 i-2 c}+\frac {\operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right )}{2 i-2 c}+\frac {2 i \operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right ) c}{2 i-2 c}-\frac {\operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right ) c^{2}}{2 i-2 c}-\left (i-c \right )^{2} \left (\frac {-\frac {i \ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right )^{2}}{4}+\frac {i \left (\operatorname {dilog}\left (-\frac {i \left (\tanh \left (b x +a \right ) \left (c -i\right )+c +i\right )}{2}\right )+\ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right ) \ln \left (-\frac {i \left (\tanh \left (b x +a \right ) \left (c -i\right )+c +i\right )}{2}\right )\right )}{2}}{2 i-2 c}-\frac {-\frac {i \left (\operatorname {dilog}\left (\frac {-i+\tanh \left (b x +a \right ) \left (c -i\right )+c}{-2 i+2 c}\right )+\ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right ) \ln \left (\frac {-i+\tanh \left (b x +a \right ) \left (c -i\right )+c}{-2 i+2 c}\right )\right )}{2}+\frac {i \left (\operatorname {dilog}\left (\frac {\tanh \left (b x +a \right ) \left (c -i\right )+c +i}{2 c}\right )+\ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right ) \ln \left (\frac {\tanh \left (b x +a \right ) \left (c -i\right )+c +i}{2 c}\right )\right )}{2}}{2 \left (i-c \right )}\right )}{b \left (c -i\right )}\) | \(517\) |
default | \(\frac {-\frac {\operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right )}{2 i-2 c}-\frac {2 i \operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right ) c}{2 i-2 c}+\frac {\operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right ) c^{2}}{2 i-2 c}+\frac {\operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right )}{2 i-2 c}+\frac {2 i \operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right ) c}{2 i-2 c}-\frac {\operatorname {arccot}\left (c +\tanh \left (b x +a \right ) \left (c -i\right )\right ) \ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right ) c^{2}}{2 i-2 c}-\left (i-c \right )^{2} \left (\frac {-\frac {i \ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right )^{2}}{4}+\frac {i \left (\operatorname {dilog}\left (-\frac {i \left (\tanh \left (b x +a \right ) \left (c -i\right )+c +i\right )}{2}\right )+\ln \left (-i+\tanh \left (b x +a \right ) \left (c -i\right )+c \right ) \ln \left (-\frac {i \left (\tanh \left (b x +a \right ) \left (c -i\right )+c +i\right )}{2}\right )\right )}{2}}{2 i-2 c}-\frac {-\frac {i \left (\operatorname {dilog}\left (\frac {-i+\tanh \left (b x +a \right ) \left (c -i\right )+c}{-2 i+2 c}\right )+\ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right ) \ln \left (\frac {-i+\tanh \left (b x +a \right ) \left (c -i\right )+c}{-2 i+2 c}\right )\right )}{2}+\frac {i \left (\operatorname {dilog}\left (\frac {\tanh \left (b x +a \right ) \left (c -i\right )+c +i}{2 c}\right )+\ln \left (\tanh \left (b x +a \right ) \left (c -i\right )-c +i\right ) \ln \left (\frac {\tanh \left (b x +a \right ) \left (c -i\right )+c +i}{2 c}\right )\right )}{2}}{2 \left (i-c \right )}\right )}{b \left (c -i\right )}\) | \(517\) |
risch | \(\text {Expression too large to display}\) | \(1229\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 186 vs. \(2 (58) = 116\).
Time = 0.27 (sec) , antiderivative size = 186, normalized size of antiderivative = 2.27 \[ \int \cot ^{-1}(c-(i-c) \tanh (a+b x)) \, dx=\frac {-i \, b^{2} x^{2} + i \, b x \log \left (\frac {{\left (c - i\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c e^{\left (2 \, b x + 2 \, a\right )} + i}\right ) + i \, a^{2} + {\left (i \, b x + i \, a\right )} \log \left (\frac {1}{2} \, \sqrt {4 i \, c} e^{\left (b x + a\right )} + 1\right ) + {\left (i \, b x + i \, a\right )} \log \left (-\frac {1}{2} \, \sqrt {4 i \, c} e^{\left (b x + a\right )} + 1\right ) - i \, a \log \left (\frac {2 \, c e^{\left (b x + a\right )} + i \, \sqrt {4 i \, c}}{2 \, c}\right ) - i \, a \log \left (\frac {2 \, c e^{\left (b x + a\right )} - i \, \sqrt {4 i \, c}}{2 \, c}\right ) + i \, {\rm Li}_2\left (\frac {1}{2} \, \sqrt {4 i \, c} e^{\left (b x + a\right )}\right ) + i \, {\rm Li}_2\left (-\frac {1}{2} \, \sqrt {4 i \, c} e^{\left (b x + a\right )}\right )}{2 \, b} \]
[In]
[Out]
Exception generated. \[ \int \cot ^{-1}(c-(i-c) \tanh (a+b x)) \, dx=\text {Exception raised: CoercionFailed} \]
[In]
[Out]
none
Time = 1.28 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.98 \[ \int \cot ^{-1}(c-(i-c) \tanh (a+b x)) \, dx=2 \, b {\left (c - i\right )} {\left (\frac {2 \, x^{2}}{2 i \, c + 2} - \frac {2 \, b x \log \left (-i \, c e^{\left (2 \, b x + 2 \, a\right )} + 1\right ) + {\rm Li}_2\left (i \, c e^{\left (2 \, b x + 2 \, a\right )}\right )}{-2 \, b^{2} {\left (-i \, c - 1\right )}}\right )} + x \operatorname {arccot}\left ({\left (c - i\right )} \tanh \left (b x + a\right ) + c\right ) \]
[In]
[Out]
\[ \int \cot ^{-1}(c-(i-c) \tanh (a+b x)) \, dx=\int { \operatorname {arccot}\left ({\left (c - i\right )} \tanh \left (b x + a\right ) + c\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \cot ^{-1}(c-(i-c) \tanh (a+b x)) \, dx=\int \mathrm {acot}\left (c+\mathrm {tanh}\left (a+b\,x\right )\,\left (c-\mathrm {i}\right )\right ) \,d x \]
[In]
[Out]