Integrand size = 16, antiderivative size = 142 \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\frac {1}{2} x \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} i \cos ^2(x) \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-\frac {1}{2} i \cos ^2(x) \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x \sqrt {a \sec ^4(x)} \sin ^2(x) \]
[Out]
Time = 0.55 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.688, Rules used = {6852, 2700, 14, 4505, 2628, 4504, 4268, 2317, 2438, 3554, 8} \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=-2 x \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} i \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\frac {1}{2} i \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} x \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} x \sin ^2(x) \sqrt {a \sec ^4(x)}-\frac {1}{2} \sin (x) \cos (x) \sqrt {a \sec ^4(x)} \]
[In]
[Out]
Rule 8
Rule 14
Rule 2317
Rule 2438
Rule 2628
Rule 2700
Rule 3554
Rule 4268
Rule 4504
Rule 4505
Rule 6852
Rubi steps \begin{align*} \text {integral}& = \left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \csc (x) \sec ^3(x) \, dx \\ & = x \cos ^2(x) \log (\tan (x)) \sqrt {a \sec ^4(x)}+\frac {1}{2} x \sqrt {a \sec ^4(x)} \sin ^2(x)-\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \left (\log (\tan (x))+\frac {\tan ^2(x)}{2}\right ) \, dx \\ & = x \cos ^2(x) \log (\tan (x)) \sqrt {a \sec ^4(x)}+\frac {1}{2} x \sqrt {a \sec ^4(x)} \sin ^2(x)-\frac {1}{2} \left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \tan ^2(x) \, dx-\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \log (\tan (x)) \, dx \\ & = -\frac {1}{2} \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x \sqrt {a \sec ^4(x)} \sin ^2(x)+\frac {1}{2} \left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int 1 \, dx+\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \csc (x) \sec (x) \, dx \\ & = \frac {1}{2} x \cos ^2(x) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x \sqrt {a \sec ^4(x)} \sin ^2(x)+\left (2 \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int x \csc (2 x) \, dx \\ & = \frac {1}{2} x \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x \sqrt {a \sec ^4(x)} \sin ^2(x)-\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \log \left (1-e^{2 i x}\right ) \, dx+\left (\cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \int \log \left (1+e^{2 i x}\right ) \, dx \\ & = \frac {1}{2} x \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x \sqrt {a \sec ^4(x)} \sin ^2(x)+\frac {1}{2} \left (i \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i x}\right )-\frac {1}{2} \left (i \cos ^2(x) \sqrt {a \sec ^4(x)}\right ) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i x}\right ) \\ & = \frac {1}{2} x \cos ^2(x) \sqrt {a \sec ^4(x)}-2 x \text {arctanh}\left (e^{2 i x}\right ) \cos ^2(x) \sqrt {a \sec ^4(x)}+\frac {1}{2} i \cos ^2(x) \operatorname {PolyLog}\left (2,-e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-\frac {1}{2} i \cos ^2(x) \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \sqrt {a \sec ^4(x)}-\frac {1}{2} \cos (x) \sqrt {a \sec ^4(x)} \sin (x)+\frac {1}{2} x \sqrt {a \sec ^4(x)} \sin ^2(x) \\ \end{align*}
Time = 0.26 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.60 \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\frac {1}{2} \cos ^2(x) \sqrt {a \sec ^4(x)} \left (2 x \log \left (1-e^{2 i x}\right )-2 x \log \left (1+e^{2 i x}\right )+i \operatorname {PolyLog}\left (2,-e^{2 i x}\right )-i \operatorname {PolyLog}\left (2,e^{2 i x}\right )+x \sec ^2(x)-\tan (x)\right ) \]
[In]
[Out]
Time = 1.04 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.99
method | result | size |
risch | \(\sqrt {\frac {a \,{\mathrm e}^{4 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{4}}}\, \left (-i+2 x -i {\mathrm e}^{-2 i x}\right )-4 i \sqrt {\frac {a \,{\mathrm e}^{4 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{4}}}\, {\mathrm e}^{-2 i x} \left ({\mathrm e}^{2 i x}+1\right )^{2} \left (\frac {i x \ln \left ({\mathrm e}^{i x}+1\right )}{4}+\frac {\operatorname {polylog}\left (2, -{\mathrm e}^{i x}\right )}{4}+\frac {i x \ln \left (1-{\mathrm e}^{i x}\right )}{4}+\frac {\operatorname {polylog}\left (2, {\mathrm e}^{i x}\right )}{4}-\frac {i x \ln \left ({\mathrm e}^{2 i x}+1\right )}{4}-\frac {\operatorname {polylog}\left (2, -{\mathrm e}^{2 i x}\right )}{8}\right )\) | \(140\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 270 vs. \(2 (105) = 210\).
Time = 0.29 (sec) , antiderivative size = 270, normalized size of antiderivative = 1.90 \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\frac {1}{2} \, {\left (x \cos \left (x\right )^{2} \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right )^{2} \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right )^{2} \log \left (i \, \cos \left (x\right ) + \sin \left (x\right ) + 1\right ) - x \cos \left (x\right )^{2} \log \left (i \, \cos \left (x\right ) - \sin \left (x\right ) + 1\right ) - x \cos \left (x\right )^{2} \log \left (-i \, \cos \left (x\right ) + \sin \left (x\right ) + 1\right ) - x \cos \left (x\right )^{2} \log \left (-i \, \cos \left (x\right ) - \sin \left (x\right ) + 1\right ) + x \cos \left (x\right )^{2} \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right )^{2} \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - i \, \cos \left (x\right )^{2} {\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + i \, \cos \left (x\right )^{2} {\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right )^{2} {\rm Li}_2\left (i \, \cos \left (x\right ) + \sin \left (x\right )\right ) + i \, \cos \left (x\right )^{2} {\rm Li}_2\left (i \, \cos \left (x\right ) - \sin \left (x\right )\right ) + i \, \cos \left (x\right )^{2} {\rm Li}_2\left (-i \, \cos \left (x\right ) + \sin \left (x\right )\right ) - i \, \cos \left (x\right )^{2} {\rm Li}_2\left (-i \, \cos \left (x\right ) - \sin \left (x\right )\right ) + i \, \cos \left (x\right )^{2} {\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right )^{2} {\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right ) - \cos \left (x\right ) \sin \left (x\right ) + x\right )} \sqrt {\frac {a}{\cos \left (x\right )^{4}}} \]
[In]
[Out]
\[ \int x \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\int x \sqrt {a \sec ^{4}{\left (x \right )}} \csc {\left (x \right )} \sec {\left (x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 423 vs. \(2 (105) = 210\).
Time = 0.32 (sec) , antiderivative size = 423, normalized size of antiderivative = 2.98 \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=-\frac {{\left (2 \, {\left (x \cos \left (4 \, x\right ) + 2 \, x \cos \left (2 \, x\right ) + i \, x \sin \left (4 \, x\right ) + 2 i \, x \sin \left (2 \, x\right ) + x\right )} \arctan \left (\sin \left (2 \, x\right ), \cos \left (2 \, x\right ) + 1\right ) - 2 \, {\left (x \cos \left (4 \, x\right ) + 2 \, x \cos \left (2 \, x\right ) + i \, x \sin \left (4 \, x\right ) + 2 i \, x \sin \left (2 \, x\right ) + x\right )} \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + 2 \, {\left (x \cos \left (4 \, x\right ) + 2 \, x \cos \left (2 \, x\right ) + i \, x \sin \left (4 \, x\right ) + 2 i \, x \sin \left (2 \, x\right ) + x\right )} \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) - 2 \, {\left (-2 i \, x - 1\right )} \cos \left (2 \, x\right ) - {\left (\cos \left (4 \, x\right ) + 2 \, \cos \left (2 \, x\right ) + i \, \sin \left (4 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_2\left (-e^{\left (2 i \, x\right )}\right ) + 2 \, {\left (\cos \left (4 \, x\right ) + 2 \, \cos \left (2 \, x\right ) + i \, \sin \left (4 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + 2 \, {\left (\cos \left (4 \, x\right ) + 2 \, \cos \left (2 \, x\right ) + i \, \sin \left (4 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_2\left (e^{\left (i \, x\right )}\right ) + {\left (-i \, x \cos \left (4 \, x\right ) - 2 i \, x \cos \left (2 \, x\right ) + x \sin \left (4 \, x\right ) + 2 \, x \sin \left (2 \, x\right ) - i \, x\right )} \log \left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right ) + {\left (i \, x \cos \left (4 \, x\right ) + 2 i \, x \cos \left (2 \, x\right ) - x \sin \left (4 \, x\right ) - 2 \, x \sin \left (2 \, x\right ) + i \, x\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + {\left (i \, x \cos \left (4 \, x\right ) + 2 i \, x \cos \left (2 \, x\right ) - x \sin \left (4 \, x\right ) - 2 \, x \sin \left (2 \, x\right ) + i \, x\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - 2 \, {\left (2 \, x - i\right )} \sin \left (2 \, x\right ) + 2\right )} \sqrt {a}}{-2 i \, \cos \left (4 \, x\right ) - 4 i \, \cos \left (2 \, x\right ) + 2 \, \sin \left (4 \, x\right ) + 4 \, \sin \left (2 \, x\right ) - 2 i} \]
[In]
[Out]
\[ \int x \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\int { \sqrt {a \sec \left (x\right )^{4}} x \csc \left (x\right ) \sec \left (x\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^4(x)} \, dx=\int \frac {x\,\sqrt {\frac {a}{{\cos \left (x\right )}^4}}}{\cos \left (x\right )\,\sin \left (x\right )} \,d x \]
[In]
[Out]