Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a function satisfying $$\left|f(x+y)-f(x-y)-y\right| \leq y^2$$ for all $x,y\in \mathbb{R}$ Prove that $f(x)=x/2+c$ where c is a constant
I have taken $g(x)=f(x)-x/2$ and from the given condition I can arrive at $\left|g(x+y)-g(x-y)\right| \leq y^2$. I know we have to take the limit after this. But I am having problem in proving the function continuous and differentiable. Since without proving that, I cannot take the limit. Please help how to prove this is continuous and differentiable
Fix $a$ and take $x = a+y$ (and later $x = a-y$). You get for $y\ge 0$, $$ \frac{|f(a+2y)-f(a)-\frac{1}{2}2y|}{y}\le y. $$ From there, with the substitution $\epsilon = 2y$, $$ \lim_{\epsilon\rightarrow 0^+}\frac{|f(a + \epsilon) - f(a) - \frac{1}{2}\epsilon|}{\epsilon} = 0 $$ That shows you that the right hand derivative of $f$ at $a$ is $1/2$. Taking $x = a-y$ gives you the same thing for the left hand derivative. That gives you both differentiability and continuity at $a$ for all $a$. To see that the only possible functions are $f(x) = C + \frac{x}{2}$, remember from calculus that two functions with the same derivative everywhere can only differ by a constant.
Edit: Usually the right hand derivative of $f(x)$ at $a$ is defined to be a number $r$ so that $$ \lim_{h\rightarrow 0^{+}}\frac{f(a+h)-f(a)}{h}=r. $$ By subtracting $r$ to the other side, this is the same as $$ \lim_{h\rightarrow 0^{+}}\frac{f(a + h)-f(a)-rh}{h} = 0. $$ Finally, if the limit of a function is $0$, then so is the limit of its absolute value (since the absolute value function is continuous). All of these steps are reversible, so the right hand derivative of $f(x)$ at $a$ being r is the same as $$ \lim_{h\rightarrow 0^{+}}\frac{|f(a + h)-f(a)-rh|}{h}=0. $$