Optimal. Leaf size=174 \[ -\frac{i \text{PolyLog}\left (2,\frac{(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{4 b}+\frac{i \text{PolyLog}\left (2,\frac{(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{4 b}-\frac{1}{2} i x \log \left (1-\frac{(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )+\frac{1}{2} i x \log \left (1-\frac{(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )+x \cot ^{-1}(d \coth (a+b x)+c) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.23187, antiderivative size = 174, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {5194, 2190, 2279, 2391} \[ -\frac{i \text{PolyLog}\left (2,\frac{(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{4 b}+\frac{i \text{PolyLog}\left (2,\frac{(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{4 b}-\frac{1}{2} i x \log \left (1-\frac{(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )+\frac{1}{2} i x \log \left (1-\frac{(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )+x \cot ^{-1}(d \coth (a+b x)+c) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5194
Rule 2190
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int \cot ^{-1}(c+d \coth (a+b x)) \, dx &=x \cot ^{-1}(c+d \coth (a+b x))+(b (1-i (c+d))) \int \frac{e^{2 a+2 b x} x}{i+c-d+(-i-c-d) e^{2 a+2 b x}} \, dx-(b (1+i (c+d))) \int \frac{e^{2 a+2 b x} x}{i-c+d+(-i+c+d) e^{2 a+2 b x}} \, dx\\ &=x \cot ^{-1}(c+d \coth (a+b x))-\frac{1}{2} i x \log \left (1-\frac{(i-c-d) e^{2 a+2 b x}}{i-c+d}\right )+\frac{1}{2} i x \log \left (1-\frac{(i+c+d) e^{2 a+2 b x}}{i+c-d}\right )-\frac{1}{2} i \int \log \left (1+\frac{(-i-c-d) e^{2 a+2 b x}}{i+c-d}\right ) \, dx+\frac{1}{2} i \int \log \left (1+\frac{(-i+c+d) e^{2 a+2 b x}}{i-c+d}\right ) \, dx\\ &=x \cot ^{-1}(c+d \coth (a+b x))-\frac{1}{2} i x \log \left (1-\frac{(i-c-d) e^{2 a+2 b x}}{i-c+d}\right )+\frac{1}{2} i x \log \left (1-\frac{(i+c+d) e^{2 a+2 b x}}{i+c-d}\right )-\frac{i \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{(-i-c-d) x}{i+c-d}\right )}{x} \, dx,x,e^{2 a+2 b x}\right )}{4 b}+\frac{i \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{(-i+c+d) x}{i-c+d}\right )}{x} \, dx,x,e^{2 a+2 b x}\right )}{4 b}\\ &=x \cot ^{-1}(c+d \coth (a+b x))-\frac{1}{2} i x \log \left (1-\frac{(i-c-d) e^{2 a+2 b x}}{i-c+d}\right )+\frac{1}{2} i x \log \left (1-\frac{(i+c+d) e^{2 a+2 b x}}{i+c-d}\right )-\frac{i \text{Li}_2\left (\frac{(i-c-d) e^{2 a+2 b x}}{i-c+d}\right )}{4 b}+\frac{i \text{Li}_2\left (\frac{(i+c+d) e^{2 a+2 b x}}{i+c-d}\right )}{4 b}\\ \end{align*}
Mathematica [A] time = 1.21804, size = 287, normalized size = 1.65 \[ x \cot ^{-1}(d \coth (a+b x)+c)-\frac{d \text{PolyLog}\left (2,\frac{\left (c^2+2 c d+d^2+1\right ) e^{2 (a+b x)}}{c^2-d^2+2 \sqrt{-d^2}+1}\right )-d \text{PolyLog}\left (2,-\frac{\left (c^2+2 c d+d^2+1\right ) e^{2 (a+b x)}}{-c^2+d^2+2 \sqrt{-d^2}-1}\right )+2 d (a+b x) \log \left (1-\frac{\left ((c+d)^2+1\right ) e^{2 (a+b x)}}{c^2-d^2+2 \sqrt{-d^2}+1}\right )-2 d (a+b x) \log \left (\frac{\left ((c+d)^2+1\right ) e^{2 (a+b x)}}{-c^2+d^2+2 \sqrt{-d^2}-1}+1\right )+4 a \sqrt{-d^2} \tan ^{-1}\left (\frac{-\left (c^2+2 c d+d^2+1\right ) e^{2 (a+b x)}+c^2-d^2+1}{2 d}\right )}{4 b \sqrt{-d^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.095, size = 350, normalized size = 2. \begin{align*} -{\frac{{\rm arccot} \left (c+d{\rm coth} \left (bx+a\right )\right )\ln \left ( d{\rm coth} \left (bx+a\right )-d \right ) }{2\,b}}+{\frac{{\rm arccot} \left (c+d{\rm coth} \left (bx+a\right )\right )\ln \left ( d{\rm coth} \left (bx+a\right )+d \right ) }{2\,b}}+{\frac{{\frac{i}{4}}\ln \left ( d{\rm coth} \left (bx+a\right )-d \right ) }{b}\ln \left ({\frac{-d{\rm coth} \left (bx+a\right )+i-c}{i-c-d}} \right ) }-{\frac{{\frac{i}{4}}\ln \left ( d{\rm coth} \left (bx+a\right )-d \right ) }{b}\ln \left ({\frac{d{\rm coth} \left (bx+a\right )+c+i}{i+c+d}} \right ) }+{\frac{{\frac{i}{4}}}{b}{\it dilog} \left ({\frac{-d{\rm coth} \left (bx+a\right )+i-c}{i-c-d}} \right ) }-{\frac{{\frac{i}{4}}}{b}{\it dilog} \left ({\frac{d{\rm coth} \left (bx+a\right )+c+i}{i+c+d}} \right ) }-{\frac{{\frac{i}{4}}\ln \left ( d{\rm coth} \left (bx+a\right )+d \right ) }{b}\ln \left ({\frac{-d{\rm coth} \left (bx+a\right )+i-c}{i-c+d}} \right ) }+{\frac{{\frac{i}{4}}\ln \left ( d{\rm coth} \left (bx+a\right )+d \right ) }{b}\ln \left ({\frac{d{\rm coth} \left (bx+a\right )+c+i}{i+c-d}} \right ) }-{\frac{{\frac{i}{4}}}{b}{\it dilog} \left ({\frac{-d{\rm coth} \left (bx+a\right )+i-c}{i-c+d}} \right ) }+{\frac{{\frac{i}{4}}}{b}{\it dilog} \left ({\frac{d{\rm coth} \left (bx+a\right )+c+i}{i+c-d}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -4 \, b d \int \frac{x e^{\left (2 \, b x + 2 \, a\right )}}{c^{2} - 2 \, c d + d^{2} +{\left (c^{2} e^{\left (4 \, a\right )} + 2 \, c d e^{\left (4 \, a\right )} + d^{2} e^{\left (4 \, a\right )} + e^{\left (4 \, a\right )}\right )} e^{\left (4 \, b x\right )} - 2 \,{\left (c^{2} e^{\left (2 \, a\right )} - d^{2} e^{\left (2 \, a\right )} + e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )} + 1}\,{d x} + x \arctan \left (e^{\left (2 \, b x + 2 \, a\right )} - 1,{\left (c e^{\left (2 \, a\right )} + d e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )} - c + d\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 5.70609, size = 2272, normalized size = 13.06 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \operatorname{arccot}\left (d \coth \left (b x + a\right ) + c\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]