0

I've been learning Linear Recurrences in my Discrete Math course and I've learned how to solve them when the characteristic equation is a quadratic. Is solving a linear recurrence with a cubic equation similar? This is the question I'm working on:

Solve the Linear Recurrence:

$f(0) = 0$

$f(1) = 0$

$f(2) = 18$

$f(n) = 3f(n − 1) − 4f(n − 3)$

...assuming the form will be of the kind $x^n$, I ended up getting:

$x^n = 3x^n-1 - 4x^n-3$

Which becomes the below once you divide the common factor from each term:

$x^3 = 3x^2 + 4$

Which is the cubic equation $x^2 - 3x^2 + 4$

Factoring everything out gave me the following Zeros: $2, 2, -1$ (not sure if this accurate, I'm using to factoring quadratics or using the quadratic equations to get zeros).

I then tried to set up a system of equations, but I've never done this $3$ equations:

$f(n) = a(2)^n + b(2)^n + c(-1)^n$

$f(0) = a(2)^0 + b(2)^0 + c(-1)^0 = a + b + c = 0$ $f(1) = a(2)^1 + b(2)^1 + c(-1)^1 = 2a + 2b - c = 0$ $f(2) = a(2)^2 + b(2)^2 + c(-1)^2 = 4a + 4b - c = 18$

...I have no idea if I did this correctly. I basically followed the procedure I used to solve a quadratic linear recurrence but now I'm stumped. Any help would be most welcome!

haqnatural
  • 22,026
Chris T
  • 833
  • 1
    You need parentheses in the characteristic equation. It should be x^n=3x^(n-1)-4x^(n-3). Then you dropped a sign before the $4$ on the next line. – Ross Millikan Jun 23 '16 at 14:53
  • 1
    Apart from numerous typos, you are largely correct. But remember when you have a repeated root you need $A2^n+Bn2^n$. – almagest Jun 23 '16 at 14:53
  • so if I had a third root (like I do in this equation) would it be + Cn(-1)^n? Thank you for the critique :) – Chris T Jun 23 '16 at 15:07
  • You are right to be stumped, the system of three linear equations you reached is incompatible. If you use $a\cdot 2^n+b\cdot n2^n+c\cdot (-1)^n$, as suggested by almagest, your system will have a solution. – André Nicolas Jun 23 '16 at 15:08
  • @AndréNicolas How did you figure that out? I have found the solution in that form with $a=-2$, $b=3$, and $c=2$, but I did so by taking the power of a matrix using the Jordan normal form and then simplifying a very long term. How did you know that the matrix wasn't diagonalizable, or does that not matter since that would yield $b=0$? – Noble Mushtak Jun 23 '16 at 15:27
  • @NobleMushtak: The $r^n$ and $nr^n$ stuff is a standard "elementary" method for dealing with characteristic equations with double roots, both for linear recurrences with constant coefficients and DE with constant coefficients. – André Nicolas Jun 23 '16 at 15:40
  • @AndréNicolas OK. Thanks for telling me about this! I'll definitely use it next time I have to do recurrences like this. – Noble Mushtak Jun 23 '16 at 15:42
  • 1
    @NobleMushtak: The ultimate justification is, as in your answer, "linear algebra," but in first courses it is often treated as a heuristic. And if we do succeed in solving the system of linear equations, that is, for the particular example, a proof of correctness. – André Nicolas Jun 23 '16 at 15:45

1 Answers1

1

I'm not quite sure why you assumed it would be in the form of $x^n$. This looks like a linear recurrence that can be solved using matrices to me. This is how we get a new term: $$\left[\begin{matrix}0 & 1 & 0 \\ 0 & 0 & 1 \\ -4 & 0 & 3\end{matrix}\right]\left[\begin{matrix} 0 \\ 0 \\ 18\end{matrix}\right]=\left[\begin{matrix}0 \\ 18 \\ 54\end{matrix}\right]$$ That last term is $f(3)$, which we get by applying this matrix once. Thus, if we apply this matrix $n$ times, we'll get $f(n+2)$, so we have: $$\left[\begin{matrix}0 & 1 & 0 \\ 0 & 0 & 1 \\ -4 & 0 & 3\end{matrix}\right]^n\left[\begin{matrix} 0 \\ 0 \\ 18\end{matrix}\right]=\left[\begin{matrix}f(n) \\ f(n+1) \\ f(n+2)\end{matrix}\right]$$ Now, we can find the Jordan normal form of this matrix because it is not diagonalizable: $$\left[\begin{matrix}1 & 1 & -1 \\ -1 & 2 & -1 \\ 1 & 4 & 0\end{matrix}\right]\left[\begin{matrix}-1 & 0 & 0 \\ 0 & 2 & 1 \\ 0 & 0 & 2\end{matrix}\right]^n\left[\begin{matrix}\frac 4 9 & -\frac 4 9 & \frac 1 9 \\ -\frac 1 9 & \frac 1 9 & \frac 2 9 \\ -\frac 2 3 & -\frac 1 3 & \frac 1 3\end{matrix}\right]\left[\begin{matrix} 0 \\ 0 \\ 18\end{matrix}\right]=\left[\begin{matrix}f(n) \\ f(n+1) \\ f(n+2)\end{matrix}\right]$$ Now, we can use this formula to find the power: $$\left[\begin{matrix}1 & 1 & -1 \\ -1 & 2 & -1 \\ 1 & 4 & 0\end{matrix}\right]\left[\begin{matrix}(-1)^n & 0 & 0 \\ 0 & 2^n & n\cdot 2^{n-1} \\ 0 & 0 & 2^n\end{matrix}\right]\left[\begin{matrix}\frac 4 9 & -\frac 4 9 & \frac 1 9 \\ -\frac 1 9 & \frac 1 9 & \frac 2 9 \\ -\frac 2 3 & -\frac 1 3 & \frac 1 3\end{matrix}\right]\left[\begin{matrix} 0 \\ 0 \\ 18\end{matrix}\right]=\left[\begin{matrix}f(n) \\ f(n+1) \\ f(n+2)\end{matrix}\right]$$ Multiply everything together and take the first element to get your formula: $$f(n)=18\left(\frac{(-1)^n}{9}+\frac{2^{n+1}}{9}+\frac 1 3(n2^{n-1}-2^n)\right)$$ Simplify: $$f(n)=2(-1)^n-2^{n+1}+3n2^n$$

Noble Mushtak
  • 18,869