Integrand size = 18, antiderivative size = 341 \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \operatorname {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i \cos (x) \operatorname {PolyLog}\left (4,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i \cos (x) \operatorname {PolyLog}\left (4,e^{i x}\right ) \sqrt {a \sec ^2(x)} \]
[Out]
Time = 0.78 (sec) , antiderivative size = 341, normalized size of antiderivative = 1.00, number of steps used = 21, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.722, Rules used = {6852, 2702, 327, 213, 4505, 14, 6408, 4268, 2611, 6744, 2320, 6724, 4266} \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \operatorname {PolyLog}\left (2,-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-3 i x^2 \operatorname {PolyLog}\left (2,e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i x \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 i x \operatorname {PolyLog}\left (2,i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 x \operatorname {PolyLog}\left (3,-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 x \operatorname {PolyLog}\left (3,e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 \operatorname {PolyLog}\left (3,i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i \operatorname {PolyLog}\left (4,-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 i \operatorname {PolyLog}\left (4,e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+x^3 \sqrt {a \sec ^2(x)} \]
[In]
[Out]
Rule 14
Rule 213
Rule 327
Rule 2320
Rule 2611
Rule 2702
Rule 4266
Rule 4268
Rule 4505
Rule 6408
Rule 6724
Rule 6744
Rule 6852
Rubi steps \begin{align*} \text {integral}& = \left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^3 \csc (x) \sec ^2(x) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}-x^3 \text {arctanh}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 (-\text {arctanh}(\cos (x))+\sec (x)) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}-x^3 \text {arctanh}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \left (-x^2 \text {arctanh}(\cos (x))+x^2 \sec (x)\right ) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}-x^3 \text {arctanh}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}+\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \text {arctanh}(\cos (x)) \, dx-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \sec (x) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^3 \csc (x) \, dx+\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \log \left (1-i e^{i x}\right ) \, dx-\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \log \left (1+i e^{i x}\right ) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \, dx-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \operatorname {PolyLog}\left (2,i e^{i x}\right ) \, dx-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \log \left (1-e^{i x}\right ) \, dx+\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \log \left (1+e^{i x}\right ) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \operatorname {PolyLog}\left (2,-e^{i x}\right ) \, dx+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \operatorname {PolyLog}\left (2,e^{i x}\right ) \, dx+\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-i x)}{x} \, dx,x,e^{i x}\right )-\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,i x)}{x} \, dx,x,e^{i x}\right ) \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \operatorname {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}+\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \operatorname {PolyLog}\left (3,-e^{i x}\right ) \, dx-\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \operatorname {PolyLog}\left (3,e^{i x}\right ) \, dx \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \operatorname {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,-x)}{x} \, dx,x,e^{i x}\right )+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,x)}{x} \, dx,x,e^{i x}\right ) \\ & = x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \arctan \left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \operatorname {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i \cos (x) \operatorname {PolyLog}\left (4,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i \cos (x) \operatorname {PolyLog}\left (4,e^{i x}\right ) \sqrt {a \sec ^2(x)} \\ \end{align*}
Time = 0.32 (sec) , antiderivative size = 290, normalized size of antiderivative = 0.85 \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\frac {1}{8} \left (8 x^3-i \pi ^4 \cos (x)+2 i x^4 \cos (x)+8 x^3 \cos (x) \log \left (1-e^{-i x}\right )-24 x^2 \cos (x) \log \left (1-i e^{i x}\right )+24 x^2 \cos (x) \log \left (1+i e^{i x}\right )-8 x^3 \cos (x) \log \left (1+e^{i x}\right )+24 i x^2 \cos (x) \operatorname {PolyLog}\left (2,e^{-i x}\right )+24 i x^2 \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right )-48 i x \cos (x) \operatorname {PolyLog}\left (2,-i e^{i x}\right )+48 i x \cos (x) \operatorname {PolyLog}\left (2,i e^{i x}\right )+48 x \cos (x) \operatorname {PolyLog}\left (3,e^{-i x}\right )-48 x \cos (x) \operatorname {PolyLog}\left (3,-e^{i x}\right )+48 \cos (x) \operatorname {PolyLog}\left (3,-i e^{i x}\right )-48 \cos (x) \operatorname {PolyLog}\left (3,i e^{i x}\right )-48 i \cos (x) \operatorname {PolyLog}\left (4,e^{-i x}\right )-48 i \cos (x) \operatorname {PolyLog}\left (4,-e^{i x}\right )\right ) \sqrt {a \sec ^2(x)} \]
[In]
[Out]
Time = 1.34 (sec) , antiderivative size = 250, normalized size of antiderivative = 0.73
method | result | size |
risch | \(2 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, x^{3}+4 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, \left (\frac {3 x^{2} \ln \left (1+i {\mathrm e}^{i x}\right )}{2}-3 i x \operatorname {polylog}\left (2, -i {\mathrm e}^{i x}\right )+3 \operatorname {polylog}\left (3, -i {\mathrm e}^{i x}\right )-\frac {3 x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )}{2}+3 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )-3 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+\frac {i \left (\frac {x^{4}}{4}+i x^{3} \ln \left ({\mathrm e}^{i x}+1\right )+3 x^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i x}\right )+6 i x \operatorname {polylog}\left (3, -{\mathrm e}^{i x}\right )-6 \operatorname {polylog}\left (4, -{\mathrm e}^{i x}\right )\right )}{2}+\frac {i \left (-\frac {x^{4}}{4}-i x^{3} \ln \left (1-{\mathrm e}^{i x}\right )-3 x^{2} \operatorname {polylog}\left (2, {\mathrm e}^{i x}\right )-6 i x \operatorname {polylog}\left (3, {\mathrm e}^{i x}\right )+6 \operatorname {polylog}\left (4, {\mathrm e}^{i x}\right )\right )}{2}\right ) \cos \left (x \right )\) | \(250\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 539 vs. \(2 (253) = 506\).
Time = 0.33 (sec) , antiderivative size = 539, normalized size of antiderivative = 1.58 \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int x^{3} \sqrt {a \sec ^{2}{\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. 567 vs. \(2 (253) = 506\).
Time = 0.33 (sec) , antiderivative size = 567, normalized size of antiderivative = 1.66 \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=-\frac {{\left (4 i \, x^{3} \cos \left (x\right ) - 4 \, x^{3} \sin \left (x\right ) - 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} \arctan \left (\cos \left (x\right ), \sin \left (x\right ) + 1\right ) - 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} \arctan \left (\cos \left (x\right ), -\sin \left (x\right ) + 1\right ) + 2 \, {\left (x^{3} \cos \left (2 \, x\right ) + i \, x^{3} \sin \left (2 \, x\right ) + x^{3}\right )} \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + 2 \, {\left (x^{3} \cos \left (2 \, x\right ) + i \, x^{3} \sin \left (2 \, x\right ) + x^{3}\right )} \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) - 12 \, {\left (x \cos \left (2 \, x\right ) + i \, x \sin \left (2 \, x\right ) + x\right )} {\rm Li}_2\left (i \, e^{\left (i \, x\right )}\right ) + 12 \, {\left (x \cos \left (2 \, x\right ) + i \, x \sin \left (2 \, x\right ) + x\right )} {\rm Li}_2\left (-i \, e^{\left (i \, x\right )}\right ) - 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} {\rm Li}_2\left (e^{\left (i \, x\right )}\right ) + {\left (-i \, x^{3} \cos \left (2 \, x\right ) + x^{3} \sin \left (2 \, x\right ) - i \, x^{3}\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + {\left (i \, x^{3} \cos \left (2 \, x\right ) - x^{3} \sin \left (2 \, x\right ) + i \, x^{3}\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - 3 \, {\left (i \, x^{2} \cos \left (2 \, x\right ) - x^{2} \sin \left (2 \, x\right ) + i \, x^{2}\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) - 3 \, {\left (-i \, x^{2} \cos \left (2 \, x\right ) + x^{2} \sin \left (2 \, x\right ) - i \, x^{2}\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right ) + 12 \, {\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_{4}(-e^{\left (i \, x\right )}) - 12 \, {\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_{4}(e^{\left (i \, x\right )}) - 12 \, {\left (i \, \cos \left (2 \, x\right ) - \sin \left (2 \, x\right ) + i\right )} {\rm Li}_{3}(i \, e^{\left (i \, x\right )}) - 12 \, {\left (-i \, \cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) - i\right )} {\rm Li}_{3}(-i \, e^{\left (i \, x\right )}) - 12 \, {\left (i \, x \cos \left (2 \, x\right ) - x \sin \left (2 \, x\right ) + i \, x\right )} {\rm Li}_{3}(-e^{\left (i \, x\right )}) - 12 \, {\left (-i \, x \cos \left (2 \, x\right ) + x \sin \left (2 \, x\right ) - i \, x\right )} {\rm Li}_{3}(e^{\left (i \, x\right )})\right )} \sqrt {a}}{-2 i \, \cos \left (2 \, x\right ) + 2 \, \sin \left (2 \, x\right ) - 2 i} \]
[In]
[Out]
\[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int { \sqrt {a \sec \left (x\right )^{2}} x^{3} \csc \left (x\right ) \sec \left (x\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int \frac {x^3\,\sqrt {\frac {a}{{\cos \left (x\right )}^2}}}{\cos \left (x\right )\,\sin \left (x\right )} \,d x \]
[In]
[Out]