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

Optimal. Leaf size=7 \[ -2 \log (\cos (x)+1) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0443849, antiderivative size = 7, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {12, 31} \[ -2 \log (\cos (x)+1) \]

Antiderivative was successfully verified.

[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*} \int \frac{\sec (x) \sin (2 x)}{1+\cos (x)} \, dx &=-\operatorname{Subst}\left (\int \frac{2}{1+x} \, dx,x,\cos (x)\right )\\ &=-\left (2 \operatorname{Subst}\left (\int \frac{1}{1+x} \, dx,x,\cos (x)\right )\right )\\ &=-2 \log (1+\cos (x))\\ \end{align*}

Mathematica [A]  time = 0.0055193, size = 9, normalized size = 1.29 \[ -4 \log \left (\cos \left (\frac{x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 8, normalized size = 1.1 \begin{align*} -2\,\ln \left ( 1+\cos \left ( x \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.979069, size = 9, normalized size = 1.29 \begin{align*} -2 \, \log \left (\cos \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.08175, size = 35, normalized size = 5. \begin{align*} -2 \, \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 7.66422, size = 8, normalized size = 1.14 \begin{align*} - 2 \log{\left (\cos{\left (x \right )} + 1 \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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