# Help with hairy recurrence relation

There's so much going on here I don't know where to start:

$$d_{t} = d_{t - 1} + \left(\frac{1}{r}\right)v_{t - 1}$$

$$v_{t} = x_t + v_{t - 1} - \left(\frac{f^2}{r}\right) (4\pi^2 d_{t - 1} + D v_{t - 1})$$

$r$, $f$, and $D$ are constants. How can I solve this for $d_t$?

-
Where does $x_t$ come from? – erlking Dec 16 '12 at 1:45
erlking: The context is audio signal processing, and $x_t$ is the input sample at time $t$. – Andreas Jansson Dec 16 '12 at 1:47

## 1 Answer

First, rename the constants appropriately so that we get $$d_t = d_{t-1} + A v_{t-1} \\ v_t = x_t + B v_{t-1} + Cd_{t-1}$$

Then use the second equation to substitute $d_t$ and $d_{t-1}$ in the first one: $$(v_{t+1}-x_{t+1}-Bv_t)/C = (v_t - x_t -Bv_{t-1})/C+Av_{t-1} \\ \Leftrightarrow v_{t+1} -(B+1)v_t +(-AC+B)v_{t-1}=(x_{t+1}-x_t)$$

This is an inhomogeneous second order difference equation. There are standard methods to solve this. You first find the solutions for the homogeneous case (i.e. $x_{t+1}-x_t=0$) and then you find one particular solution to the inhomogeneous case. This will obviously depend on the nature of the $x_t$, and there may not be a closed form. Then you can substitute back to get $d_t$. So if your input is real data you may have to put up with numerical iterative solutions for $d_t$.

-