Ravi Stein

2022-02-24

During some computations I came up with the following system of linear recurrences:
${B}_{n+2}=3{B}_{n}+{A}_{n}$
${A}_{n}={A}_{n-1}+{B}_{n-1}$
Here I am trying to find the solution for B (hoping to get some sort of homogeneous equation, find it roots and get the closed form formula).
But I can't solve it. The only thing I can do is
${B}_{n+2}=3{B}_{n}+\sum _{i=0}^{n-1}{B}_{i}$,
which will not help me to solve recurrence. So is there a way I can find B without the summation through n?

Alexandra Haynes

You can transform the above equations into equations only in A and only in B: The second equation gives
${B}_{n}={A}_{n+1}-{A}_{n}$
applying this to the first equation gives
${A}_{n+3}-{A}_{n+2}=3\left({A}_{n+1}-{A}_{n}\right)+{A}_{n}=3{A}_{n+1}-2{A}_{n}$
$⇒{A}_{n+3}={A}_{n+2}+3{A}_{n+1}-2{A}_{n}$
Similar
${A}_{n}={B}_{n+2}-3{B}_{n}$
${B}_{n+2}-3{B}_{n}={B}_{n+1}-3{B}_{n-1}+{B}_{n-1}⇒$
${B}_{n+2}={B}_{n+1}+3{B}_{n}-2{B}_{n-1}$

Cheryl Stark

the equation
${B}_{n+2}=3{B}_{n}+\sum _{i=0}^{n-1}{B}_{i}$
is of the form
$B\ast h\left(n\right)=0$
where $h\left(n\right)=\delta \left(n+2\right)-2\delta \left(n\right)-\sum _{k=0}^{\mathrm{\infty }}\delta \left(n\right)$ is a linear filter. the general way to solve this is similar as the method of using the Laplace transform for solving linear differential equations. the discrete version of the Laplace transform is the the Z-transform:
$H\left(z\right)=\sum _{n=-\mathrm{\infty }}^{\mathrm{\infty }}{z}^{-n}h\left(n\right)={z}^{-2}-2-\frac{1}{1-z}=$
$=\frac{{z}^{-2}-{z}^{-1}-3+2z}{1-z}$
$\frac{1}{H\left(z\right)}=\frac{1-z}{1-z-3{z}^{2}+2{z}^{3}}=\frac{\left(1-z\right)}{\left(2z-1\right)\left({z}^{2}-z-1\right)}$
perform partial fraction decomposition to get:
$\frac{1}{H\left(z\right)}=-\frac{1}{5\left(z-\frac{1}{2}\right)}+\frac{z-3}{5\left(-1-z+{z}^{2}\right)}=$
$=-\frac{1}{5\left(z-\frac{1}{2}\right)}+\frac{A}{z-\phi }+\frac{B}{z-\phi }$
for some constants A,B and $\phi =\frac{1+\sqrt{5}}{2}$. The solution is then:
$g\left(n\right)=-\frac{1}{10}{2}_{\left\{\phantom{\rule{1em}{0ex}}n\ge 1\right\}}^{-n}+A{\phi }_{\left\{\phantom{\rule{1em}{0ex}}n\ge 1\right\}}^{n-1}+B{\phi }_{\left\{\phantom{\rule{1em}{0ex}}n\ge 1\right\}}^{-n+1}$
with
$g\ast h\left(n\right)=\sum _{m=-\mathrm{\infty }}^{\mathrm{\infty }}g\left(m\right)h\left(n-m\right)=\delta \left(n\right)$
i.e. $g\left(n\right)$ is the solution of your difference equation for initial condition $B\left(n\right)=0$ for $n<0$ and $B\left(0\right)=1$, the solution for other initial condition being found by linearity.

Do you have a similar question?