Optimal. Leaf size=13 \[ -2 \cot (x) \sqrt {\sin (x) \tan (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4397, 4400, 2589} \[ -2 \cot (x) \sqrt {\sin (x) \tan (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2589
Rule 4397
Rule 4400
Rubi steps
\begin {align*} \int \sqrt {-\cos (x)+\sec (x)} \, dx &=\int \sqrt {\sin (x) \tan (x)} \, dx\\ &=\frac {\sqrt {\sin (x) \tan (x)} \int \sqrt {\sin (x)} \sqrt {\tan (x)} \, dx}{\sqrt {\sin (x)} \sqrt {\tan (x)}}\\ &=-2 \cot (x) \sqrt {\sin (x) \tan (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 13, normalized size = 1.00 \[ -2 \cot (x) \sqrt {\sin (x) \tan (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.26, size = 22, normalized size = 1.69 \[ -\frac {2 \, \sqrt {-\frac {\cos \relax (x)^{2} - 1}{\cos \relax (x)}} \cos \relax (x)}{\sin \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.20, size = 46, normalized size = 3.54 \[ -\frac {4 \, \mathrm {sgn}\left (-\tan \left (\frac {1}{2} \, x\right )^{3} - \tan \left (\frac {1}{2} \, x\right )\right ) \mathrm {sgn}\left (\cos \relax (x)\right )}{\frac {\sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 1} - 1}{\tan \left (\frac {1}{2} \, x\right )^{2}} - 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.31, size = 174, normalized size = 13.38 \[ \frac {\left (-1+\cos \relax (x )\right ) \left (4 \cos \relax (x ) \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}+4 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}+\ln \left (-\frac {2 \left (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\right )}{\sin \relax (x )^{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 ) \cos \relax (x ) \sqrt {-\frac {-1+\cos ^{2}\relax (x )}{\cos \relax (x )}}}{2 \sqrt {-\frac {\cos \relax (x )}{\left (1+\cos \relax (x )\right )^{2}}}\, \sin \relax (x )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 57, normalized size = 4.38 \[ \frac {2 \, {\left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - 1\right )}}{\sqrt {\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1} \sqrt {-\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1} \sqrt {\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.42, size = 20, normalized size = 1.54 \[ -\frac {2\,\sin \relax (x)}{\sqrt {\frac {1}{\cos \relax (x)}}\,\sqrt {1-{\cos \relax (x)}^2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {- \cos {\relax (x )} + \sec {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________