Optimal. Leaf size=21 \[ \frac{1}{2} \log (\sin (x)+\cos (x))-\frac{1}{2 (\tan (x)+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0256371, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3483, 3530} \[ \frac{1}{2} \log (\sin (x)+\cos (x))-\frac{1}{2 (\tan (x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3483
Rule 3530
Rubi steps
\begin{align*} \int \frac{1}{(1+\tan (x))^2} \, dx &=-\frac{1}{2 (1+\tan (x))}+\frac{1}{2} \int \frac{1-\tan (x)}{1+\tan (x)} \, dx\\ &=\frac{1}{2} \log (\cos (x)+\sin (x))-\frac{1}{2 (1+\tan (x))}\\ \end{align*}
Mathematica [A] time = 0.0404895, size = 27, normalized size = 1.29 \[ \frac{\tan (x)+\log (\sin (x)+\cos (x))+\tan (x) \log (\sin (x)+\cos (x))}{2 \tan (x)+2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.014, size = 26, normalized size = 1.2 \begin{align*} -{\frac{\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) }{4}}-{\frac{1}{2+2\,\tan \left ( x \right ) }}+{\frac{\ln \left ( 1+\tan \left ( x \right ) \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.42644, size = 34, normalized size = 1.62 \begin{align*} -\frac{1}{2 \,{\left (\tan \left (x\right ) + 1\right )}} - \frac{1}{4} \, \log \left (\tan \left (x\right )^{2} + 1\right ) + \frac{1}{2} \, \log \left (\tan \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.06109, size = 124, normalized size = 5.9 \begin{align*} \frac{{\left (\tan \left (x\right ) + 1\right )} \log \left (\frac{\tan \left (x\right )^{2} + 2 \, \tan \left (x\right ) + 1}{\tan \left (x\right )^{2} + 1}\right ) + \tan \left (x\right ) - 1}{4 \,{\left (\tan \left (x\right ) + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.365338, size = 75, normalized size = 3.57 \begin{align*} \frac{2 \log{\left (\tan{\left (x \right )} + 1 \right )} \tan{\left (x \right )}}{4 \tan{\left (x \right )} + 4} + \frac{2 \log{\left (\tan{\left (x \right )} + 1 \right )}}{4 \tan{\left (x \right )} + 4} - \frac{\log{\left (\tan ^{2}{\left (x \right )} + 1 \right )} \tan{\left (x \right )}}{4 \tan{\left (x \right )} + 4} - \frac{\log{\left (\tan ^{2}{\left (x \right )} + 1 \right )}}{4 \tan{\left (x \right )} + 4} - \frac{2}{4 \tan{\left (x \right )} + 4} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10039, size = 35, normalized size = 1.67 \begin{align*} -\frac{1}{2 \,{\left (\tan \left (x\right ) + 1\right )}} - \frac{1}{4} \, \log \left (\tan \left (x\right )^{2} + 1\right ) + \frac{1}{2} \, \log \left ({\left | \tan \left (x\right ) + 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]