Given $f(x)$ to be differentiable such that $f(y)-f(x)-(y-x)f'(\frac{x+y}{2})+\frac{(x-y)^2}{4}=0$, then find $f(x)$
From the given equation, we can't plug in $x=y$ as it just gives $0=0$. For some reason I think $f(x)$ is a quadratic equation ( I dunno why tho ). So I set $f(x)=ax^2+bx+c$ and put it in the given equation. \begin{equation} ay^2+by+c-(ax^2+bx+c)-(y-x)[a(x+y)+b]+\frac{x^2-2xy+y^2}{4}=0\\ \Rightarrow x^2-2xy+y^2=0\\ \Rightarrow x=y \end{equation}
So does that mean for all quadratic equation it satisfies this functional equation?.
I'm assuming here the equation has to be satisfied for all $x,y$. Showing that $f$ being quadratic implies $x=y$ means that $f$ cannot be quadratic, as we could choose $x\neq y$.
As the problem is currently stated there is no such $f(x)$. First, let $x=a, y=b$. The equation becomes $$f(b) - f(a) - (b-a)f'\left(\frac{a+b}{2}\right)+\frac{(a-b)^2}{4} = 0$$
Then, letting $x=b, y=a$, we have $$f(a) - f(b) - (a-b)f\left(\frac{b+a}{2}\right)+\frac{(b-a)^2}{4} = 0$$
Adding the two together, we get \begin{align} &\frac{(a-b)^2}{2} = 0\\ \implies& a=b \end{align}
Which means we have to choose $x=y$ regardless of $f$. If we relax the problem so that the equation only has to be satisfied for $x=y$, it becomes trivial as you have shown.