# Bounds on trig integrals converted to the complex plane

I am having trouble changing variables and converting real trig integrals into the complex plane. I know these integrals need to be converted to contour integrals along the circle $$|z|=1$$ but I am having trouble changing the bound if the integrals are not already over the interval $$[0,2 \pi]$$.

For instance the book I am using, Saff Snider says if the given integral is: $$\int_{0}^{\pi}\frac{8}{5+2 \cos \theta} d \theta$$

The book states since $$\cos(\theta)=\cos (\theta -2 \pi)$$ This implies $$\int_{0}^{\pi}\frac{8}{5+2 \cos \theta} d \theta=\frac{1}{2}\int_{0}^{2\pi}\frac{8}{5+2 \cos \theta} d \theta$$

I know this has something to do with the evenness and periodicity of the cosine function. Can someone explain this to me?

Also another problem in the book is:

$$\int_{- \pi}^{\pi}\frac{1}{1+\sin^{2} \theta} d \theta$$ and this integral is equal to $$\int_{0}^{2\pi}\frac{1}{1+\sin^{2} \theta} d \theta$$

I have also seen the integral: $$\int_{0}^{\frac{\pi}{2}}\frac{\cos 2 \theta}{1+2\cos^{2} \theta} d \theta$$

which equals $$\frac{1}{4} \int_{0}^{2 \pi}\frac{\cos 2 \theta}{1+2\cos^{2} \theta} d \theta$$

I cannot figure out how to easily switch the bounds of the given integral to the interval $$[0,2 \pi]$$ is there any method to easily do this?Can help explain how to do this easily and for any given interval?

For $$\int_0^{\pi} \frac{8}{5+2\cos \theta} d\theta$$ note that that the only variable function is $$\cos \theta$$. Draw the line $$x=\pi$$ on the graph of $$\cos x$$, to notice that it has reflectional symmetry about it. In other words, $$\cos(\pi + x) = \cos(\pi-x)$$. This means the area under the graph in $$[0,\pi]$$ equals that in $$[\pi, 2\pi]$$ and the result follows.
Notice that $$\frac{1}{1+ \sin^2x}$$ is even and so $$\int_{-\pi}^{\pi} \frac{1}{1+\sin^2x}=2 \int_0^{\pi} \frac{1}{1+\sin^2x}$$ Again, by the same reflectional symmetry at $$x=\pi$$ if we expand the interval to $$[0,2\pi]$$, we would have to divide by $$2$$ to preserve the area.
For the last one, you can use a trig identity and the integral becomes$$\int_0^{\frac{\pi}{2}} \frac{\cos 2\theta}{2+\cos 2\theta} d\theta$$
This time, $$\cos 2\theta$$ has reflectional symmetry along $$x=\frac{\pi}{2}$$ and $$x=\frac{3\pi}{2}$$, leading to the areas under the graph in $$[0,\frac{\pi}{2}],\, [\frac{\pi}{2}, \pi],\, [\pi, \frac{3\pi}{2}],\, [\frac{3\pi}{2}, 2\pi]$$ all being equal.