Consider the following function $F: x \to \sum_{k=1}^{N}\dfrac{\cos(2\pi k x)}{k^2}$, where $x\in[0,1]$. I would like to show that the minimum of this function is achieved in $x=\dfrac{1}{2}$ for any $N\in\mathbb{N}$. I have already tried with all the "classical tools" of real analysis, but I am unable to conclude anything. Eventually, I have figured out that the function $F$ can be seen as a truncated Fourier series of a parable. I have also tried to plot $F$: plot for N=4, plot for N=10.
Am I missing something? Can someone help me out?
Let us consider the function
$$f(x) = \sum_{k=1}^N\dfrac{\cos(2\pi k x)}{k^2}$$ $$\implies \left.f'(x)\right|_{x=0.5} = -\left.\sum_{k=1}^N\dfrac{2\pi k}{k^2}\sin(2\pi kx)\right|_{x=0.5}$$ $$=-\sum_{k=1}^N\dfrac{2\pi}{k}\sin(\pi k)=-\sum_{k=1}^N\left[\dfrac{2\pi}{k}\cdot 0\right]=0$$
$$\implies \left.f''(x)\right|_{x=0.5} = -\left.\sum_{k=1}^N\dfrac{4\pi^2 k^2}{k^2}\cos(2\pi k x)\right|_{x=0.5}$$ $$=-\sum_{k=1}^N4\pi^2\cos(\pi k )=2\pi^2\left[1 - (-1)^N\right]$$
What can be concluded from these observations? We see that for $x=0.5$ the first derviative vanishes. The second derivative vanishes only for even $N$. For odd $N$ it is positive. Hence, we can confirm your conjuncture for odd $N$ as the second derviative is positive. For even $N$ we need to further investigate the sum.
$$\implies f'''(0.5) = 0.$$
$$\implies \left.f^{(4)}(x)\right|_{x=0.5} = \left.\sum_{k=1}^N\dfrac{16\pi^4 k^4}{k^2}\cos(2\pi k x)\right|_{x=0.5}=\sum_{k=1}^N16\pi^4k^2\cos(\pi k )=\sum_{k=1}^N16\pi^4k^2(-1)^k$$ $$=16\pi^4\sum_{k=1}^N(-1)^kk^2=8\pi^2(-1)^N[N(N+1)]>0$$
With this information we can write down a Taylor approximation to this function as
$$f(x) = f(0.5) + \dfrac{f'(0.5)}{1!}(x-0.5)+\dfrac{f''(0.5)}{2!}(x-0.5)^2 + \dfrac{f'''(0.5)}{3!}(x-0.5)^3 + \dfrac{f^{(4)}(0.5)}{4!}(x-0.5)^4 + O((x-0.5)^5)$$ $$\implies f(x) = f(0.5)+\dfrac{f^{(4)}(0.5)}{4!}(x-0.5)^4 + O((x-0.5)^5)$$
We can conclude from this polynomial, that we have a minimum at $x=0.5$ as the coefficient of the $(x-0.5)^4$ term is positive hence the sum is minimal when the term $(x-0.5)^4$ vanishes.