Optimal. Leaf size=110 \[ -\frac {5 \sin (x) \tan ^{-1}\left (\sqrt {\cos (x)}\right )}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}+\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {5 \csc (x)}{192 \sqrt {\sin (x) \tan (x)}}-\frac {5 \sin (x) \tanh ^{-1}\left (\sqrt {\cos (x)}\right )}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 10, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.909, Rules used = {4397, 4400, 2597, 2599, 2601, 2565, 329, 212, 206, 203} \[ -\frac {5 \sin (x) \tan ^{-1}\left (\sqrt {\cos (x)}\right )}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}+\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {5 \csc (x)}{192 \sqrt {\sin (x) \tan (x)}}-\frac {5 \sin (x) \tanh ^{-1}\left (\sqrt {\cos (x)}\right )}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 206
Rule 212
Rule 329
Rule 2565
Rule 2597
Rule 2599
Rule 2601
Rule 4397
Rule 4400
Rubi steps
\begin {align*} \int \frac {1}{(-\cos (x)+\sec (x))^{7/2}} \, dx &=\int \frac {1}{(\sin (x) \tan (x))^{7/2}} \, dx\\ &=\frac {\left (\sqrt {\sin (x)} \sqrt {\tan (x)}\right ) \int \frac {1}{\sin ^{\frac {7}{2}}(x) \tan ^{\frac {7}{2}}(x)} \, dx}{\sqrt {\sin (x) \tan (x)}}\\ &=-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}}-\frac {\left (5 \sqrt {\sin (x)} \sqrt {\tan (x)}\right ) \int \frac {1}{\sin ^{\frac {7}{2}}(x) \tan ^{\frac {3}{2}}(x)} \, dx}{12 \sqrt {\sin (x) \tan (x)}}\\ &=\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}}+\frac {\left (5 \sqrt {\sin (x)} \sqrt {\tan (x)}\right ) \int \frac {\sqrt {\tan (x)}}{\sin ^{\frac {7}{2}}(x)} \, dx}{96 \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {5 \csc (x)}{192 \sqrt {\sin (x) \tan (x)}}+\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}}+\frac {\left (5 \sqrt {\sin (x)} \sqrt {\tan (x)}\right ) \int \frac {\sqrt {\tan (x)}}{\sin ^{\frac {3}{2}}(x)} \, dx}{128 \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {5 \csc (x)}{192 \sqrt {\sin (x) \tan (x)}}+\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}}+\frac {(5 \sin (x)) \int \frac {\csc (x)}{\sqrt {\cos (x)}} \, dx}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {5 \csc (x)}{192 \sqrt {\sin (x) \tan (x)}}+\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}}-\frac {(5 \sin (x)) \operatorname {Subst}\left (\int \frac {1}{\sqrt {x} \left (1-x^2\right )} \, dx,x,\cos (x)\right )}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {5 \csc (x)}{192 \sqrt {\sin (x) \tan (x)}}+\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}}-\frac {(5 \sin (x)) \operatorname {Subst}\left (\int \frac {1}{1-x^4} \, dx,x,\sqrt {\cos (x)}\right )}{64 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {5 \csc (x)}{192 \sqrt {\sin (x) \tan (x)}}+\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}}-\frac {(5 \sin (x)) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\cos (x)}\right )}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {(5 \sin (x)) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\cos (x)}\right )}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {5 \csc (x)}{192 \sqrt {\sin (x) \tan (x)}}+\frac {5 \csc ^3(x)}{48 \sqrt {\sin (x) \tan (x)}}-\frac {\cot ^2(x) \csc ^3(x)}{6 \sqrt {\sin (x) \tan (x)}}-\frac {5 \tan ^{-1}\left (\sqrt {\cos (x)}\right ) \sin (x)}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {5 \tanh ^{-1}\left (\sqrt {\cos (x)}\right ) \sin (x)}{128 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.36, size = 74, normalized size = 0.67 \[ -\frac {\cot (x) \sqrt {\sin (x) \tan (x)} \left (15 \tan ^{-1}\left (\sqrt [4]{\cos ^2(x)}\right )+2 \sqrt [4]{\cos ^2(x)} \left (32 \csc ^4(x)-52 \csc ^2(x)+5\right ) \csc ^2(x)+15 \tanh ^{-1}\left (\sqrt [4]{\cos ^2(x)}\right )\right )}{384 \sqrt [4]{\cos ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.63, size = 171, normalized size = 1.55 \[ \frac {15 \, {\left (\cos \relax (x)^{6} - 3 \, \cos \relax (x)^{4} + 3 \, \cos \relax (x)^{2} - 1\right )} \arctan \left (\frac {2 \, \sqrt {-\frac {\cos \relax (x)^{2} - 1}{\cos \relax (x)}} \cos \relax (x)}{{\left (\cos \relax (x) - 1\right )} \sin \relax (x)}\right ) \sin \relax (x) + 15 \, {\left (\cos \relax (x)^{6} - 3 \, \cos \relax (x)^{4} + 3 \, \cos \relax (x)^{2} - 1\right )} \log \left (\frac {{\left (\cos \relax (x) + 1\right )} \sin \relax (x) - 2 \, \sqrt {-\frac {\cos \relax (x)^{2} - 1}{\cos \relax (x)}} \cos \relax (x)}{{\left (\cos \relax (x) - 1\right )} \sin \relax (x)}\right ) \sin \relax (x) + 4 \, {\left (5 \, \cos \relax (x)^{5} + 42 \, \cos \relax (x)^{3} - 15 \, \cos \relax (x)\right )} \sqrt {-\frac {\cos \relax (x)^{2} - 1}{\cos \relax (x)}}}{768 \, {\left (\cos \relax (x)^{6} - 3 \, \cos \relax (x)^{4} + 3 \, \cos \relax (x)^{2} - 1\right )} \sin \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.45, size = 229, normalized size = 2.08 \[ -\frac {\frac {{\left (\frac {3 \, {\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2}} - \frac {27 \, {\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}^{2}}{\tan \left (\frac {1}{2} \, x\right )^{4}} + 1\right )} \tan \left (\frac {1}{2} \, x\right )^{6}}{{\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}^{3}} - 4 \, \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} {\left ({\left (2 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 3\right )} \tan \left (\frac {1}{2} \, x\right )^{2} - 14\right )} + \frac {27 \, {\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2}} - \frac {3 \, {\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}^{2}}{\tan \left (\frac {1}{2} \, x\right )^{4}} - \frac {{\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}^{3}}{\tan \left (\frac {1}{2} \, x\right )^{6}} + 60 \, \arcsin \left (\tan \left (\frac {1}{2} \, x\right )^{2}\right ) + 60 \, \log \left (-\frac {\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1}{\tan \left (\frac {1}{2} \, x\right )^{2}}\right )}{3072 \, \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, x\right )^{4} - 1\right ) \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, x\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.36, size = 494, normalized size = 4.49 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{{\left (-\cos \relax (x) + \sec \relax (x)\right )}^{\frac {7}{2}}}\,{d x} \]
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 {1}{{\left (\frac {1}{\cos \relax (x)}-\cos \relax (x)\right )}^{7/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________