### 3.297 $$\int (1+\cos (x)) \csc (x) \, dx$$

Optimal. Leaf size=7 $\log (1-\cos (x))$

[Out]

Log[1 - Cos[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.013242, antiderivative size = 7, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 7, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.286, Rules used = {2667, 31} $\log (1-\cos (x))$

Antiderivative was successfully veriﬁed.

[In]

Int[(1 + Cos[x])*Csc[x],x]

[Out]

Log[1 - Cos[x]]

Rule 2667

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

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

Mathematica [B]  time = 0.0054386, size = 20, normalized size = 2.86 $\log \left (\sin \left (\frac{x}{2}\right )\right )+\log (\sin (x))-\log \left (\cos \left (\frac{x}{2}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(1 + Cos[x])*Csc[x],x]

[Out]

-Log[Cos[x/2]] + Log[Sin[x/2]] + Log[Sin[x]]

________________________________________________________________________________________

Maple [A]  time = 0.014, size = 6, normalized size = 0.9 \begin{align*} \ln \left ( \cos \left ( x \right ) -1 \right ) \end{align*}

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

[In]

int((cos(x)+1)*csc(x),x)

[Out]

ln(cos(x)-1)

________________________________________________________________________________________

Maxima [A]  time = 0.928996, size = 7, normalized size = 1. \begin{align*} \log \left (\cos \left (x\right ) - 1\right ) \end{align*}

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

[In]

integrate((1+cos(x))*csc(x),x, algorithm="maxima")

[Out]

log(cos(x) - 1)

________________________________________________________________________________________

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

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

[In]

integrate((1+cos(x))*csc(x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 2.02163, size = 12, normalized size = 1.71 \begin{align*} - \log{\left (\cot{\left (x \right )} + \csc{\left (x \right )} \right )} + \log{\left (\sin{\left (x \right )} \right )} \end{align*}

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

[In]

integrate((1+cos(x))*csc(x),x)

[Out]

-log(cot(x) + csc(x)) + log(sin(x))

________________________________________________________________________________________

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

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

[In]

integrate((1+cos(x))*csc(x),x, algorithm="giac")

[Out]

log(-cos(x) + 1)