Optimal. Leaf size=21 \[ -\frac {\tanh ^{-1}\left (\frac {\cos (x)-\sin (x)}{\sqrt {2}}\right )}{\sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, 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 206
Rule 3074
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.02, 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]
________________________________________________________________________________________
fricas [B] time = 0.42, size = 38, normalized size = 1.81 \[ \frac {1}{4} \, \sqrt {2} \log \left (\frac {2 \, {\left (\sqrt {2} - \cos \relax (x)\right )} \sin \relax (x) - 2 \, \sqrt {2} \cos \relax (x) + 3}{2 \, \cos \relax (x) \sin \relax (x) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.02, size = 37, normalized size = 1.76 \[ -\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 ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 19, normalized size = 0.90 \[ \sqrt {2}\, \arctanh \left (\frac {\left (2 \tan \left (\frac {x}{2}\right )-2\right ) \sqrt {2}}{4}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.15, size = 39, normalized size = 1.86 \[ -\frac {1}{2} \, \sqrt {2} \log \left (-\frac {\sqrt {2} - \frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1}{\sqrt {2} + \frac {\sin \relax (x)}{\cos \relax (x) + 1} - 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.37, size = 21, normalized size = 1.00 \[ -\sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2}}{2}-\frac {\sqrt {2}\,\mathrm {tan}\left (\frac {x}{2}\right )}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.52, size = 39, normalized size = 1.86 \[ \frac {\sqrt {2} \log {\left (\tan {\left (\frac {x}{2} \right )} - 1 + \sqrt {2} \right )}}{2} - \frac {\sqrt {2} \log {\left (\tan {\left (\frac {x}{2} \right )} - \sqrt {2} - 1 \right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________