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]
________________________________________________________________________________________
Rubi [A] time = 0.0290074, 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, Rules used = {3137, 3124, 31} \[ \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]
[Out]
Rule 3137
Rule 3124
Rule 31
Rubi steps
\begin{align*} \int \frac{\sin (x)}{1+\cos (x)+\sin (x)} \, dx &=\frac{x}{2}-\frac{1}{2} \log (1+\cos (x)+\sin (x))-\frac{1}{2} \int \frac{1}{1+\cos (x)+\sin (x)} \, dx\\ &=\frac{x}{2}-\frac{1}{2} \log (1+\cos (x)+\sin (x))-\operatorname{Subst}\left (\int \frac{1}{2+2 x} \, dx,x,\tan \left (\frac{x}{2}\right )\right )\\ &=\frac{x}{2}-\frac{1}{2} \log (1+\cos (x)+\sin (x))-\frac{1}{2} \log \left (1+\tan \left (\frac{x}{2}\right )\right )\\ \end{align*}
Mathematica [A] time = 0.0341823, 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]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.048, size = 25, normalized size = 0.8 \begin{align*}{\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}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.4185, size = 55, normalized size = 1.83 \begin{align*} \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 ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.02831, size = 39, normalized size = 1.3 \begin{align*} \frac{1}{2} \, x - \frac{1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.296861, size = 22, normalized size = 0.73 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10418, size = 34, normalized size = 1.13 \begin{align*} \frac{1}{2} \, x + \frac{1}{2} \, \log \left (\tan \left (\frac{1}{2} \, x\right )^{2} + 1\right ) - \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) + 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]