While messing around with some integrals, I have found the following proof for $\zeta(2)=\frac{\pi^2}{6}$, but I'm not sure if it is valid:

We take a look at the integral $I=\int_0^{\frac{\pi}{2}} \ln(\cos(x))\space dx$. Clearly, we have $\Im(I)=0$; to show that the integral converges isn't difficult and consequently, it is real. Now some calculations using $\cos(x)=\frac{e^{ix}+e^{-ix}}{2}$: $$ I=\int_0^{\frac{\pi}{2}} \ln\left(\frac{e^{ix}+e^{-ix}}{2}\right)\space dx=\int_0^{\frac{\pi}{2}} \ln\left(e^{2ix}+1\right)-ix-\ln(2)\space dx=\int_0^{\frac{\pi}{2}} \ln\left(e^{2ix}+1\right)\space dx-i\frac{\pi^2}{8}-\frac{\pi}{2}\ln(2) $$ Now: $$ J=\int_0^{\frac{\pi}{2}} \ln\left(e^{2ix}+1\right)\space dx=\int_0^{\frac{\pi}{2}} \sum_{k=1}^{\infty}\frac{(-1)^{k-1}\cdot e^{2ixk}}{k}\space dx=\sum_{k=1}^{\infty}\frac{(-1)^{k-1}\cdot \left[\frac{e^{2ixk}}{2ik}\right]_0^{\frac{\pi}{2}}}{k}=\sum_{k=1}^{\infty}\frac{(-1)^{k-1}\cdot \left(\frac{(-1)^k-1}{2ik}\right)}{k} $$ When $k$ is even, then $(-1)^k-1=0$ so those terms cancel out, leaving: $$ J=\sum_{k=1}^{\infty}\frac{\left(\frac{-2}{2i(2k-1)}\right)}{2k-1}=i\sum_{k=1}^{\infty}\frac{1}{(2k-1)^2}=i\left(\sum_{k=1}^{\infty}\frac{1}{k^2}-\sum_{k=1}^{\infty}\frac{1}{(2k)^2}\right)=i\cdot\frac{3}{4}\zeta(2) $$ Clearly, we have $\Re(J)=0$ and therefore $0=\Im(I)=\frac{3}{4}\zeta(2)-\frac{\pi^2}{8}$ and thus $\zeta(2)=\frac{\pi^2}{6}$.

I'm not sure with all those complex terms which are involved so it would be highly appreciated if someone could tell me wether the steps are valid or not.

Edit:

The main aspects I'm concerned about are $\ln\left(e^{ix}+e^{-ix}\right)=\ln\left(e^{2ix}+1\right)-ix$ or $e^{i\pi k}=(-1)^{k}$ and in general manipulations involving the natural log of complex arguments, because I'm familar with the fact, that it can take infinitly potential values, but until now I havent had a proper introduction to the subject and learned the major things autodidactically, so I'm not sure about the validity.


I see three steps which are delicate in some sense:

  1. the definition of the logarithm of complex numbers in the integral $I$ in such a way that usual (real) formulas still hold at least for the complex numbers involved in those computations;
  2. the exchange of the integral and the series in the integral $J$;
  3. the direct application of the fundamental theorem of calculus in the final step of the evaluation of $J$ (actually an exchange of two limits is happening here);

