# How to solve differential equations of the form $f'(x) = f(x + a)$

What could one do to find solutions for $f'(x) = f(x + a)$ for various values of $a$?

I know that $c_1\sin(x + c_2)$ is solution when $a = \frac{1}{2}\pi$, and of course $c_1e^x$ when $a = 0$.

For instance, is there a function satisfying $f'(x) = f(x + 1)$? What about negative or imaginary $a$?

Is there possibly a generalization?

(Edit: I guess I did have analytic solutions in mind, but wow, two good answers!)

-
– lhf Sep 4 '11 at 14:01
This is a delay differential equation. Solving them symbolically can be quite difficult. – J. M. Sep 4 '11 at 14:03
Nice phenomena captured by delay differential equations are predator prey cycles or feedback cycles. You can define simple ones that exhibit convergence onto oscillatory solutions for some region of parameter space and decay to a fixed point for other regions of parameter space. Some also become chaotic (usually after they become oscillatory). Higher dimensional ODEs are sometimes simplified as 1D DDE (Delay differential equations) as you have above. Bunch of theorems on classifying limits of solutions for simple ones. – Alice Sep 4 '11 at 18:11

Note that $f(x) = e^{cx}$ is a solution if $c = e^{ca}$. This can be solved for $c$ in terms of the Lambert W function: $c = - W(-a)/a$. The Lambert W function has infinitely many branches, each of which gives a solution. There are two real solutions if $0 < a < 1/e$, one if $a \le 0$ or $a = 1/e$, none if $a > 1/e$. Of course, linear combinations of solutions of your delay-differential equation are solutions. In particular, given a pair of complex conjugate $c = r \pm i s$ (for real $a$), we get real solutions of the delay-differential equation by taking the real and imaginary parts of $e^{cx}$, namely $e^{rx} \cos(sx)$ and $e^{rx} \sin(sx)$.

For example, for $a = 1$ the smallest values of $c$ are approximately $0.3181315052 \pm 1.337235701\,i$, $2.062277730 \pm 7.588631178\,i$, $2.653191974 \pm 13.94920833\,i$,$3.020239708 \pm 20.27245764\,i$, $3.287768612 \pm 26.58047150\,i$, $3.498515212 \pm 32.88072148\,i$, $3.672450069 \pm 39.17644002\,i$.

-
Nice. Is this the most general solution or are there others? – jnm2 Sep 5 '11 at 2:54
Basically, the question is whether the linear span of $e^{cx}$ for solutions $c$ of $c = e^{ac}$ is dense in $C[0,a]$. I'm not sure, but I think the answer is yes. – Robert Israel Sep 5 '11 at 7:43
The most general analytic solution, yes. With the usual caveat of branch cuts. – anon Sep 6 '11 at 9:22

To make things a little more natural, I will consider the equation $f'(x)=f(x-a)$, $a>0$. As observed in the comments, this is a (linear) delay differential equation. Given a continuous function $\phi\colon[-a,0]\to\mathbb{R}$, there is a unique continuous function $f\colon[-a,\infty)\to\mathbb{R}$, with continuous derivative on $(0,\infty)$, such that $f(x)=\phi(x)$ for $x\in[-a,0]$ and $f'(x)=f(x-a)$ for $x>0$.

The solution $f$ is constructed recursively on the intervals $[na,(n+1)a]$, $n=0,1,2\dots$

If $x\in[0,a]$, then $$f(x)=f(0)+\int_0^xf'(t)dt=f(0)+\int_0^xf(t-a)dt=\phi(0)+\int_{-a}^{x-a}\phi(t)dt.$$ If $x\in[a,2a]$, then $$f(x)=f(a)+\int_a^xf'(t)dt=f(a)+\int_a^xf(t-a)dt=f(a)+\int_0^{x-a}f(t)dt,$$ which is well defined since in the previous step we calculated $f$ on $[0,a]$. Iterating this procedure, we can find $f$ on any interval $[0,na]$. Only on rare ocasions it is possible to obtain a closed formula for $f$.

Example: $a=1$, $\phi(x)=x^2$.

For $x\in[0,1]$ $$f(x)=\phi(0)+\int_{-1}^{x-1}t^2dt=x-x^2+\frac{x^3}{3}.$$ For $x\in[1,2]$ $$f(x)=f(1)+\int_{0}^{x-1}\Bigl(t-t^2+\frac{t^3}{3}. \Bigr)dt=\frac{5}{4} - \frac{7 x}{3} + 2 x^2 - \frac{2 x^3}{3} + \frac{x^4}{12}.$$ For $x\in[2,3]$ $$f(x)=f(2)+\int_{1}^{x-1}f(t)dt=\frac{x^5}{60}-\frac{x^4}{4}+\frac{3 x^3}{2}-\frac{13 x^2}{3}+\frac{19 x}{3}-\frac{197}{60}.$$ The graph shows the smoothness of $f$.

-
I'm not following. How is $f$ constructed using $\phi$, which is defined in terms of $f$? How would I use this to calculate $f(x)$ numerically? – jnm2 Sep 4 '11 at 23:14
$\phi$ is given, defined on $[-a,0]$. It is a sort of initial value. From it and the equation, you find $f$ on $[0,a]$; from the values of $f$ on $[0,a]$ you find the value of $f$ on $[a,2a]$, and so on. For each initial function $\phi$, you obtain a solution. – Julián Aguirre Sep 5 '11 at 9:41
Is there a way to ensure that $f$ is smooth? – jnm2 Sep 5 '11 at 14:27
If $\phi$ is $C^k$ on $[-a,0]$, then $f$ is $C^{k+1}$ on $[0,\infty]$, $C^{k+2}$ on $[a,\infty]$, and in general, $C^{k+n}$ on $[(n-1)a,\infty]$. – Julián Aguirre Sep 5 '11 at 15:06
I meant smooth at the boundaries ($0$, $a$, $2a$, ...). I tried $\phi(x) = x^2$to see what the result would be and $f$ is not differentiable at $x = 0, a, 2a, ...$ – jnm2 Sep 5 '11 at 18:37