3.461 \(\int \frac{\csc (x)}{2+2 \cot (x)+3 \csc (x)} \, dx\)

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

[Out]

x + 2*ArcTan[(Cos[x] - Sin[x])/(2 + Cos[x] + Sin[x])]

________________________________________________________________________________________

Rubi [A]  time = 0.0478138, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {3166, 3124, 618, 204} \[ x+2 \tan ^{-1}\left (\frac{\cos (x)-\sin (x)}{\sin (x)+\cos (x)+2}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]/(2 + 2*Cot[x] + 3*Csc[x]),x]

[Out]

x + 2*ArcTan[(Cos[x] - Sin[x])/(2 + Cos[x] + Sin[x])]

Rule 3166

Int[csc[(d_.) + (e_.)*(x_)]^(n_.)*((a_.) + csc[(d_.) + (e_.)*(x_)]*(b_.) + cot[(d_.) + (e_.)*(x_)]*(c_.))^(m_)
, x_Symbol] :> Int[1/(b + a*Sin[d + e*x] + c*Cos[d + e*x])^n, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[m + n, 0]
 && IntegerQ[n]

Rule 3124

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Module[{f = Free
Factors[Tan[(d + e*x)/2], x]}, Dist[(2*f)/e, Subst[Int[1/(a + b + 2*c*f*x + (a - b)*f^2*x^2), x], x, Tan[(d +
e*x)/2]/f], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

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

Rubi steps

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

Mathematica [B]  time = 0.0248894, size = 51, normalized size = 2.43 \[ \tan ^{-1}\left (\sec \left (\frac{x}{2}\right ) \left (\sin \left (\frac{x}{2}\right )+2 \cos \left (\frac{x}{2}\right )\right )\right )-\tan ^{-1}\left (\frac{\cos \left (\frac{x}{2}\right )}{\sin \left (\frac{x}{2}\right )+2 \cos \left (\frac{x}{2}\right )}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]/(2 + 2*Cot[x] + 3*Csc[x]),x]

[Out]

-ArcTan[Cos[x/2]/(2*Cos[x/2] + Sin[x/2])] + ArcTan[Sec[x/2]*(2*Cos[x/2] + Sin[x/2])]

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 10, normalized size = 0.5 \begin{align*} 2\,\arctan \left ( 2+\tan \left ( x/2 \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)/(2+2*cot(x)+3*csc(x)),x)

[Out]

2*arctan(2+tan(1/2*x))

________________________________________________________________________________________

Maxima [A]  time = 1.48324, size = 19, normalized size = 0.9 \begin{align*} 2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 2\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*arctan(sin(x)/(cos(x) + 1) + 2)

________________________________________________________________________________________

Fricas [A]  time = 2.19288, size = 74, normalized size = 3.52 \begin{align*} -\arctan \left (-\frac{3 \, \cos \left (x\right ) + 3 \, \sin \left (x\right ) + 4}{\cos \left (x\right ) - \sin \left (x\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arctan(-(3*cos(x) + 3*sin(x) + 4)/(cos(x) - sin(x)))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc{\left (x \right )}}{2 \cot{\left (x \right )} + 3 \csc{\left (x \right )} + 2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(csc(x)/(2*cot(x) + 3*csc(x) + 2), x)

________________________________________________________________________________________

Giac [A]  time = 1.14316, size = 30, normalized size = 1.43 \begin{align*} 2 \, \pi \left \lfloor \frac{x}{2 \, \pi } + \frac{1}{2} \right \rfloor + 2 \, \arctan \left (\tan \left (\frac{1}{2} \, x\right ) + 2\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*pi*floor(1/2*x/pi + 1/2) + 2*arctan(tan(1/2*x) + 2)