Optimal. Leaf size=32 \[ \tan ^{-1}\left (\frac{\sqrt{2} \tan (x)}{\sqrt{1-\tan ^2(x)}}\right )-\frac{\sin ^{-1}(\tan (x))}{\sqrt{2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0385622, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.454, Rules used = {12, 402, 216, 377, 203} \[ \tan ^{-1}\left (\frac{\sqrt{2} \tan (x)}{\sqrt{1-\tan ^2(x)}}\right )-\frac{\sin ^{-1}(\tan (x))}{\sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 402
Rule 216
Rule 377
Rule 203
Rubi steps
\begin{align*} \int \sqrt{\cot (2 x) \tan (x)} \, dx &=\operatorname{Subst}\left (\int \frac{\sqrt{1-x^2}}{\sqrt{2} \left (1+x^2\right )} \, dx,x,\tan (x)\right )\\ &=\frac{\operatorname{Subst}\left (\int \frac{\sqrt{1-x^2}}{1+x^2} \, dx,x,\tan (x)\right )}{\sqrt{2}}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{1}{\sqrt{1-x^2}} \, dx,x,\tan (x)\right )}{\sqrt{2}}+\sqrt{2} \operatorname{Subst}\left (\int \frac{1}{\sqrt{1-x^2} \left (1+x^2\right )} \, dx,x,\tan (x)\right )\\ &=-\frac{\sin ^{-1}(\tan (x))}{\sqrt{2}}+\sqrt{2} \operatorname{Subst}\left (\int \frac{1}{1+2 x^2} \, dx,x,\frac{\tan (x)}{\sqrt{1-\tan ^2(x)}}\right )\\ &=-\frac{\sin ^{-1}(\tan (x))}{\sqrt{2}}+\tan ^{-1}\left (\frac{\sqrt{2} \tan (x)}{\sqrt{1-\tan ^2(x)}}\right )\\ \end{align*}
Mathematica [A] time = 0.067457, size = 52, normalized size = 1.62 \[ \frac{\cos (x) \sqrt{\tan (x) \cot (2 x)} \left (\sqrt{2} \sin ^{-1}\left (\sqrt{2} \sin (x)\right )-\tan ^{-1}\left (\frac{\sin (x)}{\sqrt{\cos (2 x)}}\right )\right )}{\sqrt{\cos (2 x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.327, size = 242, normalized size = 7.6 \begin{align*}{\frac{\sqrt{2} \left ( 2+\sqrt{2} \right ) \cos \left ( x \right ) \left ( \sin \left ( x \right ) \right ) ^{2}}{2\,\sqrt{3+2\,\sqrt{2}} \left ( 1+\sqrt{2} \right ) \left ( \cos \left ( x \right ) -1 \right ) \left ( 2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1 \right ) } \left ( 4\,{\it EllipticPi} \left ({\frac{\sqrt{3+2\,\sqrt{2}} \left ( \cos \left ( x \right ) -1 \right ) }{\sin \left ( x \right ) }},- \left ( 3+2\,\sqrt{2} \right ) ^{-1},{\frac{\sqrt{3-2\,\sqrt{2}}}{\sqrt{3+2\,\sqrt{2}}}} \right ) -2\,{\it EllipticPi} \left ({\frac{\sqrt{3+2\,\sqrt{2}} \left ( \cos \left ( x \right ) -1 \right ) }{\sin \left ( x \right ) }}, \left ( 3+2\,\sqrt{2} \right ) ^{-1},{\frac{\sqrt{3-2\,\sqrt{2}}}{\sqrt{3+2\,\sqrt{2}}}} \right ) -{\it EllipticF} \left ({\frac{ \left ( \cos \left ( x \right ) -1 \right ) \left ( 1+\sqrt{2} \right ) }{\sin \left ( x \right ) }},3-2\,\sqrt{2} \right ) \right ) \sqrt{-2\,{\frac{\cos \left ( x \right ) \sqrt{2}-2\,\cos \left ( x \right ) -\sqrt{2}+1}{\cos \left ( x \right ) +1}}}\sqrt{{\frac{\cos \left ( x \right ) \sqrt{2}+2\,\cos \left ( x \right ) -\sqrt{2}-1}{\cos \left ( x \right ) +1}}}\sqrt{{\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1}{ \left ( \cos \left ( x \right ) \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.67048, size = 328, normalized size = 10.25 \begin{align*} \frac{1}{4} \, \sqrt{2} \arctan \left (\frac{\sqrt{2}{\left (3 \, \cos \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) - 1\right )} \sqrt{\frac{\cos \left (2 \, x\right )}{\cos \left (2 \, x\right ) + 1}}}{4 \, \cos \left (2 \, x\right ) \sin \left (2 \, x\right )}\right ) - \frac{1}{2} \, \arctan \left (\frac{\sqrt{2}{\left (2 \, \sqrt{2} \cos \left (2 \, x\right )^{2} + \sqrt{2} \cos \left (2 \, x\right ) - \sqrt{2}\right )} \sqrt{\frac{\cos \left (2 \, x\right )}{\cos \left (2 \, x\right ) + 1}}}{4 \, \cos \left (2 \, x\right ) \sin \left (2 \, x\right )}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\frac{\cot{\left (2 x \right )}}{\cot{\left (x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] time = 1.23145, size = 188, normalized size = 5.88 \begin{align*} \frac{1}{2} \,{\left (\pi - \sqrt{2} \arctan \left (-i\right ) - \sqrt{2} \arctan \left (\sqrt{2}\right ) - i \, \log \left (2 \, \sqrt{2} + 3\right )\right )} \mathrm{sgn}\left (\sin \left (2 \, x\right )\right ) - \frac{\sqrt{2}{\left ({\left (\sqrt{2} \arcsin \left (4 \, \cos \left (x\right )^{2} - 3\right ) + 2 \, \arctan \left (\frac{1}{4} \, \sqrt{2}{\left (\frac{3 \,{\left (2 \, \sqrt{2} \sqrt{-2 \, \cos \left (x\right )^{4} + 3 \, \cos \left (x\right )^{2} - 1} - 1\right )}}{4 \, \cos \left (x\right )^{2} - 3} - 1\right )}\right )\right )} \mathrm{sgn}\left (\cos \left (x\right )\right ) +{\left (-i \, \sqrt{2} \log \left (2 i \, \sqrt{2} + 3 i\right ) - 2 \, \arctan \left (-i\right )\right )} \mathrm{sgn}\left (\cos \left (x\right )\right )\right )}}{4 \, \mathrm{sgn}\left (\cos \left (x\right )\right ) \mathrm{sgn}\left (\sin \left (2 \, x\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]