3.476 \(\int \frac{1}{(\cos ^2(x)-\sin ^2(x))^2} \, dx\)

Optimal. Leaf size=13 \[ \frac{\tan (x)}{1-\tan ^2(x)} \]

[Out]

Tan[x]/(1 - Tan[x]^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0229803, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {383} \[ \frac{\tan (x)}{1-\tan ^2(x)} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[x]^2 - Sin[x]^2)^(-2),x]

[Out]

Tan[x]/(1 - Tan[x]^2)

Rule 383

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*x*(a + b*x^n)^(p + 1))/a, x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a*d - b*c*(n*(p + 1) + 1), 0]

Rubi steps

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

Mathematica [A]  time = 0.0032264, size = 8, normalized size = 0.62 \[ \frac{1}{2} \tan (2 x) \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[x]^2 - Sin[x]^2)^(-2),x]

[Out]

Tan[2*x]/2

________________________________________________________________________________________

Maple [A]  time = 0.031, size = 18, normalized size = 1.4 \begin{align*} -{\frac{1}{2+2\,\tan \left ( x \right ) }}-{\frac{1}{2\,\tan \left ( x \right ) -2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.983312, size = 16, normalized size = 1.23 \begin{align*} -\frac{\tan \left (x\right )}{\tan \left (x\right )^{2} - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-tan(x)/(tan(x)^2 - 1)

________________________________________________________________________________________

Fricas [A]  time = 1.64872, size = 43, normalized size = 3.31 \begin{align*} \frac{\cos \left (x\right ) \sin \left (x\right )}{2 \, \cos \left (x\right )^{2} - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 2.39591, size = 48, normalized size = 3.69 \begin{align*} - \frac{2 \tan ^{3}{\left (\frac{x}{2} \right )}}{\tan ^{4}{\left (\frac{x}{2} \right )} - 6 \tan ^{2}{\left (\frac{x}{2} \right )} + 1} + \frac{2 \tan{\left (\frac{x}{2} \right )}}{\tan ^{4}{\left (\frac{x}{2} \right )} - 6 \tan ^{2}{\left (\frac{x}{2} \right )} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*tan(x/2)**3/(tan(x/2)**4 - 6*tan(x/2)**2 + 1) + 2*tan(x/2)/(tan(x/2)**4 - 6*tan(x/2)**2 + 1)

________________________________________________________________________________________

Giac [A]  time = 1.11712, size = 8, normalized size = 0.62 \begin{align*} \frac{1}{2} \, \tan \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)^2,x, algorithm="giac")

[Out]

1/2*tan(2*x)