\(\int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx\) [725]

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

Optimal result

Integrand size = 13, antiderivative size = 5 \[ \int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx=-\arctan (\cos (x)) \]

[Out]

-arctan(cos(x))

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 5, 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.154, Rules used = {4424, 209} \[ \int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx=-\arctan (\cos (x)) \]

[In]

Int[(Sec[x]*Tan[x])/(1 + Sec[x]^2),x]

[Out]

-ArcTan[Cos[x]]

Rule 209

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

Rule 4424

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, Dist[-(b*
c)^(-1), Subst[Int[SubstFor[1/x, Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d], x] /; FunctionOfQ[Cos[
c*(a + b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Tan] || EqQ[F, tan])

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cos (x)\right ) \\ & = -\arctan (\cos (x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx=-\arctan (\cos (x)) \]

[In]

Integrate[(Sec[x]*Tan[x])/(1 + Sec[x]^2),x]

[Out]

-ArcTan[Cos[x]]

Maple [A] (verified)

Time = 2.26 (sec) , antiderivative size = 4, normalized size of antiderivative = 0.80

method result size
derivativedivides \(\arctan \left (\sec \left (x \right )\right )\) \(4\)
default \(\arctan \left (\sec \left (x \right )\right )\) \(4\)
risch \(-\frac {i \ln \left (2 i {\mathrm e}^{i x}+{\mathrm e}^{2 i x}+1\right )}{2}+\frac {i \ln \left (-2 i {\mathrm e}^{i x}+{\mathrm e}^{2 i x}+1\right )}{2}\) \(40\)

[In]

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

[Out]

arctan(sec(x))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx=-\arctan \left (\cos \left (x\right )\right ) \]

[In]

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

[Out]

-arctan(cos(x))

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 3, normalized size of antiderivative = 0.60 \[ \int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx=\operatorname {atan}{\left (\sec {\left (x \right )} \right )} \]

[In]

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

[Out]

atan(sec(x))

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx=-\arctan \left (\cos \left (x\right )\right ) \]

[In]

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

[Out]

-arctan(cos(x))

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx=-\arctan \left (\cos \left (x\right )\right ) \]

[In]

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

[Out]

-arctan(cos(x))

Mupad [B] (verification not implemented)

Time = 26.47 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.40 \[ \int \frac {\sec (x) \tan (x)}{1+\sec ^2(x)} \, dx=\mathrm {atan}\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2\right ) \]

[In]

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

[Out]

atan(tan(x/2)^2)