Error with Cauchy Integral Formula

I have been told to calculate $$\int_0^{2\pi}\frac{1}{2+2\text{sin}(\theta)} d\theta$$

I set $$z = e^{i \theta}$$ so parameterising by the unit circle and ended up with $$\int_C \frac{1}{(z+i)^2} dz$$

My issue is that $$-i$$ is not in the interior of the unit circle so I can't apply the cauchy integral formula. This means I also can't apply the residue theorem.

• Near $\theta = 3 \pi/2$ is the integrand $\sim (x-3\pi/2)^{-2}$, which is not integrable. Apr 19 at 11:37
• Is the upper limit meant to be $\pi$? As the previous comment says, if the upper limit is $2\pi$ this integral cannot be calculated. The general anti-derivative can be found using a half-angle tan substitution. Apr 19 at 11:41
• Note $\sin\theta=\frac{z-z^{-1}}{2i},d\theta=\frac{dz}{iz}$. Apr 19 at 12:55
• The integrand is nonnegative, so perhaps the answer "$\infty$" is intended. Apr 19 at 18:08

Let $$I=\int\frac{1}{2+2\sin{\theta}} d\theta$$

Now, let $$x=\tan{\frac{\theta}{2}}$$.

Then $$\sin{\theta}=\frac{2}{1+x^2}$$ and $$d\theta=\frac{2}{1+x^2}dx$$

After some algebraic manipulation this gives $$I=\int\frac{1}{(1+x)^2}dx$$

$$=-\frac{1}{x+1}+c$$

$$=-\frac{1}{\tan{\frac{\theta}{2}+1}}+c$$

But if $$\theta=2\pi$$ then we have a $$-\frac{1}{0}$$ situation... so the integral cannot be calculated.

Hence my question as to whether the upper limit was meant to be $$\pi$$ instead which would make the integral equal to $$1$$.

Expanding in a series at $$\theta = \frac{3\pi}{2}$$ gives that the integrand is $$\frac{1}{2 (1 + \sin \theta)} = \frac{1}{\left(\theta - \frac{3 \pi}{2}\right)^2} + g(\theta),$$ for some integrable (in fact, continuous) $$g$$, but the first term on the right is not integrable on $$[0, 2\pi]$$, so the integrand is not integrable on $$[0, 2\pi]$$. In terms of the complex variable $$z$$, the complex integrand $$\frac{1}{(z + i)^2}$$ has a pole at $$z = -i$$, which in particular lies on the contour, so the Residue Theorem does not apply.

On the other hand, we can compute an indefinite integral—which is valid on any interval on which $$\sin \theta \neq -1$$—without the tangent half-angle substitution: $$\int \frac{d\theta}{1 + \sin \theta} = \int \frac{(1 - \sin \theta) \,d\theta}{(1 + \sin \theta) (1 - \sin \theta)} = \int (\sec^2 \theta - \sec \theta \tan \theta) \,d\theta = \tan \theta - \sec \theta + C$$