I'm stuck with a problem here, because i could not justify my way around a situation.
THE PROBLEM
Let $f:R \to R$ be a function satisfying:
$|f(x+y) -f(x-y) -y| \le y^2$ for all $x,y \in R$. Then show that
$f(x) = \frac{x}{2} + c$ for some constant c .
MY DOUBT
I started by putting $x=y$ which gives,
$|f(2x) - f(0) - x| \le x^2$
However, this eqn raised a doubt. Suppose $f(2x) = x^2 + c + x$ then the inequality willbeconverted into an equality,so the conditions are satisfied. But this is in direct contradiction with what we are asked to prove. Can someone please point out a mistake, because i coudnt find any when i tried?
By letting $x=y$ you're only looking at a subset of the full collection of pairs $(x,y)$ for which the inequality is assumed. So that is criticism 1.
Also, there is no "right" to replace the $\le$ by $=.$ Or in other words, you have really just defined a function of $x$ alone, and noted that it satisfies the result of substituting $x=y$ in the original inequality.
What you really need to find is a function $f$ which satisfies the given inequality for all possible pairs $(x,y).$
Added: a proof.
The assumed inequality is $$|f(x+y)-f(x-y)-y|\le y^2 \tag{1}$$ for all real $x,y.$ Let $u=x+y,\ v=x-y$ so that $y=(u-v)/2.$ Now assume $u-v>0$ and divide $(1)$ by $u-v,$ to get $$|(f(u)-f(v))/(u-v)-1/2|\le(u-v)/4. \tag{2}$$ If we now let $u \to v^+$ in $(2)$ we see that the right hand derivative of $f$ at the arbitrary real number $v$ exists and is $1/2.$ On the other hand if we let $v \to u^-$ in $(2)$ we see that the left hand derivative of $f$ at the arbitrary real number $u$ exists and is also $1/2.$
Since here each of $u,v$ are arbitrary, and both one-sided derivatives agree, we have that the (two sided) derivative of $f$ exists and is $1/2$ everywhere. Thus $f'(x)=1/2$ so that $f(x)=(1/2)x+c$ for some real $c$ as required.