### 3.344 $$\int \csc ^3(\frac{x}{2}) \, dx$$

Optimal. Leaf size=24 $-\tanh ^{-1}\left (\cos \left (\frac{x}{2}\right )\right )-\cot \left (\frac{x}{2}\right ) \csc \left (\frac{x}{2}\right )$

[Out]

-ArcTanh[Cos[x/2]] - Cot[x/2]*Csc[x/2]

________________________________________________________________________________________

Rubi [A]  time = 0.0113921, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 8, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.25, Rules used = {3768, 3770} $-\tanh ^{-1}\left (\cos \left (\frac{x}{2}\right )\right )-\cot \left (\frac{x}{2}\right ) \csc \left (\frac{x}{2}\right )$

Antiderivative was successfully veriﬁed.

[In]

Int[Csc[x/2]^3,x]

[Out]

-ArcTanh[Cos[x/2]] - Cot[x/2]*Csc[x/2]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \csc ^3\left (\frac{x}{2}\right ) \, dx &=-\cot \left (\frac{x}{2}\right ) \csc \left (\frac{x}{2}\right )+\frac{1}{2} \int \csc \left (\frac{x}{2}\right ) \, dx\\ &=-\tanh ^{-1}\left (\cos \left (\frac{x}{2}\right )\right )-\cot \left (\frac{x}{2}\right ) \csc \left (\frac{x}{2}\right )\\ \end{align*}

Mathematica [A]  time = 0.0085372, size = 41, normalized size = 1.71 $-\frac{1}{4} \csc ^2\left (\frac{x}{4}\right )+\frac{1}{4} \sec ^2\left (\frac{x}{4}\right )+\log \left (\sin \left (\frac{x}{4}\right )\right )-\log \left (\cos \left (\frac{x}{4}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Csc[x/2]^3,x]

[Out]

-Csc[x/4]^2/4 - Log[Cos[x/4]] + Log[Sin[x/4]] + Sec[x/4]^2/4

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 24, normalized size = 1. \begin{align*} -\cot \left ({\frac{x}{2}} \right ) \csc \left ({\frac{x}{2}} \right ) +\ln \left ( \csc \left ({\frac{x}{2}} \right ) -\cot \left ({\frac{x}{2}} \right ) \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(csc(1/2*x)^3,x)

[Out]

-cot(1/2*x)*csc(1/2*x)+ln(csc(1/2*x)-cot(1/2*x))

________________________________________________________________________________________

Maxima [A]  time = 0.980341, size = 46, normalized size = 1.92 \begin{align*} \frac{\cos \left (\frac{1}{2} \, x\right )}{\cos \left (\frac{1}{2} \, x\right )^{2} - 1} - \frac{1}{2} \, \log \left (\cos \left (\frac{1}{2} \, x\right ) + 1\right ) + \frac{1}{2} \, \log \left (\cos \left (\frac{1}{2} \, x\right ) - 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.02372, size = 182, normalized size = 7.58 \begin{align*} -\frac{{\left (\cos \left (\frac{1}{2} \, x\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \cos \left (\frac{1}{2} \, x\right ) + \frac{1}{2}\right ) -{\left (\cos \left (\frac{1}{2} \, x\right )^{2} - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (\frac{1}{2} \, x\right ) + \frac{1}{2}\right ) - 2 \, \cos \left (\frac{1}{2} \, x\right )}{2 \,{\left (\cos \left (\frac{1}{2} \, x\right )^{2} - 1\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 0.116014, size = 36, normalized size = 1.5 \begin{align*} \frac{\log{\left (\cos{\left (\frac{x}{2} \right )} - 1 \right )}}{2} - \frac{\log{\left (\cos{\left (\frac{x}{2} \right )} + 1 \right )}}{2} + \frac{2 \cos{\left (\frac{x}{2} \right )}}{2 \cos ^{2}{\left (\frac{x}{2} \right )} - 2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.06559, size = 95, normalized size = 3.96 \begin{align*} -\frac{{\left (\frac{2 \,{\left (\cos \left (\frac{1}{2} \, x\right ) - 1\right )}}{\cos \left (\frac{1}{2} \, x\right ) + 1} - 1\right )}{\left (\cos \left (\frac{1}{2} \, x\right ) + 1\right )}}{4 \,{\left (\cos \left (\frac{1}{2} \, x\right ) - 1\right )}} - \frac{\cos \left (\frac{1}{2} \, x\right ) - 1}{4 \,{\left (\cos \left (\frac{1}{2} \, x\right ) + 1\right )}} + \frac{1}{2} \, \log \left (-\frac{\cos \left (\frac{1}{2} \, x\right ) - 1}{\cos \left (\frac{1}{2} \, x\right ) + 1}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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