1

What is the general solution to the recurrence: $x(n + 2) = 6x(n + 1) - 9x(n)$ for $n \geq 0$; with $x(0) = 0; x(1) = 1$?

Solution. The first few values of $x(n)$ are $0,1,6,27,...$ The auxiliary equation for the recurrence is $r^2-6r+9$ which factors as $(r-3)^2$. Thus, we have repeated roots so that the general solution to the recurrence will have the form $x(n) = c_13^n + c_2n3^n$. Substituting the values $n = 0$ and $n = 1$ gives us $x(0) = 0 = c_1$ and $x(1) = 1 = 0 + c_2\cdot3$. Thus, $c_1=1/3$ and $x(n) = nc^{n-1}$.


What doesn't make sense to me is why they added the additional $n$ in $c_2n3^n$ to get $x(n) = c_13^n + c_2n3^n$. When I did it myself I only got $x(n) = c_13^n$. Also why is the answer $x(n) = nc^{n-1}$, when I got $x(n)=(1/3)n3^n$ or $x(n)=n3^{n-1}$ ?

vonbrand
  • 28,394
notamathwiz
  • 1,016
  • as far as linear goes, i do understand that adding an additional number to a linear solution does not change the solution, but i'm having trouble figuring out exactly what i need to add – notamathwiz Mar 17 '13 at 01:26

3 Answers3

2

The best technique for solving recurrences I've seen is given in Wilf's "generatingfunctionology".

Define the ordinary generating function: $$ X(z) = \sum_{n \ge 0} x_n z^n $$ From the recurrence, by the properties of ordinary generating functions (see section 2.2 in the cited book): $$ \begin{align*} \frac{X(z) - x_0 - x_1 z}{z^2} &= 6 \frac{X(z) - x_0}{z} - 9 X(z) \\ X(z) &= \frac{1}{3} \cdot \frac{1}{(1 - 3 z)^2} - \frac{1}{3} \cdot \frac{1}{1 - 3 z} \end{align*} $$ The solution is thus (see the table of series in section 2 of the book): $$ \begin{align*} x_n &= \frac{1}{3} \binom{-2}{n} (-3)^n - \frac{1}{3} \cdot 3^n \\ &= \left( \binom{n + 2 - 1}{2 - 1} - 1 \right) 3^{n - 1} \\ &= n 3^{n - 1} \end{align*} $$

vonbrand
  • 28,394
  • i'm sure this technique works great, however i want to solve the recurrence with my method which i walked through and understand, the only part that's confusing to me is the added $c_2n3^n$ and why the answer is $nc^{n-1}$ instead of $n3^{n-1}$ – notamathwiz Mar 17 '13 at 03:04
  • If my answer doesn't help you, I'm sorry. It might help somebody who later stumbles on this, though. – vonbrand Mar 17 '13 at 03:08
1

Here is why. Since we have a linear recurrence relation of a second order, then by the theory of linear recurrence relations it should have two linearly independent solutions. Now, in our case, the auxiliary equation $r^2-6r+9$ has a root $r=3$ of multiplicity $2$. This means that we can have only one solution namely, $x_1(n)=3^n $. Using some techniques we can get a second linearly independent solution $x_2(n)=n 3^n$.

You can find the second solution by assuming $x_2(n)=x_1(n)u(n)=3^n u(n)$ and substituting back in the recurrence relation to find $u(n)$. If you do this you will find $u(n)=n$. See here, page 5.

0

may be this page can help you. look under the topic "linear".
http://www.wikihow.com/Solve-Recurrence-Relations

Shreya
  • 3,155
  • the linear topic explains what i already know, as you can see there are two different roots that are used, i'm the case above there is only one root, which is 3. the solution goes on to add an additional $c_2n3^n$ which is whats confusing me, why it that added to the general solution? – notamathwiz Mar 17 '13 at 01:20
  • look under the step 4 of linear topic. – Shreya Mar 23 '13 at 06:06