Optimal. Leaf size=22 \[ -x-\tanh ^{-1}(\cos (x))-\frac {\cos (x) \log (\sin (x))}{\sin (x)+1} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {2648, 2554, 2839, 3770, 8} \[ -x-\tanh ^{-1}(\cos (x))-\frac {\cos (x) \log (\sin (x))}{\sin (x)+1} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2554
Rule 2648
Rule 2839
Rule 3770
Rubi steps
\begin {align*} \int \frac {\log (\sin (x))}{1+\sin (x)} \, dx &=-\frac {\cos (x) \log (\sin (x))}{1+\sin (x)}+\int \frac {\cos (x) \cot (x)}{1+\sin (x)} \, dx\\ &=-\frac {\cos (x) \log (\sin (x))}{1+\sin (x)}-\int 1 \, dx+\int \csc (x) \, dx\\ &=-x-\tanh ^{-1}(\cos (x))-\frac {\cos (x) \log (\sin (x))}{1+\sin (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 39, normalized size = 1.77 \[ -x-2 \log \left (\cos \left (\frac {x}{2}\right )\right )+\frac {2 \sin \left (\frac {x}{2}\right ) \log (\sin (x))}{\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.45, size = 93, normalized size = 4.23 \[ -\frac {4 \, {\left (\cos \relax (x) + \sin \relax (x) + 1\right )} \arctan \left (-\frac {\cos \relax (x) + \sin \relax (x) + 1}{\cos \relax (x) - \sin \relax (x) + 1}\right ) + 4 \, x \cos \relax (x) + {\left (\cos \relax (x) + \sin \relax (x) + 1\right )} \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) - {\left (\cos \relax (x) + \sin \relax (x) + 1\right )} \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) + 2 \, {\left (\cos \relax (x) - \sin \relax (x) + 1\right )} \log \left (\sin \relax (x)\right ) + 4 \, x \sin \relax (x) + 4 \, x}{2 \, {\left (\cos \relax (x) + \sin \relax (x) + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.13, size = 36, normalized size = 1.64 \[ -x - \frac {2 \, \log \left (\sin \relax (x)\right )}{\tan \left (\frac {1}{2} \, x\right ) + 1} - 2 \, \log \left (\tan \left (\frac {1}{4} \, x\right )^{2} + 1\right ) + 2 \, \log \left ({\left | \tan \left (\frac {1}{4} \, x\right ) \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.17, size = 54, normalized size = 2.45 \[ \ln \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )+\frac {-x \tan \left (\frac {x}{2}\right )+2 \ln \left (\frac {2 \tan \left (\frac {x}{2}\right )}{\tan ^{2}\left (\frac {x}{2}\right )+1}\right ) \tan \left (\frac {x}{2}\right )-x}{\tan \left (\frac {x}{2}\right )+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.97, size = 82, normalized size = 3.73 \[ -\frac {2 \, \log \left (\frac {2 \, \sin \relax (x)}{{\left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right )} {\left (\cos \relax (x) + 1\right )}}\right )}{\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1} - 2 \, \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) + 2 \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) - \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]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.38, size = 55, normalized size = 2.50 \[ -2\,x+\ln \left (2\,\sin \relax (x)-\cos \relax (x)\,2{}\mathrm {i}-2{}\mathrm {i}\right )\,\left (-1-\mathrm {i}\right )+\ln \left (2\,\sin \relax (x)-\cos \relax (x)\,2{}\mathrm {i}+2{}\mathrm {i}\right )\,\left (1-\mathrm {i}\right )-\frac {2\,\ln \left (\sin \relax (x)\right )}{\cos \relax (x)+\sin \relax (x)\,1{}\mathrm {i}+1{}\mathrm {i}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.37, size = 97, normalized size = 4.41 \[ - \frac {x \tan {\left (\frac {x}{2} \right )}}{\tan {\left (\frac {x}{2} \right )} + 1} - \frac {x}{\tan {\left (\frac {x}{2} \right )} + 1} - \frac {\log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )} \tan {\left (\frac {x}{2} \right )}}{\tan {\left (\frac {x}{2} \right )} + 1} + \frac {\log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )}}{\tan {\left (\frac {x}{2} \right )} + 1} + \frac {2 \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} \tan {\left (\frac {x}{2} \right )}}{\tan {\left (\frac {x}{2} \right )} + 1} + \frac {2 \log {\relax (2 )} \tan {\left (\frac {x}{2} \right )}}{\tan {\left (\frac {x}{2} \right )} + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________