Optimal. Leaf size=79 \[ \frac{i \text{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 \tan ^{-1}(c+(c+i) \tanh (a+b x))-\frac{1}{2} i b x^2 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.117691, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {5187, 2184, 2190, 2279, 2391} \[ \frac{i \text{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 \tan ^{-1}(c+(c+i) \tanh (a+b x))-\frac{1}{2} i b x^2 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5187
Rule 2184
Rule 2190
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int \tan ^{-1}(c+(i+c) \tanh (a+b x)) \, dx &=x \tan ^{-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 \tan ^{-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 \tan ^{-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 \tan ^{-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{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 \tan ^{-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{Li}_2\left (-i c e^{2 a+2 b x}\right )}{4 b}\\ \end{align*}
Mathematica [A] time = 1.70071, size = 71, normalized size = 0.9 \[ \frac{i \left (2 b x \log \left (1-\frac{i e^{-2 (a+b x)}}{c}\right )-\text{PolyLog}\left (2,\frac{i e^{-2 (a+b x)}}{c}\right )\right )}{4 b}+x \tan ^{-1}(c+(c+i) \tanh (a+b x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.145, size = 1381, normalized size = 17.5 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 5.86429, size = 108, normalized size = 1.37 \begin{align*} 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 \arctan \left ({\left (c + i\right )} \tanh \left (b x + a\right ) + c\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.9047, size = 518, normalized size = 6.56 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - i b \int \frac{x}{i c e^{2 a} e^{2 b x} + 1}\, dx + \frac{i x \log{\left (- i c + \frac{i c}{e^{2 a} e^{2 b x} + 1} - \frac{i c e^{a} e^{b x}}{e^{a} e^{b x} + e^{- a} e^{- b x}} + 1 - \frac{1}{e^{2 a} e^{2 b x} + 1} + \frac{e^{a} e^{b x}}{e^{a} e^{b x} + e^{- a} e^{- b x}} \right )}}{2} - \frac{i x \log{\left (i c - \frac{i c}{e^{2 a} e^{2 b x} + 1} + \frac{i c e^{a} e^{b x}}{e^{a} e^{b x} + e^{- a} e^{- b x}} + 1 + \frac{1}{e^{2 a} e^{2 b x} + 1} - \frac{e^{a} e^{b x}}{e^{a} e^{b x} + e^{- a} e^{- b x}} \right )}}{2} \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 \arctan \left ({\left (c + i\right )} \tanh \left (b x + a\right ) + c\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]