[Math] How to solve this recurrence relation

recurrence-relationsreference-request

What are some ways to solve this recurrence relation:

$a(n+1)=2 a(n) – a(n-1) -1, \text{ with }a(0)=0, a(10)=0?$

I tried to first convert this inhomogeneous equation into a homogeneous one following Wikipedia:

$b_{n}=Ab_{n-1}+Bb_{n-2}+K \,$ can be
converted into homogeneous form as
follows: The steady state is found by
setting $b_n = b_{n−1} = b_{n−2} = b^{*}$ to
obtain $b^{*} = \frac{K}{1-A-B}. \, $.
Then the non-homogeneous recurrence
can be rewritten in homogeneous form
as $[b_n -b^{*}]=A[b_{n-1}-b^{*}]+B[b_{n-2}-b^{*}], \, $

But in the recurrence relation given at the beginning of this post, the denominator in $b^{*} = \frac{K}{1-A-B} \, $ is $1-2+1=0$. So how can I solve the recurrence relation? Thanks in advance!

PS: Are there some books or websites with some summary of various ways to solve recurrence relation?

Best Answer

Mary: You may consider your equation for $n+2$ instead of $n+1$; this gives us $$ a(n+2)=2a(n+1)-a(n)-1.$$ Subtract the first equation from this one. We obtain $$\begin{array}{rl}a(n+2)-a(n+1)&=(2a(n+1)-a(n)-1)-(2a(n)-a(n-1)-1)\\&=2a(n+1)-3a(n)+a(n-1),\end{array}$$ or $$a(n+2)=3a(n+1)-3a(n)+a(n-1).$$

In general, if your equation is "almost homogeneous" but for a constant, the same trick of subtracting consecutive instances of the recurrence gives us a homogeneous equation.

The associated characteristic equation is now $x^3-3x^2+3x-1=0$, or $(x-1)^3=0$. This means that $a(n)=A+Bn+Cn^2$ for some constants $A,B,C$.

In general, if the equation has the form $(x-r)^k(x-b)^s\dots=0$, then the general solution will have the form $$a(n)=(A+Bn+\dots+C n^{k-1})r^n+(D+En+\dots+F n^{s-1})b^n+\dots$$ (in the most studied case, the characteristic equation has no repeated roots, but as in your example here, repeated roots may occur, so we need this more general version).

To find $A,B,C$ in our equation for $a(n)=A+Bn+Cn^2$, we use the given initial conditions. Are you sure the condition $a(10)=0$ is correct, rather than $a(1)=0$?

With $a(1)=0$, we have $0=A+B+C$. Also, $a(0)=0$, so $A=0$. Finally, $a(2)=2a(1)-a(0)-1=-1$, using the original recurrence, so $A+2B+4C=-1$. This easily gives us $A=0$, $B=1/2$, and $C=-1/2$, or $$ a(n)=\frac{n-n^2}2. $$

Note that we needed to compute $a(2)$ before we could find $A,B,C$. This is because the original equation was not homogeneous, so even though it is of second order, we needed an additional initial condition to the two given to us. (Note the homogeneous equation we obtained is of third order, needing 3 initial conditions.)


Unfortunately, I do not know of a decent reference on recurrence relations at an elementary level (I know of one, in Spanish, a translation of a small Russian booklet published by Mir eds. years ago). There are several standard approaches which might not be as elementary as you may want, but you may enjoy looking at them anyway: Using linear algebra or generating functions. For the latter, a good reference is "generatingfunctionology",

http://www.math.upenn.edu/~wilf/DownldGF.html

and for the former a good reference is Volume II of Apostol's Calculus book.


Hmm... With $a(10)=0$, we can proceed as follows: We have $$a(n)=A+Bn+Cn^2$$ and so $$A=0$$ (since $a(0)=0$) and $$10B+100C=0$$ (since $a(10)=0$ and $A=0$). We also have $$a(n+2)=2a(n+1)-a(n)-1,$$ or $$ B(n+2)+C(n+2)^2=2B(n+1)+2C(n+1)^2-Bn-Cn^2-1, $$ which simplifies to $2C=-1$, or $$C=-1/2.$$ Then $$B=5,$$ from the equation for $a(10)=0$, and $$ a(n)=5n-\frac{n^2}2. $$

Related Question