Optimal. Leaf size=220 \[ i x \text {Li}_2\left (-e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-i x \text {Li}_2\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\frac {1}{2} \text {Li}_3\left (-e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} \text {Li}_3\left (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)}-2 x^2 \cos ^2(x) \tanh ^{-1}\left (e^{2 i x}\right ) \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)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.54, antiderivative size = 220, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 13, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.722, Rules used = {6720, 2620, 14, 4420, 2551, 4419, 4183, 2531, 2282, 6589, 3720, 3475, 30} \[ i x \cos ^2(x) \text {PolyLog}\left (2,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-i x \cos ^2(x) \text {PolyLog}\left (2,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos ^2(x) \text {PolyLog}\left (3,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}+\frac {1}{2} \cos ^2(x) \text {PolyLog}\left (3,e^{2 i x}\right ) \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)}-2 x^2 \cos ^2(x) \tanh ^{-1}\left (e^{2 i x}\right ) \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)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 2282
Rule 2531
Rule 2551
Rule 2620
Rule 3475
Rule 3720
Rule 4183
Rule 4419
Rule 4420
Rule 6589
Rule 6720
Rubi steps
\begin {align*} \int x^2 \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx &=\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 \tanh ^{-1}\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 \tanh ^{-1}\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) \text {Li}_2\left (-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-i x \cos ^2(x) \text {Li}_2\left (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 \text {Li}_2\left (-e^{2 i x}\right ) \, dx+\left (i \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \text {Li}_2\left (e^{2 i x}\right ) \, dx\\ &=\frac {1}{2} x^2 \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x^2 \tanh ^{-1}\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) \text {Li}_2\left (-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-i x \cos ^2(x) \text {Li}_2\left (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 ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 i x}\right )+\frac {1}{2} \left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_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 \tanh ^{-1}\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) \text {Li}_2\left (-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-i x \cos ^2(x) \text {Li}_2\left (e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos ^2(x) \text {Li}_3\left (-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}+\frac {1}{2} \cos ^2(x) \text {Li}_3\left (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*}
________________________________________________________________________________________
Mathematica [A] time = 0.63, size = 138, normalized size = 0.63 \[ \frac {1}{24} \cos ^2(x) \sqrt {a \sec ^4(x)} \left (24 i x \text {Li}_2\left (e^{-2 i x}\right )+24 i x \text {Li}_2\left (-e^{2 i x}\right )+12 \text {Li}_3\left (e^{-2 i x}\right )-12 \text {Li}_3\left (-e^{2 i x}\right )+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 )+12 x^2 \sec ^2(x)-24 x \tan (x)-24 \log (\cos (x))-i \pi ^3\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 2.05, size = 550, normalized size = 2.50 \[ \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)^{4}} x^{2} \csc \relax (x) \sec \relax (x)\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.23, size = 254, normalized size = 1.15 \[ 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}}}\, \left ({\mathrm e}^{2 i x}+1\right )^{2} \left (-\frac {{\mathrm e}^{-2 i x} \ln \left ({\mathrm e}^{2 i x}+1\right )}{2}-{\mathrm e}^{-2 i x} \Im \relax (x )+{\mathrm e}^{-2 i x} \ln \left ({\mathrm e}^{i \Re \relax (x )}\right )+\frac {{\mathrm e}^{-2 i x} x^{2} \ln \left (1+{\mathrm e}^{i x}\right )}{2}-i {\mathrm e}^{-2 i x} x \polylog \left (2, -{\mathrm e}^{i x}\right )+{\mathrm e}^{-2 i x} \polylog \left (3, -{\mathrm e}^{i x}\right )-\frac {{\mathrm e}^{-2 i x} x^{2} \ln \left ({\mathrm e}^{2 i x}+1\right )}{2}+\frac {i {\mathrm e}^{-2 i x} x \polylog \left (2, -{\mathrm e}^{2 i x}\right )}{2}-\frac {{\mathrm e}^{-2 i x} \polylog \left (3, -{\mathrm e}^{2 i x}\right )}{4}+\frac {{\mathrm e}^{-2 i x} x^{2} \ln \left (1-{\mathrm e}^{i x}\right )}{2}-i {\mathrm e}^{-2 i x} x \polylog \left (2, {\mathrm e}^{i x}\right )+{\mathrm e}^{-2 i x} \polylog \left (3, {\mathrm e}^{i x}\right )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.52, size = 653, normalized size = 2.97 \[ \text {result too large to display} \]
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^2\,\sqrt {\frac {a}{{\cos \relax (x)}^4}}}{\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^{2} \sqrt {a \sec ^{4}{\relax (x )}} \csc {\relax (x )} \sec {\relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________