3.1.6 \(\int \tan (x) \sqrt {1+\tan ^4(x)} \, dx\) [6]

Optimal. Leaf size=56 \[ -\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)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 56, normalized size of antiderivative = 1.00, 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 = {3751, 1262, 749, 858, 221, 739, 212} \begin {gather*} \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 ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 212

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

Rule 221

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 739

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 749

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 858

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 1262

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 3751

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]))

Rubi steps

\begin {align*} \int \tan (x) \sqrt {1+\tan ^4(x)} \, dx &=\text {Subst}\left (\int \frac {x \sqrt {1+x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \text {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} \text {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} \text {Subst}\left (\int \frac {1}{\sqrt {1+x^2}} \, dx,x,\tan ^2(x)\right )+\text {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)}-\text {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.09, size = 74, normalized size = 1.32 \begin {gather*} \frac {\left (-2 \sqrt {2} \sinh ^{-1}(\cos (2 x)) \cos ^2(x)-2 \tanh ^{-1}\left (\frac {2 \sin ^2(x)}{\sqrt {3+\cos (4 x)}}\right ) \cos ^2(x)+\sqrt {3+\cos (4 x)}\right ) \sqrt {1+\tan ^4(x)}}{2 \sqrt {3+\cos (4 x)}} \end {gather*}

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.06, size = 64, normalized size = 1.14

method result size
derivativedivides \(\frac {\sqrt {\left (1+\tan ^{2}\left (x \right )\right )^{2}-2 \left (\tan ^{2}\left (x \right )\right )}}{2}-\frac {\arcsinh \left (\tan ^{2}\left (x \right )\right )}{2}-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (-2 \left (\tan ^{2}\left (x \right )\right )+2\right ) \sqrt {2}}{4 \sqrt {\left (1+\tan ^{2}\left (x \right )\right )^{2}-2 \left (\tan ^{2}\left (x \right )\right )}}\right )}{2}\) \(64\)
default \(\frac {\sqrt {\left (1+\tan ^{2}\left (x \right )\right )^{2}-2 \left (\tan ^{2}\left (x \right )\right )}}{2}-\frac {\arcsinh \left (\tan ^{2}\left (x \right )\right )}{2}-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (-2 \left (\tan ^{2}\left (x \right )\right )+2\right ) \sqrt {2}}{4 \sqrt {\left (1+\tan ^{2}\left (x \right )\right )^{2}-2 \left (\tan ^{2}\left (x \right )\right )}}\right )}{2}\) \(64\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((1+tan(x)^2)^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)/((
1+tan(x)^2)^2-2*tan(x)^2)^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

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] Leaf count of result is larger than twice the leaf count of optimal. 88 vs. \(2 (43) = 86\).
time = 0.75, size = 88, normalized size = 1.57 \begin {gather*} \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 {gather*}

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.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\tan ^{4}{\left (x \right )} + 1} \tan {\left (x \right )}\, dx \end {gather*}

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 = 0.44, size = 79, normalized size = 1.41 \begin {gather*} \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 {gather*}

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))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \mathrm {tan}\left (x\right )\,\sqrt {{\mathrm {tan}\left (x\right )}^4+1} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________