if the following functional equation $$f\bigg(\frac{x+y}{2}\bigg) =\frac{f(x)+f(y)}{2} \quad \text{ holds for all real }~ x ~\text{ and }~ y$$ If$f'(0)$ exists and equals to $-1$ then find $|f(2)|$.
My work
I tried to find $f'(x)$ so that i can intregrate it and then find $f(x)$
$f'(x)=\lim_{h \to 0} \frac{f(x+h)-f(x)}{h}$
which gave me this equation:
$f'(x)=\lim_{h \to 0} \frac{f(2x)-2f(x)+1+f(2h)-1}{2h}$
I could not proceed further
and the answer is $2$
since $f'(0)=-1$
we get $f'(x)=-1$
we can integrate both sides and put $x=2$
(and also sorry for mistakes in question. I'm new, so this all was a bit hard and I made silly mistakes)
so we get $|f(x)|=2$