Optimal. Leaf size=105 \[ i \text {Li}_2\left (-e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-i \text {Li}_2\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}+x \sqrt {a \sec ^2(x)}-2 x \cos (x) \tanh ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-\cos (x) \sqrt {a \sec ^2(x)} \tanh ^{-1}(\sin (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 10, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {6720, 2622, 321, 207, 4420, 6271, 4183, 2279, 2391, 3770} \[ i \cos (x) \text {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-i \cos (x) \text {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)}+x \sqrt {a \sec ^2(x)}-2 x \cos (x) \tanh ^{-1}\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}-\cos (x) \sqrt {a \sec ^2(x)} \tanh ^{-1}(\sin (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 321
Rule 2279
Rule 2391
Rule 2622
Rule 3770
Rule 4183
Rule 4420
Rule 6271
Rule 6720
Rubi steps
\begin {align*} \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx &=\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \csc (x) \sec ^2(x) \, dx\\ &=x \sqrt {a \sec ^2(x)}-x \tanh ^{-1}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}-\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int \left (-\tanh ^{-1}(\cos (x))+\sec (x)\right ) \, dx\\ &=x \sqrt {a \sec ^2(x)}-x \tanh ^{-1}(\cos (x)) \cos (x) \sqrt {a \sec ^2(x)}+\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int \tanh ^{-1}(\cos (x)) \, dx-\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int \sec (x) \, dx\\ &=x \sqrt {a \sec ^2(x)}-\tanh ^{-1}(\sin (x)) \cos (x) \sqrt {a \sec ^2(x)}+\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int x \csc (x) \, dx\\ &=x \sqrt {a \sec ^2(x)}-2 x \tanh ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-\tanh ^{-1}(\sin (x)) \cos (x) \sqrt {a \sec ^2(x)}-\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int \log \left (1-e^{i x}\right ) \, dx+\left (\cos (x) \sqrt {a \sec ^2(x)}\right ) \int \log \left (1+e^{i x}\right ) \, dx\\ &=x \sqrt {a \sec ^2(x)}-2 x \tanh ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-\tanh ^{-1}(\sin (x)) \cos (x) \sqrt {a \sec ^2(x)}+\left (i \cos (x) \sqrt {a \sec ^2(x)}\right ) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i x}\right )-\left (i \cos (x) \sqrt {a \sec ^2(x)}\right ) \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i x}\right )\\ &=x \sqrt {a \sec ^2(x)}-2 x \tanh ^{-1}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-\tanh ^{-1}(\sin (x)) \cos (x) \sqrt {a \sec ^2(x)}+i \cos (x) \text {Li}_2\left (-e^{i x}\right ) \sqrt {a \sec ^2(x)}-i \cos (x) \text {Li}_2\left (e^{i x}\right ) \sqrt {a \sec ^2(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 108, normalized size = 1.03 \[ \sqrt {a \sec ^2(x)} \left (i \left (\text {Li}_2\left (-e^{i x}\right )-\text {Li}_2\left (e^{i x}\right )\right ) \cos (x)+x+x \left (\log \left (1-e^{i x}\right )-\log \left (1+e^{i x}\right )\right ) \cos (x)+\cos (x) \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )-\cos (x) \log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 140, normalized size = 1.33 \[ -\frac {1}{2} \, {\left (x \cos \relax (x) \log \left (\cos \relax (x) + i \, \sin \relax (x) + 1\right ) + x \cos \relax (x) \log \left (\cos \relax (x) - i \, \sin \relax (x) + 1\right ) - x \cos \relax (x) \log \left (-\cos \relax (x) + i \, \sin \relax (x) + 1\right ) - x \cos \relax (x) \log \left (-\cos \relax (x) - i \, \sin \relax (x) + 1\right ) + i \, \cos \relax (x) {\rm Li}_2\left (\cos \relax (x) + i \, \sin \relax (x)\right ) - i \, \cos \relax (x) {\rm Li}_2\left (\cos \relax (x) - i \, \sin \relax (x)\right ) + i \, \cos \relax (x) {\rm Li}_2\left (-\cos \relax (x) + i \, \sin \relax (x)\right ) - i \, \cos \relax (x) {\rm Li}_2\left (-\cos \relax (x) - i \, \sin \relax (x)\right ) + \cos \relax (x) \log \left (-\frac {\sin \relax (x) + 1}{\sin \relax (x) - 1}\right ) - 2 \, x\right )} \sqrt {\frac {a}{\cos \relax (x)^{2}}} \]
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 \csc \relax (x) \sec \relax (x)\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 86, normalized size = 0.82 \[ 2 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, x +4 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, \left (i \arctan \left ({\mathrm e}^{i x}\right )+\frac {i \dilog \left (1+{\mathrm e}^{i x}\right )}{2}-\frac {x \ln \left (1+{\mathrm e}^{i x}\right )}{2}+\frac {i \dilog \left ({\mathrm e}^{i x}\right )}{2}\right ) \cos \relax (x ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.70, size = 299, normalized size = 2.85 \[ \frac {{\left ({\left (2 \, \cos \left (2 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 2\right )} \arctan \left (\cos \relax (x), \sin \relax (x) + 1\right ) + {\left (2 \, \cos \left (2 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 2\right )} \arctan \left (\cos \relax (x), -\sin \relax (x) + 1\right ) - 2 \, {\left (x \cos \left (2 \, x\right ) + i \, x \sin \left (2 \, x\right ) + x\right )} \arctan \left (\sin \relax (x), \cos \relax (x) + 1\right ) - 2 \, {\left (x \cos \left (2 \, x\right ) + i \, x \sin \left (2 \, x\right ) + x\right )} \arctan \left (\sin \relax (x), -\cos \relax (x) + 1\right ) - 4 i \, x \cos \relax (x) + {\left (2 \, \cos \left (2 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 2\right )} {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) - {\left (2 \, \cos \left (2 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 2\right )} {\rm Li}_2\left (e^{\left (i \, x\right )}\right ) - {\left (-i \, x \cos \left (2 \, x\right ) + x \sin \left (2 \, x\right ) - i \, x\right )} \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \cos \relax (x) + 1\right ) - {\left (i \, x \cos \left (2 \, x\right ) - x \sin \left (2 \, x\right ) + i \, x\right )} \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \cos \relax (x) + 1\right ) - {\left (-i \, \cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) - i\right )} \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \sin \relax (x) + 1\right ) - {\left (i \, \cos \left (2 \, x\right ) - \sin \left (2 \, x\right ) + i\right )} \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \sin \relax (x) + 1\right ) + 4 \, x \sin \relax (x)\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.01 \[ \int \frac {x\,\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 \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]
________________________________________________________________________________________