Optimal. Leaf size=11 \[ -\log \left (\cot \left (\frac {x}{2}\right )+1\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 11, 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 = {3121, 31} \[ -\log \left (\cot \left (\frac {x}{2}\right )+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3121
Rubi steps
\begin {align*} \int \frac {1}{1-\cos (x)+\sin (x)} \, dx &=-\operatorname {Subst}\left (\int \frac {1}{1+x} \, dx,x,\cot \left (\frac {x}{2}\right )\right )\\ &=-\log \left (1+\cot \left (\frac {x}{2}\right )\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.02, size = 24, normalized size = 2.18 \[ \log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 17, normalized size = 1.55 \[ \frac {1}{2} \, \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) - \frac {1}{2} \, \log \left (\sin \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.94, size = 17, normalized size = 1.55 \[ -\log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) + 1 \right |}\right ) + \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 16, normalized size = 1.45 \[ -\ln \left (\tan \left (\frac {x}{2}\right )+1\right )+\ln \left (\tan \left (\frac {x}{2}\right )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.59, size = 25, normalized size = 2.27 \[ -\log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1\right ) + \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 11, normalized size = 1.00 \[ -2\,\mathrm {atanh}\left (2\,\mathrm {tan}\left (\frac {x}{2}\right )+1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.25, size = 14, normalized size = 1.27 \[ - \log {\left (\tan {\left (\frac {x}{2} \right )} + 1 \right )} + \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________