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

   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 = 9, antiderivative size = 7 \[ \int \csc ^2(x) \sec ^2(x) \, dx=-\cot (x)+\tan (x) \]

[Out]

-cot(x)+tan(x)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2700, 14} \[ \int \csc ^2(x) \sec ^2(x) \, dx=\tan (x)-\cot (x) \]

[In]

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

[Out]

-Cot[x] + Tan[x]

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]]

Rule 2700

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]

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

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.86 \[ \int \csc ^2(x) \sec ^2(x) \, dx=-2 \cot (2 x) \]

[In]

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

[Out]

-2*Cot[2*x]

Maple [A] (verified)

Time = 0.29 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.57

method result size
parallelrisch \(-2 \cot \left (x \right )+\sec \left (x \right ) \csc \left (x \right )\) \(11\)
default \(\frac {1}{\cos \left (x \right ) \sin \left (x \right )}-2 \cot \left (x \right )\) \(15\)
risch \(-\frac {4 i}{\left ({\mathrm e}^{2 i x}+1\right ) \left ({\mathrm e}^{2 i x}-1\right )}\) \(22\)
norman \(\frac {\frac {1}{2}-3 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+\frac {\left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{2}}{\left (\tan ^{2}\left (\frac {x}{2}\right )-1\right ) \tan \left (\frac {x}{2}\right )}\) \(36\)

[In]

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

[Out]

-2*cot(x)+sec(x)*csc(x)

Fricas [B] (verification not implemented)

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

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 2.57 \[ \int \csc ^2(x) \sec ^2(x) \, dx=-\frac {2 \, \cos \left (x\right )^{2} - 1}{\cos \left (x\right ) \sin \left (x\right )} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

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

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.71 \[ \int \csc ^2(x) \sec ^2(x) \, dx=- \frac {2 \cos {\left (2 x \right )}}{\sin {\left (2 x \right )}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.29 \[ \int \csc ^2(x) \sec ^2(x) \, dx=-\frac {1}{\tan \left (x\right )} + \tan \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.86 \[ \int \csc ^2(x) \sec ^2(x) \, dx=-2\,\mathrm {cot}\left (2\,x\right ) \]

[In]

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

[Out]

-2*cot(2*x)