Integrand size = 16, antiderivative size = 76 \[ \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^2(x)}} \, dx=-\frac {2 x \text {arctanh}\left (e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}}+\frac {i \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}}-\frac {i \operatorname {PolyLog}\left (2,e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}} \]
[Out]
Time = 0.63 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6852, 4268, 2317, 2438} \[ \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^2(x)}} \, dx=-\frac {2 x \text {arctanh}\left (e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}}+\frac {i \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}}-\frac {i \operatorname {PolyLog}\left (2,e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}} \]
[In]
[Out]
Rule 2317
Rule 2438
Rule 4268
Rule 6852
Rubi steps \begin{align*} \text {integral}& = \frac {\sec (x) \int x \csc (x) \, dx}{\sqrt {a \sec ^2(x)}} \\ & = -\frac {2 x \text {arctanh}\left (e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}}-\frac {\sec (x) \int \log \left (1-e^{i x}\right ) \, dx}{\sqrt {a \sec ^2(x)}}+\frac {\sec (x) \int \log \left (1+e^{i x}\right ) \, dx}{\sqrt {a \sec ^2(x)}} \\ & = -\frac {2 x \text {arctanh}\left (e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}}+\frac {(i \sec (x)) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i x}\right )}{\sqrt {a \sec ^2(x)}}-\frac {(i \sec (x)) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i x}\right )}{\sqrt {a \sec ^2(x)}} \\ & = -\frac {2 x \text {arctanh}\left (e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}}+\frac {i \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}}-\frac {i \operatorname {PolyLog}\left (2,e^{i x}\right ) \sec (x)}{\sqrt {a \sec ^2(x)}} \\ \end{align*}
Time = 0.10 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.91 \[ \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^2(x)}} \, dx=\frac {\left (x \left (\log \left (1-e^{i x}\right )-\log \left (1+e^{i x}\right )\right )+i \operatorname {PolyLog}\left (2,-e^{i x}\right )-i \operatorname {PolyLog}\left (2,e^{i x}\right )\right ) \sec (x)}{\sqrt {a \sec ^2(x)}} \]
[In]
[Out]
Time = 1.04 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.09
method | result | size |
risch | \(-\frac {2 i {\mathrm e}^{i x} \left (-\frac {i x \ln \left ({\mathrm e}^{i x}+1\right )}{2}-\frac {\operatorname {polylog}\left (2, -{\mathrm e}^{i x}\right )}{2}+\frac {i x \ln \left (1-{\mathrm e}^{i x}\right )}{2}+\frac {\operatorname {polylog}\left (2, {\mathrm e}^{i x}\right )}{2}\right )}{\sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}+1\right )}\) | \(83\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (55) = 110\).
Time = 0.26 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.63 \[ \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^2(x)}} \, dx=-\frac {{\left (x \cos \left (x\right ) \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right ) \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right ) \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right ) \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + i \, \cos \left (x\right ) {\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right ) {\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + i \, \cos \left (x\right ) {\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right ) {\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right )\right )} \sqrt {\frac {a}{\cos \left (x\right )^{2}}}}{2 \, a} \]
[In]
[Out]
\[ \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^2(x)}} \, dx=\int \frac {x \csc {\left (x \right )} \sec {\left (x \right )}}{\sqrt {a \sec ^{2}{\left (x \right )}}}\, dx \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.04 \[ \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^2(x)}} \, dx=-\frac {2 i \, x \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + 2 i \, x \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) + x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) - x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 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}} \]
[In]
[Out]
\[ \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^2(x)}} \, dx=\int { \frac {x \csc \left (x\right ) \sec \left (x\right )}{\sqrt {a \sec \left (x\right )^{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x \csc (x) \sec (x)}{\sqrt {a \sec ^2(x)}} \, dx=\int \frac {x}{\cos \left (x\right )\,\sin \left (x\right )\,\sqrt {\frac {a}{{\cos \left (x\right )}^2}}} \,d x \]
[In]
[Out]