Optimal. Leaf size=57 \[ \sqrt{2} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}+1\right )-\sqrt{2} \tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] time = 0.211369, antiderivative size = 243, normalized size of antiderivative = 4.26, number of steps used = 22, number of rules used = 9, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {3107, 2575, 297, 1162, 617, 204, 1165, 628, 2574} \[ \frac{\tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{\sqrt{2}}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}+1\right )}{\sqrt{2}}-\frac{\tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )}{\sqrt{2}}+\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}+1\right )}{\sqrt{2}}+\frac{\log \left (\tan (x)-\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}+1\right )}{2 \sqrt{2}}-\frac{\log \left (\tan (x)+\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}+1\right )}{2 \sqrt{2}}-\frac{\log \left (\cot (x)-\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}+1\right )}{2 \sqrt{2}}+\frac{\log \left (\cot (x)+\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}+1\right )}{2 \sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3107
Rule 2575
Rule 297
Rule 1162
Rule 617
Rule 204
Rule 1165
Rule 628
Rule 2574
Rubi steps
\begin{align*} \int \frac{\cos (x)+\sin (x)}{\sqrt{\cos (x)} \sqrt{\sin (x)}} \, dx &=\int \left (\frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}}+\frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right ) \, dx\\ &=\int \frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}} \, dx+\int \frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}} \, dx\\ &=-\left (2 \operatorname{Subst}\left (\int \frac{x^2}{1+x^4} \, dx,x,\frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )\right )+2 \operatorname{Subst}\left (\int \frac{x^2}{1+x^4} \, dx,x,\frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )\\ &=\operatorname{Subst}\left (\int \frac{1-x^2}{1+x^4} \, dx,x,\frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )-\operatorname{Subst}\left (\int \frac{1-x^2}{1+x^4} \, dx,x,\frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )-\operatorname{Subst}\left (\int \frac{1+x^2}{1+x^4} \, dx,x,\frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )+\operatorname{Subst}\left (\int \frac{1+x^2}{1+x^4} \, dx,x,\frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )\\ &=-\left (\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{2} x+x^2} \, dx,x,\frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{2} x+x^2} \, dx,x,\frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{2} x+x^2} \, dx,x,\frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{2} x+x^2} \, dx,x,\frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{2}+2 x}{-1-\sqrt{2} x-x^2} \, dx,x,\frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{2 \sqrt{2}}+\frac{\operatorname{Subst}\left (\int \frac{\sqrt{2}+2 x}{-1-\sqrt{2} x-x^2} \, dx,x,\frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )}{2 \sqrt{2}}-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{2}-2 x}{-1+\sqrt{2} x-x^2} \, dx,x,\frac{\sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{2 \sqrt{2}}+\frac{\operatorname{Subst}\left (\int \frac{\sqrt{2}-2 x}{-1+\sqrt{2} x-x^2} \, dx,x,\frac{\sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )}{2 \sqrt{2}}\\ &=-\frac{\log \left (1+\cot (x)-\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{2 \sqrt{2}}+\frac{\log \left (1+\cot (x)+\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{2 \sqrt{2}}+\frac{\log \left (1-\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}+\tan (x)\right )}{2 \sqrt{2}}-\frac{\log \left (1+\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}+\tan (x)\right )}{2 \sqrt{2}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{\sqrt{2}}+\frac{\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{\sqrt{2}}+\frac{\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )}{\sqrt{2}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )}{\sqrt{2}}\\ &=\frac{\tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{\sqrt{2}}-\frac{\tan ^{-1}\left (1+\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{\sqrt{2}}-\frac{\tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )}{\sqrt{2}}+\frac{\tan ^{-1}\left (1+\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}\right )}{\sqrt{2}}-\frac{\log \left (1+\cot (x)-\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{2 \sqrt{2}}+\frac{\log \left (1+\cot (x)+\frac{\sqrt{2} \sqrt{\cos (x)}}{\sqrt{\sin (x)}}\right )}{2 \sqrt{2}}+\frac{\log \left (1-\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}+\tan (x)\right )}{2 \sqrt{2}}-\frac{\log \left (1+\frac{\sqrt{2} \sqrt{\sin (x)}}{\sqrt{\cos (x)}}+\tan (x)\right )}{2 \sqrt{2}}\\ \end{align*}
Mathematica [C] time = 0.0567925, size = 68, normalized size = 1.19 \[ \frac{2 \sqrt{\sin (x)} \sqrt [4]{\cos ^2(x)} \left (\sin (x) \sqrt{\cos ^2(x)} \text{Hypergeometric2F1}\left (\frac{3}{4},\frac{3}{4},\frac{7}{4},\sin ^2(x)\right )+3 \cos (x) \text{Hypergeometric2F1}\left (\frac{1}{4},\frac{1}{4},\frac{5}{4},\sin ^2(x)\right )\right )}{3 \cos ^{\frac{3}{2}}(x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.157, size = 137, normalized size = 2.4 \begin{align*} -{\frac{\sqrt{2}}{-1+\cos \left ( x \right ) }\sqrt{{\frac{\sin \left ( x \right ) +1-\cos \left ( x \right ) }{\sin \left ( x \right ) }}}\sqrt{{\frac{\cos \left ( x \right ) -1+\sin \left ( x \right ) }{\sin \left ( x \right ) }}}\sqrt{{\frac{-1+\cos \left ( x \right ) }{\sin \left ( x \right ) }}} \left ( \sin \left ( x \right ) \right ) ^{{\frac{3}{2}}} \left ( i{\it EllipticPi} \left ( \sqrt{{\frac{\sin \left ( x \right ) +1-\cos \left ( x \right ) }{\sin \left ( x \right ) }}},{\frac{1}{2}}-{\frac{i}{2}},{\frac{\sqrt{2}}{2}} \right ) -i{\it EllipticPi} \left ( \sqrt{{\frac{\sin \left ( x \right ) +1-\cos \left ( x \right ) }{\sin \left ( x \right ) }}},{\frac{1}{2}}+{\frac{i}{2}},{\frac{\sqrt{2}}{2}} \right ) -{\it EllipticF} \left ( \sqrt{{\frac{\sin \left ( x \right ) +1-\cos \left ( x \right ) }{\sin \left ( x \right ) }}},{\frac{\sqrt{2}}{2}} \right ) \right ){\frac{1}{\sqrt{\cos \left ( x \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (x\right ) + \sin \left (x\right )}{\sqrt{\cos \left (x\right )} \sqrt{\sin \left (x\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.39579, size = 275, normalized size = 4.82 \begin{align*} -\frac{1}{4} \, \sqrt{2} \arctan \left (-\frac{{\left (32 \, \sqrt{2} \cos \left (x\right )^{4} - 32 \, \sqrt{2} \cos \left (x\right )^{2} + 16 \, \sqrt{2} \cos \left (x\right ) \sin \left (x\right ) - \sqrt{2}\right )} \sqrt{\cos \left (x\right )} \sqrt{\sin \left (x\right )}}{8 \,{\left (4 \, \cos \left (x\right )^{5} - 3 \, \cos \left (x\right )^{3} -{\left (4 \, \cos \left (x\right )^{4} - 5 \, \cos \left (x\right )^{2}\right )} \sin \left (x\right ) - \cos \left (x\right )\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 \frac{\sin{\left (x \right )} + \cos{\left (x \right )}}{\sqrt{\sin{\left (x \right )}} \sqrt{\cos{\left (x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (x\right ) + \sin \left (x\right )}{\sqrt{\cos \left (x\right )} \sqrt{\sin \left (x\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]