Optimal. Leaf size=341 \[ 3 i x^2 \text {Li}_2\left (-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-3 i x^2 \text {Li}_2\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i x \text {Li}_2\left (-i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 i x \text {Li}_2\left (i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 x \text {Li}_3\left (-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 x \text {Li}_3\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 \text {Li}_3\left (-i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 \text {Li}_3\left (i e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i \text {Li}_4\left (-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+6 i \text {Li}_4\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+x^3 \sqrt {a \sec ^2(x)}-2 x^3 \cos (x) \tanh ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x^2 \cos (x) \tan ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.63, antiderivative size = 341, normalized size of antiderivative = 1.00, number of steps used = 21, number of rules used = 13, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.722, Rules used = {6720, 2622, 321, 207, 4420, 14, 6273, 4183, 2531, 6609, 2282, 6589, 4181} \[ 3 i x^2 \cos (x) \text {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \text {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \text {PolyLog}\left (2,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \text {PolyLog}\left (2,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \text {PolyLog}\left (3,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \text {PolyLog}\left (3,e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \text {PolyLog}\left (3,-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \text {PolyLog}\left (3,i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i \cos (x) \text {PolyLog}\left (4,-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i \cos (x) \text {PolyLog}\left (4,e^{i x}\right ) \sqrt {a \sec ^2(x)}+x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \cos (x) \tan ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-2 x^3 \cos (x) \tanh ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 207
Rule 321
Rule 2282
Rule 2531
Rule 2622
Rule 4181
Rule 4183
Rule 4420
Rule 6273
Rule 6589
Rule 6609
Rule 6720
Rubi steps
\begin {align*} \int x^3 \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx &=\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 \tanh ^{-1}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \left (-\tanh ^{-1}(\cos (x))+\sec (x)\right ) \, dx\\ &=x^3 \sqrt {a \sec ^2(x)}-x^3 \tanh ^{-1}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}-\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \left (-x^2 \tanh ^{-1}(\cos (x))+x^2 \sec (x)\right ) \, dx\\ &=x^3 \sqrt {a \sec ^2(x)}-x^3 \tanh ^{-1}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}+\left (3 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x^2 \tanh ^{-1}(\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 \tan ^{-1}\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 \tan ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \tanh ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \text {Li}_2\left (-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \text {Li}_2\left (i e^{i x}\right ) \sqrt {a \sec ^2(x)}+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \text {Li}_2\left (-i e^{i x}\right ) \, dx-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \text {Li}_2\left (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 \tan ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \tanh ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \text {Li}_2\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \text {Li}_2\left (-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \text {Li}_2\left (i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \text {Li}_2\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \text {Li}_2\left (-e^{i x}\right ) \, dx+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \text {Li}_2\left (e^{i x}\right ) \, dx+\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{i x}\right )-\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(i x)}{x} \, dx,x,e^{i x}\right )\\ &=x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \tan ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \tanh ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \text {Li}_2\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \text {Li}_2\left (-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \text {Li}_2\left (i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \text {Li}_2\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \text {Li}_3\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \text {Li}_3\left (-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \text {Li}_3\left (i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \text {Li}_3\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}+\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \text {Li}_3\left (-e^{i x}\right ) \, dx-\left (6 \cos (x) \sqrt {a \sec ^2(x)}\right ) \int \text {Li}_3\left (e^{i x}\right ) \, dx\\ &=x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \tan ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \tanh ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \text {Li}_2\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \text {Li}_2\left (-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \text {Li}_2\left (i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \text {Li}_2\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \text {Li}_3\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \text {Li}_3\left (-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \text {Li}_3\left (i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \text {Li}_3\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_3(-x)}{x} \, dx,x,e^{i x}\right )+\left (6 i \cos (x) \sqrt {a \sec ^2(x)}\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_3(x)}{x} \, dx,x,e^{i x}\right )\\ &=x^3 \sqrt {a \sec ^2(x)}+6 i x^2 \tan ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-2 x^3 \tanh ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+3 i x^2 \cos (x) \text {Li}_2\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i x \cos (x) \text {Li}_2\left (-i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i x \cos (x) \text {Li}_2\left (i e^{i x}\right ) \sqrt {a \sec ^2(x)}-3 i x^2 \cos (x) \text {Li}_2\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 x \cos (x) \text {Li}_3\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 \cos (x) \text {Li}_3\left (-i e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 \cos (x) \text {Li}_3\left (i e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 x \cos (x) \text {Li}_3\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-6 i \cos (x) \text {Li}_4\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}+6 i \cos (x) \text {Li}_4\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.41, size = 290, normalized size = 0.85 \[ \frac {1}{8} \sqrt {a \sec ^2(x)} \left (24 i x^2 \text {Li}_2\left (e^{-i x}\right ) \cos (x)+24 i x^2 \text {Li}_2\left (-e^{i x}\right ) \cos (x)-48 i x \text {Li}_2\left (-i e^{i x}\right ) \cos (x)+48 i x \text {Li}_2\left (i e^{i x}\right ) \cos (x)+48 x \text {Li}_3\left (e^{-i x}\right ) \cos (x)-48 x \text {Li}_3\left (-e^{i x}\right ) \cos (x)+48 \text {Li}_3\left (-i e^{i x}\right ) \cos (x)-48 \text {Li}_3\left (i e^{i x}\right ) \cos (x)-48 i \text {Li}_4\left (e^{-i x}\right ) \cos (x)-48 i \text {Li}_4\left (-e^{i x}\right ) \cos (x)+2 i x^4 \cos (x)+8 x^3+8 x^3 \log \left (1-e^{-i x}\right ) \cos (x)-8 x^3 \log \left (1+e^{i x}\right ) \cos (x)-24 x^2 \log \left (1-i e^{i x}\right ) \cos (x)+24 x^2 \log \left (1+i e^{i x}\right ) \cos (x)-i \pi ^4 \cos (x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 1.15, size = 539, normalized size = 1.58 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \sec \relax (x)^{2}} x^{3} \csc \relax (x) \sec \relax (x)\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.42, size = 250, normalized size = 0.73 \[ 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 \polylog \left (2, -i {\mathrm e}^{i x}\right )+3 \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 \polylog \left (2, i {\mathrm e}^{i x}\right )-3 \polylog \left (3, i {\mathrm e}^{i x}\right )+\frac {i \left (\frac {x^{4}}{4}+i x^{3} \ln \left (1+{\mathrm e}^{i x}\right )+3 x^{2} \polylog \left (2, -{\mathrm e}^{i x}\right )+6 i x \polylog \left (3, -{\mathrm e}^{i x}\right )-6 \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} \polylog \left (2, {\mathrm e}^{i x}\right )-6 i x \polylog \left (3, {\mathrm e}^{i x}\right )+6 \polylog \left (4, {\mathrm e}^{i x}\right )\right )}{2}\right ) \cos \relax (x ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.48, size = 568, normalized size = 1.67 \[ -\frac {{\left (4 i \, x^{3} \cos \relax (x) - 4 \, x^{3} \sin \relax (x) - 6 \, {\left (x^{2} \cos \left (2 \, x\right ) + i \, x^{2} \sin \left (2 \, x\right ) + x^{2}\right )} \arctan \left (\cos \relax (x), \sin \relax (x) + 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 \relax (x), -\sin \relax (x) + 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 \relax (x), \cos \relax (x) + 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 \relax (x), -\cos \relax (x) + 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 \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \cos \relax (x) + 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 \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \cos \relax (x) + 1\right ) + {\left (-3 i \, x^{2} \cos \left (2 \, x\right ) + 3 \, x^{2} \sin \left (2 \, x\right ) - 3 i \, x^{2}\right )} \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \sin \relax (x) + 1\right ) + {\left (3 i \, x^{2} \cos \left (2 \, x\right ) - 3 \, x^{2} \sin \left (2 \, x\right ) + 3 i \, x^{2}\right )} \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \sin \relax (x) + 1\right ) + {\left (12 \, \cos \left (2 \, x\right ) + 12 i \, \sin \left (2 \, x\right ) + 12\right )} {\rm Li}_{4}(-e^{\left (i \, x\right )}) - {\left (12 \, \cos \left (2 \, x\right ) + 12 i \, \sin \left (2 \, x\right ) + 12\right )} {\rm Li}_{4}(e^{\left (i \, x\right )}) + {\left (-12 i \, \cos \left (2 \, x\right ) + 12 \, \sin \left (2 \, x\right ) - 12 i\right )} {\rm Li}_{3}(i \, e^{\left (i \, x\right )}) + {\left (12 i \, \cos \left (2 \, x\right ) - 12 \, \sin \left (2 \, x\right ) + 12 i\right )} {\rm Li}_{3}(-i \, e^{\left (i \, x\right )}) + {\left (-12 i \, x \cos \left (2 \, x\right ) + 12 \, x \sin \left (2 \, x\right ) - 12 i \, x\right )} {\rm Li}_{3}(-e^{\left (i \, x\right )}) + {\left (12 i \, x \cos \left (2 \, x\right ) - 12 \, x \sin \left (2 \, x\right ) + 12 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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {x^3\,\sqrt {\frac {a}{{\cos \relax (x)}^2}}}{\cos \relax (x)\,\sin \relax (x)} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{3} \sqrt {a \sec ^{2}{\relax (x )}} \csc {\relax (x )} \sec {\relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________