Optimal. Leaf size=21 \[ -\frac{\tanh ^{-1}\left (\frac{\cos (x)-\sin (x)}{\sqrt{2}}\right )}{\sqrt{2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0096234, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3074, 206} \[ -\frac{\tanh ^{-1}\left (\frac{\cos (x)-\sin (x)}{\sqrt{2}}\right )}{\sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3074
Rule 206
Rubi steps
\begin{align*} \int \frac{1}{\cos (x)+\sin (x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{2-x^2} \, dx,x,\cos (x)-\sin (x)\right )\\ &=-\frac{\tanh ^{-1}\left (\frac{\cos (x)-\sin (x)}{\sqrt{2}}\right )}{\sqrt{2}}\\ \end{align*}
Mathematica [C] time = 0.0202798, size = 24, normalized size = 1.14 \[ (-1-i) (-1)^{3/4} \tanh ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right )-1}{\sqrt{2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.019, size = 19, normalized size = 0.9 \begin{align*} \sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{4} \left ( 2\,\tan \left ( x/2 \right ) -2 \right ) } \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.4082, size = 53, normalized size = 2.52 \begin{align*} -\frac{1}{2} \, \sqrt{2} \log \left (-\frac{\sqrt{2} - \frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 1}{\sqrt{2} + \frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} - 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.22559, size = 126, normalized size = 6. \begin{align*} \frac{1}{4} \, \sqrt{2} \log \left (\frac{2 \,{\left (\sqrt{2} - \cos \left (x\right )\right )} \sin \left (x\right ) - 2 \, \sqrt{2} \cos \left (x\right ) + 3}{2 \, \cos \left (x\right ) \sin \left (x\right ) + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.12603, size = 50, normalized size = 2.38 \begin{align*} -\frac{1}{2} \, \sqrt{2} \log \left (\frac{{\left | -2 \, \sqrt{2} + 2 \, \tan \left (\frac{1}{2} \, x\right ) - 2 \right |}}{{\left | 2 \, \sqrt{2} + 2 \, \tan \left (\frac{1}{2} \, x\right ) - 2 \right |}}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]