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?