An exercise from Stein and Shakarchi's "Fourier Analysis" (exercise 14, chapter 8) I'm trying to solve Exercise 14 of Chapter 8 of Fourier Analysis by Stein and Shakarchi. The problem is as follows: 
The series $$\sum_{\vert n\vert\ne 0}\frac{e^{in\theta}}{n},\quad \mbox{for}\ \vert\theta\vert <\pi$$
converges for every $\theta$ and is the Fourier series of the function defined on $[-\pi,\pi]$ by $F(0)=0$ and 
$$F(\theta) =
\begin{cases}
i(-\pi-\theta),  & \text{if $-\pi\le \theta<0$}  \\
i(\pi-\theta),  & \text{if $0< \theta\le \pi$}
\end{cases}$$
and extended by periodicity (period $2\pi$) to all of $\mathbb R$
Show also that if $\theta\ne 0 \mod 2\pi$, then the series 
$$E(\theta)=\sum_{n=1}^{\infty}\frac{e^{in\theta}}{n}$$
converges, and that 
$$E(\theta)={1\over2}\log\left({1\over{2-2\cos \theta}}\right)+{i\over 2}F(\theta)$$
And I do not know how to prove the last identity.  Are there any hints?
 A: Observe that
$$\sum_{n=1}^\infty\frac{e^{in\theta}}n=\sum_{n=1}^\infty\frac{\cos n\theta}n+i\sum_{n=1}^\infty\frac{\sin n\theta}n$$
Splitting the sum above is justified because both series above converge, for example using Dirichlet's test (read Showing $\sum\frac{\sin(nx)}{n}$ converges pointwise  and also http://mathforum.org/library/drmath/view/72101.html , for instance) , and this already proves convergence for $\;\theta\neq2k\pi\;,\;\;k\in\Bbb Z$ ,  since for $\;\theta=2k\pi\;$ we get the harmonic series.
Now, since for $\;z\in\Bbb C\;,\;\;|z|<1\;$ we have:
$$\frac1{1-z}=\sum_{n=1}^\infty x^{n-1}\implies -\text{Log}\,(1-z)=\sum_{n=1}^\infty\frac{z^n}n\;+\;K\text{ (=constant)}\implies$$
(Log$\,\,z\,$ is the complex logarithm) substitute $\;z=e^{i\theta}\;$ (this is justified by Abel's Theorem) :
$$-\text{Log}\,(1-e^{i\theta})=\text{Log}\,\frac1{1-e^{i\theta}}=\sum_{n=1}^\infty\frac{e^{in\theta}}n\;+\;K$$
Finally (fill in details of all the above), observe that
$$1-e^{i\theta}=1-\cos\theta-i\sin\theta\implies |1-e^{i\theta}|=\sqrt{2(1-\cos\theta)}$$ and also
$$\text{Log}\,z:=\log|z|+i\arg z\;\;,\;\;\text{with}\;\;\log\;\;\text{the real usual logarithm}$$
and usually choosing the main branch's principal value for the logarithm, in which $\;\arg z\in(-\pi,\,\pi]\;$ .
The summand $\;\frac i2F(\theta)\;$ is the constant above
A: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\sum_{\verts{n} \not= 0}{\expo{\ic n\theta} \over n} & =
\sum_{n < 0}{\expo{\ic n\theta} \over n} +
\sum_{n > 0}{\expo{\ic n\theta} \over n} =
\sum_{n > 0}{\expo{-\ic n\theta} \over -n} +
\sum_{n > 0}{\expo{\ic n\theta} \over n} = 2\ic\sum_{n = 1}^{\infty}{\sin\pars{n\theta} \over n}
\\[5mm] & =
2\ic\theta\sum_{n = 1}^{\infty}\mrm{sinc}\pars{n\theta} =
-2\ic\theta + 2\ic\theta\sum_{n = 0}^{\infty}\mrm{sinc}\pars{n\theta}
\\[5mm] & =
-2\ic\theta + 2\ic\theta\bracks{%
\int_{0}^{\infty}\mrm{sinc}\pars{\theta\, x}\,\dd x +
{1 \over 2}\,\mrm{sinc}\pars{0}}
\end{align}

The bracket enclosed expression is found by means of the
  Abel-Plana Formula. Then,

\begin{align}
\sum_{\verts{n} \not= 0}{\expo{\ic n\theta} \over n} & =
-2\ic\theta + 2\ic\theta\bracks{%
{\pi\,\mrm{sgn}\pars{\theta} \over 2\theta} + {1 \over 2}} =
-2\ic\theta + \ic\,\pi\,\mrm{sgn}\pars{\theta} + \ic\theta =
\ic\bracks{\pi\,\mrm{sgn}\pars{\theta} - \theta}
\\[5mm] & =\ \bbox[15px,#ffe,border:2px dotted navy]{\ds{%
\left\{\begin{array}{rcrcl}
\ds{-\ic\pars{\pi + \theta}} & \mbox{if} & \ds{\theta} & \ds{<} & \ds{0}
\\[2mm]
\ds{\ic\pars{\pi - \theta}} & \mbox{if} & \ds{\theta} & \ds{>} & \ds{0}
\end{array}\right.}}
\end{align}

Note that
  $\ds{\,\mrm{E}\pars{\theta} \equiv
\sum_{n = 1}^{\infty}{\expo{\ic n\theta} \over n}}$ is related to the
  $\ds{\ln}$-function as it was already explained in
  $\texttt{@DonAntonio}$ answer.

A: My answer is not essentially different to that of DonAntonio's. I do attempt to make it more aligned with Stein and Shakarchi's presentation of the material.
First, the convergence of $F(\theta)$ and $E(\theta)$ can be easily shown through sum by parts.
Define $$F(r,\theta) = \sum_{|n|\neq 0} \frac{(re^{i\theta})^n}{n}$$ and $$E(r,\theta) = \sum_{n=1}^\infty \frac{(re^{i\theta})^n}{n}$$ for $0\leq r <1$.
We know the following facts.

*

*$\lim_{r\rightarrow 1} F(r,\theta)=F(\theta)$ and $\lim_{r\rightarrow 1} E(r,\theta)=E(\theta)$. (See Chapter 2, Section 5.3.)

*$e^{E(r,\theta)}=\frac{1}{1-re^{i\theta}}$ by Proposition 3.1(i) in Chapter 8.

The second point implies $\mathrm{Re}E(r,\theta) = \log|\frac{1}{1-re^{i\theta}}|$. Let $r\rightarrow 1$, we have $$\mathrm{Re}E(\theta) = \log \left|\frac{1}{1-e^{i\theta}}\right| = \frac{1}{2} \log \left(\frac{1}{2-2\cos\theta}\right). \tag{1}$$
Further, $F(\theta) = E(\theta) - \overline{E(\theta)}$ and therefore $$\mathrm{Im} E(\theta) = \frac{1}{2i} F(\theta). \tag{2}$$
Combining (1) and (2), we get the following result.
$$E(\theta) = \frac{1}{2} \log \left(\frac{1}{2-2\cos\theta}\right) + \frac{1}{2} F(\theta)$$
Note that the factor $\frac{i}{2}$ in front of $F(\theta)$ in the textbook is wrong. It should be $\frac{1}{2}$.
