2

$$a_{n+2} - 6a_{n+1} + 9a_n = 3^n$$

Solving for this recurrence can be done by the following: 1) solve for the recurrence relation $a_g$ such that: $a_{n+2} - 6a_{n+1} + 9a_n = 0$ then, 2) $a_h$ such that: $a_{n+2} - 6a_{n+1} + 9a_n = 3^n$ then, 3) $a_n = a_g + a_p$

Solving for the $a_g$ I have the solution: $C_1(3)^n + C_2n(3)^n$, where the extra $n$ is due to the repeated root.

Now, solving for $a_p$ I use the trial solution $a_n = A(3^n)\cdot(n^2)$, where $n^2$ is due to the third root.

This is the part I'm having trouble with now: when i substitute for $a_{n+2}$ is it $A\cdot3^{n+2}\cdot(n+2)^2$ and then similarly I would substitute for $6a_{n+1}$ which should be $6A\cdot3^{n+1}\cdot(n+1)^2$ and $9a_n$ should be $9A\cdot 3^n \cdot n^2$

Then, I need to solve:
$$(A\cdot3^{n+2}\cdot(n+2)^2) - (6A\cdot 3^{n+1} \cdot (n+1)^2) + (9A\cdot 3^n \cdot n^2) = 3^n$$

Would this be the correct approach to solve for $a_p$?

Diante
  • 189
  • 3
    Hint: let $a_n = 3^n b_n,$, then the recurrence reduces to $b_{n+2}-2 b_{n+1}+b_n=\frac{1}{9},$, which further telescopes. See also the similar question asked earlier today: recurrence relation concrete way to solve it. – dxiv Apr 08 '17 at 03:21
  • Apologies, I don't quite follow that method is there a name associated with the technique by chance? By solving for $b_n$ and then would ${3^n}$*$b_n$ be $a_p$ – Diante Apr 08 '17 at 03:30
  • 2
    Using @dxiv's comment, we can forget about your step (1)...If you set $a_n=3^n b_n$, then $a_{n+1}=3^n\cdot 3b_{n+1}$ and $a_{n+2}=3^n\cdot 3^2 b_{n+2}$, and so, substituting the right side of these equations into $a_{n+2}-6a_{n+1}+9a_n$, we get $3^n \left( 9b_{n+2}-18b_{n+1}+9b_n \right)=3^n$. Divide this equation by $9\cdot 3^n$, to get the recurrence of dxiv. This new equation is the "difference delta" or forword difference delta applied twice to $b_n$, and Wikipedia has an article on it in "Finite difference". It's fairly easy to solve. It is the inverse of a sum, which is easy to sum. – Matt Groff Apr 08 '17 at 03:53

1 Answers1

1

Writing, as you did, $$(A\cdot3^{n+2}\cdot(n+2)^2) - (6A\cdot 3^{n+1} \cdot (n+1)^2) + (9A\cdot 3^n \cdot n^2) = 3^n$$ Expanding the lhs, you should end with $$2 A\, 3^{n+2}=3^n\implies 18 A=1\implies A=\frac 1 {18}$$ But, as said in comments, there is a faster way to solve the problem.

  • Much appreciated, I am more familiar with this format and have been taught similar techniques. Still not quite sure about the above mentioned method in the comments, but will look them up at another point. – Diante Apr 08 '17 at 16:33