Solving an inhomogeneous linear recurrence relation $s_n = r (s_{n-1} +n \cdot B)$

96 Views Asked by At

I have been trying to solve the following linear recurrence relation, but I cannot seem to find a good particular solution:

$$s_n = r (s_{n-1} +n \cdot B) $$

Where $B$ and $r$ are constant. We have as initial conditions that states $s_0=0$ and $s_1=B \cdot r$.

For the a homogeneous solution, we solve the system: $$s_n - r s_{n-1} =0$$ We try out an auxiliary solution $s_{n, \text{hom}}= c\cdot r^n$, this generates the equation: $$ c \cdot r^n - c \cdot r^n =0$$ Which indeed satisfies the homogeneous equation. Now for the tricky bit. We see that the original equation is linear in $n$, so we will try some polynomial. I was thinking of trying a quadratic polynomial so something of the form $ s_n = an^2 +b n +d$, we insert this into our equation: $$ an^2 +b n +d = r (a(n-1)^2 +b(n-1) +d + n\cdot B)$$ We work out the brackets: $$ an^2 +b n +d = r (a n^2 -2a n-a +bn-b +d + n\cdot B) $$ We factor some terms: $$ an^2 +b n +d = r (a n^2 + (-2a +b+B )n-a-b +d ) $$ So $$ a = ra \implies a=0$$ I should not have started with a quadratic polynomial perhaps? Does anybody see a better approach or what I'm doing wrong specifically?

1

There are 1 best solutions below

2
On BEST ANSWER

TIP$_1$: Sketch a few terms without arithmetic and use induction

TIP$_2$: $s_n = r^{\color{red}{1}}s_{n-\color{red}{1}} + B\sum_{j=1}^{\color{red}{1}} (n+1-j)r^j$