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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0411408, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3097, 3133} \[ \frac{x}{2}-\frac{1}{2} \log (\sin (x)+\cos (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3097

Int[sin[(c_.) + (d_.)*(x_)]/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp
[(b*x)/(a^2 + b^2), x] - Dist[a/(a^2 + b^2), Int[(b*Cos[c + d*x] - a*Sin[c + d*x])/(a*Cos[c + d*x] + b*Sin[c +
 d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]

Rule 3133

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[((b*B + c*C)*x)/(b^2 + c^2), x] + Simp[((c*B - b*C)*L
og[a + b*Cos[d + e*x] + c*Sin[d + e*x]])/(e*(b^2 + c^2)), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2
+ c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]

Rubi steps

\begin{align*} \int \frac{\sin (x)}{\cos (x)+\sin (x)} \, dx &=\frac{x}{2}-\frac{1}{2} \int \frac{\cos (x)-\sin (x)}{\cos (x)+\sin (x)} \, dx\\ &=\frac{x}{2}-\frac{1}{2} \log (\cos (x)+\sin (x))\\ \end{align*}

Mathematica [A]  time = 0.0232694, size = 16, normalized size = 1. \[ \frac{x}{2}-\frac{1}{2} \log (\sin (x)+\cos (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.023, size = 21, normalized size = 1.3 \begin{align*}{\frac{\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) }{4}}-{\frac{\ln \left ( 1+\tan \left ( x \right ) \right ) }{2}}+{\frac{x}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/(cos(x)+sin(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.41169, size = 72, normalized size = 4.5 \begin{align*} \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) - \frac{1}{2} \, \log \left (-\frac{2 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1\right ) + \frac{1}{2} \, \log \left (\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(cos(x)+sin(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.27533, size = 51, normalized size = 3.19 \begin{align*} \frac{1}{2} \, x - \frac{1}{4} \, \log \left (2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(cos(x)+sin(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.132393, size = 12, normalized size = 0.75 \begin{align*} \frac{x}{2} - \frac{\log{\left (\sin{\left (x \right )} + \cos{\left (x \right )} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(cos(x)+sin(x)),x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.08967, size = 28, normalized size = 1.75 \begin{align*} \frac{1}{2} \, x + \frac{1}{4} \, \log \left (\tan \left (x\right )^{2} + 1\right ) - \frac{1}{2} \, \log \left ({\left | \tan \left (x\right ) + 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(cos(x)+sin(x)),x, algorithm="giac")

[Out]

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