Integrand size = 23, antiderivative size = 39 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {2}{3} \sqrt {4-\cot ^2(x)} \tan (x)-\frac {1}{3} \sqrt {4-\cot ^2(x)} \tan ^3(x) \]
[Out]
Time = 0.12 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {12, 445, 464, 197} \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {1}{3} \tan ^3(x) \sqrt {4-\cot ^2(x)}-\frac {2}{3} \tan (x) \sqrt {4-\cot ^2(x)} \]
[In]
[Out]
Rule 12
Rule 197
Rule 445
Rule 464
Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {2 \left (-1-2 x^2\right )}{\sqrt {4-\frac {1}{x^2}}} \, dx,x,\tan (x)\right ) \\ & = 2 \text {Subst}\left (\int \frac {-1-2 x^2}{\sqrt {4-\frac {1}{x^2}}} \, dx,x,\tan (x)\right ) \\ & = 2 \text {Subst}\left (\int \frac {\left (-2-\frac {1}{x^2}\right ) x^2}{\sqrt {4-\frac {1}{x^2}}} \, dx,x,\tan (x)\right ) \\ & = -\frac {1}{3} \sqrt {4-\cot ^2(x)} \tan ^3(x)-\frac {8}{3} \text {Subst}\left (\int \frac {1}{\sqrt {4-\frac {1}{x^2}}} \, dx,x,\tan (x)\right ) \\ & = -\frac {2}{3} \sqrt {4-\cot ^2(x)} \tan (x)-\frac {1}{3} \sqrt {4-\cot ^2(x)} \tan ^3(x) \\ \end{align*}
Time = 0.09 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=\frac {(3+\cos (2 x)) (-3+5 \cos (2 x)) \csc (x) \sec ^3(x)}{12 \sqrt {4-\cot ^2(x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(66\) vs. \(2(31)=62\).
Time = 2.73 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.72
method | result | size |
default | \(\frac {\left (\sec ^{3}\left (x \right )\right ) \csc \left (x \right ) \left (25 \left (\cos ^{4}\left (x \right )\right )-10 \left (\cos ^{2}\left (x \right )\right )-8\right )}{6 \sqrt {-5 \left (\cot ^{2}\left (x \right )\right )+4 \left (\csc ^{2}\left (x \right )\right )}}-\frac {5 \cot \left (x \right )-4 \sec \left (x \right ) \csc \left (x \right )}{2 \sqrt {-5 \left (\cot ^{2}\left (x \right )\right )+4 \left (\csc ^{2}\left (x \right )\right )}}\) | \(67\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.85 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {{\left (\cos \left (x\right )^{2} + 1\right )} \sqrt {\frac {5 \, \cos \left (x\right )^{2} - 4}{\cos \left (x\right )^{2} - 1}} \sin \left (x\right )}{3 \, \cos \left (x\right )^{3}} \]
[In]
[Out]
\[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=\int \frac {\cos {\left (2 x \right )} - 3}{\sqrt {- \left (\cot {\left (x \right )} - 2\right ) \left (\cot {\left (x \right )} + 2\right )} \cos ^{4}{\left (x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (31) = 62\).
Time = 0.21 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.62 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {1}{48} \, {\left (-\frac {1}{\tan \left (x\right )^{2}} + 4\right )}^{\frac {3}{2}} \tan \left (x\right )^{3} + \frac {3}{16} \, \sqrt {-\frac {1}{\tan \left (x\right )^{2}} + 4} \tan \left (x\right ) - \frac {8 \, \tan \left (x\right )^{4} + 26 \, \tan \left (x\right )^{2} - 7}{8 \, \sqrt {2 \, \tan \left (x\right ) + 1} \sqrt {2 \, \tan \left (x\right ) - 1}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.28 (sec) , antiderivative size = 135, normalized size of antiderivative = 3.46 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=\frac {\frac {125 \, \sqrt {5} {\left (\frac {21 \, {\left (\sqrt {5} \sqrt {-5 \, \cos \left (x\right )^{2} + 4} - 2 \, \sqrt {5}\right )}^{2}}{\cos \left (x\right )^{2}} + 125\right )} \cos \left (x\right )^{3}}{{\left (\sqrt {5} \sqrt {-5 \, \cos \left (x\right )^{2} + 4} - 2 \, \sqrt {5}\right )}^{3}} - \frac {\sqrt {5} {\left (\sqrt {5} \sqrt {-5 \, \cos \left (x\right )^{2} + 4} - 2 \, \sqrt {5}\right )}^{3}}{\cos \left (x\right )^{3}} - \frac {105 \, \sqrt {5} {\left (\sqrt {5} \sqrt {-5 \, \cos \left (x\right )^{2} + 4} - 2 \, \sqrt {5}\right )}}{\cos \left (x\right )}}{2400 \, \mathrm {sgn}\left (\sin \left (x\right )\right )} + \frac {2}{3} i \, \mathrm {sgn}\left (\sin \left (x\right )\right ) \]
[In]
[Out]
Time = 0.85 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.51 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {\mathrm {tan}\left (x\right )\,\left ({\mathrm {tan}\left (x\right )}^2+2\right )\,\sqrt {4-\frac {1}{{\mathrm {tan}\left (x\right )}^2}}}{3} \]
[In]
[Out]