Optimal. Leaf size=76 \[ \frac{i \sec (x) \text{PolyLog}\left (2,-e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{i \sec (x) \text{PolyLog}\left (2,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 x \sec (x) \tanh ^{-1}\left (e^{i x}\right )}{\sqrt{a \sec ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.534855, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {6720, 4183, 2279, 2391} \[ \frac{i \sec (x) \text{PolyLog}\left (2,-e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{i \sec (x) \text{PolyLog}\left (2,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 x \sec (x) \tanh ^{-1}\left (e^{i x}\right )}{\sqrt{a \sec ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6720
Rule 4183
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int \frac{x \csc (x) \sec (x)}{\sqrt{a \sec ^2(x)}} \, dx &=\frac{\sec (x) \int x \csc (x) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{\sec (x) \int \log \left (1-e^{i x}\right ) \, dx}{\sqrt{a \sec ^2(x)}}+\frac{\sec (x) \int \log \left (1+e^{i x}\right ) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}+\frac{(i \sec (x)) \operatorname{Subst}\left (\int \frac{\log (1-x)}{x} \, dx,x,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{(i \sec (x)) \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}+\frac{i \text{Li}_2\left (-e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{i \text{Li}_2\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}\\ \end{align*}
Mathematica [A] time = 0.0614066, size = 69, normalized size = 0.91 \[ \frac{\sec (x) \left (i \text{PolyLog}\left (2,-e^{i x}\right )-i \text{PolyLog}\left (2,e^{i x}\right )+x \left (\log \left (1-e^{i x}\right )-\log \left (1+e^{i x}\right )\right )\right )}{\sqrt{a \sec ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.078, size = 98, normalized size = 1.3 \begin{align*}{\frac{-2\,i}{1+{{\rm e}^{2\,ix}}} \left ( -{\frac{i}{2}}{{\rm e}^{ix}}x\ln \left ({{\rm e}^{ix}}+1 \right ) -{\frac{{{\rm e}^{ix}}{\it polylog} \left ( 2,-{{\rm e}^{ix}} \right ) }{2}}+{\frac{i}{2}}{{\rm e}^{ix}}x\ln \left ( 1-{{\rm e}^{ix}} \right ) +{\frac{{{\rm e}^{ix}}{\it polylog} \left ( 2,{{\rm e}^{ix}} \right ) }{2}} \right ){\frac{1}{\sqrt{{\frac{a{{\rm e}^{2\,ix}}}{ \left ( 1+{{\rm e}^{2\,ix}} \right ) ^{2}}}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.52844, size = 107, normalized size = 1.41 \begin{align*} -\frac{2 i \, x \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + 2 i \, x \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) + x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) - x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - 2 i \,{\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + 2 i \,{\rm Li}_2\left (e^{\left (i \, x\right )}\right )}{2 \, \sqrt{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.45447, size = 439, normalized size = 5.78 \begin{align*} -\frac{{\left (x \cos \left (x\right ) \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right ) \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right ) \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right ) \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + i \, \cos \left (x\right ){\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right ){\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + i \, \cos \left (x\right ){\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right ){\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right )\right )} \sqrt{\frac{a}{\cos \left (x\right )^{2}}}}{2 \, a} \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*} \int \frac{x \csc{\left (x \right )} \sec{\left (x \right )}}{\sqrt{a \sec ^{2}{\left (x \right )}}}\, dx \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 \frac{x \csc \left (x\right ) \sec \left (x\right )}{\sqrt{a \sec \left (x\right )^{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]