Methods to find the value of $\int_0^{2\pi} \frac{dt}{z+e^{it}}$ Given $z \in \mathbb{C}$, with $|z|\neq1$, what are the classic methods to determine the value of:
$$\int_0^{2\pi} \dfrac{dt}{z+e^{it}}$$
I thought of rewriting the integral with only real integrands but it seems very tedious. I am not asking necessarily for an answer but I would like to know how can I approach this kind of integral in order to be quite efficient.
I never saw contour integration, so I am not going to use it in any case. But if you have a solution that involves this concept, I would be glad to read it anyway.
 A: Expand integrand as a power series in $z$ or $z^{-1}$ depends on whether $|z| < 1$ or $> 1$.
$$\frac{1}{z+ e^{it}} = 
\begin{cases}
\sum\limits_{n=0}^\infty (-z)^n e^{-i(n+1)t},&|z| < 1\\
\sum\limits_{n=0}^\infty (-e^{it})^n z^{-(n+1)},&|z| > 1
\end{cases}$$
Since $|z^n e^{-i(n+1)t}| = |z|^n$ and $|e^{int}z^{-(n+1)}| = |z|^{-(n+1)}$,
the magnitude of the functions in the expansion is bounded by a geometric series in $|z|$ or $|z|^{-1}$ and independent of $t$.
From this, it is easy to deduce the series of functions converges uniformly over $[0,2\pi]$ and hence we can integrate it term by term.... The rest is straight forward.
A: Large Hint: It is equal to:
$$\frac{1}{i}\int_\gamma \frac{w^{-1}\,dw}{z+w}$$ where $\gamma(t)=e^{it}.$
Then $$\frac{w^{-1}}{w+z}=\frac1{w(w+z)}=\frac{1}{z}\left(\frac1w-\frac1{w+z}\right)$$
Then the integral depends on whether $|z|<1$ or $|z|>1.$
A: Let $z=|z|e^{ia}$ and rewrite the integral
$$I=\int_0^{2\pi} \dfrac{dt}{z+e^{it}}
= e^{-i a}\int_0^{2\pi} \frac{|z| +\cos (t-a) -i \sin (t-a)}{|z| ^2+ 2|z|\cos (t-a)+1}dt
$$
where the integration over the $\sin$-term vanishes due to periodicity. Integrate  the remaining  integrand as follows
\begin{align}
I= &\frac{1}{2z}\int_0^{2\pi} \left(1+ \frac{|z| ^2-1}{|z| ^2+ 2|z|\cos t+1}\right)\>dt\\
=& \frac{1}{z}\left( \pi+ {(|z|^2-1})\int_0^{2\pi}\frac{d(\tan\frac t2)}{(|z|-1)^2\tan^2\frac t2+(|z| +1)^2}dt\right)\\
=& \frac\pi z \left( 1+\text{sgn}\left(  \frac{|z|+1}{|z|-1}\right)\right)
\end{align}
A: $$I=\int_{0}^{2\pi} \frac{dt}{z+e^{it}}~~~~(1)$$
Apply** $\int_{0}^{a} f(x) dx=\int_{0}^{a} f(a-x) dx$, then
$$I=\int_{0}^{2\pi} \frac{dt}{z+e^{-it}}~~~~(2)$$
Then add the two results to get
$$2I=\int_{0}^{2\pi}\frac{2z+2\cos t}{z^2+2z\cos t+1}$$
Next use
$\int_{0}^{2a} f(x) dx=2\int_{0}^{a} f(x) dx, ~if~ f(2a-x)=f(x)$.
Then we get$$I=\int_{0}^{\pi}\frac{2z+2\cos t}{z^2+2z\cos t+1}dt=\frac{1}{z} \int_{0}^{\pi} \frac{z^2-1}{z^2+1+2z\cos t}+\frac{1}{z}\int_{0}^{\pi} dt$$
Next use the standard integral $$J=\int_{0}^{\pi} \frac{dx}{A+\cos x}=\frac{\pi}{\sqrt{A^2-1}}, A>1$$
We get $$I=\frac{2\pi}{z}$$
Edit: Finding $J$ use ** again to get $$2J=\int_{0}^{\pi} \left(\frac{1}{A+\cos x}+\frac{1}{A-\cos x}\right) dx=2A\int_{0}^{\pi}\frac{\sec^2x dx}{A^2(1+\tan^2x) +A^2-1}=\frac{\pi}{\sqrt{A^2-1}}.$$ By taking $\tan x=u$.
A: Rewrite
$$\frac{1}{z+e^{i t}}=\frac{1}{z}-\frac{e^{i t}}{z \left(z+e^{i t}\right)}$$
$$\int\frac{1}{z+e^{i t}} \,dt=\frac{t}{z}+\frac{i \log \left(z+e^{i t}\right)}{z}$$
$$\int_0^{2\pi}\frac{1}{z+e^{i t}} \,dt=\frac {2 \pi}z$$
A: Consider the mean value theorem for harmonic functions:
$$f\left( z \right)=\frac{1}{2\pi }\int\limits_{0}^{2\pi }{f\left( z+{{e}^{it}} \right)dt}\Rightarrow \int\limits_{0}^{2\pi }{\frac{1}{z+{{e}^{it}}}dt}=\frac{2\pi }{z}$$
This is true for all z where f is analytic in a unit circle centred at z. For example this is true for all z with $\operatorname{Re}\left( z \right)>1$ etc.
