3.80 \(\int \cot (2 x) \sin (x) \, dx\)

Optimal. Leaf size=10 \[ \sin (x)-\frac {1}{2} \tanh ^{-1}(\sin (x)) \]

[Out]

-1/2*arctanh(sin(x))+sin(x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {388, 206} \[ \sin (x)-\frac {1}{2} \tanh ^{-1}(\sin (x)) \]

Antiderivative was successfully verified.

[In]

Int[Cot[2*x]*Sin[x],x]

[Out]

-ArcTanh[Sin[x]]/2 + Sin[x]

Rule 206

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

Rule 388

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 10, normalized size = 1.00 \[ \sin (x)-\frac {1}{2} \tanh ^{-1}(\sin (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[2*x]*Sin[x],x]

[Out]

-1/2*ArcTanh[Sin[x]] + Sin[x]

________________________________________________________________________________________

fricas [B]  time = 0.68, size = 19, normalized size = 1.90 \[ -\frac {1}{4} \, \log \left (\sin \relax (x) + 1\right ) + \frac {1}{4} \, \log \left (-\sin \relax (x) + 1\right ) + \sin \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(2*x)*sin(x),x, algorithm="fricas")

[Out]

-1/4*log(sin(x) + 1) + 1/4*log(-sin(x) + 1) + sin(x)

________________________________________________________________________________________

giac [B]  time = 0.14, size = 19, normalized size = 1.90 \[ -\frac {1}{4} \, \log \left (\sin \relax (x) + 1\right ) + \frac {1}{4} \, \log \left (-\sin \relax (x) + 1\right ) + \sin \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(2*x)*sin(x),x, algorithm="giac")

[Out]

-1/4*log(sin(x) + 1) + 1/4*log(-sin(x) + 1) + sin(x)

________________________________________________________________________________________

maple [A]  time = 0.08, size = 12, normalized size = 1.20 \[ \sin \relax (x )-\frac {\ln \left (\sec \relax (x )+\tan \relax (x )\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(2*x)*sin(x),x)

[Out]

sin(x)-1/2*ln(sec(x)+tan(x))

________________________________________________________________________________________

maxima [B]  time = 0.41, size = 37, normalized size = 3.70 \[ -\frac {1}{4} \, \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \sin \relax (x) + 1\right ) + \frac {1}{4} \, \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \sin \relax (x) + 1\right ) + \sin \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(2*x)*sin(x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.32, size = 10, normalized size = 1.00 \[ \sin \relax (x)-\mathrm {atanh}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(2*x)*sin(x),x)

[Out]

sin(x) - atanh(tan(x/2))

________________________________________________________________________________________

sympy [B]  time = 0.82, size = 19, normalized size = 1.90 \[ \frac {\log {\left (\sin {\relax (x )} - 1 \right )}}{4} - \frac {\log {\left (\sin {\relax (x )} + 1 \right )}}{4} + \sin {\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(2*x)*sin(x),x)

[Out]

log(sin(x) - 1)/4 - log(sin(x) + 1)/4 + sin(x)

________________________________________________________________________________________