Optimal. Leaf size=29 \[ -\log \left (\tan \left (\frac {x}{2}\right )+1\right )-\frac {\cos (x)-\sin (x)}{\sin (x)+\cos (x)+1} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3129, 3124, 31} \[ -\log \left (\tan \left (\frac {x}{2}\right )+1\right )-\frac {\cos (x)-\sin (x)}{\sin (x)+\cos (x)+1} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3124
Rule 3129
Rubi steps
\begin {align*} \int \frac {1}{(1+\cos (x)+\sin (x))^2} \, dx &=-\frac {\cos (x)-\sin (x)}{1+\cos (x)+\sin (x)}-\int \frac {1}{1+\cos (x)+\sin (x)} \, dx\\ &=-\frac {\cos (x)-\sin (x)}{1+\cos (x)+\sin (x)}-2 \operatorname {Subst}\left (\int \frac {1}{2+2 x} \, dx,x,\tan \left (\frac {x}{2}\right )\right )\\ &=-\log \left (1+\tan \left (\frac {x}{2}\right )\right )-\frac {\cos (x)-\sin (x)}{1+\cos (x)+\sin (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 56, normalized size = 1.93 \[ \frac {1}{2} \tan \left (\frac {x}{2}\right )+\log \left (\cos \left (\frac {x}{2}\right )\right )+\frac {\sin \left (\frac {x}{2}\right )}{\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\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.44, size = 46, normalized size = 1.59 \[ \frac {{\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 (\sin \relax (x) + 1\right ) - 2 \, \cos \relax (x) + 2 \, \sin \relax (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 = 0.18, size = 30, normalized size = 1.03 \[ \frac {\tan \left (\frac {1}{2} \, x\right )}{\tan \left (\frac {1}{2} \, x\right ) + 1} - \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) + 1 \right |}\right ) + \frac {1}{2} \, \tan \left (\frac {1}{2} \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 27, normalized size = 0.93 \[ -\ln \left (\tan \left (\frac {x}{2}\right )+1\right )+\frac {\tan \left (\frac {x}{2}\right )}{2}-\frac {1}{\tan \left (\frac {x}{2}\right )+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 40, normalized size = 1.38 \[ \frac {\sin \relax (x)}{2 \, {\left (\cos \relax (x) + 1\right )}} - \frac {1}{\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1} - \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.28, size = 26, normalized size = 0.90 \[ \frac {\mathrm {tan}\left (\frac {x}{2}\right )}{2}-\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )-\frac {1}{\mathrm {tan}\left (\frac {x}{2}\right )+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.69, size = 66, normalized size = 2.28 \[ - \frac {2 \log {\left (\tan {\left (\frac {x}{2} \right )} + 1 \right )} \tan {\left (\frac {x}{2} \right )}}{2 \tan {\left (\frac {x}{2} \right )} + 2} - \frac {2 \log {\left (\tan {\left (\frac {x}{2} \right )} + 1 \right )}}{2 \tan {\left (\frac {x}{2} \right )} + 2} + \frac {\tan ^{2}{\left (\frac {x}{2} \right )}}{2 \tan {\left (\frac {x}{2} \right )} + 2} - \frac {3}{2 \tan {\left (\frac {x}{2} \right )} + 2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________