1

example , $$ a_n=6a_{n-1}-9a_{n-2},a_0=0,a_1=1 $$ what is the $a_n$?

In fact, I want to know there are any way to deal with this situation.

Thomas Andrews
  • 177,126
Farmer
  • 1,535
  • 1
    @lanse2pty, http://en.wikipedia.org/wiki/Recurrence_relation#Solving – lab bhattacharjee Aug 16 '14 at 03:34
  • 1
    Besides solving this recurrence, I advise you to learn how to write formal proofs and verify others' proofs so that you can understand perfectly why a given method works or does not work. Frankly I cannot emphasize this enough. – user21820 Aug 16 '14 at 03:43

3 Answers3

6

We assume that you are dealing with linear homogeneous recurrences with constant coefficients.

When the characteristic equation has degree $2$ and a double root $r$, the general solution is $Ar^n +Bnr^n$.

If the equation has degree $3$, a double root $r$ and a single root $s$, use $Ar^n+Bnr^n+Cs^n$.

If there is a triple root $r$, use $Ar^n+Bnr^n+Cn^2r^n$.

And so on.

Remark: The situation is analogous to what we do with linear homogeneous differential equations with constant coefficients when the characteristic equation has multiple roots.

André Nicolas
  • 507,029
  • Even though you have not proof your way,but I feel it is right. If I want to study the the linear recurrence theory,what book I should read? – Farmer Aug 16 '14 at 06:32
  • 1
    Sorry, I am not familiar with current texts. The book by Rosen on discrete mathematics is fairly comprehensive. As to proof, all we need to verify (for your case) is that $r^n$ and $nr^n$ are solutions (easy) and that they are linearly independent. That the space of solutions is $2$-dimensional is linear algebra, and then we get that the space of solutions is given by linear combinations of $r^n$ and $nr^n$. The proof for the general case is similar, but gets notationally messy. – André Nicolas Aug 16 '14 at 06:38
5

Here is a fun way to get to the answer:

Suppose we have a recursion $A_n = c_1A_{n-1} + c_2A_{n-2} + \dots + c_kA_{n-k}$. When you are doing the usual approach, you are looking for geometric sequences that satisfy this recursion, and you end up looking for nonzero roots $r$ of:

$$x^n = c_1x^{n-1} + c_2x^{n-2} + \dots + c_k x^{n-k}$$

Now remember that when we have a double root of a polynomial, then it is also a root of the derivative of that polynomial. So if we are in that case and $r$ is a double root of this let's differentiate the above equation, and then multiply by $x$ to keep it looking nice:

$$nx^n = c_1(n-1)x^{n-1} + c_2(n-2)x^{n-2} + \dots + c_k(n-k) x^{n-k}$$

We know $r$ must still must be a root of this, so we plug in $r$ and look carefully this says that the sequence $A_n = nr^n$ satisfies our original recursion. Hooray!

If $r$ is a root of multiplicity more than 2, then we can differentiate the equation more times to get more sequences of the form $A_n = n^kr^n$ for $k$ less than the multiplicity of $r$.

I know another way to get at this using linear algebra that I think is a bit more enlightening as to why these are the answers, and why you never get anything else, but in my opinion this differentiation trick is pretty slick.

Nate
  • 11,206
3

A bare-hands method would be as follows:

$$a_n - 3 a_{n-1} = 3 ( a_{n-1} - 3 a_{n-2} )$$

$$a_n - 3 a_{n-1} = 3^{n-1} ( a_1 - 3 a_0 )$$

$$\sum_{k=1}^n 3^{n-k} ( a_k - 3 a_{k-1} ) = \sum_{k=1}^n 3^{n-k} \left( 3^{k-1} ( a_1 - 3 a_0 ) \right)$$

$$\sum_{k=1}^n 3^{n-k} a_k - 3^{n-(k-1)} a_{k-1} = \sum_{k=1}^n 3^{n-1} ( a_1 - 3 a_0 )$$

$$a_n - 3^n a_0 = n 3^{n-1} ( a_1 - 3 a_0 )$$

The constants were obtained from the factorization of the quadratic.

Note that the above method works regardless of whether the roots are repeated, although the last step will differ.

Did
  • 279,727
user21820
  • 57,693
  • 9
  • 98
  • 256
  • 1
    Nice trick. You might want to add a step or two between the second and third identities. – Did Aug 19 '14 at 19:14
  • @Did: Yea I thought of doing that but didn't know how much detail I should provide. Alright I'll add the summation in. =) – user21820 Aug 24 '14 at 08:20
  • Reading the expanded version, I think it is impossible to fail to get the idea... :-) – Did Aug 24 '14 at 17:19