What is $\max_{x\in\mathbb R}\int_0^T f(t)f(t+x)\,dt$ with $f\in C^0(\mathbb R)$ and $T$ periodic ?
I tried with some continuous functions and I feel that the value of the max is $\int_0^T f(t)^2\,dt$.
I think I need to prove that $\int_0^T f(t)(f(t+x)-f(t))\,dt\le 0$. But I didn't find anything.
Do you have any proposition ?
Your answer is right, but I would like to provide some useful intuition.
First, $f(t+x)$ is just another function, call it $g_x(t)$, and think about your problem as maximizing $\int_0^{T}f(t)g(t)dt$. This is the inner product of two functions, and it looks an awful lot like an infinite-dimensional analog of the dot product between two vectors, $v.w = \sum_{0}^Nv_iw_i$. In the latter, we know from geometric intuition, and rigorously from Cauchy-Swartz, that the dot product is maximized when the two vectors are collinear, that is, when $w = cv$ with $c>0$. Thus, we hope that this intuition carries over to our infinite dimensional case, and indeed it does. Notice that for $x = 0$, we get $g_0(t) = cf(t)$ where $c = 1$, and since $f$ is $T$-periodic, for no other $0<x<T$ can $g_x(t)$ be colinear to $f$, so by Cauchy-Swartz, your guess is correct :)