Optimal. Leaf size=91 \[ -\frac {3 \sin (x) \tan ^{-1}\left (\sqrt {\cos (x)}\right )}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}+\frac {3 \cot (x)}{16 \sqrt {\sin (x) \tan (x)}}+\frac {3 \sin (x) \tanh ^{-1}\left (\sqrt {\cos (x)}\right )}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 10, 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, 298, 203, 206} \[ -\frac {3 \sin (x) \tan ^{-1}\left (\sqrt {\cos (x)}\right )}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}+\frac {3 \cot (x)}{16 \sqrt {\sin (x) \tan (x)}}+\frac {3 \sin (x) \tanh ^{-1}\left (\sqrt {\cos (x)}\right )}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 206
Rule 298
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))^{5/2}} \, dx &=\int \frac {1}{(\sin (x) \tan (x))^{5/2}} \, dx\\ &=\frac {\left (\sqrt {\sin (x)} \sqrt {\tan (x)}\right ) \int \frac {1}{\sin ^{\frac {5}{2}}(x) \tan ^{\frac {5}{2}}(x)} \, dx}{\sqrt {\sin (x) \tan (x)}}\\ &=-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}}-\frac {\left (3 \sqrt {\sin (x)} \sqrt {\tan (x)}\right ) \int \frac {1}{\sin ^{\frac {5}{2}}(x) \sqrt {\tan (x)}} \, dx}{8 \sqrt {\sin (x) \tan (x)}}\\ &=\frac {3 \cot (x)}{16 \sqrt {\sin (x) \tan (x)}}-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}}-\frac {\left (3 \sqrt {\sin (x)} \sqrt {\tan (x)}\right ) \int \frac {1}{\sqrt {\sin (x)} \sqrt {\tan (x)}} \, dx}{32 \sqrt {\sin (x) \tan (x)}}\\ &=\frac {3 \cot (x)}{16 \sqrt {\sin (x) \tan (x)}}-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}}-\frac {(3 \sin (x)) \int \sqrt {\cos (x)} \csc (x) \, dx}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=\frac {3 \cot (x)}{16 \sqrt {\sin (x) \tan (x)}}-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}}+\frac {(3 \sin (x)) \operatorname {Subst}\left (\int \frac {\sqrt {x}}{1-x^2} \, dx,x,\cos (x)\right )}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=\frac {3 \cot (x)}{16 \sqrt {\sin (x) \tan (x)}}-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}}+\frac {(3 \sin (x)) \operatorname {Subst}\left (\int \frac {x^2}{1-x^4} \, dx,x,\sqrt {\cos (x)}\right )}{16 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=\frac {3 \cot (x)}{16 \sqrt {\sin (x) \tan (x)}}-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}}+\frac {(3 \sin (x)) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\cos (x)}\right )}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {(3 \sin (x)) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\cos (x)}\right )}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=\frac {3 \cot (x)}{16 \sqrt {\sin (x) \tan (x)}}-\frac {\cot (x) \csc ^2(x)}{4 \sqrt {\sin (x) \tan (x)}}-\frac {3 \tan ^{-1}\left (\sqrt {\cos (x)}\right ) \sin (x)}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}+\frac {3 \tanh ^{-1}\left (\sqrt {\cos (x)}\right ) \sin (x)}{32 \sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.65, size = 73, normalized size = 0.80 \[ -\frac {\cot (x) \sqrt {\sin (x) \tan (x)} \left (3 \cos (x) \tan ^{-1}\left (\sqrt [4]{\cos ^2(x)}\right )-3 \cos (x) \tanh ^{-1}\left (\sqrt [4]{\cos ^2(x)}\right )+\cos ^2(x)^{3/4} (3 \cos (2 x)+5) \cot (x) \csc ^3(x)\right )}{32 \cos ^2(x)^{3/4}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.02, size = 147, normalized size = 1.62 \[ \frac {3 \, {\left (\cos \relax (x)^{4} - 2 \, \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) + 3 \, {\left (\cos \relax (x)^{4} - 2 \, \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 (3 \, \cos \relax (x)^{4} + \cos \relax (x)^{2}\right )} \sqrt {-\frac {\cos \relax (x)^{2} - 1}{\cos \relax (x)}}}{64 \, {\left (\cos \relax (x)^{4} - 2 \, \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.40, size = 170, normalized size = 1.87 \[ \frac {\frac {{\left (\frac {4 \, {\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2}} + 1\right )} \tan \left (\frac {1}{2} \, x\right )^{4}}{{\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}^{2}} - 4 \, \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} {\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 2\right )} - \frac {4 \, {\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2}} - \frac {{\left (\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1\right )}^{2}}{\tan \left (\frac {1}{2} \, x\right )^{4}} - 12 \, \arcsin \left (\tan \left (\frac {1}{2} \, x\right )^{2}\right ) + 12 \, \log \left (-\frac {\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1}{\tan \left (\frac {1}{2} \, x\right )^{2}}\right )}{256 \, \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.32, size = 454, normalized size = 4.99 \[ \frac {\left (24 \left (\cos ^{3}\relax (x )\right ) \left (-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}\right )^{\frac {3}{2}}+40 \left (\cos ^{2}\relax (x )\right ) \left (-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}\right )^{\frac {3}{2}}-12 \left (\cos ^{3}\relax (x )\right ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-3 \left (\cos ^{3}\relax (x )\right ) \ln \left (-\frac {2 \left (\cos ^{2}\relax (x )\right ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-\left (\cos ^{2}\relax (x )\right )+2 \cos \relax (x )-2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-1}{\sin \relax (x )^{2}}\right )-3 \left (\cos ^{3}\relax (x )\right ) \arctan \left (\frac {1}{2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}}\right )+8 \cos \relax (x ) \left (-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}\right )^{\frac {3}{2}}+24 \left (\cos ^{2}\relax (x )\right ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}+3 \left (\cos ^{2}\relax (x )\right ) \ln \left (-\frac {2 \left (\cos ^{2}\relax (x )\right ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-\left (\cos ^{2}\relax (x )\right )+2 \cos \relax (x )-2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-1}{\sin \relax (x )^{2}}\right )+3 \left (\cos ^{2}\relax (x )\right ) \arctan \left (\frac {1}{2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}}\right )-8 \left (-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}\right )^{\frac {3}{2}}-12 \cos \relax (x ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}+3 \cos \relax (x ) \ln \left (-\frac {2 \left (\cos ^{2}\relax (x )\right ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-\left (\cos ^{2}\relax (x )\right )+2 \cos \relax (x )-2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-1}{\sin \relax (x )^{2}}\right )+3 \cos \relax (x ) \arctan \left (\frac {1}{2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}}\right )-3 \ln \left (-\frac {2 \left (\cos ^{2}\relax (x )\right ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-\left (\cos ^{2}\relax (x )\right )+2 \cos \relax (x )-2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}-1}{\sin \relax (x )^{2}}\right )-3 \arctan \left (\frac {1}{2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}}\right )\right ) \sin \relax (x )}{64 \left (-\frac {-1+\cos ^{2}\relax (x )}{\cos \relax (x )}\right )^{\frac {5}{2}} \cos \relax (x )^{2} \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}} \]
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 {5}{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 )}^{5/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (- \cos {\relax (x )} + \sec {\relax (x )}\right )^{\frac {5}{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________