\(\int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx\) [756]

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

Optimal result

Integrand size = 13, antiderivative size = 7 \[ \int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx=-2 \log (1+\cos (x)) \]

[Out]

-2*ln(1+cos(x))

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {12, 31} \[ \int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx=-2 \log (\cos (x)+1) \]

[In]

Int[(Sec[x]*Sin[2*x])/(1 + Cos[x]),x]

[Out]

-2*Log[1 + Cos[x]]

Rule 12

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

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

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

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.29 \[ \int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx=-4 \log \left (\cos \left (\frac {x}{2}\right )\right ) \]

[In]

Integrate[(Sec[x]*Sin[2*x])/(1 + Cos[x]),x]

[Out]

-4*Log[Cos[x/2]]

Maple [A] (verified)

Time = 2.50 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.14

method result size
derivativedivides \(-2 \ln \left (\cos \left (x \right )+1\right )\) \(8\)
default \(-2 \ln \left (\cos \left (x \right )+1\right )\) \(8\)
risch \(2 i x -4 \ln \left ({\mathrm e}^{i x}+1\right )\) \(16\)

[In]

int(sec(x)*sin(2*x)/(cos(x)+1),x,method=_RETURNVERBOSE)

[Out]

-2*ln(cos(x)+1)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.29 \[ \int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx=-2 \, \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \]

[In]

integrate(sec(x)*sin(2*x)/(1+cos(x)),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 1.34 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.14 \[ \int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx=- 2 \log {\left (\cos {\left (x \right )} + 1 \right )} \]

[In]

integrate(sec(x)*sin(2*x)/(1+cos(x)),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx=-2 \, \log \left (\cos \left (x\right ) + 1\right ) \]

[In]

integrate(sec(x)*sin(2*x)/(1+cos(x)),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx=-2 \, \log \left (\cos \left (x\right ) + 1\right ) \]

[In]

integrate(sec(x)*sin(2*x)/(1+cos(x)),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (x) \sin (2 x)}{1+\cos (x)} \, dx=-2\,\ln \left (\cos \left (x\right )+1\right ) \]

[In]

int(sin(2*x)/(cos(x)*(cos(x) + 1)),x)

[Out]

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