Optimal. Leaf size=52 \[ \frac {\sin (x) \tan ^{-1}\left (\sqrt {\cos (x)}\right )}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {\sin (x) \tanh ^{-1}\left (\sqrt {\cos (x)}\right )}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.727, Rules used = {4397, 4400, 2601, 2565, 329, 298, 203, 206} \[ \frac {\sin (x) \tan ^{-1}\left (\sqrt {\cos (x)}\right )}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {\sin (x) \tanh ^{-1}\left (\sqrt {\cos (x)}\right )}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 206
Rule 298
Rule 329
Rule 2565
Rule 2601
Rule 4397
Rule 4400
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {-\cos (x)+\sec (x)}} \, dx &=\int \frac {1}{\sqrt {\sin (x) \tan (x)}} \, dx\\ &=\frac {\left (\sqrt {\sin (x)} \sqrt {\tan (x)}\right ) \int \frac {1}{\sqrt {\sin (x)} \sqrt {\tan (x)}} \, dx}{\sqrt {\sin (x) \tan (x)}}\\ &=\frac {\sin (x) \int \sqrt {\cos (x)} \csc (x) \, dx}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {\sin (x) \operatorname {Subst}\left (\int \frac {\sqrt {x}}{1-x^2} \, dx,x,\cos (x)\right )}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {(2 \sin (x)) \operatorname {Subst}\left (\int \frac {x^2}{1-x^4} \, dx,x,\sqrt {\cos (x)}\right )}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=-\frac {\sin (x) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\cos (x)}\right )}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}+\frac {\sin (x) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\cos (x)}\right )}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ &=\frac {\tan ^{-1}\left (\sqrt {\cos (x)}\right ) \sin (x)}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}-\frac {\tanh ^{-1}\left (\sqrt {\cos (x)}\right ) \sin (x)}{\sqrt {\cos (x)} \sqrt {\sin (x) \tan (x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.25, size = 43, normalized size = 0.83 \[ \frac {\cos (x) \cot (x) \sqrt {\sin (x) \tan (x)} \left (\tan ^{-1}\left (\sqrt [4]{\cos ^2(x)}\right )-\tanh ^{-1}\left (\sqrt [4]{\cos ^2(x)}\right )\right )}{\cos ^2(x)^{3/4}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.00, size = 72, normalized size = 1.38 \[ -\frac {1}{2} \, \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 ) + \frac {1}{2} \, \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 ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {-\cos \relax (x) + \sec \relax (x)}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.28, size = 105, normalized size = 2.02 \[ -\frac {\left (\arctan \left (\frac {1}{2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}}\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 )\right ) \left (1+\cos \relax (x )\right ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}\, \sqrt {\frac {1-\left (\cos ^{2}\relax (x )\right )}{\cos \relax (x )}}}{2 \sin \relax (x )} \]
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}{\sqrt {-\cos \relax (x) + \sec \relax (x)}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {1}{\sqrt {\frac {1}{\cos \relax (x)}-\cos \relax (x)}} \,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}{\sqrt {- \cos {\relax (x )} + \sec {\relax (x )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________