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

Optimal. Leaf size=2 \[ \tan (x) \]

[Out]

tan(x)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 2, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3852, 8} \begin {gather*} \tan (x) \end {gather*}

Antiderivative was successfully verified.

[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*} \int \sec ^2(x) \, dx &=-\text {Subst}(\int 1 \, dx,x,-\tan (x))\\ &=\tan (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 2, normalized size = 1.00 \begin {gather*} \tan (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^2,x]

[Out]

Tan[x]

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 3, normalized size = 1.50

method result size
default \(\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\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^2,x,method=_RETURNVERBOSE)

[Out]

tan(x)

________________________________________________________________________________________

Maxima [A]
time = 2.06, size = 2, normalized size = 1.00 \begin {gather*} \tan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2,x, algorithm="maxima")

[Out]

tan(x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 7 vs. \(2 (2) = 4\).
time = 0.83, size = 7, normalized size = 3.50 \begin {gather*} \frac {\sin \left (x\right )}{\cos \left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2,x, algorithm="fricas")

[Out]

sin(x)/cos(x)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 5 vs. \(2 (2) = 4\).
time = 0.03, size = 5, normalized size = 2.50 \begin {gather*} \frac {\sin {\left (x \right )}}{\cos {\left (x \right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**2,x)

[Out]

sin(x)/cos(x)

________________________________________________________________________________________

Giac [A]
time = 1.20, size = 2, normalized size = 1.00 \begin {gather*} \tan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2,x, algorithm="giac")

[Out]

tan(x)

________________________________________________________________________________________

Mupad [B]
time = 0.02, size = 2, normalized size = 1.00 \begin {gather*} \mathrm {tan}\left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

tan(x)

________________________________________________________________________________________