Solving equation involving shifts of the unknown function.

71 Views Asked by At

Let's consider the following equation: $$ a_2.f(t+2) + a_1.f(t+1) + a_0.f(t+0) = g(t) $$ where $a_0,a_1,a_2$ are non zero reals and $g(t)$ is a known function.

Although it looks like an ordinary differential equation of order 2, the "changing" parts on the left part of this equation doesn't involve derivatives but rather a shift on the main variable $t$.

Question(s): what is the name of such an equation and what kind of methods do we have to find the unknown function $f(t)$ ?

3

There are 3 best solutions below

0
On

This is a recursively defined sequence of the 2nd order. Assumming that $a_1\ne 0$, it becomes: $$ f(t+2) = c f(t+1)+d f(t)+h(t). $$ where $c=-a_1/a_2$ and $d=-a_0/a_2$, and also $h(t)=-g(t)/a_2$. Let $\lambda, \mu$ be the zeroes of the quadratic equation $x^2-cx-d=0$, then $$ f(t+2) = (\lambda+\mu) f(t+1)+\lambda\mu f(t)+h(t), $$ and hence $$ f(t+2)-\lambda f(t+1) = \mu \big( f(t+1)-\lambda f(t)\big)+h(t). $$ Set $F(t)=f(t+1)-\lambda f(t),$ then $$ F(t+1) = \mu F(t)+h(t). $$ If we know $F\restriction [0,1)$, then $F$ (and consequently $f$) is obtained, the same way we obtain the formula of the recursive sequence $$ A_0=a, \quad A_{n+1}=\mu A_n+h_n, \quad n\in\mathbb N. $$

0
On

Important preliminary remark. It has to be noted that this kind of difference functional equation is linear with respect to $f$. Indeed, it can be rewritten as $Lf = g$, where $L = a_2S^2 + a_1S + a_0$, with $S(f(t)) := f(t+1)$ the shifting operator, is a linear operator and $g$ plays the role of an inhomogeneous source term. In consequence, the general solution to this equation is given by $f = f_h + f_p$, where $f_h \in \ker L$ is the solution to the associated homogeneous problem, i.e. $Lf_h = 0$, and $f_p$ is a particular solution to the inhomogeneous equation.

How to find a particular solution ? The Fourier transform permits to handle the shifts as follows : $f(t+\tau) \to F(\omega)e^{i\omega\tau}$, where $F$ is the Fourier transform of $f$. In consequence, your equation becomes $$ a_2F(\omega)e^{2i\omega} + a_1F(\omega)e^{i\omega} + a_0F(\omega) = G(\omega) $$ hence where $G$ is the Fourier transform of $g$, hence $$ F(\omega) = \frac{G(\omega)}{a_2e^{2i\omega} + a_1e^{i\omega} + a_0}, $$ which you still need to invert in order to recover $f$. You may use the Laplace transform instead, the same procedure is valid.

0
On
Equations Name

In Math.SE you can find equations like this under or . You can classify the equation in different ways, for example as a non-homogeneous linear advance functional equation with constant coefficients (equivalent to a homogeneous linear delay functional equation or you could view it as an DDE of order $0$). It's also a recurrence equation, functional differential equation of order $0$, arithmetic difference equation (Mathematica can solve such equations via RSolve)...

Solving this equation

You can solve them in different ways. Depending on the type of functional solution, the solution methods work and some don't. These are examples that work here:

$\mathcal{Z}$-transform

There is a quite useful transform like the Laplace transform called the $\mathcal{Z}$-transform Like with the Laplace transform there are multiple possible definitions. It is often used because of its special properties (especially its linearity and its time-delay or time-advance properties). Using the bilateral one:

