Optimal. Leaf size=56 \[ \frac{1}{2} \sqrt{\tan ^4(x)+1}-\frac{\tanh ^{-1}\left (\frac{1-\tan ^2(x)}{\sqrt{2} \sqrt{\tan ^4(x)+1}}\right )}{\sqrt{2}}-\frac{1}{2} \sinh ^{-1}\left (\tan ^2(x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.068675, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3670, 1248, 735, 844, 215, 725, 206} \[ \frac{1}{2} \sqrt{\tan ^4(x)+1}-\frac{\tanh ^{-1}\left (\frac{1-\tan ^2(x)}{\sqrt{2} \sqrt{\tan ^4(x)+1}}\right )}{\sqrt{2}}-\frac{1}{2} \sinh ^{-1}\left (\tan ^2(x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 1248
Rule 735
Rule 844
Rule 215
Rule 725
Rule 206
Rubi steps
\begin{align*} \int \tan (x) \sqrt{1+\tan ^4(x)} \, dx &=\operatorname{Subst}\left (\int \frac{x \sqrt{1+x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{\sqrt{1+x^2}}{1+x} \, dx,x,\tan ^2(x)\right )\\ &=\frac{1}{2} \sqrt{1+\tan ^4(x)}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1-x}{(1+x) \sqrt{1+x^2}} \, dx,x,\tan ^2(x)\right )\\ &=\frac{1}{2} \sqrt{1+\tan ^4(x)}-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{\sqrt{1+x^2}} \, dx,x,\tan ^2(x)\right )+\operatorname{Subst}\left (\int \frac{1}{(1+x) \sqrt{1+x^2}} \, dx,x,\tan ^2(x)\right )\\ &=-\frac{1}{2} \sinh ^{-1}\left (\tan ^2(x)\right )+\frac{1}{2} \sqrt{1+\tan ^4(x)}-\operatorname{Subst}\left (\int \frac{1}{2-x^2} \, dx,x,\frac{1-\tan ^2(x)}{\sqrt{1+\tan ^4(x)}}\right )\\ &=-\frac{1}{2} \sinh ^{-1}\left (\tan ^2(x)\right )-\frac{\tanh ^{-1}\left (\frac{1-\tan ^2(x)}{\sqrt{2} \sqrt{1+\tan ^4(x)}}\right )}{\sqrt{2}}+\frac{1}{2} \sqrt{1+\tan ^4(x)}\\ \end{align*}
Mathematica [A] time = 0.110168, size = 74, normalized size = 1.32 \[ \frac{\sqrt{\tan ^4(x)+1} \left (\sqrt{\cos (4 x)+3}-2 \sqrt{2} \cos ^2(x) \sinh ^{-1}(\cos (2 x))-2 \cos ^2(x) \tanh ^{-1}\left (\frac{2 \sin ^2(x)}{\sqrt{\cos (4 x)+3}}\right )\right )}{2 \sqrt{\cos (4 x)+3}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.055, size = 64, normalized size = 1.1 \begin{align*}{\frac{1}{2}\sqrt{ \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) ^{2}-2\, \left ( \tan \left ( x \right ) \right ) ^{2}}}-{\frac{{\it Arcsinh} \left ( \left ( \tan \left ( x \right ) \right ) ^{2} \right ) }{2}}-{\frac{\sqrt{2}}{2}{\it Artanh} \left ({\frac{ \left ( -2\, \left ( \tan \left ( x \right ) \right ) ^{2}+2 \right ) \sqrt{2}}{4}{\frac{1}{\sqrt{ \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) ^{2}-2\, \left ( \tan \left ( x \right ) \right ) ^{2}}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\tan \left (x\right )^{4} + 1} \tan \left (x\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 4.03328, size = 263, normalized size = 4.7 \begin{align*} \frac{1}{4} \, \sqrt{2} \log \left (\frac{3 \, \tan \left (x\right )^{4} - 2 \, \tan \left (x\right )^{2} + 2 \, \sqrt{\tan \left (x\right )^{4} + 1}{\left (\sqrt{2} \tan \left (x\right )^{2} - \sqrt{2}\right )} + 3}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) + \frac{1}{2} \, \sqrt{\tan \left (x\right )^{4} + 1} + \frac{1}{2} \, \log \left (-\tan \left (x\right )^{2} + \sqrt{\tan \left (x\right )^{4} + 1}\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 \sqrt{\tan ^{4}{\left (x \right )} + 1} \tan{\left (x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11868, size = 107, normalized size = 1.91 \begin{align*} \frac{1}{2} \, \sqrt{2} \log \left (-\frac{\tan \left (x\right )^{2} + \sqrt{2} - \sqrt{\tan \left (x\right )^{4} + 1} + 1}{\tan \left (x\right )^{2} - \sqrt{2} - \sqrt{\tan \left (x\right )^{4} + 1} + 1}\right ) + \frac{1}{2} \, \sqrt{\tan \left (x\right )^{4} + 1} + \frac{1}{2} \, \log \left (-\tan \left (x\right )^{2} + \sqrt{\tan \left (x\right )^{4} + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]