Solve $f'(ax+by)=[f(y)-f(x)]/(y-x)$ Let $a,b$ be two reals. Find all differentiable functions $f$ satisfying:
$$f'(ax+by)= \frac{f(y)-f(x)}{y-x}$$
for all $y\neq x$. 

I have solved the problem but my solution is not as elegant as I would like it to be so I'm hoping someone can post their solution. The answer is:

 If $a=b=0.5$, the solution set is all quadratics; else, the solution set is all linear functions.

A brief outline of my method, for which the key idea is l'Hopistal:

First I show that $f$ is of class $C^2$ on $\mathbb{R}$. Then fix $x=x_0$ and take the limit of both sides of the given equation as $y \to x_0$, applying l'Hospital to the right side. We find that $f'(x_0)=f'[(a+b)x_0]$. Thus $f'(x)=f'[(a+b)x]$ for all $x$. Next, keeping $x=x_0$ fixed we differentiate both sides of the original equation w.r.t $y$ and take the limit again as $y \to x_0$, applying l'Hospital once more. You find $2bf''((a+b)x_0)=f''(x_0)$. But since $f''[(a+b)x_0](a+b)=f''(x_0)$, either $f''(x_0)=0$ for all $x_0$ or $a=b$. The first case implies that solutions are polynomials of degree at most $2$. The second case is easily dealt with by setting $a=b$ and $y=-x$ in the original equation. 

 A: Below is a lighter-weight approach, not using l'Hopital or $f'$ differentiability at $0\,$, which proves that $f$ must be linear except in the case $a=b=\frac{1}{2}$ when it is (at most) a quadratic. The proof for the latter case relies on the additional assumption of $f$ being analytic, which is not among the stated premises, and could likely be unnecessary (the OP called it the easy case so I may well be overlooking something obvious there).


*

*If $a=0$ or $b=0$ then it trivially follows that $f$ must be linear. The following assumes $ab \ne 0$.

*With $y=0\,$: $f'(ax)=\frac{f(x)-f(0)}{x}\,$ therefore $f'$ is continuous and differentiable on $\mathbb{R}\setminus \{0\}\,$. Since $f$ is assumed to be differentiable, $f'(0)=\lim_{x \to 0} \frac{f(x)-f(0)}{x}=\lim_{x \to 0} f'(ax)\,$, therefore $f'$ is also continuous at $0$, thus throughout $\mathbb{R}$.

*With $x \ne 0, y \to x\,$: $f'\big((a+b)x\big)=f'(x)\,$.

*If $|a+b| \ne 1$ assume WLOG that $|a+b| < 1$ (else use the same argument for $\frac{1}{a+b}$) and note that $f'(x)=f'\big((a+b)x\big)=f'\big((a+b)^2x\big)=\cdots=f'\big((a+b)^n x\big) \to_{n \to \infty} f'(0)$ by continuity of $f'$. Therefore $f'$ is constant on $\mathbb{R}\,$, so $f$ must be linear.

*Otherwise if $|a| \ne |b|$ writing the relation for $x = bz, y=0$ and $x=0, y=az$, respectively, gives $f'(abz) = \big(f(bz)-f(0)\big)/bz = \big(f(az)-f(0)\big)/az\,$ Multiplying the latter equality by $z$ gives $\big(f(bz)-f(0)\big)/b = \big(f(az)-f(0)\big)/a\,$ then taking the derivative in $z\,$: $f'(bz)=f'(az)\,$ or $f'(z)=f'(\frac{a}{b}z)$. Assuming WLOG $|a| \lt |b|$ (else swap $a,b$) and iterating, it follows that $f'(x)=f'\big(\frac{a}{b}x\big)=f'\big((\frac{a}{b})^2x\big)=\cdots=f'\big((\frac{a}{b})^n x\big) \to_{n \to \infty} f'(0)$ by continuity of $f'$. Therefore once again $f'$ is constant on $\mathbb{R}\,$, so $f$ must be linear.

*The last case left to consider is $|a+b|=1$ and $|a|=|b|\,$ i.e. $\,a=b=\pm\frac{1}{2}$. Assume WLOG $a=b=\frac{1}{2}$ (else use the same argument for $f(-x)$) then with $y=-x\,$: $f'(0)=\frac{f(x)-f(-x)}{2x}\,$. Furthermore assuming that $f$ is analytic near $0$ so that $f(x) = \sum_{n \ge 0} a_nx^n$ it follows that $a_n=0$ for $n \ge 3\,$, so $f(x)$ is a quadratic (at most).
