Optimal. Leaf size=33 \[ x-\tan ^{-1}\left (\frac {-2 \cos ^2(x)+\sin (x) \cos (x)+1}{\cos ^2(x)+2 \sin (x) \cos (x)+2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {4342, 617, 204} \[ x-\tan ^{-1}\left (\frac {-2 \cos ^2(x)+\sin (x) \cos (x)+1}{\cos ^2(x)+2 \sin (x) \cos (x)+2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 617
Rule 4342
Rubi steps
\begin {align*} \int \frac {\sec ^2(x)}{2+2 \tan (x)+\tan ^2(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1}{2+2 x+x^2} \, dx,x,\tan (x)\right )\\ &=-\operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\tan (x)\right )\\ &=x-\tan ^{-1}\left (\frac {1-2 \cos ^2(x)+\cos (x) \sin (x)}{2+\cos ^2(x)+2 \cos (x) \sin (x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 31, normalized size = 0.94 \[ 2 \left (\frac {1}{4} \tan ^{-1}(\sec (x) (\sin (x)+\cos (x)))-\frac {1}{4} \tan ^{-1}\left (\frac {\cos (x)}{\sin (x)+\cos (x)}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.86, size = 35, normalized size = 1.06 \[ -\frac {1}{2} \, \arctan \left (-\frac {3 \, \cos \relax (x)^{2} + 6 \, \cos \relax (x) \sin \relax (x) + 1}{2 \, {\left (2 \, \cos \relax (x)^{2} - \cos \relax (x) \sin \relax (x) - 1\right )}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 5, normalized size = 0.15 \[ \arctan \left (\tan \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 6, normalized size = 0.18 \[ \arctan \left (1+\tan \relax (x )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 5, normalized size = 0.15 \[ \arctan \left (\tan \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.12, size = 5, normalized size = 0.15 \[ \mathrm {atan}\left (\mathrm {tan}\relax (x)+1\right ) \]
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 {\sec ^{2}{\relax (x )}}{\tan ^{2}{\relax (x )} + 2 \tan {\relax (x )} + 2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________