\(\int \frac {1}{(\cot (x)+\csc (x))^3} \, dx\) [300]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 7, antiderivative size = 14 \[ \int \frac {1}{(\cot (x)+\csc (x))^3} \, dx=\frac {2}{1+\cos (x)}+\log (1+\cos (x)) \]

[Out]

2/(1+cos(x))+ln(1+cos(x))

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4477, 2746, 45} \[ \int \frac {1}{(\cot (x)+\csc (x))^3} \, dx=\frac {2}{\cos (x)+1}+\log (\cos (x)+1) \]

[In]

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

[Out]

2/(1 + Cos[x]) + Log[1 + Cos[x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rule 4477

Int[(cot[(c_.) + (d_.)*(x_)]^(n_.)*(a_.) + csc[(c_.) + (d_.)*(x_)]^(n_.)*(b_.))^(p_)*(u_.), x_Symbol] :> Int[A
ctivateTrig[u]*Csc[c + d*x]^(n*p)*(b + a*Cos[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.29 \[ \int \frac {1}{(\cot (x)+\csc (x))^3} \, dx=2 \log \left (\cos \left (\frac {x}{2}\right )\right )+\sec ^2\left (\frac {x}{2}\right ) \]

[In]

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

[Out]

2*Log[Cos[x/2]] + Sec[x/2]^2

Maple [A] (verified)

Time = 0.81 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.07

method result size
default \(\frac {2}{\cos \left (x \right )+1}+\ln \left (\cos \left (x \right )+1\right )\) \(15\)
risch \(-i x +\frac {4 \,{\mathrm e}^{i x}}{\left ({\mathrm e}^{i x}+1\right )^{2}}+2 \ln \left ({\mathrm e}^{i x}+1\right )\) \(32\)

[In]

int(1/(cot(x)+csc(x))^3,x,method=_RETURNVERBOSE)

[Out]

2/(cos(x)+1)+ln(cos(x)+1)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.50 \[ \int \frac {1}{(\cot (x)+\csc (x))^3} \, dx=\frac {{\left (\cos \left (x\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 2}{\cos \left (x\right ) + 1} \]

[In]

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

[Out]

((cos(x) + 1)*log(1/2*cos(x) + 1/2) + 2)/(cos(x) + 1)

Sympy [F]

\[ \int \frac {1}{(\cot (x)+\csc (x))^3} \, dx=\int \frac {1}{\left (\cot {\left (x \right )} + \csc {\left (x \right )}\right )^{3}}\, dx \]

[In]

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

[Out]

Integral((cot(x) + csc(x))**(-3), x)

Maxima [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 28, normalized size of antiderivative = 2.00 \[ \int \frac {1}{(\cot (x)+\csc (x))^3} \, dx=\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right ) \]

[In]

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

[Out]

sin(x)^2/(cos(x) + 1)^2 - log(sin(x)^2/(cos(x) + 1)^2 + 1)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int \frac {1}{(\cot (x)+\csc (x))^3} \, dx=\frac {2}{\cos \left (x\right ) + 1} + \log \left (\cos \left (x\right ) + 1\right ) \]

[In]

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

[Out]

2/(cos(x) + 1) + log(cos(x) + 1)

Mupad [B] (verification not implemented)

Time = 29.13 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.29 \[ \int \frac {1}{(\cot (x)+\csc (x))^3} \, dx={\mathrm {tan}\left (\frac {x}{2}\right )}^2-\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right ) \]

[In]

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

[Out]

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