TITLE: Finding solutions to $f'(x) = f(x + k)$
QUESTION [7 upvotes]: I'm trying to find non-trivial functions $f \colon \mathbb R \to \mathbb R $ that $f'(x) = f(x+k)$ with $k \in \mathbb R$.
For $k \le 0$, I've found functions based on $f(x)= e^x$, such as $f(x) = e^{x \frac{W(k)}{k}}$, where $W(k)$ is the Lambert W function.
However, for $k>0$, I can only find a solution if $k=2\pi n+\frac{\pi}{2} $ with $n\in\mathbb N$. The solution is $f(x) = \sin x$. Are there solutions for other values of $k$?
I was hoping that for $k>0$, a function whose graphic is similar to $f(x)=-e^x$ could exist, but it seems it doesn't exist. Or does it?
The method I used is basically trial and error. What other method could I have used?
Thanks.

REPLY [2 votes]: Let $a=\alpha+\beta i$, $\alpha,\beta\in\mathbb{R}$, be a complex number such that $a=e^{ak}$. In terms of $\alpha$ and $\beta$ this means that $\alpha=e^{\alpha k}\cos(\beta k)$ and $\beta=e^{\alpha k}\sin(\beta k)$. Then $f(x)=Ae^{\alpha x}\cos(\beta x)+Be^{\alpha x}\sin(\beta x)$ is a solution for any choice of $A,B\in \mathbb{R}$. Are there other solutions? Yes.
In the following I assume $k>0$. Let $\phi$ be a $C^\infty$ function with compact support in $[0,k]$. Let $n$ be a non negative integer. Define $g$ on $[nk,(n+1)k]$ by $g(x)=\phi^{(n)}(x-nk)$. Then $g$ verifies $g'(x)=g(x+k)$ on $[0,+\infty)$. We need to extend $g$ to $(-\infty,0]$. For this define indectively $g$ on $[-(n+1)k,-nk]$ by $g(x)=-\int_{x+k}^{-(n-1)k}g(s)ds$.
The general solution is of the form $f+g$ for some choice of $\alpha,\beta$ and $\phi$.