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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, 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.02, size = 16, normalized size = 1.00 \[ \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

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 15, normalized size = 0.94 \[ \frac {1}{2} \, x - \frac {1}{4} \, \log \left (2 \, \cos \relax (x) \sin \relax (x) + 1\right ) \]

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)

________________________________________________________________________________________

giac [A]  time = 1.08, size = 21, normalized size = 1.31 \[ \frac {1}{2} \, x + \frac {1}{4} \, \log \left (\tan \relax (x)^{2} + 1\right ) - \frac {1}{2} \, \log \left ({\left | \tan \relax (x) + 1 \right |}\right ) \]

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))

________________________________________________________________________________________

maple [A]  time = 0.05, size = 21, normalized size = 1.31 \[ \frac {x}{2}+\frac {\ln \left (\tan ^{2}\relax (x )+1\right )}{4}-\frac {\ln \left (\tan \relax (x )+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 1.28, size = 53, normalized size = 3.31 \[ \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) - \frac {1}{2} \, \log \left (-\frac {2 \, \sin \relax (x)}{\cos \relax (x) + 1} + \frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - 1\right ) + \frac {1}{2} \, \log \left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right ) \]

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)

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 13, normalized size = 0.81 \[ \frac {x}{2}-\frac {\ln \left (\cos \left (x-\frac {\pi }{4}\right )\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/2 - log(cos(x - pi/4))/2

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 12, normalized size = 0.75 \[ \frac {x}{2} - \frac {\log {\left (\sin {\relax (x )} + \cos {\relax (x )} \right )}}{2} \]

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

________________________________________________________________________________________