How to solve a difference equation with starting and end condition?

105 Views Asked by At

I am currently having trouble solving a difference equations problem where the initial value is given and the end value. I simplified the problem to the following: \begin{align} y^{k - 1} - 2y^{k} + y^{k+1} = 0, \qquad k=1, \dots, T-1, y^{i} \in \mathbb{R}^{d} \text{ for } i\in [0, \dots, T], \end{align} where the values for $y^{0}$ and $y^{T}$ are given. I have tried googling but the only thing I found are examples where $y^{0}$ and $y^{1}$ are known, which is not case here sadly.

Question: Does anyone know how to solve this?

Thanks for any help or tips in advance!

2

There are 2 best solutions below

2
On

In this particular case, you can rewrite your relationship as $y^{k-1} - y^k = y^k - y^{k+1}$, so for every $i$ the quantity $y^i - y^{i+1}$ is the same. Now note that $$ y^0 = y^T + \sum_{i=0}^{T-1}y^i - y^{i+1}. $$ Can you conclude from there?

3
On

If the difference between consecutive terms is constant, you have an arithmetic sequence, which has the form $y^k = ak+b$. We have that $$y^0 = b \implies y^k = ak+y^0.$$ Now, to find $a$, $$y^T = aT+y^0 \implies a = \frac{y^T-y^0}{T}.$$ Hence, the solution is $$y^k = y^0 + \frac{y^T-y^0}{T}k.$$