3.120 \(\int \frac{1}{1+\sin (x)} \, dx\)

Optimal. Leaf size=10 \[ -\frac{\cos (x)}{\sin (x)+1} \]

[Out]

-(Cos[x]/(1 + Sin[x]))

_______________________________________________________________________________________

Rubi [A]  time = 0.0132518, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167 \[ -\frac{\cos (x)}{\sin (x)+1} \]

Antiderivative was successfully verified.

[In]  Int[(1 + Sin[x])^(-1),x]

[Out]

-(Cos[x]/(1 + Sin[x]))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.505654, size = 8, normalized size = 0.8 \[ - \frac{\cos{\left (x \right )}}{\sin{\left (x \right )} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(1+sin(x)),x)

[Out]

-cos(x)/(sin(x) + 1)

_______________________________________________________________________________________

Mathematica [B]  time = 0.00779831, size = 23, normalized size = 2.3 \[ \frac{2 \sin \left (\frac{x}{2}\right )}{\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )} \]

Antiderivative was successfully verified.

[In]  Integrate[(1 + Sin[x])^(-1),x]

[Out]

(2*Sin[x/2])/(Cos[x/2] + Sin[x/2])

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 11, normalized size = 1.1 \[ -2\, \left ( 1+\tan \left ( x/2 \right ) \right ) ^{-1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(1+sin(x)),x)

[Out]

-2/(1+tan(1/2*x))

_______________________________________________________________________________________

Maxima [A]  time = 1.35161, size = 20, normalized size = 2. \[ -\frac{2}{\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(sin(x) + 1),x, algorithm="maxima")

[Out]

-2/(sin(x)/(cos(x) + 1) + 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.222419, size = 24, normalized size = 2.4 \[ -\frac{\cos \left (x\right ) - \sin \left (x\right ) + 1}{\cos \left (x\right ) + \sin \left (x\right ) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(sin(x) + 1),x, algorithm="fricas")

[Out]

-(cos(x) - sin(x) + 1)/(cos(x) + sin(x) + 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.66411, size = 8, normalized size = 0.8 \[ - \frac{2}{\tan{\left (\frac{x}{2} \right )} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(1+sin(x)),x)

[Out]

-2/(tan(x/2) + 1)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.201414, size = 14, normalized size = 1.4 \[ -\frac{2}{\tan \left (\frac{1}{2} \, x\right ) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(sin(x) + 1),x, algorithm="giac")

[Out]

-2/(tan(1/2*x) + 1)