# Boundary conditions in linear homogeneous differential equation with constant coefficients

I have the linear homogeneous recurrence relation:

$$p_{k+1} -2 p_k + p_{k-1}=0$$,

where $$p_k$$ - probability of getting $$N=5$$, starting with $$k=3$$.

I'm trying to find boundary conditions, which are I think $$p_0=0, p_N=1$$.

Let $$a_k = p_{k-1}$$, so we have $$a_{k+2}-2a_{k+1}+a_k=0$$. (After that I'll just look for roots of my quadratic differential equation, and find the solution).

How does it change the boundary conditions? (I have to find both constants). Is it just $$a_0=0, a_N=1$$ or do we "add one" and have $$a_1=0, a_{N+1}=1$$?

Generally, my exercise is about gamer's ruin with given probabilities $$p,q$$ and $$r$$, where I have to find $$a_1$$, but I just need help with these boundary conditions.

Also what happens, when we have $$2p_{k+1}-3p_k+p_{k-2}=0$$ with found boundary conditions $$p_0=0, p_N=1, p_{-1}=0$$ (or $$p_{-2}=0$$ ?), and we want that once again $$a_k=p_{k-2}$$. I don't understand how these work.

If I have to add any other information from my exercise (incomplete info), just tell me and I will add it. Any help will be much appreciated.

The difference equation $$p_{k+1}-2p_k+p_{k-1}=0$$ has a double characteristic root $$1$$ and thus the solution formula $$p_n=An+B$$, thus with your boundary conditions $$p_n=n/N$$.
$$2p_{k+1}-3p_k+p_{k-1}=0$$ has roots $$1$$ and $$1/2$$ with general solution formula $$p_n=A2^{-n}+B$$ and thus $$p_n=\dfrac{1-2^{-n}}{1-2^{-N}}$$.
• I'm sorry, I can not help you much with that. For me you are just re-labeling the sequence, $a_k=p_{k-1}$ or $p_k=a_{k+1}$, this is another letter and an index shift. If it has to remain fundamentally the same sequence, the bc translate as you suspected. Or you have to write in more detail what the conditions on the sequence are if $a_1=0$ is only a simplified assumption. Commented Nov 11, 2018 at 11:19