What is the general solution of $\frac{df(x)}{dx} = f(x-a)$? 
Let $a \in \mathbb{R}$ be a constant. What is the general solution of the following delay differential equation (DDE)? $$\frac{df(x)}{dx} = f(x-a)$$


For example, for $a = - \frac{\pi}{2}$,
$$\begin{split}
\frac{d(\sin x)}{dx} &= \cos x \\
&= \sin\left(x + \frac{\pi}{2}\right)
\end{split}$$
 A: $f'(x)$ can be written in terms of operators as $D[f],$ where $D$ is the derivative operator, a linear operator. $f(x+a)$ can be written in terms of operators as $S_a[f],$ where $S_a$ is the shift operator, another linear operator. Now, $S_a$ can be written in terms of $D.$ Think about this: you can expand $f(x+a)$ as a Taylor series centered at $x,$ hence $$f(x+a)=\sum_{m=0}^{\infty}\frac{(D^m[f])(x)[(x+a)-x]^m}{m!}=\sum_{m=0}^{\infty}\frac{a^mD^m[f]}{m!}(x).$$ Since this is true for any analytic function $f,$ it means that $$S_a=\sum_{m=0}^{\infty}\frac{a^mD^m}{m!}=\exp(aD)=e^{aD}.$$ This is important for the equation solving. Now, the equation can be rewritten simply as $D[f]=S_a[f],$ which is equivalent to $D[f]-S_a[f]=0,$ which is equivalent to $(D-S_a)[f]=(D-e^{aD})[f]=0.$ Thus, solving your equation is equivalent to finding the null space, also called the kernel, of the operator $D-e^{aD}.$ Now, consider the eigenvalue equations $$D[f]=\lambda{f}$$ and $$e^{aD}[f]=e^{a\lambda}f,$$ where $\lambda\in\mathbb{C}.$ Subtract the latter from the former, and you have that $$(D-e^{aD})[f]=(\lambda-e^{a\lambda})f,$$ giving an eigenvalue equation for $D-e^{aD}.$ Solving $(D-e^{aD})[f]=0$ is then equivalent to finding the eigenvectors (eigenfunctions) of $D-e^{aD}$ such that their eigenvalue is $0.$ This amounts to finding the eigenfunctions of $D$ that correspond to the eigenvalues $\lambda$ such that $\lambda-e^{a\lambda}=0.$ We know the eigenfunctions of $D$ are given by $Ce^{\lambda{x}},$ so we merely want those precise exponentials with $\lambda$ solving the equation $\lambda-e^{a\lambda}=0.$
Now onto solving the latter equation. Notice that it is equivalent to $\lambda=e^{a\lambda},$ which is equivalent to $\lambda{e}^{-a\lambda}=1,$ which is equivalent to $-a\lambda{e}^{-a\lambda}=-a.$ Taking into account the complex branches of the Lambert W, this means $$W_n(-a)=-a\lambda,$$ meaning that $$\lambda=-\frac{W_n(-a)}{a}.$$ Therefore, for some sequence of $C_n,$ $$f(x)=\sum_{n\in\mathbb{Z}}C_ne^{-\frac{W_n(-a)}{a}x}$$ is the complete solution family to the equation $$f'(x)=f(x+a).$$
In the special case that $a=\frac{\pi}2,$ we get that $$W_0\left(-\frac{\pi}2\right)=\frac{i\pi}2,$$ hence $$-\frac{W_0\left(-\frac{\pi}2\right)}{\frac{\pi}2}=-i,$$ so we have that $f(x)=Ce^{-ix}$ is one of the solutions given. This means $\sin(x)$ and $\cos(x)$ are solutions, as expected. There are other solutions, but there is no nice way of expressing them, due to the nature of the Lambert W map.
