Optimal. Leaf size=81 \[ -\frac {i \text {Li}_2\left (e^{2 i x}\right ) \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}-\frac {i x^2 \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}+\frac {x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.49, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {6720, 3717, 2190, 2279, 2391} \[ -\frac {i \sec ^2(x) \text {PolyLog}\left (2,e^{2 i x}\right )}{2 \sqrt {a \sec ^4(x)}}-\frac {i x^2 \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}+\frac {x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3717
Rule 6720
Rubi steps
\begin {align*} \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^4(x)}} \, dx &=\frac {\sec ^2(x) \int x \cot (x) \, dx}{\sqrt {a \sec ^4(x)}}\\ &=-\frac {i x^2 \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}-\frac {\left (2 i \sec ^2(x)\right ) \int \frac {e^{2 i x} x}{1-e^{2 i x}} \, dx}{\sqrt {a \sec ^4(x)}}\\ &=-\frac {i x^2 \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}+\frac {x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}-\frac {\sec ^2(x) \int \log \left (1-e^{2 i x}\right ) \, dx}{\sqrt {a \sec ^4(x)}}\\ &=-\frac {i x^2 \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}+\frac {x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}+\frac {\left (i \sec ^2(x)\right ) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i x}\right )}{2 \sqrt {a \sec ^4(x)}}\\ &=-\frac {i x^2 \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}+\frac {x \log \left (1-e^{2 i x}\right ) \sec ^2(x)}{\sqrt {a \sec ^4(x)}}-\frac {i \text {Li}_2\left (e^{2 i x}\right ) \sec ^2(x)}{2 \sqrt {a \sec ^4(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 50, normalized size = 0.62 \[ -\frac {i \sec ^2(x) \left (\text {Li}_2\left (e^{2 i x}\right )+x \left (x+2 i \log \left (1-e^{2 i x}\right )\right )\right )}{2 \sqrt {a \sec ^4(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 2.10, size = 138, normalized size = 1.70 \[ \frac {{\left (x \cos \relax (x)^{2} \log \left (\cos \relax (x) + i \, \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (\cos \relax (x) - i \, \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (-\cos \relax (x) + i \, \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (-\cos \relax (x) - i \, \sin \relax (x) + 1\right ) - i \, \cos \relax (x)^{2} {\rm Li}_2\left (\cos \relax (x) + i \, \sin \relax (x)\right ) + i \, \cos \relax (x)^{2} {\rm Li}_2\left (\cos \relax (x) - i \, \sin \relax (x)\right ) + i \, \cos \relax (x)^{2} {\rm Li}_2\left (-\cos \relax (x) + i \, \sin \relax (x)\right ) - i \, \cos \relax (x)^{2} {\rm Li}_2\left (-\cos \relax (x) - i \, \sin \relax (x)\right )\right )} \sqrt {\frac {a}{\cos \relax (x)^{4}}}}{2 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \csc \relax (x) \sec \relax (x)}{\sqrt {a \sec \relax (x)^{4}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.20, size = 147, normalized size = 1.81 \[ \frac {i {\mathrm e}^{2 i x} x^{2}}{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}}-\frac {2 i \left (\frac {{\mathrm e}^{2 i x} x^{2}}{2}+\frac {i {\mathrm e}^{2 i x} x \ln \left (1+{\mathrm e}^{i x}\right )}{2}+\frac {{\mathrm e}^{2 i x} \polylog \left (2, -{\mathrm e}^{i x}\right )}{2}+\frac {i {\mathrm e}^{2 i x} x \ln \left (1-{\mathrm e}^{i x}\right )}{2}+\frac {{\mathrm e}^{2 i x} \polylog \left (2, {\mathrm e}^{i x}\right )}{2}\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}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.92, size = 83, normalized size = 1.02 \[ \frac {-i \, x^{2} + 2 i \, x \arctan \left (\sin \relax (x), \cos \relax (x) + 1\right ) - 2 i \, x \arctan \left (\sin \relax (x), -\cos \relax (x) + 1\right ) + x \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \cos \relax (x) + 1\right ) + x \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \cos \relax (x) + 1\right ) - 2 i \, {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) - 2 i \, {\rm Li}_2\left (e^{\left (i \, x\right )}\right )}{2 \, \sqrt {a}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {x}{\cos \relax (x)\,\sin \relax (x)\,\sqrt {\frac {a}{{\cos \relax (x)}^4}}} \,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 \frac {x \csc {\relax (x )} \sec {\relax (x )}}{\sqrt {a \sec ^{4}{\relax (x )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________