Let $\{\varphi_k\}_{k=1}^\infty$ be an orthogonal system, and $\{\alpha_k(f)\}$ the Fourier coefficients for a function $f\in L^2([a,b])$. Then the Parseval's identity is given by the formula \begin{equation} |f|_2^2 = \sum_{k=1}^\infty \alpha_k(f)^2|\varphi_k|_2^2, \end{equation} where $|f|_2 = \left(\int_a^bf^2\right)^{1/2}$.
I'm computing the complex Fourier series of $f:[-\pi,\pi]\to\Bbb R$, $f(x) = e^x$, and if nothing is wrong the series goes as follows: \begin{equation} f(x)\sim\sum_{k=-\infty}^\infty\frac{(-1)^{k}\sinh(\pi) i}{(i-k)\pi}e^{ikx}. \end{equation} I also computed it in the same restriction with the real trigonometric coefficients, and if I haven't messed up anywhere, this is what I got: \begin{equation} f(x)\sim\frac{\sinh(\pi)}{\pi}+\sum_{k=1}^\infty\left(\frac{2(-1)^k \sinh(\pi)}{(1+k^2)\pi}\cos(kx)-\frac{2(-1)^k k \sinh(\pi)}{(1+k^2)\pi}\sin(kx)\right). \end{equation} I'm trying to see what I can get from the Parseval's identity, but none of the series seem to give me any equality: \begin{equation} \int_{-\pi}^\pi e^{2x}\;dx = \sinh(2\pi),\;\;\int_{-\pi}^\pi e^{2kix}\;dx = 0,\;\;\int_{-\pi}^\pi\;dx = 2\pi,\;\;c_0(f)^2 = \frac{\sinh^2(\pi)}{\pi^2} \end{equation} \begin{equation} \sinh(2\pi) = 2\frac{\sinh^2(\pi)}{\pi}, \end{equation} but these two are not equal. Something similar happens with the other series (I took this one directly from Mathematica, it was too long to write): \begin{equation} \sinh(2\pi) = \sin\frac{\sinh^2 (\pi )}{\pi^2 }+\frac{2 \sinh ^2(\pi ) (\pi \coth (\pi )-1)}{\pi }, \end{equation} which again, the equality doesn't hold.
Did I commit a mistake while writing Parseval's identity with the correspondent variables? Or perhaps the restriction of $e^x$ in the interval $[-\pi,\pi]$ doesn't hold the Parseval's identity (I think it should, since $f\in L^2([-\pi,\pi])$ and the orthogonal systems are complete). Could anyone please help?