3

I tried two methods which gave different answers:
Method 1:

$$x_{n} - 3x_{n-1} = -8 \\ x_n = 3(3x_{n-2} - 8) - 8 \\ = 3^2 x_{n-2} -8 ( 1+3) \\ = 3^3 x_{n-3} - 8(1+3+3^2) \\ = 3^n x_{0} - 8(1+3+3^2 + \ldots + 3^{n-1}) \\ = 2\times 3^n - 8\left(\frac{3^n - 1}{3-1}\right)\\ = 2\times 3^n - 4(3^n - 1) \\ = -2\times 3^n +4.$$

Method 2:
Solving the homogenous equation using $x_n = r^n$,
$$r^n - 3r^{n-1} = 0 \\ \implies r = 3$$
So the homogenous solution is $h_n = a\times 3^n$ for some $a\in\mathbb{R}$.
With the initial condition, $h_n = 2\times 3^n$.

Also, by guessing the particular solution with $x_n = C$,
$$C - 3C = -8 \implies C = 4$$.

So, the final solution is
$$x_n = 2\times 3^n + 4.$$

I'm unsure why the two methods differ. It looks obvious that the first one gives the correct result.

Natash1
  • 1,379

4 Answers4

2

Safety way

Set $v_n =x_n-a$ such that $v_n$ satisfies $$ v_{n+1} =3v_n\Longleftrightarrow x_{n+1}-a =3(x_n-a)$\Longleftrightarrow 3x_{n}-8-a =3(x_n-a)\Longleftrightarrow a=4$$ Then $$v_n =3^nv_0\Longleftrightarrow x_n-4 = 3^n(x_0-4)\Longleftrightarrow \color{red}{x_n = -2\cdot3^n +4}$$

Guy Fsone
  • 23,903
1

Alternatively, you can always double check the result with generating functions (like here and here for more examples): $$f(t)=\sum\limits_{n=0}x_n\cdot t^{n}=2 + \sum\limits_{n=1}x_n\cdot t^{n}= 2 + \sum\limits_{n=1}(3x_{n-1}-8)\cdot t^{n}=\\ 2 + 3\sum\limits_{n=1}x_{n-1}\cdot t^{n}-8\sum\limits_{n=1} t^{n}=2+3t\sum\limits_{n=1}x_{n-1}t^{n-1}-\frac{8}{1-t}+8$$ or $$f(t)=10+3tf(t)-\frac{8}{1-t} \Rightarrow f(t)=\frac{10}{1-3t}-\frac{8}{(1-t)(1-3t)}=\\ \frac{10}{1-3t}+\frac{4}{1-t} -\frac{12}{1-3t}=\frac{4}{1-t}-\frac{2}{1-3t}$$ or $$f(x)=4\sum\limits_{n=0}t^n-2\sum\limits_{n=0}(3t)^n=\sum\limits_{n=0}\left(\color{red}{4-2\cdot3^n}\right)t^n$$ Thus $$x_n=4-2\cdot3^n$$

Some of the shortcuts are explained here.

rtybase
  • 16,907
1

To answer the question of why the method 2 answer is incorrect, the problem is that you try to figure out the coefficient on the homogenous portion of the solution before figuring out a particular solution. This gives an incorrect value because you haven't taken the inhomogeneous portion into account. Instead, once you've found $C=4$ in the particular solution, you plug in to $x_n=a\times 3^n+4$ to match $x_0=2$: $a\times 3^0+4=2$; $a\times 1=2-4=-2$; $a=-2$, so $x_n=(-2)\times 3^n+4$.

  • Thank you. A minor query: am I remembering wrong os when we find $C=4$, shouldn't the solution $x_n$ be $x_n + a\times 3^n + 4\times b$ since a linear combination of the homogenous and particular are the solutions to the original equation? – Natash1 Oct 08 '17 at 10:03
  • @Natash1 You are remembering wrong on that front; can take multiples of any homogenous solutions (because of their homogeneity) but not of any particular solutions. Think of it this way: if $f(n)=0$, $g(n)=0$, and $h(n)=2$, then $f(n)+g(n)+h(n)=0+0+2=2$, and $5f(n)+8g(n)+h(n)=2=5\cdot0+8\cdot0+2=2$, but $f(n)+g(n)+2h(n)=0+0+2\cdot2=4$. (Here $f(n)$, etc. are standing in for more complicated expressions that aren't 'obviously' zero.) – Steven Stadnicki Oct 08 '17 at 16:42
0

Here's another method. Convert the recurrence to a generalized Fibonacci form as follows:

$$ x_n=Ax_{n-1}+B,\quad x_{_0} ~\text{given}\\ x_{n-1}=Ax_{n-2}+B\\ x_n-x_{n-1}=Ax_{n-1}-Ax_{n-2}\\ x_n=(A+1)x_{n-1}-Ax_{n-2},\quad x_{_1}=Ax_{_0}+B $$

The characteristic roots for this equation are always

$$\alpha,\beta=A,1$$

Cye Waldman
  • 7,524