A function with midpoint-linear derivative is a quadratic polynomial 
Suppose $f:\mathbb{R}\to \mathbb{R}$ is a differentiable function such that $$f'\left(\frac{a+b}{2}\right) = \frac{f'(a)+f'(b)}2,\quad \forall a,b\in\mathbb{R}$$ Prove that $f$ is a polynomial of degree at most $2$.

In other words: if the derivative of a differentiable function is midpoint-linear, then it is linear. (In general, being midpoint-linear, i.e., $g((a+b)/2)=(g(a)+g(b))/2$, is weaker).
I'm looking for a solution without Baire category tools, e.g., on the level of Rudin's Principles of Mathematical Analysis.
Motivation
The problem isn't hard to solve if one uses the fact that $f'$, being a Baire-$1$ function, has a point of continuity. Then the rest is elementary: here's a proof that a midpoint-linear function $g$ with a point of continuity is linear:

*

*Subtract a  linear function to arrange $g(0)=g(1)=0$.

*Apply the midpoint-linear property to conclude that $g=0$ at all dyadic rationals.

*If $g$ is continuous at $a$, then $g(a)=0$ by above.

*For every $\epsilon>0$ there is a neighborhood of $a$ in which $|g|<\epsilon$.

*From midpoint-linearity, and $g$ being $0$ on a dense set, it follows that $|g|<\epsilon$ everywhere.

*Thus, $g\equiv 0$.

But invoking that fact about Baire-$1$ function looks like using a sledgehammer and makes me think I'm missing some approach here.
 A: I hope that I have not made any mistakes.
First note that if $f(x)$ has the desired property, then so does the function $f(x) - f^\prime(0) x - f(0)$, and so we can assume that $f(0) = f^\prime(0) = 0$.
Now taking $a = 2x$, $b = 0$, gives us that
$$f^\prime(x) = \frac{f^\prime(2x)}{2},$$ and so
$$\frac{\text{d}}{\text{d}x} (f(2x) - 4f(x)) = 0.$$
This implies that there is some constant $C$ such that $f(2x) = 4f(x) + C$ for all $x \in \mathbb{R}$. Taking $x = 0$ shows that $C=0$ and so
$$f(2x) = 4f(x),\quad\text{ for all }\quad x \in \mathbb{R}.$$
Now taking $a = 2x$ and $b = 2$ gives us that
$$f^\prime(x+1) = \frac{f^\prime(2x)+f^\prime(2)}{2} = \frac{2f^\prime(x) + 2f^\prime(1)}{2} = f^\prime(x) + f^\prime(1)$$ for all $x \in \mathbb{R}$.
Thus
$$\frac{\text{d}}{\text{d}x} (f(x+1) - f(x) - f^\prime(1)x) = 0,$$ which implies that there is some constant $K$ such that $f(x+1) = f(x) + f^\prime(1)x + K$ for all $x \in \mathbb{R}$.
Taking $x = 0$ shows that $K = f(1)$. Taking $x = 1$ gives us $$4f(1) = f(2) = f(1) + f^\prime(1) + f(1)$$
and so $f^\prime(1) = 2f(1) = 2K$. We thus have that $f(x + 1) = f(x) + 2Kx + K$.
We can then use this formula to show by induction that $f(m) = Km^2$ for all $m \in \mathbb{Z}$.
We can then use the formula $f(2x) = 4f(x)$ to show by induction that $f(x) = Kx^2$ for all real numbers $x$ of the form $x = \frac{m}{2^n}$ where $m$ and $n$ are integers.
These numbers form a dense subset of the reals, and $f$ is continuous since it is differentiable, and so we must have that
$$f(x) = Kx^2 \quad\text{ for all }\quad x \in \mathbb{R}$$
as we wanted to show.
