i suppose it's fairly well known that if a (continuous, real-valued) function $f$ on the real line satisfies


$f(x-y)=f(x)-f(y)+const$


then it is necessarily linear.


are there any general characterizations of "approximate" linearity? for example, what can be said if $|f(x-y)-f(x)+f(y)-f(0)|$ is bounded by some small $\epsilon$? or, more relevant to what i need, if the $L^2$ norm of this difference is bounded by a small constant? in particular, suppose,


$$E[(f(X-Y)-f(Y)+f(Y)-f(0))^2]\leq\epsilon$$


for a pair of independent random variables $X,Y$. is there a sense in which $f$ is approximately linear?



approximately linear functions
Let $E$ and $E'$ be Banach spaces. Mappings $f:E\to E'$, which satisfy the inequality
$$\|f(x + y) − f(x) − f(y)\| \leq\epsilon$$
for all $x, y \in E$, are called $\epsilon$-additive (or approximately additive). The main result concerning approximately additive functions is due to D. Hyers
([link](http://www.ams.org/mathscinet/search/publdoc.html?arg3=&co4=AND&co5=AND&co6=AND&co7=AND&dr=all&pg4=AUCN&pg5=TI&pg6=PC&pg7=ALLF&pg8=ET&r=1&review_format=html&s4=&s5=On%20the%20stability%20of%20the%20linear%20functional%20equation&s6=&s7=&s8=All&vfpref=html&yearRangeFirst=&yearRangeSecond=&yrop=eq)).



> 
> **Theorem.** Let $f(x)$ be an $\epsilon$-additive mapping of a Banach space $E$ into another Banach space $E'$. Then $l(x)=\lim f(2^nx)/2^n$ exists for each $x$ in $E$, $l(x)$ is linear, and the inequality $$\|f(x)-l(x)\|\leq\epsilon$$ is true for all $x$ in $E$. Moreover, $l(x)$ is the only linear mapping satisfying this inequality. If $f(x)$ is continuous at at least one point, then $l(x)$ is continuous everywhere in $E$. 
> 
> 
> 


So in your case $E=L^2(\Omega)$, $E'=\mathbb R$.


**Edit.** As Yemon Choi indicated, finite dimensional versions of the result had been discovered earlier and independently. Check out, for instance, the Pólya and Szegö problem book (Ch 3, Problem 99):



> 
> Assume that the terms of the sequence $a\_1,a\_2,a\_3,\dots$ satisfy the condition 
>  $$a\_m+a\_n-1 < a\_{m+n} < a\_m+a\_n+1.$$
>  Then
>  $$\lim\limits\_{n\to\infty}\frac{a\_n}{n}=\omega$$
>  exists; $\omega$ is finite and we have
>  $$\omega n-1 < a\_n < \omega n +1.$$
> 
> 
> 


