$\newcommand{\ángulos}[1]{\left\langle\, nº 1 \,\right\rangle}
\newcommand{\llaves}[1]{\left\lbrace\, nº 1 \,\right\rbrace}
\newcommand{\bracks}[1]{\left\lbrack\, nº 1 \,\right\rbrack}
\newcommand{\ceil}[1]{\,\left\lceil\, nº 1 \,\right\rceil\,}
\newcommand{\dd}{{\rm d}}
\newcommand{\ds}[1]{\displaystyle{#1}}
\newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}}
\newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
\newcommand{\fermi}{\,{\rm f}}
\newcommand{\piso}[1]{\,\left\lfloor #1 \right\rfloor\,}
\newcommand{\mitad}{{1 \over 2}}
\newcommand{\ic}{{\rm i}}
\newcommand{\iff}{\Longleftrightarrow}
\newcommand{\imp}{\Longrightarrow}
\newcommand{\Li}[1]{\,{\rm Li}_{#1}}
\newcommand{\norm}[1]{\left\vert\left\vert\, nº 1\,\right\vert\right\vert}
\newcommand{\pars}[1]{\left (\, nº 1 \,\right)}
\newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\parcial #3^{#1}}}
\newcommand{\pp}{{\cal P}}
\newcommand{\raíz}[2][]{\,\sqrt[#1]{\vphantom{\large Un}\,#2\,}\,}
\newcommand{\sech}{\,{\rm sech}}
\newcommand{\sgn}{\,{\rm sgn}}
\newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
\newcommand{\ul}[1]{\underline{#1}}
\newcommand{\verts}[1]{\left\vert\, nº 1 \,\right\vert}$
\begin{align}&\dsc{\sum_{k\ = 0}^{n}\exp\pars{2ky\ic}}
=\sum_{k\ = 0}^{n}\bracks{\exp\pars{2y\ic}}^{k}
={1 - \exp\pars{\bracks{n + 1}\bracks{2y\ic}} \over 1 - \exp\pars{2y\ic}}
\\[5mm]&={\exp\pars{-y\ic} - \exp\pars{\bracks{2n + 1}y\ic}\over
\exp\pars{-y\ic} - \exp\pars{y\ic}}
=\dsc{\half\,\ic\,{\exp\pars{-y\ic} - \exp\pars{\bracks{2n + 1}y\ic} \over \sin\pars{y}}}
\end{align}
Vamos a tomar la parte imaginaria en ambos miembros:
\begin{align}&\sum_{k\ = 1}^{n}\sin\pars{2ky}
=\half\,\cot\pars{y} - {\cos\pars{\bracks{2n + 1}y} \over 2\sin\pars{y}}
\end{align}
Con $\ds{0 < x \leq {\pi \over 2}}$, integrar en ambos miembros de más de
$\ds{\pars{x,{\pi \over 2}}}$:
\begin{align}&\sum_{k\ = 1}^{n}
{-\cos\pars{2k\bracks{\pi/2}} + \cos\pars{2kx} \over 2k}
=\left.\half\,\ln\pars{\sin\pars{y}}\right\vert_{x}^{\pi/2}
-\half\int_{x}^{\pi/2}{\cos\pars{\bracks{2n + 1}y} \over \sin\pars{y}}\,\dd y
\end{align}
A continuación,
\begin{align}-\ \overbrace{\sum_{k\ = 1}^{n}{\pars{-1}^{k}\over k}}
^{\dsc{-\ln\pars{2}}}
+\sum_{k\ = 1}^{n}{\cos\pars{2kx} \over k}
=-\ln\pars{\sin\pars{x}}
-\int_{x}^{\pi/2}{\cos\pars{\bracks{2n + 1}y} \over \sin\pars{y}}\,\dd y
\end{align}
Vamos a tomar el límite de $\ds{n \to\ \infty}$:
\begin{align}\ln\pars{\sin\pars{x}}&=
-\ln\pars{2} - \sum_{k\ = 1}^{\infty}{\cos\pars{2kx} \over k}\
-\ \underbrace{\lim_{n\ \to\ \infty}
\int_{x}^{\pi/2}{\cos\pars{\bracks{2n + 1}y} \over \sin\pars{y}}\,\dd y}_{\ds{=}\ \dsc{0}}
\end{align}
$$
\color{#66f}{\large\ln\pars{\sin\pars{x}}}=
\color{#66f}{\large-\ln\pars{2} - \sum_{k\ = 1}^{\infty}{\cos\pars{2kx} \over k}}
\,,\qquad x \in \left(\, 0,{\pi \over 2}\,\right]\etiqueta{1}
$$
De hecho, $\ds{\large\it\mbox{it's still valid}}$ $\pars{0,\pi}$
$\ds{\pars{~\color{#00f}{\sf\mbox{see below}}~}}$
Al $\ds{x \in \pars{{\pi \over 2},\pi}}$:
\begin{align}
\ln\pars{\sin\pars{x}}&=\ln\pars{\sin\pars{\pi - x}}
=-\ln\pars{2} - \sum_{k\ = 1}^{\infty}{\cos\pars{2k\bracks{\pi - x}} \over k}
\\[5mm]&=-\ln\pars{2} - \sum_{k\ = 1}^{\infty}{\cos\pars{2kx} \over k}
\end{align}
tal que $\pars{1}$ es válido en $\pars{0,\pi}$.