Optimal. Leaf size=36 \[ \sqrt{2} x-x+\sqrt{2} \tan ^{-1}\left (\frac{\sin (x) \cos (x)}{\sin ^2(x)+\sqrt{2}+1}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0277595, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {1093, 203} \[ \sqrt{2} x-x+\sqrt{2} \tan ^{-1}\left (\frac{\sin (x) \cos (x)}{\sin ^2(x)+\sqrt{2}+1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1093
Rule 203
Rubi steps
\begin{align*} \int \frac{1}{\sec ^2(x)+\tan ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{1+3 x^2+2 x^4} \, dx,x,\tan (x)\right )\\ &=2 \operatorname{Subst}\left (\int \frac{1}{1+2 x^2} \, dx,x,\tan (x)\right )-2 \operatorname{Subst}\left (\int \frac{1}{2+2 x^2} \, dx,x,\tan (x)\right )\\ &=-x+\sqrt{2} x+\sqrt{2} \tan ^{-1}\left (\frac{\cos (x) \sin (x)}{1+\sqrt{2}+\sin ^2(x)}\right )\\ \end{align*}
Mathematica [A] time = 0.0465269, size = 19, normalized size = 0.53 \[ \sqrt{2} \tan ^{-1}\left (\sqrt{2} \tan (x)\right )-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 16, normalized size = 0.4 \begin{align*} \sqrt{2}\arctan \left ( \tan \left ( x \right ) \sqrt{2} \right ) -x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.46873, size = 20, normalized size = 0.56 \begin{align*} \sqrt{2} \arctan \left (\sqrt{2} \tan \left (x\right )\right ) - x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.77284, size = 107, normalized size = 2.97 \begin{align*} -\frac{1}{2} \, \sqrt{2} \arctan \left (\frac{3 \, \sqrt{2} \cos \left (x\right )^{2} - 2 \, \sqrt{2}}{4 \, \cos \left (x\right ) \sin \left (x\right )}\right ) - x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\tan ^{2}{\left (x \right )} + \sec ^{2}{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11276, size = 20, normalized size = 0.56 \begin{align*} \sqrt{2} \arctan \left (\sqrt{2} \tan \left (x\right )\right ) - x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]