Integrand size = 18, antiderivative size = 220 \[ \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\frac {1}{2} x^2 \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x^2 \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\cos ^2(x) \log (\cos (x)) \sqrt {a \sec ^4(x)}+i x \cos ^2(x) \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-i x \cos ^2(x) \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos ^2(x) \operatorname {PolyLog}\left (3,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}+\frac {1}{2} \cos ^2(x) \operatorname {PolyLog}\left (3,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-x \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x) \]
[Out]
Time = 0.73 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.722, Rules used = {6852, 2700, 14, 4505, 2631, 4504, 4268, 2611, 2320, 6724, 3801, 3556, 30} \[ \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=-2 x^2 \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}+i x \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-i x \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\frac {1}{2} \operatorname {PolyLog}\left (3,-e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} \operatorname {PolyLog}\left (3,e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} x^2 \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} x^2 \sin ^2(x) \sqrt {a \sec ^4(x)}-\cos ^2(x) \sqrt {a \sec ^4(x)} \log (\cos (x))-x \sin (x) \cos (x) \sqrt {a \sec ^4(x)} \]
[In]
[Out]
Rule 14
Rule 30
Rule 2320
Rule 2611
Rule 2631
Rule 2700
Rule 3556
Rule 3801
Rule 4268
Rule 4504
Rule 4505
Rule 6724
Rule 6852
Rubi steps \begin{align*} \text {integral}& = \left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x^2 \csc (x) \sec ^3(x) \, dx \\ & = x^2 \cos ^2(x) \log (\tan (x)) \sqrt {a \sec ^4(x)}+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x)-\left (2 \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \left (\log (\tan (x))+\frac {\tan ^2(x)}{2}\right ) \, dx \\ & = x^2 \cos ^2(x) \log (\tan (x)) \sqrt {a \sec ^4(x)}+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x)-\left (2 \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \left (x \log (\tan (x))+\frac {1}{2} x \tan ^2(x)\right ) \, dx \\ & = x^2 \cos ^2(x) \log (\tan (x)) \sqrt {a \sec ^4(x)}+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x)-\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \tan ^2(x) \, dx-\left (2 \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \log (\tan (x)) \, dx \\ & = -x \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x)+\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \, dx+\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x^2 \csc (x) \sec (x) \, dx+\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \tan (x) \, dx \\ & = \frac {1}{2} x^2 \cos ^2(x) \sqrt {a \sec ^4(x)}-\cos ^2(x) \log (\cos (x)) \sqrt {a \sec ^4(x)}-x \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x)+\left (2 \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x^2 \csc (2 x) \, dx \\ & = \frac {1}{2} x^2 \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x^2 \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\cos ^2(x) \log (\cos (x)) \sqrt {a \sec ^4(x)}-x \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x)-\left (2 \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \log \left (1-e^{2 i x}\right ) \, dx+\left (2 \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \log \left (1+e^{2 i x}\right ) \, dx \\ & = \frac {1}{2} x^2 \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x^2 \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\cos ^2(x) \log (\cos (x)) \sqrt {a \sec ^4(x)}+i x \cos ^2(x) \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-i x \cos ^2(x) \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-x \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x)-\left (i \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \, dx+\left (i \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \, dx \\ & = \frac {1}{2} x^2 \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x^2 \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\cos ^2(x) \log (\cos (x)) \sqrt {a \sec ^4(x)}+i x \cos ^2(x) \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-i x \cos ^2(x) \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-x \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x)-\frac {1}{2} \left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-x)}{x} \, dx,x,e^{2 i x}\right )+\frac {1}{2} \left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,x)}{x} \, dx,x,e^{2 i x}\right ) \\ & = \frac {1}{2} x^2 \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x^2 \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\cos ^2(x) \log (\cos (x)) \sqrt {a \sec ^4(x)}+i x \cos ^2(x) \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-i x \cos ^2(x) \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos ^2(x) \operatorname {PolyLog}\left (3,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}+\frac {1}{2} \cos ^2(x) \operatorname {PolyLog}\left (3,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-x \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x^2 \sqrt {a \sec ^4(x)} \sin ^2(x) \\ \end{align*}
Time = 0.51 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.63 \[ \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\frac {1}{24} \cos ^2(x) \sqrt {a \sec ^4(x)} \left (-i \pi ^3+16 i x^3+24 x^2 \log \left (1-e^{-2 i x}\right )-24 x^2 \log \left (1+e^{2 i x}\right )-24 \log (\cos (x))+24 i x \operatorname {PolyLog}\left (2,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 )-12 \operatorname {PolyLog}\left (3,-e^{2 i x}\right )+12 x^2 \sec ^2(x)-24 x \tan (x)\right ) \]
[In]
[Out]
Time = 1.04 (sec) , antiderivative size = 191, normalized size of antiderivative = 0.87
method | result | size |
risch | \(2 \sqrt {\frac {a \,{\mathrm e}^{4 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{4}}}\, x \left (x -i-i {\mathrm e}^{-2 i x}\right )+2 \sqrt {\frac {a \,{\mathrm e}^{4 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{4}}}\, {\mathrm e}^{-2 i x} \left ({\mathrm e}^{2 i x}+1\right )^{2} \left (-\frac {\ln \left ({\mathrm e}^{2 i x}+1\right )}{2}+\ln \left ({\mathrm e}^{i x}\right )+\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 )-\frac {x^{2} \ln \left ({\mathrm e}^{2 i x}+1\right )}{2}+\frac {i x \operatorname {polylog}\left (2, -{\mathrm e}^{2 i x}\right )}{2}-\frac {\operatorname {polylog}\left (3, -{\mathrm e}^{2 i x}\right )}{4}\right )\) | \(191\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 550 vs. \(2 (173) = 346\).
Time = 0.32 (sec) , antiderivative size = 550, normalized size of antiderivative = 2.50 \[ \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\int x^{2} \sqrt {a \sec ^{4}{\left (x \right )}} \csc {\left (x \right )} \sec {\left (x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 639 vs. \(2 (173) = 346\).
Time = 0.36 (sec) , antiderivative size = 639, normalized size of antiderivative = 2.90 \[ \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\int { \sqrt {a \sec \left (x\right )^{4}} x^{2} \csc \left (x\right ) \sec \left (x\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\int \frac {x^2\,\sqrt {\frac {a}{{\cos \left (x\right )}^4}}}{\cos \left (x\right )\,\sin \left (x\right )} \,d x \]
[In]
[Out]