\(\int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx\) [710]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 17, antiderivative size = 9 \[ \int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx=\frac {1}{2} \arcsin (2 \tan (x)) \]

[Out]

1/2*arcsin(2*tan(x))

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {3756, 222} \[ \int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx=\frac {1}{2} \arcsin (2 \tan (x)) \]

[In]

Int[Sec[x]^2/Sqrt[1 - 4*Tan[x]^2],x]

[Out]

ArcSin[2*Tan[x]]/2

Rule 222

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

Rule 3756

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

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{\sqrt {1-4 x^2}} \, dx,x,\tan (x)\right ) \\ & = \frac {1}{2} \arcsin (2 \tan (x)) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(47\) vs. \(2(9)=18\).

Time = 0.06 (sec) , antiderivative size = 47, normalized size of antiderivative = 5.22 \[ \int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx=\frac {\arctan \left (\frac {2 \sin (x)}{\sqrt {1-5 \sin ^2(x)}}\right ) \sqrt {-3+5 \cos (2 x)} \sec (x)}{2 \sqrt {2-8 \tan ^2(x)}} \]

[In]

Integrate[Sec[x]^2/Sqrt[1 - 4*Tan[x]^2],x]

[Out]

(ArcTan[(2*Sin[x])/Sqrt[1 - 5*Sin[x]^2]]*Sqrt[-3 + 5*Cos[2*x]]*Sec[x])/(2*Sqrt[2 - 8*Tan[x]^2])

Maple [A] (verified)

Time = 0.86 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.89

method result size
derivativedivides \(\frac {\arcsin \left (2 \tan \left (x \right )\right )}{2}\) \(8\)
default \(\frac {\arcsin \left (2 \tan \left (x \right )\right )}{2}\) \(8\)

[In]

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

[Out]

1/2*arcsin(2*tan(x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (7) = 14\).

Time = 0.26 (sec) , antiderivative size = 45, normalized size of antiderivative = 5.00 \[ \int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx=-\frac {1}{4} \, \arctan \left (\frac {{\left (9 \, \cos \left (x\right )^{3} - 8 \, \cos \left (x\right )\right )} \sqrt {\frac {5 \, \cos \left (x\right )^{2} - 4}{\cos \left (x\right )^{2}}}}{4 \, {\left (5 \, \cos \left (x\right )^{2} - 4\right )} \sin \left (x\right )}\right ) \]

[In]

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

[Out]

-1/4*arctan(1/4*(9*cos(x)^3 - 8*cos(x))*sqrt((5*cos(x)^2 - 4)/cos(x)^2)/((5*cos(x)^2 - 4)*sin(x)))

Sympy [F]

\[ \int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx=\int \frac {\sec ^{2}{\left (x \right )}}{\sqrt {- \left (2 \tan {\left (x \right )} - 1\right ) \left (2 \tan {\left (x \right )} + 1\right )}}\, dx \]

[In]

integrate(sec(x)**2/(1-4*tan(x)**2)**(1/2),x)

[Out]

Integral(sec(x)**2/sqrt(-(2*tan(x) - 1)*(2*tan(x) + 1)), x)

Maxima [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx=\frac {1}{2} \, \arcsin \left (2 \, \tan \left (x\right )\right ) \]

[In]

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

[Out]

1/2*arcsin(2*tan(x))

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx=\frac {1}{2} \, \arcsin \left (2 \, \tan \left (x\right )\right ) \]

[In]

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

[Out]

1/2*arcsin(2*tan(x))

Mupad [F(-1)]

Timed out. \[ \int \frac {\sec ^2(x)}{\sqrt {1-4 \tan ^2(x)}} \, dx=\int \frac {1}{{\cos \left (x\right )}^2\,\sqrt {1-4\,{\mathrm {tan}\left (x\right )}^2}} \,d x \]

[In]

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

[Out]

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