3.62 \(\int \csc (2 x) (1-\tan (x)) \, dx\)

Optimal. Leaf size=14 \[ \frac {1}{2} \log (\tan (x))-\frac {\tan (x)}{2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {12} \[ \frac {1}{2} \log (\tan (x))-\frac {\tan (x)}{2} \]

Antiderivative was successfully verified.

[In]

Int[Csc[2*x]*(1 - Tan[x]),x]

[Out]

Log[Tan[x]]/2 - Tan[x]/2

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

\begin {align*} \int \csc (2 x) (1-\tan (x)) \, dx &=\operatorname {Subst}\left (\int \frac {1}{2} \left (-1+\frac {1}{x}\right ) \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (-1+\frac {1}{x}\right ) \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \log (\tan (x))-\frac {\tan (x)}{2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 21, normalized size = 1.50 \[ -\frac {\tan (x)}{2}+\frac {1}{2} \log (\sin (x))-\frac {1}{2} \log (\cos (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[2*x]*(1 - Tan[x]),x]

[Out]

-1/2*Log[Cos[x]] + Log[Sin[x]]/2 - Tan[x]/2

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \csc (2 x) (1-\tan (x)) \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[Csc[2*x]*(1 - Tan[x]),x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [B]  time = 1.20, size = 32, normalized size = 2.29 \[ \frac {1}{4} \, \log \left (\frac {\tan \relax (x)^{2}}{\tan \relax (x)^{2} + 1}\right ) - \frac {1}{4} \, \log \left (\frac {1}{\tan \relax (x)^{2} + 1}\right ) - \frac {1}{2} \, \tan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-tan(x))/sin(2*x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.96, size = 11, normalized size = 0.79 \[ \frac {1}{2} \, \log \left ({\left | \tan \relax (x) \right |}\right ) - \frac {1}{2} \, \tan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-tan(x))/sin(2*x),x, algorithm="giac")

[Out]

1/2*log(abs(tan(x))) - 1/2*tan(x)

________________________________________________________________________________________

maple [A]  time = 0.13, size = 11, normalized size = 0.79




method result size



default \(\frac {\ln \left (\tan \relax (x )\right )}{2}-\frac {\tan \relax (x )}{2}\) \(11\)
norman \(\frac {\ln \left (\tan \relax (x )\right )}{2}-\frac {\tan \relax (x )}{2}\) \(11\)
risch \(-\frac {i}{1+{\mathrm e}^{2 i x}}-\frac {\ln \left (1+{\mathrm e}^{2 i x}\right )}{2}+\frac {\ln \left ({\mathrm e}^{2 i x}-1\right )}{2}\) \(34\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-tan(x))/sin(2*x),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(tan(x))-1/2*tan(x)

________________________________________________________________________________________

maxima [B]  time = 0.44, size = 47, normalized size = 3.36 \[ -\frac {\sin \left (2 \, x\right )}{\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1} - \frac {1}{4} \, \log \left (\cos \left (2 \, x\right ) + 1\right ) + \frac {1}{4} \, \log \left (\cos \left (2 \, x\right ) - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-tan(x))/sin(2*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.21, size = 10, normalized size = 0.71 \[ \frac {\ln \left (\mathrm {tan}\relax (x)\right )}{2}-\frac {\mathrm {tan}\relax (x)}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(tan(x) - 1)/sin(2*x),x)

[Out]

log(tan(x))/2 - tan(x)/2

________________________________________________________________________________________

sympy [B]  time = 1.48, size = 27, normalized size = 1.93 \[ \frac {\log {\left (\cos {\left (2 x \right )} - 1 \right )}}{4} - \frac {\log {\left (\cos {\left (2 x \right )} + 1 \right )}}{4} - \frac {\sin {\relax (x )}}{2 \cos {\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-tan(x))/sin(2*x),x)

[Out]

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

________________________________________________________________________________________