\begin{align*} a_{2} \cdot f\left( t + 2 \right) + a_{1} \cdot f\left( t + 1 \right) + a_{0} \cdot f\left( t + 0 \right) &= g\left( t \right) \tag{$\mathcal{Z}_{t}\left[ \cdot \right]\left( s \right)$}\\ \mathcal{Z}_{t}\left[ a_{2} \cdot f\left( t + 2 \right) + a_{1} \cdot f\left( t + 1 \right) + a_{0} \cdot f\left( t + 0 \right) \right]\left( s \right) &= \mathcal{Z}_{t}\left[ g\left( t \right) \right]\left( s \right)\\ a_{2} \cdot \mathcal{Z}_{t}\left[ f\left( t + 2 \right) \right]\left( s \right) + a_{1} \cdot \mathcal{Z}_{t}\left[ f\left( t + 1 \right) \right]\left( s \right) + a_{0} \cdot \mathcal{Z}_{t}\left[ f\left( t + 0 \right) \right]\left( s \right) &= \mathcal{Z}_{t}\left[ g\left( t \right) \right]\left( s \right)\\ a_{2} \cdot s^{2} \cdot \mathcal{Z}_{t}\left[ f\left( t \right) \right]\left( s \right) + a_{2} \cdot s \cdot \mathcal{Z}_{t}\left[ f\left( t \right) \right]\left( s \right) + a_{0} \cdot \mathcal{Z}_{t}\left[ f\left( t \right) \right]\left( s \right) &= \mathcal{Z}_{t}\left[ g\left( t \right) \right]\left( s \right)\\ \left( a_{2} \cdot s^{2} + a_{1} \cdot s + a_{0} \right) \cdot \mathcal{Z}_{t}\left[ f\left( t \right) \right]\left( s \right) &= \mathcal{Z}_{t}\left[ g\left( t \right) \right]\left( s \right) \tag{$\div\left( a_{2} \cdot s^{2} + a_{1} \cdot s + a_{0} \right)$}\\ \mathcal{Z}_{t}\left[ f\left( t \right) \right]\left( s \right) &= \frac{\mathcal{Z}_{t}\left[ g\left( t \right) \right]\left( s \right)}{a_{2} \cdot s^{2} + a_{1} \cdot s + a_{0}} \tag{$\mathcal{Z}_{s}^{-1}\left[ \cdot \right]\left( t \right)$}\\ f\left( t \right) &= \mathcal{Z}_{s}^{-1}\left[ \frac{\mathcal{Z}_{t}\left[ g\left( t \right) \right]\left( s \right)}{a_{2} \cdot s^{2} + a_{1} \cdot s + a_{0}} \right]\left( t \right)\\ \end{align*}

Mathematica RSolve

Mathematica can solve such equations via RSolve and gives you a closed form solution. Using

RSolveValue[a[2] f[t + 2] + a[1] f[t + 1] + a[0] f[t] == g[t], f[t], t]

we get (raw output):

((-(a[1]/a[2])-Sqrt[a[1]^2-4*a[0]*a[2]]/a[2])^t*C[1])/2^t+((-(a[1]/a[2])+Sqrt[a[1]^2-4*a[0]*a[2]]/a[2])^t*C[2])/2^t+((-(a[1]/a[2])-Sqrt[a[1]^2-4*a[0]*a[2]]/a[2])^t*Sum[-((2^(-1+K[1])*(-a[1]+Sqrt[a[1]^2-4*a[0]*a[2]])*g[K[1]])/((-((a[1]+Sqrt[a[1]^2-4*a[0]*a[2]])/a[2]))^K[1]*(a[0]*Sqrt[a[1]^2-4*a[0]*a[2]]))),{K[1],0,-1+t}]+(-(a[1]/a[2])+Sqrt[a[1]^2-4*a[0]*a[2]]/a[2])^t*Sum[-((2^(-1+K[2])*(a[1]+Sqrt[a[1]^2-4*a[0]*a[2]])*g[K[2]])/(((-a[1]+Sqrt[a[1]^2-4*a[0]*a[2]])/a[2])^K[2]*(a[0]*Sqrt[a[1]^2-4*a[0]*a[2]]))),{K[2],0,-1+t}])/2^t

or (the raw output in traditional form):

traditional form

It does look like Mathematica would use the $\mathcal{Z}$-transform here but that's not the case. But it could use it (Mathematica could use the unilateral definition).

Characteristic polynomial (solving for a homogeneous solution)

If our functional equation is linear, has only constant coefficients and contains only delays or advances then we could say that the non-homogeneous term is equal to zero, then substitute $f_{h}\left( t \right) := \text{constant} \cdot \lambda^{t}$ and solve for $\lambda$. The $f_{h}\left( t \right)$ we get is a homogeneous solution:

\begin{align*} a_{2} \cdot f\left( t + 2 \right) + a_{1} \cdot f\left( t + 1 \right) + a_{0} \cdot f\left( t + 0 \right) &= g\left( t \right)\\ a_{2} \cdot f_{h}\left( t + 2 \right) + a_{1} \cdot f_{h}\left( t + 1 \right) + a_{0} \cdot f_{h}\left( t + 0 \right) &= 0 \tag{$f\left( t \right) := \lambda^{t}$}\\ a_{2} \cdot \lambda^{t + 2} + a_{1} \cdot \lambda^{t + 1} + a_{0} \cdot \lambda^{t} &= 0\\ a_{2} \cdot \lambda^{2} \cdot \lambda^{t} + a_{1} \cdot \lambda \cdot \lambda^{t} + a_{0} \cdot \lambda^{t} &= 0 \tag{$\div\lambda^{t}$}\\ a_{2} \cdot \lambda^{2} + a_{1} \cdot \lambda + a_{0} &= 0 \tag{$abc$-formula}\\ \lambda_{1,\, 2} &= \frac{-a_{1} \pm \sqrt{a_{1}^{2} - 4 \cdot a_{2} \cdot a_{0}}}{2 \cdot a_{2}}\\ \end{align*}