3.36 \(\int \csc ^2(x) \sec ^2(x) \, dx\)

Optimal. Leaf size=7 \[ \tan (x)-\cot (x) \]

[Out]

-Cot[x] + Tan[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0237016, antiderivative size = 7, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2620, 14} \[ \tan (x)-\cot (x) \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^2*Sec[x]^2,x]

[Out]

-Cot[x] + Tan[x]

Rule 2620

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \csc ^2(x) \sec ^2(x) \, dx &=\operatorname{Subst}\left (\int \frac{1+x^2}{x^2} \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \left (1+\frac{1}{x^2}\right ) \, dx,x,\tan (x)\right )\\ &=-\cot (x)+\tan (x)\\ \end{align*}

Mathematica [A]  time = 0.0070756, size = 6, normalized size = 0.86 \[ -2 \cot (2 x) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^2*Sec[x]^2,x]

[Out]

-2*Cot[2*x]

________________________________________________________________________________________

Maple [A]  time = 0., size = 15, normalized size = 2.1 \begin{align*}{\frac{1}{\cos \left ( x \right ) \sin \left ( x \right ) }}-2\,\cot \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/sin(x)/cos(x)-2*cot(x)

________________________________________________________________________________________

Maxima [A]  time = 0.959902, size = 12, normalized size = 1.71 \begin{align*} -\frac{1}{\tan \left (x\right )} + \tan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/tan(x) + tan(x)

________________________________________________________________________________________

Fricas [B]  time = 1.8216, size = 47, normalized size = 6.71 \begin{align*} -\frac{2 \, \cos \left (x\right )^{2} - 1}{\cos \left (x\right ) \sin \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*cos(x)^2 - 1)/(cos(x)*sin(x))

________________________________________________________________________________________

Sympy [B]  time = 0.069937, size = 12, normalized size = 1.71 \begin{align*} - \frac{2 \cos{\left (2 x \right )}}{\sin{\left (2 x \right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*cos(2*x)/sin(2*x)

________________________________________________________________________________________

Giac [A]  time = 1.05369, size = 12, normalized size = 1.71 \begin{align*} -\frac{1}{\tan \left (x\right )} + \tan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/tan(x) + tan(x)