Optimal. Leaf size=36 \[ -\frac{x}{\sqrt{2}}+x-\frac{\tan ^{-1}\left (\frac{\sin (x) \cos (x)}{\sin ^2(x)+\sqrt{2}+1}\right )}{\sqrt{2}} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0671648, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231 \[ -\frac{x}{\sqrt{2}}+x-\frac{\tan ^{-1}\left (\frac{\sin (x) \cos (x)}{\sin ^2(x)+\sqrt{2}+1}\right )}{\sqrt{2}} \]
Antiderivative was successfully verified.
[In] Int[Sin[x]^2/(1 + Sin[x]^2),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 4.66621, size = 24, normalized size = 0.67 \[ \frac{\sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2}}{2 \tan{\left (x \right )}} \right )}}{2} - \operatorname{atan}{\left (\frac{1}{\tan{\left (x \right )}} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(sin(x)**2/(1+sin(x)**2),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0209109, size = 18, normalized size = 0.5 \[ x-\frac{\tan ^{-1}\left (\sqrt{2} \tan (x)\right )}{\sqrt{2}} \]
Antiderivative was successfully verified.
[In] Integrate[Sin[x]^2/(1 + Sin[x]^2),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.029, size = 15, normalized size = 0.4 \[ -{\frac{\sqrt{2}\arctan \left ( \tan \left ( x \right ) \sqrt{2} \right ) }{2}}+x \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(sin(x)^2/(1+sin(x)^2),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.52201, size = 19, normalized size = 0.53 \[ -\frac{1}{2} \, \sqrt{2} \arctan \left (\sqrt{2} \tan \left (x\right )\right ) + x \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(sin(x)^2/(sin(x)^2 + 1),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.243118, size = 51, normalized size = 1.42 \[ \frac{1}{4} \, \sqrt{2}{\left (2 \, \sqrt{2} x + \arctan \left (\frac{3 \, \sqrt{2} \cos \left (x\right )^{2} - 2 \, \sqrt{2}}{4 \, \cos \left (x\right ) \sin \left (x\right )}\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(sin(x)^2/(sin(x)^2 + 1),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 155.717, size = 416, normalized size = 11.56 \[ \frac{41 \sqrt{2} x \sqrt{- 2 \sqrt{2} + 3}}{41 \sqrt{2} \sqrt{- 2 \sqrt{2} + 3} + 58 \sqrt{- 2 \sqrt{2} + 3}} + \frac{58 x \sqrt{- 2 \sqrt{2} + 3}}{41 \sqrt{2} \sqrt{- 2 \sqrt{2} + 3} + 58 \sqrt{- 2 \sqrt{2} + 3}} - \frac{17 \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{x}{2} \right )}}{\sqrt{- 2 \sqrt{2} + 3}} \right )} + \pi \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\rfloor \right )}{41 \sqrt{2} \sqrt{- 2 \sqrt{2} + 3} + 58 \sqrt{- 2 \sqrt{2} + 3}} - \frac{12 \sqrt{2} \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{x}{2} \right )}}{\sqrt{- 2 \sqrt{2} + 3}} \right )} + \pi \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\rfloor \right )}{41 \sqrt{2} \sqrt{- 2 \sqrt{2} + 3} + 58 \sqrt{- 2 \sqrt{2} + 3}} - \frac{17 \sqrt{- 2 \sqrt{2} + 3} \sqrt{2 \sqrt{2} + 3} \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{x}{2} \right )}}{\sqrt{2 \sqrt{2} + 3}} \right )} + \pi \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\rfloor \right )}{41 \sqrt{2} \sqrt{- 2 \sqrt{2} + 3} + 58 \sqrt{- 2 \sqrt{2} + 3}} - \frac{12 \sqrt{2} \sqrt{- 2 \sqrt{2} + 3} \sqrt{2 \sqrt{2} + 3} \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{x}{2} \right )}}{\sqrt{2 \sqrt{2} + 3}} \right )} + \pi \lfloor{\frac{\frac{x}{2} - \frac{\pi }{2}}{\pi }}\rfloor \right )}{41 \sqrt{2} \sqrt{- 2 \sqrt{2} + 3} + 58 \sqrt{- 2 \sqrt{2} + 3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(sin(x)**2/(1+sin(x)**2),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.227674, size = 65, normalized size = 1.81 \[ -\frac{1}{2} \, \sqrt{2}{\left (x + \arctan \left (-\frac{\sqrt{2} \sin \left (2 \, x\right ) - 2 \, \sin \left (2 \, x\right )}{\sqrt{2} \cos \left (2 \, x\right ) + \sqrt{2} - 2 \, \cos \left (2 \, x\right ) + 2}\right )\right )} + x \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(sin(x)^2/(sin(x)^2 + 1),x, algorithm="giac")
[Out]