3.492 \(\int \frac {1}{(\cot ^2(x)+\csc ^2(x))^3} \, dx\)

Optimal. Leaf size=72 \[ \frac {7 x}{4 \sqrt {2}}-x+\frac {\tan (x)}{4 \left (\tan ^2(x)+2\right )}-\frac {\tan ^3(x)}{2 \left (\tan ^2(x)+2\right )^2}-\frac {7 \tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {2}+1}\right )}{4 \sqrt {2}} \]

[Out]

-x+7/8*x*2^(1/2)-7/8*arctan(cos(x)*sin(x)/(1+cos(x)^2+2^(1/2)))*2^(1/2)-1/2*tan(x)^3/(2+tan(x)^2)^2+1/4*tan(x)
/(2+tan(x)^2)

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {470, 578, 522, 203} \[ \frac {7 x}{4 \sqrt {2}}-x-\frac {\tan ^3(x)}{2 \left (\tan ^2(x)+2\right )^2}+\frac {\tan (x)}{4 \left (\tan ^2(x)+2\right )}-\frac {7 \tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {2}+1}\right )}{4 \sqrt {2}} \]

Antiderivative was successfully verified.

[In]

Int[(Cot[x]^2 + Csc[x]^2)^(-3),x]

[Out]

-x + (7*x)/(4*Sqrt[2]) - (7*ArcTan[(Cos[x]*Sin[x])/(1 + Sqrt[2] + Cos[x]^2)])/(4*Sqrt[2]) - Tan[x]^3/(2*(2 + T
an[x]^2)^2) + Tan[x]/(4*(2 + Tan[x]^2))

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(a*e^(2
*n - 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*n*(b*c - a*d)*(p + 1)), x] + Dist[e^(2
*n)/(b*n*(b*c - a*d)*(p + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1) +
(a*d*(m - n + n*q + 1) + b*c*n*(p + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 578

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> Simp[(g^(n - 1)*(b*e - a*f)*(g*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*n*(b*c -
 a*d)*(p + 1)), x] - Dist[g^n/(b*n*(b*c - a*d)*(p + 1)), Int[(g*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*S
imp[c*(b*e - a*f)*(m - n + 1) + (d*(b*e - a*f)*(m + n*q + 1) - b*n*(c*f - d*e)*(p + 1))*x^n, x], x], x] /; Fre
eQ[{a, b, c, d, e, f, g, q}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, 0]

Rubi steps

\begin {align*} \int \frac {1}{\left (\cot ^2(x)+\csc ^2(x)\right )^3} \, dx &=\operatorname {Subst}\left (\int \frac {x^6}{\left (1+x^2\right ) \left (2+x^2\right )^3} \, dx,x,\tan (x)\right )\\ &=-\frac {\tan ^3(x)}{2 \left (2+\tan ^2(x)\right )^2}+\frac {1}{4} \operatorname {Subst}\left (\int \frac {x^2 \left (6+2 x^2\right )}{\left (1+x^2\right ) \left (2+x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=-\frac {\tan ^3(x)}{2 \left (2+\tan ^2(x)\right )^2}+\frac {\tan (x)}{4 \left (2+\tan ^2(x)\right )}-\frac {1}{8} \operatorname {Subst}\left (\int \frac {2-6 x^2}{\left (1+x^2\right ) \left (2+x^2\right )} \, dx,x,\tan (x)\right )\\ &=-\frac {\tan ^3(x)}{2 \left (2+\tan ^2(x)\right )^2}+\frac {\tan (x)}{4 \left (2+\tan ^2(x)\right )}+\frac {7}{4} \operatorname {Subst}\left (\int \frac {1}{2+x^2} \, dx,x,\tan (x)\right )-\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=-x+\frac {7 x}{4 \sqrt {2}}-\frac {7 \tan ^{-1}\left (\frac {\cos (x) \sin (x)}{1+\sqrt {2}+\cos ^2(x)}\right )}{4 \sqrt {2}}-\frac {\tan ^3(x)}{2 \left (2+\tan ^2(x)\right )^2}+\frac {\tan (x)}{4 \left (2+\tan ^2(x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.16, size = 66, normalized size = 0.92 \[ \frac {-76 x+2 \sin (2 x)+3 \sin (4 x)-48 x \cos (2 x)-4 x \cos (4 x)+7 \sqrt {2} (\cos (2 x)+3)^2 \tan ^{-1}\left (\frac {\tan (x)}{\sqrt {2}}\right )}{8 (\cos (2 x)+3)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cot[x]^2 + Csc[x]^2)^(-3),x]

[Out]

(-76*x - 48*x*Cos[2*x] + 7*Sqrt[2]*ArcTan[Tan[x]/Sqrt[2]]*(3 + Cos[2*x])^2 - 4*x*Cos[4*x] + 2*Sin[2*x] + 3*Sin
[4*x])/(8*(3 + Cos[2*x])^2)

________________________________________________________________________________________

fricas [A]  time = 1.62, size = 98, normalized size = 1.36 \[ -\frac {16 \, x \cos \relax (x)^{4} + 32 \, x \cos \relax (x)^{2} + 7 \, {\left (\sqrt {2} \cos \relax (x)^{4} + 2 \, \sqrt {2} \cos \relax (x)^{2} + \sqrt {2}\right )} \arctan \left (\frac {3 \, \sqrt {2} \cos \relax (x)^{2} - \sqrt {2}}{4 \, \cos \relax (x) \sin \relax (x)}\right ) - 4 \, {\left (3 \, \cos \relax (x)^{3} - \cos \relax (x)\right )} \sin \relax (x) + 16 \, x}{16 \, {\left (\cos \relax (x)^{4} + 2 \, \cos \relax (x)^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(cot(x)^2+csc(x)^2)^3,x, algorithm="fricas")

[Out]

-1/16*(16*x*cos(x)^4 + 32*x*cos(x)^2 + 7*(sqrt(2)*cos(x)^4 + 2*sqrt(2)*cos(x)^2 + sqrt(2))*arctan(1/4*(3*sqrt(
2)*cos(x)^2 - sqrt(2))/(cos(x)*sin(x))) - 4*(3*cos(x)^3 - cos(x))*sin(x) + 16*x)/(cos(x)^4 + 2*cos(x)^2 + 1)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 69, normalized size = 0.96 \[ \frac {7}{8} \, \sqrt {2} {\left (x + \arctan \left (-\frac {\sqrt {2} \sin \left (2 \, x\right ) - \sin \left (2 \, x\right )}{\sqrt {2} \cos \left (2 \, x\right ) + \sqrt {2} - \cos \left (2 \, x\right ) + 1}\right )\right )} - x - \frac {\tan \relax (x)^{3} - 2 \, \tan \relax (x)}{4 \, {\left (\tan \relax (x)^{2} + 2\right )}^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(cot(x)^2+csc(x)^2)^3,x, algorithm="giac")

[Out]

7/8*sqrt(2)*(x + arctan(-(sqrt(2)*sin(2*x) - sin(2*x))/(sqrt(2)*cos(2*x) + sqrt(2) - cos(2*x) + 1))) - x - 1/4
*(tan(x)^3 - 2*tan(x))/(tan(x)^2 + 2)^2

________________________________________________________________________________________

maple [A]  time = 0.22, size = 39, normalized size = 0.54 \[ \frac {-\frac {\left (\tan ^{3}\relax (x )\right )}{4}+\frac {\tan \relax (x )}{2}}{\left (2+\tan ^{2}\relax (x )\right )^{2}}+\frac {7 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \tan \relax (x )}{2}\right )}{8}-x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cot(x)^2+csc(x)^2)^3,x)

[Out]

2*(-1/8*tan(x)^3+1/4*tan(x))/(2+tan(x)^2)^2+7/8*2^(1/2)*arctan(1/2*2^(1/2)*tan(x))-x

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 42, normalized size = 0.58 \[ \frac {7}{8} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \tan \relax (x)\right ) - x - \frac {\tan \relax (x)^{3} - 2 \, \tan \relax (x)}{4 \, {\left (\tan \relax (x)^{4} + 4 \, \tan \relax (x)^{2} + 4\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(cot(x)^2+csc(x)^2)^3,x, algorithm="maxima")

[Out]

7/8*sqrt(2)*arctan(1/2*sqrt(2)*tan(x)) - x - 1/4*(tan(x)^3 - 2*tan(x))/(tan(x)^4 + 4*tan(x)^2 + 4)

________________________________________________________________________________________

mupad [B]  time = 2.68, size = 43, normalized size = 0.60 \[ \frac {\frac {\mathrm {tan}\relax (x)}{2}-\frac {{\mathrm {tan}\relax (x)}^3}{4}}{{\mathrm {tan}\relax (x)}^4+4\,{\mathrm {tan}\relax (x)}^2+4}-x+\frac {7\,\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\mathrm {tan}\relax (x)}{2}\right )}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cot(x)^2 + 1/sin(x)^2)^3,x)

[Out]

(tan(x)/2 - tan(x)^3/4)/(4*tan(x)^2 + tan(x)^4 + 4) - x + (7*2^(1/2)*atan((2^(1/2)*tan(x))/2))/8

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(cot(x)**2+csc(x)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________