3.9 \(\int \frac {1}{1+\cos (x)} \, dx\)

Optimal. Leaf size=9 \[ \frac {\sin (x)}{\cos (x)+1} \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2648} \[ \frac {\sin (x)}{\cos (x)+1} \]

Antiderivative was successfully verified.

[In]

Int[(1 + Cos[x])^(-1),x]

[Out]

Sin[x]/(1 + Cos[x])

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{1+\cos (x)} \, dx &=\frac {\sin (x)}{1+\cos (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 6, normalized size = 0.67 \[ \tan \left (\frac {x}{2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + Cos[x])^(-1),x]

[Out]

Tan[x/2]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{1+\cos (x)} \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[(1 + Cos[x])^(-1),x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 9, normalized size = 1.00 \[ \frac {\sin \relax (x)}{\cos \relax (x) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sin(x)/(cos(x) + 1)

________________________________________________________________________________________

giac [B]  time = 0.85, size = 30, normalized size = 3.33 \[ -\frac {2 \, \tan \left (\frac {1}{2} \, x\right )}{{\left (x^{2} + 1\right )} {\left (\frac {x^{2} - 1}{x^{2} + 1} - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 5, normalized size = 0.56




method result size



default \(\tan \left (\frac {x}{2}\right )\) \(5\)
norman \(\tan \left (\frac {x}{2}\right )\) \(5\)
risch \(\frac {2 i}{{\mathrm e}^{i x}+1}\) \(13\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1+cos(x)),x,method=_RETURNVERBOSE)

[Out]

tan(1/2*x)

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 9, normalized size = 1.00 \[ \frac {\sin \relax (x)}{\cos \relax (x) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sin(x)/(cos(x) + 1)

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 4, normalized size = 0.44 \[ \mathrm {tan}\left (\frac {x}{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x) + 1),x)

[Out]

tan(x/2)

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 3, normalized size = 0.33 \[ \tan {\left (\frac {x}{2} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)),x)

[Out]

tan(x/2)

________________________________________________________________________________________