Optimal. Leaf size=30 \[ \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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 30, normalized size of antiderivative = 1.00, 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 = {3216, 3203, 31}
\begin {gather*} \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) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3203
Rule 3216
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))-\text {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.02, size = 22, normalized size = 0.73 \begin {gather*} \frac {x}{2}-\log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 1.99, size = 24, normalized size = 0.80 \begin {gather*} \frac {x}{2}-\text {Log}\left [1+\text {Tan}\left [\frac {x}{2}\right ]\right ]+\frac {\text {Log}\left [\frac {2}{1+\text {Cos}\left [x\right ]}\right ]}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 27, normalized size = 0.90
method | result | size |
risch | \(\frac {x}{2}+\frac {i x}{2}-\ln \left ({\mathrm e}^{i x}+i\right )\) | \(20\) |
default | \(-\ln \left (1+\tan \left (\frac {x}{2}\right )\right )+\frac {\ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}+\arctan \left (\tan \left (\frac {x}{2}\right )\right )\) | \(27\) |
norman | \(\frac {\frac {x}{2}+\frac {x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}}{1+\tan ^{2}\left (\frac {x}{2}\right )}-\ln \left (1+\tan \left (\frac {x}{2}\right )\right )+\frac {\ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}\) | \(46\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.35, size = 41, normalized size = 1.37 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 11, normalized size = 0.37 \begin {gather*} \frac {1}{2} \, x - \frac {1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 22, normalized size = 0.73 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 35, normalized size = 1.17 \begin {gather*} 2 \left (-\frac {\ln \left |\tan \left (\frac {x}{2}\right )+1\right |}{2}+\frac {\ln \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )}{4}+\frac {x}{2\cdot 2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.31, size = 34, normalized size = 1.13 \begin {gather*} -\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )+\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-\mathrm {i}\right )\,\left (\frac {1}{2}-\frac {1}{2}{}\mathrm {i}\right )+\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}\right )\,\left (\frac {1}{2}+\frac {1}{2}{}\mathrm {i}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________