\(\int \sec ^2(x) \, dx\) [90]

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

Optimal result

Integrand size = 4, antiderivative size = 2 \[ \int \sec ^2(x) \, dx=\tan (x) \]

[Out]

tan(x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 2, 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.500, Rules used = {3852, 8} \[ \int \sec ^2(x) \, dx=\tan (x) \]

[In]

Int[Sec[x]^2,x]

[Out]

Tan[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}(\int 1 \, dx,x,-\tan (x)) \\ & = \tan (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 2, normalized size of antiderivative = 1.00 \[ \int \sec ^2(x) \, dx=\tan (x) \]

[In]

Integrate[Sec[x]^2,x]

[Out]

Tan[x]

Maple [A] (verified)

Time = 0.13 (sec) , antiderivative size = 3, normalized size of antiderivative = 1.50

method result size
default \(\tan \left (x \right )\) \(3\)
parallelrisch \(\tan \left (x \right )\) \(3\)
risch \(\frac {2 i}{{\mathrm e}^{2 i x}+1}\) \(13\)
norman \(-\frac {2 \tan \left (\frac {x}{2}\right )}{\tan ^{2}\left (\frac {x}{2}\right )-1}\) \(17\)

[In]

int(1/cos(x)^2,x,method=_RETURNVERBOSE)

[Out]

tan(x)

Fricas [B] (verification not implemented)

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

Time = 0.24 (sec) , antiderivative size = 7, normalized size of antiderivative = 3.50 \[ \int \sec ^2(x) \, dx=\frac {\sin \left (x\right )}{\cos \left (x\right )} \]

[In]

integrate(1/cos(x)^2,x, algorithm="fricas")

[Out]

sin(x)/cos(x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 5 vs. \(2 (2) = 4\).

Time = 0.04 (sec) , antiderivative size = 5, normalized size of antiderivative = 2.50 \[ \int \sec ^2(x) \, dx=\frac {\sin {\left (x \right )}}{\cos {\left (x \right )}} \]

[In]

integrate(1/cos(x)**2,x)

[Out]

sin(x)/cos(x)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 2, normalized size of antiderivative = 1.00 \[ \int \sec ^2(x) \, dx=\tan \left (x\right ) \]

[In]

integrate(1/cos(x)^2,x, algorithm="maxima")

[Out]

tan(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 2, normalized size of antiderivative = 1.00 \[ \int \sec ^2(x) \, dx=\tan \left (x\right ) \]

[In]

integrate(1/cos(x)^2,x, algorithm="giac")

[Out]

tan(x)

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 2, normalized size of antiderivative = 1.00 \[ \int \sec ^2(x) \, dx=\mathrm {tan}\left (x\right ) \]

[In]

int(1/cos(x)^2,x)

[Out]

tan(x)