TITLE: What's wrong in this method of solving a difference equation?
QUESTION [11 upvotes]: Consider:
$$y_{n+1} = 2y_n + 1$$
To solve this I think I need to find "any" one particular solution and add it to a homogeneous solution.
A homogeneous solution is $2^ny_0$

For a particular solution, if I substitute $y_n = an$, $$a(n+1) = 2an + 1
> \implies a = \dfrac{1}{1-n}$$
This gives the complete solution as $$y_n = \color{red}{\dfrac{n}{1-n}}+2^ny_0$$

However for a particular solution, if I substitute $y_n=b$, I get
$$b=2b+1 \implies b=-1$$
This gives the complete solution as $$y_n=\color{red}{-1}+2^ny_0$$
These two solutions seem to be very different. I don't see where I've made an error.
Any particular solution will work in the complete solution, right?
If so, why the the two particular solutions above gave seemingly different general solutions?

REPLY [5 votes]: Homogeneous solution is $2^ny_0$  

No, the general homogeneous solution is $\,C \cdot 2^n\,$ for some constant $\,C\,$.

This gives the complete solution as $\quad y_n=\color{red}{-1}+2^ny_0$

Except this doesn't work if you try it for $\,n=0\,$ or $\,n=1\,$. See note above why.
Instead, you should get that $\,y_n = -1 + C \cdot 2^n\,$, where the constant $\,C\,$ is determined from the initial condition $\,y_0 = -1 + C \cdot 2^0 \iff C = y_0+1\,$

To solve this I think I need find "any" one particular soln and add it to homogeneous solution.

Alternatively, you can solve it directly by rewriting the recurrence as $\,y_{n+1}+1=2\left(y_n+1\right)\,$. It follows that $\,y_n+1\,$ is a geometric progression, and therefore $\,y_n+1 = 2^n(y_0+1)\,$, so $\,y_n=\ldots\,$