The question is as follows:
Let $f(x)$ be a differentiable function $\forall x,y \in \Bbb R$ and $$f(x-y),f(x),f(y),f(x+y)$$ are in AP then comment whether $f'(x)$ is even or odd (given $f(0) \neq 0)$.
My approach :
Since the given sequence is an AP, hence we can say that
$$2f(x) = f(x-y)+f(y) \text{ and } 2f(y) = f(x)+f(x+y)$$ replacing $x$ and $y$ in $2f(x) = f(x-y)+f(y)$ and comparing with $2f(y) = f(x)+f(x+y)$ gives
$$f(x+y)=f(x-y)$$ putting $x=0$ gives $f(y)=f(-y)$ making $f'(x)$ an odd function.
But since, $$2f(x) = f(x-y)+f(y)$$ now partially differentiating with respect to $y$ and putting $y=0$ we get $f'(x)=f'(0)$
Also $$2f(y) = f(x)+f(x+y)$$ now partially differentiating with respect to $y$ and putting $y=0$ we get $f'(x)=2f'(0)$ now this is a clear contradiction to previous equation.
So is $f'(x)$ odd or not? Kindly help me out.
The fact that $f(x-y),f(x),f(y),f(x+y)$ is an Arithmetic Progression implies that $$f(x-y)+f(x+y)=f(x)+f(y)$$
Substituting $y=0$ gives us $$2f(x)=f(x)+f(0)\to f(x)=f(0)$$This tells us that the function is constant, i.e., $f'(x)=0$, so it is even and odd.
Your work is perfectly fine. Your last equation implies that $f'(x)=0$, but I think the proof I've presented is a bit simpler.