Optimal. Leaf size=14 \[ \tanh ^{-1}\left (\frac {\tan (x)}{\sqrt {\tan ^2(x)-4}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3675, 217, 206} \[ \tanh ^{-1}\left (\frac {\tan (x)}{\sqrt {\tan ^2(x)-4}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 217
Rule 3675
Rubi steps
\begin {align*} \int \frac {\sec ^2(x)}{\sqrt {-4+\tan ^2(x)}} \, dx &=\operatorname {Subst}\left (\int \frac {1}{\sqrt {-4+x^2}} \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\tan (x)}{\sqrt {-4+\tan ^2(x)}}\right )\\ &=\tanh ^{-1}\left (\frac {\tan (x)}{\sqrt {-4+\tan ^2(x)}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.05, size = 46, normalized size = 3.29 \[ \frac {\sqrt {5 \cos (2 x)+3} \sec (x) \tan ^{-1}\left (\frac {\sin (x)}{\sqrt {4-5 \sin ^2(x)}}\right )}{\sqrt {2} \sqrt {\tan ^2(x)-4}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.00, size = 67, normalized size = 4.79 \[ \frac {1}{4} \, \log \left (\frac {1}{2} \, \sqrt {-\frac {5 \, \cos \relax (x)^{2} - 1}{\cos \relax (x)^{2}}} \cos \relax (x) \sin \relax (x) - \frac {3}{2} \, \cos \relax (x)^{2} + \frac {1}{2}\right ) - \frac {1}{4} \, \log \left (-\frac {1}{2} \, \sqrt {-\frac {5 \, \cos \relax (x)^{2} - 1}{\cos \relax (x)^{2}}} \cos \relax (x) \sin \relax (x) - \frac {3}{2} \, \cos \relax (x)^{2} + \frac {1}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 17, normalized size = 1.21 \[ -\log \left ({\left | \sqrt {\tan \relax (x)^{2} - 4} - \tan \relax (x) \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.72, size = 171, normalized size = 12.21 \[ -\frac {\sqrt {-\frac {2 \left (\cos \relax (x ) \sqrt {5}-5 \cos \relax (x )-\sqrt {5}+1\right )}{1+\cos \relax (x )}}\, \sqrt {2}\, \sqrt {\frac {\cos \relax (x ) \sqrt {5}-\sqrt {5}+5 \cos \relax (x )-1}{1+\cos \relax (x )}}\, \left (\EllipticF \left (\frac {\left (-1+\cos \relax (x )\right ) \left (\sqrt {5}-1\right )}{2 \sin \relax (x )}, \frac {3}{2}+\frac {\sqrt {5}}{2}\right )-2 \EllipticPi \left (\frac {\sqrt {\frac {3}{2}-\frac {\sqrt {5}}{2}}\, \left (-1+\cos \relax (x )\right )}{\sin \relax (x )}, -\frac {2}{\sqrt {5}-3}, \frac {\sqrt {\frac {3}{2}+\frac {\sqrt {5}}{2}}}{\sqrt {\frac {3}{2}-\frac {\sqrt {5}}{2}}}\right )\right ) \left (\sin ^{2}\relax (x )\right )}{4 \sqrt {-\frac {5 \left (\cos ^{2}\relax (x )\right )-1}{\cos \relax (x )^{2}}}\, \cos \relax (x ) \left (-1+\cos \relax (x )\right ) \sqrt {\frac {3}{2}-\frac {\sqrt {5}}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 16, normalized size = 1.14 \[ \log \left (2 \, \sqrt {\tan \relax (x)^{2} - 4} + 2 \, \tan \relax (x)\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.07 \[ \int \frac {1}{{\cos \relax (x)}^2\,\sqrt {{\mathrm {tan}\relax (x)}^2-4}} \,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 {\sec ^{2}{\relax (x )}}{\sqrt {\left (\tan {\relax (x )} - 2\right ) \left (\tan {\relax (x )} + 2\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________