Optimal. Leaf size=81 \[ -\frac{i \sec ^2(x) \text{PolyLog}\left (2,e^{2 i x}\right )}{2 \sqrt{a \sec ^4(x)}}-\frac{i x^2 \sec ^2(x)}{2 \sqrt{a \sec ^4(x)}}+\frac{x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt{a \sec ^4(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.487143, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {6720, 3717, 2190, 2279, 2391} \[ -\frac{i \sec ^2(x) \text{PolyLog}\left (2,e^{2 i x}\right )}{2 \sqrt{a \sec ^4(x)}}-\frac{i x^2 \sec ^2(x)}{2 \sqrt{a \sec ^4(x)}}+\frac{x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt{a \sec ^4(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6720
Rule 3717
Rule 2190
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int \frac{x \csc (x) \sec (x)}{\sqrt{a \sec ^4(x)}} \, dx &=\frac{\sec ^2(x) \int x \cot (x) \, dx}{\sqrt{a \sec ^4(x)}}\\ &=-\frac{i x^2 \sec ^2(x)}{2 \sqrt{a \sec ^4(x)}}-\frac{\left (2 i \sec ^2(x)\right ) \int \frac{e^{2 i x} x}{1-e^{2 i x}} \, dx}{\sqrt{a \sec ^4(x)}}\\ &=-\frac{i x^2 \sec ^2(x)}{2 \sqrt{a \sec ^4(x)}}+\frac{x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt{a \sec ^4(x)}}-\frac{\sec ^2(x) \int \log \left (1-e^{2 i x}\right ) \, dx}{\sqrt{a \sec ^4(x)}}\\ &=-\frac{i x^2 \sec ^2(x)}{2 \sqrt{a \sec ^4(x)}}+\frac{x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt{a \sec ^4(x)}}+\frac{\left (i \sec ^2(x)\right ) \operatorname{Subst}\left (\int \frac{\log (1-x)}{x} \, dx,x,e^{2 i x}\right )}{2 \sqrt{a \sec ^4(x)}}\\ &=-\frac{i x^2 \sec ^2(x)}{2 \sqrt{a \sec ^4(x)}}+\frac{x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt{a \sec ^4(x)}}-\frac{i \text{Li}_2\left (e^{2 i x}\right ) \sec ^2(x)}{2 \sqrt{a \sec ^4(x)}}\\ \end{align*}
Mathematica [A] time = 0.0381124, size = 50, normalized size = 0.62 \[ -\frac{i \sec ^2(x) \left (\text{PolyLog}\left (2,e^{2 i x}\right )+x \left (x+2 i \log \left (1-e^{2 i x}\right )\right )\right )}{2 \sqrt{a \sec ^4(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.077, size = 147, normalized size = 1.8 \begin{align*}{\frac{{\frac{i}{2}}{{\rm e}^{2\,ix}}{x}^{2}}{ \left ( 1+{{\rm e}^{2\,ix}} \right ) ^{2}}{\frac{1}{\sqrt{{\frac{a{{\rm e}^{4\,ix}}}{ \left ( 1+{{\rm e}^{2\,ix}} \right ) ^{4}}}}}}}-{\frac{2\,i}{ \left ( 1+{{\rm e}^{2\,ix}} \right ) ^{2}} \left ({\frac{{{\rm e}^{2\,ix}}{x}^{2}}{2}}+{\frac{i}{2}}{{\rm e}^{2\,ix}}x\ln \left ({{\rm e}^{ix}}+1 \right ) +{\frac{{{\rm e}^{2\,ix}}{\it polylog} \left ( 2,-{{\rm e}^{ix}} \right ) }{2}}+{\frac{i}{2}}{{\rm e}^{2\,ix}}x\ln \left ( 1-{{\rm e}^{ix}} \right ) +{\frac{{{\rm e}^{2\,ix}}{\it polylog} \left ( 2,{{\rm e}^{ix}} \right ) }{2}} \right ){\frac{1}{\sqrt{{\frac{a{{\rm e}^{4\,ix}}}{ \left ( 1+{{\rm e}^{2\,ix}} \right ) ^{4}}}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.51372, size = 112, normalized size = 1.38 \begin{align*} \frac{-i \, x^{2} + 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 = 3.07491, size = 459, normalized size = 5.67 \begin{align*} \frac{{\left (x \cos \left (x\right )^{2} \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right )^{2} \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right )^{2} \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right )^{2} \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - i \, \cos \left (x\right )^{2}{\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + i \, \cos \left (x\right )^{2}{\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + i \, \cos \left (x\right )^{2}{\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right )^{2}{\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right )\right )} \sqrt{\frac{a}{\cos \left (x\right )^{4}}}}{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 ^{4}{\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 )^{4}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]