Optimal. Leaf size=85 \[ \frac {\text {Li}_2\left (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} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {5164, 2184, 2190, 2279, 2391} \[ \frac {\text {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} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2184
Rule 2190
Rule 2279
Rule 2391
Rule 5164
Rubi steps
\begin {align*} \int \cot ^{-1}(c+(1+i c) \tan (a+b x)) \, dx &=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 {\operatorname {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 {\text {Li}_2\left (i c e^{2 i a+2 i b x}\right )}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 5.58, size = 967, normalized size = 11.38 \[ x \cot ^{-1}(c+(i c+1) \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)) ((c+i) \cos (a+b x)+(i c+1) \sin (a+b x))}{2 c}\right ) \log (1-i \tan (b x))+\log \left (\frac {\sec (b x) ((1-i c) \cos (a+b x)+(c-i) \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \log (i \tan (b x)+1)-\text {Li}_2(i \sin (2 b x)-\cos (2 b x))-\text {Li}_2\left (\frac {\sec (b x) ((c-i) \cos (a)+i (c+i) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right )+\text {Li}_2\left (\frac {1}{2} \sec (b x) ((i c+1) \cos (a)-(c+i) \sin (a)) (\cos (a+b x)+i \sin (a+b x))\right )\right ) \sec ^2(a+b x) (\cos (b x)+i \sin (b x)) (i \cos (b x)+\sin (b x)) ((1-i c) \cos (a+b x)+(c-i) \sin (a+b x))}{((c+i) \cos (a+b x)+(i c+1) \sin (a+b x)) \left (\log (i \tan (b x)+1) \tan (b x) \cos ^2(a)+2 b x-i \log \left (1-\frac {\sec (b x) ((c-i) \cos (a)+i (c+i) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right )-i \log \left (\frac {1}{2} \sec (b x) ((-i c-1) \cos (a)+(c+i) \sin (a)) (\cos (a+b x)+i \sin (a+b x))+1\right )+\log (i \tan (b x)+1) \sin ^2(a) \tan (b x)-2 i b x \tan (b x)+\log \left (1-\frac {\sec (b x) ((c-i) \cos (a)+i (c+i) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right ) \tan (b x)-\log \left (\frac {1}{2} \sec (b x) ((-i c-1) \cos (a)+(c+i) \sin (a)) (\cos (a+b x)+i \sin (a+b x))+1\right ) \tan (b x)-\log (1-i \tan (b x)) \tan (b x)-\frac {i (c-i) \cos (a+b x) (\log (1-i \tan (b x))-\log (i \tan (b x)+1))}{(c+i) \cos (a+b x)+(i c+1) \sin (a+b x)}+\frac {(c+i) (\log (1-i \tan (b x))-\log (i \tan (b x)+1)) \sin (a+b x)}{(c+i) \cos (a+b x)+(i c+1) \sin (a+b x)}+\frac {\log \left (\frac {\sec (b x) ((1-i c) \cos (a+b x)+(c-i) \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \sec ^2(b x)}{\tan (b x)-i}-\frac {\log \left (\frac {\sec (b x) (\cos (a)-i \sin (a)) ((c+i) \cos (a+b x)+(i c+1) \sin (a+b x))}{2 c}\right ) \sec ^2(b x)}{\tan (b x)+i}\right ) (\tan (a+b x)-i) (-i c+(c-i) \tan (a+b x)+1)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.68, size = 199, normalized size = 2.34 \[ \frac {b^{2} x^{2} - i \, b x \log \left (\frac {{\left (c e^{\left (2 i \, b x + 2 i \, a\right )} + i\right )} e^{\left (-2 i \, b x - 2 i \, a\right )}}{c - 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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \operatorname {arccot}\left ({\left (i \, c + 1\right )} \tan \left (b x + a\right ) + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.61, size = 1489, normalized size = 17.52 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.45, size = 455, normalized size = 5.35 \[ -\frac {{\left (-i \, c - 1\right )} {\left (\frac {4 i \, {\left (b x + a\right )} \log \left (\frac {2 i \, c^{2} - 2 \, {\left (c^{2} - 2 i \, c - 1\right )} \tan \left (b x + a\right ) + 4 \, c - 2 i}{2 i \, c^{2} - 2 \, {\left (c^{2} - 2 i \, c - 1\right )} \tan \left (b x + a\right ) + 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 ) - \frac {4 \, {\left (b x + a\right )} {\left (c - i\right )} \log \left (\frac {2 i \, c^{2} - 2 \, {\left (c^{2} - 2 i \, c - 1\right )} \tan \left (b x + a\right ) + 4 \, c - 2 i}{2 i \, c^{2} - 2 \, {\left (c^{2} - 2 i \, c - 1\right )} \tan \left (b x + a\right ) + 2 i}\right )}{i \, c + 1}}{8 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \mathrm {acot}\left (c+\mathrm {tan}\left (a+b\,x\right )\,\left (1+c\,1{}\mathrm {i}\right )\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: CoercionFailed} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________