Optimal. Leaf size=14 \[ -x-\frac {2 \cos (x)}{\sin (x)+1} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4391, 2680, 8} \[ -x-\frac {2 \cos (x)}{\sin (x)+1} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2680
Rule 4391
Rubi steps
\begin {align*} \int \frac {1}{(\sec (x)+\tan (x))^2} \, dx &=\int \frac {\cos ^2(x)}{(1+\sin (x))^2} \, dx\\ &=-\frac {2 \cos (x)}{1+\sin (x)}-\int 1 \, dx\\ &=-x-\frac {2 \cos (x)}{1+\sin (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 27, normalized size = 1.93 \[ \frac {4 \sin \left (\frac {x}{2}\right )}{\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )}-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.01, size = 25, normalized size = 1.79 \[ -\frac {{\left (x + 2\right )} \cos \relax (x) + {\left (x - 2\right )} \sin \relax (x) + x + 2}{\cos \relax (x) + \sin \relax (x) + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 14, normalized size = 1.00 \[ -x - \frac {4}{\tan \left (\frac {1}{2} \, x\right ) + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 15, normalized size = 1.07 \[ -\frac {4}{1+\tan \left (\frac {x}{2}\right )}-x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 28, normalized size = 2.00 \[ -\frac {4}{\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1} - 2 \, \arctan \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 = 2.34, size = 14, normalized size = 1.00 \[ -x-\frac {4}{\mathrm {tan}\left (\frac {x}{2}\right )+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (\tan {\relax (x )} + \sec {\relax (x )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________