The first thing to be chosen is probably a suitable analytic extension of the real logarithm to the complex plane, which is equivalent to choose an appropriate principal argument function $\operatorname{Arg}(z)$ such that $ z = |z|e^{i\operatorname{Arg}(z)}$. I'm using the following conventions: $\ln_{\mathbb{R}}$ stands for the well known real logarithm defined on positive real numbers; $\ln_{\mathbb{C}}$ stands for a suitable extension of $\ln_{\mathbb{R}}$ to the complex plane ($0$ excluded). In particular one can choose: $$ \ln_{\mathbb{C}}z= \ln_{\mathbb{R}}|z|+i \operatorname{Arg}(z) $$ where $\operatorname{Arg}(z)\in \left]-\pi,\pi\right]$. In this way, $ z\mapsto\ln_{\mathbb{C}}(z) $ is the (unique) analytic extension of $ \ln_{\mathbb{R}} $ to the domain $ \mathbb{C}^{**} := \mathbb{C}\setminus\{x\in\mathbb{R} : x\le 0\} $. The complex numbers involved in the integral $I$ are all in the closed upper half plane, so this extension should work. This justifies the fact that: $$ \ln_{\mathbb{R}}\cos(x) = \ln_{\mathbb{C}}\frac{e^{i2x}+1}{2e^{ix}} = \ln_{\mathbb{C}}({e^{i2x}+1}) - \ln_{\mathbb{C}}({2e^{ix}}) = \ln_{\mathbb{C}}({e^{i2x}+1}) - \ln_{\mathbb{R}} 2 - ix $$ Observe that with our choices the identity $ \ln_{\mathbb{C}} e^{ix} = ix $ is true if and only if $x$ belong to the interval $ \left]-\pi,\pi \right]$. Here everything works since $ \operatorname{Arg}(2e^{ix})= \operatorname{Arg}(e^{i2x}+1) = x \in [0,\pi/2] $.

There is another reason for choosing this particular extension $\ln_{\mathbb{C}}$ and it is the fact that it satisfies the identity $$ \ln_{\mathbb{C}}(z+1) = \sum_{k=1}^{+\infty} \frac{(-1)^{k-1}z^{k}}{k} \quad\forall |z|\le 1, z \ne -1, $$ which is used in the computation of $J$. This is a consequence, for instance, of the identity theorem for holomorphic functions. In fact, if, for instance, I had chosen $ \operatorname{Arg}(z) \in \left[ 0, 2\pi \right[ $ (as sometimes it is common and convenient to do), then the identity would have hold true only in the upper half ball, since the points $z+1\in\mathbb{R}$ with $ z\ge -1 $ would have been discontinuity points for the corresponding argument function and, thus, for the corresponding complex logarithm.

Note that the series above converge pointwise in that set and uniformly on the sets $ E_{r} := \{ z \in \mathbb{C} : |z|\le 1, |z+1|\ge r\}$, for each $ r \in \left]0,1\right[$. I found a very clear explanation of this on some slides by Klaas Pieter Hart; here are the links to the slides and to the web page of Klaas Pieter Hart: http://fa.its.tudelft.nl/~hart/37/onderwijs/weblecture/handout.pdf; http://fa.its.tudelft.nl/~hart

Now, let's come to point 2: the exchange of the series and the integral in the computation of $J$. Here a problem appears since, as $ x \to \pi/2^{-} $, the point $ e^{i2x} $ moves on the circle $ |z|=1 $ approaching $ -1 $ which is the unavoidable singularity of $ \ln_{\mathbb{C}}(z+1) $. Moreover the uniform convergence of the series above does not hold in any neighborhood of $-1$. In fact, the integral $J$ is a converging improper integral (as seen from Riemann's eyes, at least!), so it would be more precise to consider it as: $$ J = \lim_{\theta\to\pi/2^{-}} \int_{0}^{\theta} \ln_{\mathbb{C}}(e^{i2x}+1) dx, $$ which also explains why I spoke of an exchange of two limits in point 3. Then we can apply the fact that the series now converges uniformly on the arc described by the points $ e^{i2x} $ for $x\in[0,\theta]$ as long as $ \theta < \pi/2$, and we can rightfully exchange the integral and the series to get: $$ J = \lim_{\theta\to\pi/2^{-}} \int_{0}^{\theta} \ln_{\mathbb{C}}(e^{i2x}+1) dx = \lim_{\theta\to\pi/2^{-}} \sum_{k=1}^{+\infty}(-1)^{k-1}\frac{e^{i2k\theta}-1}{2ik^{2}}. $$ We finally arrive to point 3, since now one would like to move the limit w.r.t. $\theta$ inside the series. Here things are easier since: $$ \left|(-1)^{k-1}\frac{e^{i2k\theta}-1}{2ik^{2}} \right| \le \frac{1}{k^{2}} \quad \forall \theta\in[0,\pi/2] \text{ and } \forall k $$ and Weierstrass M-test grants that the series now converges totally, uniformly and absolutely for $ \theta \in[0,\pi/2]$ and the limit can be moved inside the series to conclude the argument.