2

I wish to solve $y_{n+2}-y_{n+1}-2y_{n}=n2^n$ by first reducing the problem to first order equations with the help of the characteristic equation, which yields the solutions: $r=-1,2$. I have learned to solve first orders with the following formula: $\forall n \geq 0: y_{n+1}=r y_{n}+q_{n} \implies y_{n+1}= r^{n+1}y_{0}+\sum_{k=0}^{n} r^{n-k} q_{k}$

So:

$y_{n+2}-y_{n+1}-2y_{n}=(y_{n+2}+y_{n+1})-2(y_{n+1}+y_{n})$, with help of substitution $z_{n}=y_{n+1}+y_{n}: z_{n+1}-2z_n=n2^n \implies z_{n+1}=2^{n+1}z_0+\sum_{k=0}^{n}2^{n-k}k2^k=2^{n+1}z_0+\frac{1}{2}2^n n(n+1) \implies z_{n}=2^nz_0+\frac{1}{2}2^{n-1}n(n-1)$

Subsequently solve in the same way $y_{n+1}+y_n=z_n \implies y_{n}=(-1)^n y_0 +\sum_{d=0}^{n} (-1)^{n-d} (2^dz_0+\frac{1}{2}2^{d-1}d(d-1))$

As you can see it gets quite messy at the end, making me think that I have made a few errors along the way or used this method the wrong way.

  • 1
    One way starts by finding a particular solution of the form $y_n=(An^2+Bn)2^n$ by determining $A,B$ that work. – Gerry Myerson Nov 14 '20 at 09:23
  • @GerryMyerson Yes you are right, but I wanted to see if it is possible to solve it with this method aswell. – Labbsserts Nov 14 '20 at 18:18
  • 1
    OK. I think you've left out some parentheses in your last equation – shouldn't $(-1)^{n-d}$ multiply everything that comes after it? So I guess what you're worried about is the difficulty of summing something like $2^{d-1}d(d-1)$. But that may be unavoidable when both the characteristic equation and the right side involve $r^n$ for the same $r$ (in this case, $r=2$). – Gerry Myerson Nov 14 '20 at 21:37
  • So, what do you think? – Gerry Myerson Nov 15 '20 at 22:31
  • @GerryMyerson $A,B$ can be determined without using any initial values of $y_n$ so it's probably $y_n=(An^2+Bn+C)2^n$ but we need two $y$'s so I'm not sure where the 4th constant goes.

    Or maybe $y_n=(An^3+Bn^2+Cn+D)2^n$?.

    – Neat Math Nov 16 '20 at 04:08
  • @Neat, I wrote that one starts by finding a particular solution of the form $y_n=(An^2+Bn)2^n$. And you're right that we don't need initial values to do this. But we're not done when we have a particular solution. One then continues by adding a solution of the corresponding homogeneous solution, $y_n=C\cdot2^n+D(-1)^2$, and to find $C$ and $D$ you do need the initial values. – Gerry Myerson Nov 16 '20 at 05:41
  • 1
    $\sum_{d=0}^{n} (-1)^{n-d} 2^dz_0$ is a geometric series with ratio -2.

    $\frac{1}{2}2^{d-1}d(d-1))=2^{d-1} {d \choose 2}$ so you can use binomial theorem.

    – Neat Math Nov 16 '20 at 14:22
  • @GerryMyerson Thanks for the notice, I've edited now. My teacher had the same argument, he said it was enough to arrive at the double summation, because not all summations can be explicitly stated. – Labbsserts Nov 17 '20 at 21:33
  • The summation can certainly be carried out explicitly, it's just a little harder to do. – Gerry Myerson Nov 17 '20 at 21:51
  • Meant in general: Not all summations can med explicitly stated. – Labbsserts Nov 19 '20 at 06:07

1 Answers1

1

As you can see, doing $y_{n+1}= r^{n+1}y_{0}+\sum_{k=0}^{n} r^{n-k} q_{k}$ once is probably OK but doing it one more time will usually lead to messiness.

In addition to Gerry Myerson's way, another method for this problem is to make it homogeneous: $$ y_{n+2} - y_{n+1} -2 y_n = n2^n \tag1 $$

$$ y_{n+1} - y_{n} -2 y_{n-1} = (n-1) 2^{n-1} \tag2 $$

$$(1)-2 \times (2) \implies y_{n+2}-3y_{n+1} + 4y_{n-1}=2^n \tag3 $$ $$y_{n+1}-3y_n + 4y_{n-2}=2^{n-1} \tag4 $$

$$(3)-2\times(4) \implies y_{n+2} - 5y_{n+1} + 6y_n+4y_{n-1}-8y_{n-2} = 0 \tag 5$$

At first glance (5) may look scary, but you already know the homogeneous part of (1) has two roots -1 and 2; and by doing $(1)-2\times(2)$ and $(3)-2\times(4)$ you know there are 2 more duplicate roots of 2. Indeed it's easy to verify that $$ y^4-5y^3+6y^2+4y-8=(y+1)(y-2)^3. $$

If you use forward shift operator it's even more obvious:

$$ (\mathbb{E}+1)(\mathbb{E}-2)y_n=n2^n \\ \implies (\mathbb{E}+1)(\mathbb{E}-2)^2 y_{n-1} = n2^n - 2(n-1)2^{n-1}=2^n\\ \implies (\mathbb{E}+1)(\mathbb{E}-2)^3 y_{n-2} = 2^n-2\cdot 2^{n-1} = 0. $$

For other examples on use of the forward shift operator, see Finding explicit formula for recursive relation

Neat Math
  • 4,790