Since f`((x+y)/(2)) = (f(x) + f(y))/(2)`
replacing x by 2x and y by 0 , we get
`f(x) = (f(2x)+ f(0))/(2)`
or f(2x) + f(0) = 2f(x) or f(2x) - 2f(x) = -f(0)`" " (1)`
Now , f'(x) = `underset(h to 0)("lim")(f(x+h) -f(x))/(h)`
`= underset(h to 0)("lim") (f((2x+2h)/(2))-f(x))/(h)`
`= underset(h to 0) ("lim"){((f(2x) + f(2h))/(2) -f(x))/(h)}`
`= underset(h to 0)("lim"){(f(2x) + f(2h) - 2f(x))/(2h)}`
`underset(h to0)("lim"){(f(2h) -f(0))/(2h)} " " ["From"(1)]`
= f'(0)
`=-1AA x inR " "`(Given)
Integrating , we get f(x) = -x + c `" "` (Given)
Putting x = 0 , we get
f(0) = 0 + c = 1
`therefore c = 1 " " ` (Given )
Then f(x) = 1- x
`therefore f(2) = 1-2 = -1`
Alternative method 1
`f((x+y)/(2)) = (f(x) + f(y))/(2)`
Differentiating both sides w.r.t.x treating y as constant , we get `f'((x+y)/(2)) , (1)/(2) = (f'(x)+ 0)/(2)` or `f'((x+y)/(2)) = f'(x)`
Replacing x by 0 and y by 2 x , we get
f'(x) = f'(0) = -1 `" "` (Given)
Integrating , we have f(x) = -x + c
Putting x = 0 , we get
f(0) = 0 + c = 1 `" "` (Given)
`therefore c = 1 `
Hence , f(x) = -x + 1
Then f(2) = -2 + 1 = -1
Alternative method 2 (Graphical method)
Suppose A(x , f(x) ) and B(y , f(y)) are any two points on the curve y = f(x) .
If M is the midpoint of AB , then the coordinates of M are `((x+y)/(2) , (f(x) + f(y))/(2))`
From point M , draw a vertical line meeting curve at P and x-axis at L . so , the coordinates of P are
`((x+y)/(2) , f((x+y)/(2)))` and PL `gt`ML or `f((x+y)/(2)) gt (f(x) + f(y))/(2)`
But given `f((x+y)/(2)) = (f(x) + f(y))/(2)`
which is possible when P `to M` ,i.e., P lies on AB . Hence , y = f(x) must be a linear function.
Let f(x) = ax + b , f(0) = 0 + b = 1 `" "` (Given)
and f'(x) = a or f'(0) = a = -1 `" " ` (Given)
`therefore f(x) = -x +1`
`therefore f(2) = -2 + 1 = -1`
Also , the given relation `f((x+y)/(2)) = (f(x) + f(y))/(2)` statisfies the section formula for abscissa and ordinate on LHS and RHS , respectively , which occurs only in the case of straight line.
Hence , f(x)= ax + b . From f'(0) = -1 , a = -1 , and from f(0) = 1 , b = 1 . Therefore , f(x) = -x + 1 .