Optimal. Leaf size=86 \[ \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 \tan ^{-1}(c-(1-i c) \tan (a+b x))+\frac {b x^2}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 86, 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 = {5163, 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 \tan ^{-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 5163
Rubi steps
\begin {align*} \int \tan ^{-1}(c+(-1+i c) \tan (a+b x)) \, dx &=x \tan ^{-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 \tan ^{-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 \tan ^{-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 \tan ^{-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 \tan ^{-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 = 17.58, size = 847, normalized size = 9.85 \[ x \tan ^{-1}(c+i (c+i) \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+i) \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)) ((i c+1) \cos (a+b x)-(c+i) \sin (a+b x))\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+1) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right )-\text {Li}_2\left (\frac {1}{2} (\cos (a)+i \sin (a)) ((c+i) \cos (a)+(i c+1) \sin (a)) (\tan (b x)-i)\right )\right ) \sec (a+b x) (\cos (b x)+i \sin (b x)) (i \cos (b x)+\sin (b x))}{((c-i) \cos (a+b x)+i (c+i) \sin (a+b x)) \left (-\frac {\log \left (\frac {1}{2} \sec (b x) (\cos (a)+i \sin (a)) ((i c+1) \cos (a+b x)-(c+i) \sin (a+b x))\right ) \sec ^2(b x)}{\tan (b x)-i}+\frac {\log \left (1-\frac {1}{2} (\cos (a)+i \sin (a)) ((c+i) \cos (a)+(i c+1) \sin (a)) (\tan (b x)-i)\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+i) \sin (a+b x))}{2 c}\right ) \sec ^2(b x)}{\tan (b x)+i}-2 b x+i \log \left (1-\frac {\sec (b x) ((c+i) \cos (a)+(i c+1) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right )+2 i b x \tan (b x)-\log \left (1-\frac {\sec (b x) ((c+i) \cos (a)+(i c+1) \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 (i \tan (b x)+1) \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+i) \sin (a+b x)}+\frac {(i c+1) (\log (1-i \tan (b x))-\log (i \tan (b x)+1)) \sin (a+b x)}{(-i c-1) \cos (a+b x)+(c+i) \sin (a+b x)}\right ) (\tan (a+b x)-i)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.75, size = 200, normalized size = 2.33 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \arctan \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.56, size = 1681, normalized size = 19.55 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.46, size = 448, normalized size = 5.21 \[ -\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 ) + 2 i}{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 )} \arctan \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 i \, c^{2} - 2 \, {\left (c^{2} + 2 i \, c - 1\right )} \tan \left (b x + a\right ) + 2 i}{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} \]
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 {atan}\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]
________________________________________________________________________________________