Optimal. Leaf size=21 \[ \frac {1}{2} \log (\sin (x)+\cos (x))-\frac {1}{2 (\tan (x)+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 21, normalized size of antiderivative = 1.00, 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.04, 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]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 37, normalized size = 1.76 \[ \frac {{\left (\tan \relax (x) + 1\right )} \log \left (\frac {\tan \relax (x)^{2} + 2 \, \tan \relax (x) + 1}{\tan \relax (x)^{2} + 1}\right ) + \tan \relax (x) - 1}{4 \, {\left (\tan \relax (x) + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.17, size = 26, normalized size = 1.24 \[ -\frac {1}{2 \, {\left (\tan \relax (x) + 1\right )}} - \frac {1}{4} \, \log \left (\tan \relax (x)^{2} + 1\right ) + \frac {1}{2} \, \log \left ({\left | \tan \relax (x) + 1 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 26, normalized size = 1.24 \[ -\frac {\ln \left (\tan ^{2}\relax (x )+1\right )}{4}+\frac {\ln \left (\tan \relax (x )+1\right )}{2}-\frac {1}{2 \left (\tan \relax (x )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.96, size = 25, normalized size = 1.19 \[ -\frac {1}{2 \, {\left (\tan \relax (x) + 1\right )}} - \frac {1}{4} \, \log \left (\tan \relax (x)^{2} + 1\right ) + \frac {1}{2} \, \log \left (\tan \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.25, size = 27, normalized size = 1.29 \[ \frac {\ln \left (\mathrm {tan}\relax (x)+1\right )}{2}-\frac {\ln \left ({\mathrm {tan}\relax (x)}^2+1\right )}{4}-\frac {1}{2\,\left (\mathrm {tan}\relax (x)+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.36, size = 75, normalized size = 3.57 \[ \frac {2 \log {\left (\tan {\relax (x )} + 1 \right )} \tan {\relax (x )}}{4 \tan {\relax (x )} + 4} + \frac {2 \log {\left (\tan {\relax (x )} + 1 \right )}}{4 \tan {\relax (x )} + 4} - \frac {\log {\left (\tan ^{2}{\relax (x )} + 1 \right )} \tan {\relax (x )}}{4 \tan {\relax (x )} + 4} - \frac {\log {\left (\tan ^{2}{\relax (x )} + 1 \right )}}{4 \tan {\relax (x )} + 4} - \frac {2}{4 \tan {\relax (x )} + 4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________