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.0326872, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3 \[ \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] Int[2/(1 + Cos[x]^2),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 0.926085, size = 15, normalized size = 0.44 \[ \sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} \tan{\left (x \right )}}{2} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(2/(1+cos(x)**2),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0159547, size = 15, normalized size = 0.44 \[ \sqrt{2} \tan ^{-1}\left (\frac{\tan (x)}{\sqrt{2}}\right ) \]
Antiderivative was successfully verified.
[In] Integrate[2/(1 + Cos[x]^2),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.019, size = 13, normalized size = 0.4 \[ \sqrt{2}\arctan \left ({\frac{\tan \left ( x \right ) \sqrt{2}}{2}} \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(2/(1+cos(x)^2),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.50807, size = 16, normalized size = 0.47 \[ \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} \tan \left (x\right )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(2/(cos(x)^2 + 1),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.232637, size = 36, normalized size = 1.06 \[ -\frac{1}{2} \, \sqrt{2} \arctan \left (\frac{\sqrt{2}{\left (3 \, \cos \left (x\right )^{2} - 1\right )}}{4 \, \cos \left (x\right ) \sin \left (x\right )}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(2/(cos(x)^2 + 1),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 1.55694, size = 60, normalized size = 1.76 \[ \sqrt{2} \left (\operatorname{atan}{\left (\sqrt{2} \tan{\left (\frac{x}{2} \right )} - 1 \right )} + \pi \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\rfloor \right ) + \sqrt{2} \left (\operatorname{atan}{\left (\sqrt{2} \tan{\left (\frac{x}{2} \right )} + 1 \right )} + \pi \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\rfloor \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(2/(1+cos(x)**2),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.199924, size = 61, normalized size = 1.79 \[ \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] integrate(2/(cos(x)^2 + 1),x, algorithm="giac")
[Out]