Integrand size = 18, antiderivative size = 109 \[ \int \frac {x^2 \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx=-\frac {i x^3 \sec ^2(x)}{3 \sqrt {a \sec ^4(x)}}+\frac {x^2 \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}-\frac {i x \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}+\frac {\operatorname {PolyLog}\left (3,e^{2 i x}\right ) \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}} \]
[Out]
Time = 0.68 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6852, 3798, 2221, 2611, 2320, 6724} \[ \int \frac {x^2 \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx=-\frac {i x \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}+\frac {\operatorname {PolyLog}\left (3,e^{2 i x}\right ) \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}-\frac {i x^3 \sec ^2(x)}{3 \sqrt {a \sec ^4(x)}}+\frac {x^2 \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}} \]
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 3798
Rule 6724
Rule 6852
Rubi steps \begin{align*} \text {integral}& = \frac {\sec ^2(x) \int x^2 \cot (x) \, dx}{\sqrt {a \sec ^4(x)}} \\ & = -\frac {i x^3 \sec ^2(x)}{3 \sqrt {a \sec ^4(x)}}-\frac {\left (2 i \sec ^2(x)\right ) \int \frac {e^{2 i x} x^2}{1-e^{2 i x}} \, dx}{\sqrt {a \sec ^4(x)}} \\ & = -\frac {i x^3 \sec ^2(x)}{3 \sqrt {a \sec ^4(x)}}+\frac {x^2 \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}-\frac {\left (2 \sec ^2(x)\right ) \int x \log \left (1-e^{2 i x}\right ) \, dx}{\sqrt {a \sec ^4(x)}} \\ & = -\frac {i x^3 \sec ^2(x)}{3 \sqrt {a \sec ^4(x)}}+\frac {x^2 \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}-\frac {i x \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}+\frac {\left (i \sec ^2(x)\right ) \int \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \, dx}{\sqrt {a \sec ^4(x)}} \\ & = -\frac {i x^3 \sec ^2(x)}{3 \sqrt {a \sec ^4(x)}}+\frac {x^2 \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}-\frac {i x \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}+\frac {\sec ^2(x) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,x)}{x} \, dx,x,e^{2 i x}\right )}{2 \sqrt {a \sec ^4(x)}} \\ & = -\frac {i x^3 \sec ^2(x)}{3 \sqrt {a \sec ^4(x)}}+\frac {x^2 \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}-\frac {i x \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}+\frac {\operatorname {PolyLog}\left (3,e^{2 i x}\right ) \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}} \\ \end{align*}
Time = 0.09 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.69 \[ \int \frac {x^2 \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx=\frac {\left (-i \pi ^3+8 i x^3+24 x^2 \log \left (1-e^{-2 i x}\right )+24 i x \operatorname {PolyLog}\left (2,e^{-2 i x}\right )+12 \operatorname {PolyLog}\left (3,e^{-2 i x}\right )\right ) \sec ^2(x)}{24 \sqrt {a \sec ^4(x)}} \]
[In]
[Out]
Time = 1.00 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.40
method | result | size |
risch | \(\frac {i {\mathrm e}^{2 i x} x^{3}}{3 \sqrt {\frac {a \,{\mathrm e}^{4 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{4}}}\, \left ({\mathrm e}^{2 i x}+1\right )^{2}}-\frac {2 \,{\mathrm e}^{2 i x} \left (\frac {i x^{3}}{3}-\frac {x^{2} \ln \left ({\mathrm e}^{i x}+1\right )}{2}+i x \operatorname {polylog}\left (2, -{\mathrm e}^{i x}\right )-\operatorname {polylog}\left (3, -{\mathrm e}^{i x}\right )-\frac {x^{2} \ln \left (1-{\mathrm e}^{i x}\right )}{2}+i x \operatorname {polylog}\left (2, {\mathrm e}^{i x}\right )-\operatorname {polylog}\left (3, {\mathrm e}^{i x}\right )\right )}{\sqrt {\frac {a \,{\mathrm e}^{4 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{4}}}\, \left ({\mathrm e}^{2 i x}+1\right )^{2}}\) | \(153\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 248 vs. \(2 (83) = 166\).
Time = 0.27 (sec) , antiderivative size = 248, normalized size of antiderivative = 2.28 \[ \int \frac {x^2 \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx=\frac {2 \, \sqrt {\frac {a}{\cos \left (x\right )^{4}}} \cos \left (x\right )^{2} {\rm polylog}\left (3, \cos \left (x\right ) + i \, \sin \left (x\right )\right ) + 2 \, \sqrt {\frac {a}{\cos \left (x\right )^{4}}} \cos \left (x\right )^{2} {\rm polylog}\left (3, \cos \left (x\right ) - i \, \sin \left (x\right )\right ) + 2 \, \sqrt {\frac {a}{\cos \left (x\right )^{4}}} \cos \left (x\right )^{2} {\rm polylog}\left (3, -\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + 2 \, \sqrt {\frac {a}{\cos \left (x\right )^{4}}} \cos \left (x\right )^{2} {\rm polylog}\left (3, -\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + {\left (x^{2} \cos \left (x\right )^{2} \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x^{2} \cos \left (x\right )^{2} \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + x^{2} \cos \left (x\right )^{2} \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x^{2} \cos \left (x\right )^{2} \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - 2 i \, x \cos \left (x\right )^{2} {\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + 2 i \, x \cos \left (x\right )^{2} {\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + 2 i \, x \cos \left (x\right )^{2} {\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - 2 i \, x \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} \]
[In]
[Out]
\[ \int \frac {x^2 \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx=\int \frac {x^{2} \csc {\left (x \right )} \sec {\left (x \right )}}{\sqrt {a \sec ^{4}{\left (x \right )}}}\, dx \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.04 \[ \int \frac {x^2 \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx=\frac {-2 i \, x^{3} + 6 i \, x^{2} \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) - 6 i \, x^{2} \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) + 3 \, x^{2} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + 3 \, x^{2} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - 12 i \, x {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) - 12 i \, x {\rm Li}_2\left (e^{\left (i \, x\right )}\right ) + 12 \, {\rm Li}_{3}(-e^{\left (i \, x\right )}) + 12 \, {\rm Li}_{3}(e^{\left (i \, x\right )})}{6 \, \sqrt {a}} \]
[In]
[Out]
\[ \int \frac {x^2 \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx=\int { \frac {x^{2} \csc \left (x\right ) \sec \left (x\right )}{\sqrt {a \sec \left (x\right )^{4}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x^2 \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx=\int \frac {x^2}{\cos \left (x\right )\,\sin \left (x\right )\,\sqrt {\frac {a}{{\cos \left (x\right )}^4}}} \,d x \]
[In]
[Out]