A sufficient condition for linearity? If $f$ is a linear function (defined on $\mathbb{R}$), then for each $x$, $f(x) – xf’(x) = f(0)$. Is the converse true? That is, is it true that if $f$ is a differentiable function defined on $\mathbb{R}$ such that for each $x$, $f(x) – xf’(x) = f(0)$, then $f$ is linear?

The following argument uses not much machinery. 
Suppose that $f(0)=b$ and $f'(0)=m$.  Let $g(x)=f(x)-(mx+b)$.   Then $g(0)=0$ and $g'(0)=0$.
Note that
$$g(x)-xg'(x)=[f(x)-(mx+b)] -x(f'(x)-m)=0=g(0).$$
So $xg'(x)-g(x)=0$ for all $x$.  
For $x \ne 0$, let $h(x)=g(x)/x$.
Then for any $x \ne 0$, we have
$$h'(x)=\frac{xg'(x)-g(x)}{x^2}=0.$$
It follows that $h(x)$ is a constant $p$ on $(0, \infty)$, and a constant $n$ on $(-\infty,0)$.
Thus $g(x)=px$ on $(0,\infty)$ and $g(x)=nx$ on $ (-\infty,0)$.
But $g'(x)=0$.  So 
$$\lim_{x\to 0+} \frac{px-0}{x-0}=0.$$ 
It follows that $p=0$.  In the same way we can show that $n=0$.  So $g(x)$ is identically $0$, and therefore $f(x)=mx+b$.
