Optimal. Leaf size=128 \[ \frac{2 i x \sec (x) \text{PolyLog}\left (2,-e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 i x \sec (x) \text{PolyLog}\left (2,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 \sec (x) \text{PolyLog}\left (3,-e^{i x}\right )}{\sqrt{a \sec ^2(x)}}+\frac{2 \sec (x) \text{PolyLog}\left (3,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 x^2 \sec (x) \tanh ^{-1}\left (e^{i x}\right )}{\sqrt{a \sec ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.591856, antiderivative size = 128, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.278, Rules used = {6720, 4183, 2531, 2282, 6589} \[ \frac{2 i x \sec (x) \text{PolyLog}\left (2,-e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 i x \sec (x) \text{PolyLog}\left (2,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 \sec (x) \text{PolyLog}\left (3,-e^{i x}\right )}{\sqrt{a \sec ^2(x)}}+\frac{2 \sec (x) \text{PolyLog}\left (3,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}-\frac{2 x^2 \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 2531
Rule 2282
Rule 6589
Rubi steps
\begin{align*} \int \frac{x^2 \csc (x) \sec (x)}{\sqrt{a \sec ^2(x)}} \, dx &=\frac{\sec (x) \int x^2 \csc (x) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x^2 \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{(2 \sec (x)) \int x \log \left (1-e^{i x}\right ) \, dx}{\sqrt{a \sec ^2(x)}}+\frac{(2 \sec (x)) \int x \log \left (1+e^{i x}\right ) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x^2 \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}+\frac{2 i x \text{Li}_2\left (-e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{2 i x \text{Li}_2\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{(2 i \sec (x)) \int \text{Li}_2\left (-e^{i x}\right ) \, dx}{\sqrt{a \sec ^2(x)}}+\frac{(2 i \sec (x)) \int \text{Li}_2\left (e^{i x}\right ) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x^2 \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}+\frac{2 i x \text{Li}_2\left (-e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{2 i x \text{Li}_2\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{(2 \sec (x)) \operatorname{Subst}\left (\int \frac{\text{Li}_2(-x)}{x} \, dx,x,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}+\frac{(2 \sec (x)) \operatorname{Subst}\left (\int \frac{\text{Li}_2(x)}{x} \, dx,x,e^{i x}\right )}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{2 x^2 \tanh ^{-1}\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}+\frac{2 i x \text{Li}_2\left (-e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{2 i x \text{Li}_2\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{2 \text{Li}_3\left (-e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}+\frac{2 \text{Li}_3\left (e^{i x}\right ) \sec (x)}{\sqrt{a \sec ^2(x)}}\\ \end{align*}
Mathematica [A] time = 0.0687644, size = 99, normalized size = 0.77 \[ \frac{\sec (x) \left (2 i x \text{PolyLog}\left (2,-e^{i x}\right )-2 i x \text{PolyLog}\left (2,e^{i x}\right )-2 \text{PolyLog}\left (3,-e^{i x}\right )+2 \text{PolyLog}\left (3,e^{i x}\right )+x^2 \log \left (1-e^{i x}\right )-x^2 \log \left (1+e^{i x}\right )\right )}{\sqrt{a \sec ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.066, size = 132, normalized size = 1. \begin{align*} -2\,{\frac{1/2\,{{\rm e}^{ix}}{x}^{2}\ln \left ({{\rm e}^{ix}}+1 \right ) -i{{\rm e}^{ix}}x{\it polylog} \left ( 2,-{{\rm e}^{ix}} \right ) +{{\rm e}^{ix}}{\it polylog} \left ( 3,-{{\rm e}^{ix}} \right ) -1/2\,{{\rm e}^{ix}}{x}^{2}\ln \left ( 1-{{\rm e}^{ix}} \right ) +i{{\rm e}^{ix}}x{\it polylog} \left ( 2,{{\rm e}^{ix}} \right ) -{{\rm e}^{ix}}{\it polylog} \left ( 3,{{\rm e}^{ix}} \right ) }{1+{{\rm e}^{2\,ix}}}{\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.52118, size = 144, normalized size = 1.12 \begin{align*} -\frac{2 i \, x^{2} \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + 2 i \, x^{2} \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) + x^{2} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) - x^{2} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - 4 i \, x{\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + 4 i \, x{\rm Li}_2\left (e^{\left (i \, x\right )}\right ) + 4 \,{\rm Li}_{3}(-e^{\left (i \, x\right )}) - 4 \,{\rm Li}_{3}(e^{\left (i \, x\right )})}{2 \, \sqrt{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 2.4141, size = 788, normalized size = 6.16 \begin{align*} \frac{2 \, \sqrt{\frac{a}{\cos \left (x\right )^{2}}} \cos \left (x\right ){\rm polylog}\left (3, \cos \left (x\right ) + i \, \sin \left (x\right )\right ) + 2 \, \sqrt{\frac{a}{\cos \left (x\right )^{2}}} \cos \left (x\right ){\rm polylog}\left (3, \cos \left (x\right ) - i \, \sin \left (x\right )\right ) - 2 \, \sqrt{\frac{a}{\cos \left (x\right )^{2}}} \cos \left (x\right ){\rm polylog}\left (3, -\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - 2 \, \sqrt{\frac{a}{\cos \left (x\right )^{2}}} \cos \left (x\right ){\rm polylog}\left (3, -\cos \left (x\right ) - i \, \sin \left (x\right )\right ) -{\left (x^{2} \cos \left (x\right ) \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x^{2} \cos \left (x\right ) \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - x^{2} \cos \left (x\right ) \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - x^{2} \cos \left (x\right ) \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + 2 i \, x \cos \left (x\right ){\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - 2 i \, x \cos \left (x\right ){\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + 2 i \, x \cos \left (x\right ){\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - 2 i \, x \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^{2} \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^{2} \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]