Let $a\_n$ be a sequence of strictly positive real numbers such that $\lim\_{n \to \infty}a\_n=0$. Find all functions $f: \mathbb{R} \to \mathbb{R}$ that admit primitives (i.e. there exists a function $F:\mathbb{R} \to \mathbb{R}$ such that $\frac{dF(x)}{dx}=f(x), \forall x \in \mathbb{R}$) and satisfy the following equality $$2f(x)=f(x+a\_n)+f(x-a\_n), \forall x \in \mathbb{R}, \forall n \in \mathbb{N}$$
I have already posted this question [here](https://math.stackexchange.com/questions/4634456/trying-to-solve-a-functional-equation) but I got no answer.



Solving the functional equation $2f(x)=f(x+a_n)+f(x-a_n)$
$\newcommand{\De}{\Delta}$This problem can be solved by using the Fourier transform -- cf. [this previous answer](https://mathoverflow.net/a/440186/36721).


Let us present here an elementary solution:


Letting $G\_n(x):=F(x+a\_n)+F(x-a\_n)-2F(x)$, we get $G'\_n(x)=f(x+a\_n)+f(x-a\_n)-2f(x)=0$ for all $x$. So,
\begin{equation\*}
 c\_n:=G\_n(x) \tag{1}\label{1}
\end{equation\*}
does not depend on $x$.


Take any real $A$ and $B$ such that $A<B$. Let $k\_n:=\lfloor\frac{B-A}{a\_n}\rfloor$, so that
\begin{equation\*}
 k\_n\sim \frac{B-A}{a\_n},
\end{equation\*}
$A+k\_n a\_n\to B$, and, by \eqref{1}, $\De\_x(a\_n):=F(x+a\_n)-F(x)=\De\_{x-a\_n}(a\_n)+c\_n$ for all $x$, so that
\begin{equation\*}
 F(A+k\_n a\_n)-F(A)=k\_n \De\_A(a\_n)+\frac{k\_n(k\_n-1)}2\,c\_n \\ 
 =(1+o(1))(B-A)\frac{\De\_A(a\_n)}{a\_n}+\frac{1+o(1)}2\,(B-A)^2\frac{c\_n}{a\_n^2}, 
\end{equation\*}
whence
\begin{equation\*}
\frac{\De\_A(a\_n)}{a\_n}
=(1+o(1))\frac{F(A+k\_n a\_n)-F(A)}{B-A}-\frac{1+o(1)}2\,(B-A)\frac{c\_n}{a\_n^2}. \tag{2}\label{2}
\end{equation\*}
Similarly, for any real $C>B$,
\begin{equation\*}
\frac{\De\_A(a\_n)}{a\_n}
=(1+o(1))\frac{F(A+m\_n a\_n)-F(A)}{C-A}-\frac{1+o(1)}2\,(C-A)\frac{c\_n}{a\_n^2}, \tag{3}\label{3}
\end{equation\*}
where $m\_n:=\lfloor\frac{C-A}{a\_n}\rfloor$.


The function $F$ is differentiable and hence continuous. So, $F(A+k\_n a\_n)\to F(B)$ and $F(A+m\_n a\_n)\to F(C)$. Subtracting now \eqref{2} from \eqref{3}, we get
\begin{equation}
 \frac12\,\frac{c\_n}{a\_n^2}\to\frac{\De\_A(C-A)-\De\_A(B-A)}{C-B}.
\end{equation}
It follows now by \eqref{2} that $\frac{\De\_A(a\_n)}{a\_n}$ converges to a finite limit as well, and thus
\begin{equation}
 F(B)-F(A)=K\_1(B-A)+\frac{K\_2}2\,(B-A)^2
\end{equation}
for some real $K\_1,K\_2$ and all real $A$ and $B$ such that $A<B$.


We conclude that $F$ is a quadratic polynomial and hence $f=F'$ is an affine function. (Vice versa, any affine function $f$ satisfies your system of functional equations.)




---


The above proof can be simplified a bit by noting that the limit of $\frac{\De\_A(a\_n)}{a\_n}$ exists (and equals $F'(0)$). However, the advantage of the above proof is that it shows that the conclusion that the only solutions to the system \eqref{1} of functional equations are quadratic polynomials can be reached assuming a priori only the continuity of $F$.


