Optimal. Leaf size=74 \[ \frac{7 x}{4 \sqrt{2}}-x-\frac{\tan (x)}{4 \left (2 \tan ^2(x)+1\right )}+\frac{\tan (x)}{2 \left (2 \tan ^2(x)+1\right )^2}+\frac{7 \tan ^{-1}\left (\frac{\sin (x) \cos (x)}{\sin ^2(x)+\sqrt{2}+1}\right )}{4 \sqrt{2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0546415, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {414, 527, 522, 203} \[ \frac{7 x}{4 \sqrt{2}}-x-\frac{\tan (x)}{4 \left (2 \tan ^2(x)+1\right )}+\frac{\tan (x)}{2 \left (2 \tan ^2(x)+1\right )^2}+\frac{7 \tan ^{-1}\left (\frac{\sin (x) \cos (x)}{\sin ^2(x)+\sqrt{2}+1}\right )}{4 \sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 414
Rule 527
Rule 522
Rule 203
Rubi steps
\begin{align*} \int \frac{1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx &=\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \left (1+2 x^2\right )^3} \, dx,x,\tan (x)\right )\\ &=\frac{\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac{1}{4} \operatorname{Subst}\left (\int \frac{-2-6 x^2}{\left (1+x^2\right ) \left (1+2 x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=\frac{\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac{\tan (x)}{4 \left (1+2 \tan ^2(x)\right )}+\frac{1}{8} \operatorname{Subst}\left (\int \frac{6-2 x^2}{\left (1+x^2\right ) \left (1+2 x^2\right )} \, dx,x,\tan (x)\right )\\ &=\frac{\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac{\tan (x)}{4 \left (1+2 \tan ^2(x)\right )}+\frac{7}{4} \operatorname{Subst}\left (\int \frac{1}{1+2 x^2} \, dx,x,\tan (x)\right )-\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=-x+\frac{7 x}{4 \sqrt{2}}+\frac{7 \tan ^{-1}\left (\frac{\cos (x) \sin (x)}{1+\sqrt{2}+\sin ^2(x)}\right )}{4 \sqrt{2}}+\frac{\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac{\tan (x)}{4 \left (1+2 \tan ^2(x)\right )}\\ \end{align*}
Mathematica [A] time = 0.184788, size = 79, normalized size = 1.07 \[ -\frac{(\cos (2 x)-3) \sec ^6(x) \left (-76 x-2 \sin (2 x)+3 \sin (4 x)+48 x \cos (2 x)-4 x \cos (4 x)+7 \sqrt{2} (\cos (2 x)-3)^2 \tan ^{-1}\left (\sqrt{2} \tan (x)\right )\right )}{64 \left (\tan ^2(x)+\sec ^2(x)\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.054, size = 40, normalized size = 0.5 \begin{align*} 8\,{\frac{-1/16\, \left ( \tan \left ( x \right ) \right ) ^{3}+1/32\,\tan \left ( x \right ) }{ \left ( 1+2\, \left ( \tan \left ( x \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{7\,\sqrt{2}\arctan \left ( \tan \left ( x \right ) \sqrt{2} \right ) }{8}}-x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.48526, size = 61, normalized size = 0.82 \begin{align*} \frac{7}{8} \, \sqrt{2} \arctan \left (\sqrt{2} \tan \left (x\right )\right ) - x - \frac{2 \, \tan \left (x\right )^{3} - \tan \left (x\right )}{4 \,{\left (4 \, \tan \left (x\right )^{4} + 4 \, \tan \left (x\right )^{2} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.84311, size = 305, normalized size = 4.12 \begin{align*} -\frac{16 \, x \cos \left (x\right )^{4} - 64 \, x \cos \left (x\right )^{2} + 7 \,{\left (\sqrt{2} \cos \left (x\right )^{4} - 4 \, \sqrt{2} \cos \left (x\right )^{2} + 4 \, \sqrt{2}\right )} \arctan \left (\frac{3 \, \sqrt{2} \cos \left (x\right )^{2} - 2 \, \sqrt{2}}{4 \, \cos \left (x\right ) \sin \left (x\right )}\right ) - 4 \,{\left (3 \, \cos \left (x\right )^{3} - 2 \, \cos \left (x\right )\right )} \sin \left (x\right ) + 64 \, x}{16 \,{\left (\cos \left (x\right )^{4} - 4 \, \cos \left (x\right )^{2} + 4\right )}} \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}{\left (\tan ^{2}{\left (x \right )} + \sec ^{2}{\left (x \right )}\right )^{3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16182, size = 53, normalized size = 0.72 \begin{align*} \frac{7}{8} \, \sqrt{2} \arctan \left (\sqrt{2} \tan \left (x\right )\right ) - x - \frac{2 \, \tan \left (x\right )^{3} - \tan \left (x\right )}{4 \,{\left (2 \, \tan \left (x\right )^{2} + 1\right )}^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]