if $f(x)-a\int_x^{x+1}f(t)~dt$ is constant, then $f(x)$ is constant or $f(x)=Ae^{bx}+B$ Question:

let $a\in(0,1)$, and such $f(x)\geq0$, $x\in R$ is continuous on $R$,
if 
  $$f(x)-a\int_x^{x+1}f(t)dt,\forall x\in R $$ is constant,
show that
$f(x)$ is constant;
or $$f(x)=Ae^{bx}+B$$ where $A\ge 0,|B|\le A$ and $A,B$ are constant, and the positive number  $b$ is such
  $\dfrac{b}{e^b-1}=a$

My try:
let $$f(x)-a\int_x^{x+1}f(t)dt=C$$
then we have
$$f'(x)-af(x+1)+af(x)=0,\forall x\in R$$
other idea:
let $$F(x)=\int_{0}^{x}f(x)dx$$
then 
$$f(x)-a\int_x^{x+1}f(t)dt=F'(x)-a[F(x+1)-F(x)]=C$$
then I can't solve this ODE? maybe my idea is not good.
Thank you very much. 
 A: A very pretty problem! Under the hypotheses stated, we will conclude that
$f(x) = A e^{bx}+B$ with $A, B\ge0$. The amplitude of $B$ cannot be restricted. 
Since $f$ is continuous, the integral is differentiable and by the OP's calculation,
$$
\frac{d}{dx}(e^{ax} f(x)) = e^{ax}(f'(x)+a f(x)) =  e^{ax} a f(x+1)\ .
$$
It follows $u(x)=e^{ax}f(x)$ is nonnegative and 
satisfies
$$
u'(x) = c u(x+1) ,  \quad c=a e^{-a}.
$$
By a simple induction argument, $u$ is infinitely differentiable with 
all derivatives nonnegative on $\mathbb R$.  Thus its reflection $v(x)=u(-x)$ 
is completely monotone, 
meaning all its even derivatives are nonnegative and all its odd derivatives are nonpositive.
By Bernstein's theorem on completely monotone functions,
 there is a unique Borel measure $d\mu$ on $[0,\infty)$ such that
 $$
 v(x) = u(-x) = \int_0^\infty e^{-tx}\,d\mu(t)
 $$
 for all $x>0$.  But then, since $v'(x)=-u'(-x)=-c v(x-1)$, we find that for $x>1$, 
 $$
 c v(x) = -v'(x+1) = \int_0^\infty e^{-tx} e^{-t}t\,d\mu(t).
 $$
 By uniqueness of the representing measure, $c\,d\mu(t)=te^{-t} d\mu(t)$
 as measures on $[0,\infty)$.  Hence $(c-te^{-t})d\mu(t)=0$, and
 the support of $d\mu$ must lie in the set of $t$ such that $c=te^{-t}$.
Since $t\mapsto te^{-t}$ increases on $(0,1)$
 and decreases on $(1,\infty)$, this set consists of two points: 
 the number $a\in(0,1)$ and the unique
 $\hat a>1$ such that $ae^{-a}=\hat a e^{-\hat a}$.   Therefore $d\mu$ is a nonnegative combination of  delta masses at $a$ and $\hat a$:
 $$
 d\mu(t) = B\,\delta(t-a) + A\, \delta(t-\hat a)
 $$
 where $B, A\ge0$. Consequently, for all $x>1$,
$$ 
 v(x) = B e^{-ax} + A e^{-\hat a x} = e^{-ax}f(-x),
 $$
 hence $f(x) = B + A e^{bx}$ where $b=\hat a-a>0$ satisfies $a e^b = \hat a = b+a$
 as desired.
The argument above actually applies for any translate $v(x-k)$. Consequently the desired representation of $f$ holds for all $x$.
A: I need help proving the following result:
If $f(x)-a\int_x^{x+1}f(t)dt$ is constant, then $f(x)$ is constant or $f(x)=Ae^{bx}+B$.


*

*Firstly, we transform this ODE to the form:
$$\frac{dy}{dx}+P(x)y=Q(x).$$


Such equation has the solution:
$$y=e^{-\int{Pdx}}$$[\int{Qe^{\int{Pdx}}+C}].$$


*Then,we calculate this solution as the following way:
$$fe^{ax}=\int{Qe^{ax}dx+C}\implies(Ae^{bx}+B)e^{ax}=\int{Qe^{ax}dx+C}\implies Qe^{ax}=Aae^{b}e^{(a+b)x}+Bae^{ax}\implies Q=Aae^{b}e^{bx}+Ba.$$


Therefore,
$$f(x+1)=f^{'}(x)\frac{e^{b}}{b}+C\implies Q=f(x+1)$$
where
$Aae^{b}\ge0,$ $Ba\le{Aae^{b}}$.
From my point, this ODE has the solution of $f=Ae^{\lambda{x}}+B$ is obviously, the only thing we should prove is that $\lambda=b=a(e^{b}-1)$.
