Optimal. Leaf size=39 \[ -\frac {2}{3} \sqrt {4-\cot ^2(x)} \tan (x)-\frac {1}{3} \sqrt {4-\cot ^2(x)} \tan ^3(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {12, 445, 464,
197} \begin {gather*} -\frac {1}{3} \tan ^3(x) \sqrt {4-\cot ^2(x)}-\frac {2}{3} \tan (x) \sqrt {4-\cot ^2(x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 197
Rule 445
Rule 464
Rubi steps
\begin {align*} \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx &=\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*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 36, normalized size = 0.92 \begin {gather*} \frac {(3+\cos (2 x)) (-3+5 \cos (2 x)) \csc (x) \sec ^3(x)}{12 \sqrt {4-\cot ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [F(-1)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(63\) vs.
\(2(31)=62\).
time = 0.54, size = 64, normalized size = 1.64
method | result | size |
default | \(-\frac {\left (5 \left (\cos ^{2}\left (x \right )\right )+2\right ) \sqrt {-\frac {5 \left (\cos ^{2}\left (x \right )\right )-4}{\sin \left (x \right )^{2}}}\, \sin \left (x \right ) \sqrt {4}}{12 \cos \left (x \right )^{3}}+\frac {\sqrt {4}\, \sin \left (x \right ) \sqrt {-\frac {5 \left (\cos ^{2}\left (x \right )\right )-4}{\sin \left (x \right )^{2}}}}{4 \cos \left (x \right )}\) | \(64\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 63 vs.
\(2 (31) = 62\).
time = 0.26, size = 63, normalized size = 1.62 \begin {gather*} -\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}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.32, size = 33, normalized size = 0.85 \begin {gather*} -\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}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \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 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.02, size = 193, normalized size = 4.95 \begin {gather*} \frac {2}{3} \mathrm {i} \mathrm {sign}\left (\sin x\right )-\frac {\frac {\frac {128000}{3} \left (-\frac {-2 \sqrt {5} \sqrt {-5 \cos ^{2}x+4}+4 \sqrt {5}}{10 \cos x}\right )^{3}-\frac {17920 \left (-2 \sqrt {5} \sqrt {-5 \cos ^{2}x+4}+4 \sqrt {5}\right )}{\cos x}}{163840 \sqrt {5}}+\frac {-34406400 \left (-\frac {-2 \sqrt {5} \sqrt {-5 \cos ^{2}x+4}+4 \sqrt {5}}{10 \cos x}\right )^{2}-8192000}{31457280 \left (\sqrt {5} \left (-\frac {-2 \sqrt {5} \sqrt {-5 \cos ^{2}x+4}+4 \sqrt {5}}{10 \cos x}\right )^{3}\right )}}{\mathrm {sign}\left (\sin x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.76, size = 20, normalized size = 0.51 \begin {gather*} -\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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________