Optimal. Leaf size=11 \[ -\log \left (1+\cot \left (\frac {x}{2}\right )\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 = {3200, 31}
\begin {gather*} -\log \left (\cot \left (\frac {x}{2}\right )+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3200
Rubi steps
\begin {align*} \int \frac {1}{1-\cos (x)+\sin (x)} \, dx &=-\text {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] Leaf count is larger than twice the leaf count of optimal. \(24\) vs. \(2(11)=22\).
time = 0.01, size = 24, normalized size = 2.18 \begin {gather*} \log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 16, normalized size = 1.45
method | result | size |
default | \(-\ln \left (1+\tan \left (\frac {x}{2}\right )\right )+\ln \left (\tan \left (\frac {x}{2}\right )\right )\) | \(16\) |
norman | \(-\ln \left (1+\tan \left (\frac {x}{2}\right )\right )+\ln \left (\tan \left (\frac {x}{2}\right )\right )\) | \(16\) |
risch | \(\ln \left ({\mathrm e}^{i x}-1\right )-\ln \left ({\mathrm e}^{i x}+i\right )\) | \(21\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 25 vs.
\(2 (9) = 18\).
time = 1.97, size = 25, normalized size = 2.27 \begin {gather*} -\log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1} + 1\right ) + \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.47, size = 17, normalized size = 1.55 \begin {gather*} \frac {1}{2} \, \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - \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.10, size = 14, normalized size = 1.27 \begin {gather*} - \log {\left (\tan {\left (\frac {x}{2} \right )} + 1 \right )} + \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 17, normalized size = 1.55 \begin {gather*} -\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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 11, normalized size = 1.00 \begin {gather*} -2\,\mathrm {atanh}\left (2\,\mathrm {tan}\left (\frac {x}{2}\right )+1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________