3.6 \(\int \tan (x) \sqrt{1+\tan ^4(x)} \, dx\)

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]

-ArcSinh[Tan[x]^2]/2 - ArcTanh[(1 - Tan[x]^2)/(Sqrt[2]*Sqrt[1 + Tan[x]^4])]/Sqrt[2] + Sqrt[1 + Tan[x]^4]/2

________________________________________________________________________________________

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]

Int[Tan[x]*Sqrt[1 + Tan[x]^4],x]

[Out]

-ArcSinh[Tan[x]^2]/2 - ArcTanh[(1 - Tan[x]^2)/(Sqrt[2]*Sqrt[1 + Tan[x]^4])]/Sqrt[2] + Sqrt[1 + Tan[x]^4]/2

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 1248

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(d + e*x)^q
*(a + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, c, d, e, p, q}, x]

Rule 735

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m + 1)*(a + c*x^2)^p)/(
e*(m + 2*p + 1)), x] + Dist[(2*p)/(e*(m + 2*p + 1)), Int[(d + e*x)^m*Simp[a*e - c*d*x, x]*(a + c*x^2)^(p - 1),
 x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !Ration
alQ[m] || LtQ[m, 1]) &&  !ILtQ[m + 2*p, 0] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 844

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rule 215

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[(Rt[b, 2]*x)/Sqrt[a]]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 725

Int[1/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (c_.)*(x_)^2]), x_Symbol] :> -Subst[Int[1/(c*d^2 + a*e^2 - x^2), x], x,
 (a*e - c*d*x)/Sqrt[a + c*x^2]] /; FreeQ[{a, c, d, e}, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

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]

Integrate[Tan[x]*Sqrt[1 + Tan[x]^4],x]

[Out]

((-2*Sqrt[2]*ArcSinh[Cos[2*x]]*Cos[x]^2 - 2*ArcTanh[(2*Sin[x]^2)/Sqrt[3 + Cos[4*x]]]*Cos[x]^2 + Sqrt[3 + Cos[4
*x]])*Sqrt[1 + Tan[x]^4])/(2*Sqrt[3 + Cos[4*x]])

________________________________________________________________________________________

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]

int((1+tan(x)^4)^(1/2)*tan(x),x)

[Out]

1/2*((tan(x)^2+1)^2-2*tan(x)^2)^(1/2)-1/2*arcsinh(tan(x)^2)-1/2*2^(1/2)*arctanh(1/4*(-2*tan(x)^2+2)*2^(1/2)/((
tan(x)^2+1)^2-2*tan(x)^2)^(1/2))

________________________________________________________________________________________

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]

integrate((1+tan(x)^4)^(1/2)*tan(x),x, algorithm="maxima")

[Out]

integrate(sqrt(tan(x)^4 + 1)*tan(x), x)

________________________________________________________________________________________

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]

integrate((1+tan(x)^4)^(1/2)*tan(x),x, algorithm="fricas")

[Out]

1/4*sqrt(2)*log((3*tan(x)^4 - 2*tan(x)^2 + 2*sqrt(tan(x)^4 + 1)*(sqrt(2)*tan(x)^2 - sqrt(2)) + 3)/(tan(x)^4 +
2*tan(x)^2 + 1)) + 1/2*sqrt(tan(x)^4 + 1) + 1/2*log(-tan(x)^2 + sqrt(tan(x)^4 + 1))

________________________________________________________________________________________

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]

integrate((1+tan(x)**4)**(1/2)*tan(x),x)

[Out]

Integral(sqrt(tan(x)**4 + 1)*tan(x), x)

________________________________________________________________________________________

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]

integrate((1+tan(x)^4)^(1/2)*tan(x),x, algorithm="giac")

[Out]

1/2*sqrt(2)*log(-(tan(x)^2 + sqrt(2) - sqrt(tan(x)^4 + 1) + 1)/(tan(x)^2 - sqrt(2) - sqrt(tan(x)^4 + 1) + 1))
+ 1/2*sqrt(tan(x)^4 + 1) + 1/2*log(-tan(x)^2 + sqrt(tan(x)^4 + 1))