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

Optimal. Leaf size=30 \[ \frac{x}{2}-\frac{1}{2} \log \left (\tan \left (\frac{x}{2}\right )+1\right )-\frac{1}{2} \log (\sin (x)+\cos (x)+1) \]

[Out]

x/2 - Log[1 + Cos[x] + Sin[x]]/2 - Log[1 + Tan[x/2]]/2

_______________________________________________________________________________________

Rubi [A]  time = 0.0454923, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273 \[ \frac{x}{2}-\frac{1}{2} \log \left (\tan \left (\frac{x}{2}\right )+1\right )-\frac{1}{2} \log (\sin (x)+\cos (x)+1) \]

Antiderivative was successfully verified.

[In]  Int[Sin[x]/(1 + Cos[x] + Sin[x]),x]

[Out]

x/2 - Log[1 + Cos[x] + Sin[x]]/2 - Log[1 + Tan[x/2]]/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 2.11813, size = 24, normalized size = 0.8 \[ \frac{x}{2} - \frac{\log{\left (\tan{\left (\frac{x}{2} \right )} + 1 \right )}}{2} - \frac{\log{\left (\sin{\left (x \right )} + \cos{\left (x \right )} + 1 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.0109498, size = 22, normalized size = 0.73 \[ \frac{x}{2}-\log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[Sin[x]/(1 + Cos[x] + Sin[x]),x]

[Out]

x/2 - Log[Cos[x/2] + Sin[x/2]]

_______________________________________________________________________________________

Maple [A]  time = 0.066, size = 25, normalized size = 0.8 \[{\frac{1}{2}\ln \left ( \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) }-\ln \left ( 1+\tan \left ({\frac{x}{2}} \right ) \right ) +{\frac{x}{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 1.48879, size = 55, normalized size = 1.83 \[ \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) - \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 1\right ) + \frac{1}{2} \, \log \left (\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

arctan(sin(x)/(cos(x) + 1)) - log(sin(x)/(cos(x) + 1) + 1) + 1/2*log(sin(x)^2/(c
os(x) + 1)^2 + 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.230849, size = 15, normalized size = 0.5 \[ \frac{1}{2} \, x - \frac{1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/2*x - 1/2*log(sin(x) + 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.419479, size = 22, normalized size = 0.73 \[ \frac{x}{2} - \log{\left (\tan{\left (\frac{x}{2} \right )} + 1 \right )} + \frac{\log{\left (\tan ^{2}{\left (\frac{x}{2} \right )} + 1 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.225072, size = 34, normalized size = 1.13 \[ \frac{1}{2} \, x + \frac{1}{2} \,{\rm ln}\left (\tan \left (\frac{1}{2} \, x\right )^{2} + 1\right ) -{\rm ln}\left ({\left | \tan \left (\frac{1}{2} \, x\right ) + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/2*x + 1/2*ln(tan(1/2*x)^2 + 1) - ln(abs(tan(1/2*x) + 1))