Optimal. Leaf size=34 \[ \sqrt {2} x-\sqrt {2} \tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {2}+1}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {12, 3181, 203} \[ \sqrt {2} x-\sqrt {2} \tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {2}+1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 203
Rule 3181
Rubi steps
\begin {align*} \int \frac {2}{1+\cos ^2(x)} \, dx &=2 \int \frac {1}{1+\cos ^2(x)} \, dx\\ &=-\left (2 \operatorname {Subst}\left (\int \frac {1}{1+2 x^2} \, dx,x,\cot (x)\right )\right )\\ &=\sqrt {2} x-\sqrt {2} \tan ^{-1}\left (\frac {\cos (x) \sin (x)}{1+\sqrt {2}+\cos ^2(x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 15, normalized size = 0.44 \[ \sqrt {2} \tan ^{-1}\left (\frac {\tan (x)}{\sqrt {2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 31, normalized size = 0.91 \[ -\frac {1}{2} \, \sqrt {2} \arctan \left (\frac {3 \, \sqrt {2} \cos \relax (x)^{2} - \sqrt {2}}{4 \, \cos \relax (x) \sin \relax (x)}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.85, size = 45, normalized size = 1.32 \[ \sqrt {2} {\left (x + \arctan \left (-\frac {\sqrt {2} \sin \left (2 \, x\right ) - \sin \left (2 \, x\right )}{\sqrt {2} \cos \left (2 \, x\right ) + \sqrt {2} - \cos \left (2 \, x\right ) + 1}\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 13, normalized size = 0.38 \[ \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \tan \relax (x )}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.43, size = 12, normalized size = 0.35 \[ \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \tan \relax (x)\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.21, size = 24, normalized size = 0.71 \[ \sqrt {2}\,\left (x-\mathrm {atan}\left (\mathrm {tan}\relax (x)\right )\right )+\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\mathrm {tan}\relax (x)}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.77, size = 60, normalized size = 1.76 \[ \sqrt {2} \left (\operatorname {atan}{\left (\sqrt {2} \tan {\left (\frac {x}{2} \right )} - 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) + \sqrt {2} \left (\operatorname {atan}{\left (\sqrt {2} \tan {\left (\frac {x}{2} \right )} + 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________