Numerical solution of a difference equation

95 Views Asked by At

I would like to solve in $f$ the equation $f(x) - f(x-d) = g(x),$ where $g$ is a given function and $d$ a given constant delay. We can assume $f(x) = 0$ for negative $x$.

When $g$ is sampled (with a unit step), are there known numerical approaches to estimate the corresponding $f$ samples ? $d$ is not necessarily integer, but in practice is a small value (say 5 to 25).

I think this can be called an "(ordinary) finite-difference equation", but I am having a hard time to find relevant documentation, as the topic is swamped by theory on recurrence relations and solutions of differential equations by discretization.

1

There are 1 best solutions below

1
On BEST ANSWER

Since $f(x) = 0$ for negative $x\,$ you'll get :

  • $\;f(x)=g(x)\;$ in $(0,d)$
  • $\;f(x)=g(x)+g(x-d)\;$ in $(d,2\,d)\;$ since $\;f(y+d)-f(y)=g(y+d)\;$ for $\,y:=x-d\,$ in $(0,d)$

and more generally :

$$f(x)=\sum_{k=0}^n g(x-k\,d)\quad\text{for $\,x\,$ in}\;\;(n\,d,\,(n+1)\,d)$$

In your specific case ($g$ sampled with a unit step) this will only work for $d$ integer.
I would suggest linear interpolation between the two nearest integer values if $\,x-k\,d\,$ is not integer (of course higher degree interpolations are possible but seem more 'risky'...).