The question is: $a_{n}=12a_{n-2}+16a_{n-3}+9\cdot 4^{n}+81n$with $a_{0}=0 ,a_{1}=1 ,a_{2}=98$ I tried to deal with the particular solution first by: $A4^{n}+Bn=12[A4^{n-2}+B(n-2)]+16[A4^{n-3}+B(n-3)]+9\cdot 4^{n}+81n$. However, turns out the coefficient of $4^{n}$being 0 which means 9=0 which is clearly wrong. Could anyone please show me where did I do wrong in the working? Many thanks.
-
First, you would want to try $A,4^n+Bn+C$. But if any of those terms is also a solution to the corresponding homogeneous equation, then that won't work --- you have to bump it up by $n$ (and if that doesn't work, then by $n^2$, etc.). It's usually a good idea to solve the homogeneous before you go looking for the particular. – Gerry Myerson Apr 23 '14 at 13:18
-
thanks for your reply, but what do you mean about bump up by $n$? Does it means try $A(4n)^{n}+B(n^{2})+C$? – user3440427 Apr 25 '14 at 04:17
-
If $f(n)$ is a solution of the homogeneous equation, then it can't be a solution of the inhomogeneous, so instead you try $nf(n)$ (and, if necessary, $n^2f(n),n^3f(n),\dots$). – Gerry Myerson Apr 25 '14 at 05:10
-
See https://math.stackexchange.com/questions/774125/non-homogeneous-recurrence-relation-problem – user236182 Sep 28 '17 at 13:07
3 Answers
Oh it's a 'trick' question. Note that the characteristic polynomial of the corresponding homogenous recurrence is $r \mapsto r^3-12r-16$ which has $4$ as a root, and hence when you substituted $4^n$ in it didn't work.
In general we can solve all such recurrences by repeatedly applying the operator
$f(n) \mapsto f(n+1) - r f(n)$
for some $r$ until it becomes homogenous. In this case to get rid of the $4^n$ term we use $f(n) \mapsto f(n+1) - 4 f(n)$ and to get rid of the linear term we use $f(n) \mapsto f(n+1) - f(n)$ twice. If you understand the proof of the general solution for the homogenous case, then you will immediately see how those 'non-homogenous' terms interact with the homogenous solution, because they will now show up in the factors of the characteristic polynomial together with those from the homogenous case. In this case we will get roots -2,-2,4,4,1,1, which corresponds to the general solution $a_n = (An+B)(-2)^n + (Cn+D)4^n + (En+F)$.
- 57,693
- 9
- 98
- 256
I see user21820 has given a good answer while I went AFK, but I figured I'd share this anyway since I worked it out...
We can apply the method of annihilators to convert this into a 6th order, constant coefficient, homogeneous recurrence. For background on the method of annihilators, see these links.
First, we rewrite and reindex the recurrence: $$a_n = 12a_{n-2} + 16_{n-3} + 9\cdot 4^n + 81n \implies a_{n+3}-12a_{n+1}-16a_n = 9\cdot 4^{n+3}+81(n+3)$$
Next, we rewrite using the shift operator (and I've simplified some of the products): $$(E^3-12E-16)\langle a_n\rangle = \langle 576\cdot 4^n\rangle +\langle 81n \rangle + \langle 243 \rangle$$
Note that the annihilator for $4^n$ is $(E-4)$, the annihilator for $n$ is $(E-1)^2$, and the annihilator for $243$ is $(E-1)$. We apply the annihilators to the whole equation: $$\begin{align}(E-4)(E-1)^2(E^3-12E-16)\langle a_n\rangle = &(E-4)(E-1)^2\langle 576\cdot 4^n\rangle \\&+(E-4)(E-1)^2\langle 81n \rangle \\&+ (E-4)(E-1)^2\langle 243 \rangle\end{align}$$
The RHS is annihilated, so: $$(E-4)(E-1)^2(E^3-12E-16)\langle a_n\rangle = \langle 0\rangle$$
Factoring the annihilators (which gives the roots of the characteristic), we find this is equivalent to: $$(E-4)^2(E-1)^2(E+2)^2\langle a_n\rangle = \langle 0\rangle$$
We have 3 roots, each of of multiplicity $2$. So: $$a_n = c_14^n + c_2n4^n + c_31^n + c_4n1^n + c_5(-2)^n + c_6n(-2)^n$$ Or, simplified: $$a_n = 4^n(c_1 + nc_2) + (c_3 + nc_4) + (-2)^n(c_5 + nc_6)$$
Computing the first 6 terms of the sequence provides 6 linear equations in 6 unknowns, which can be (relatively) easily solved.
(And my answer matches the other one, which is a good sign...) :)
- 17,706
-
I realize my method may not be the simplest, but I think it's a good demonstration of the annihilator method. – apnorton Apr 23 '14 at 14:36
-
It's exactly the same method! Anyway it's good that you gave a nice detailed writeup, as I'm a little too busy for that.. And you gave links too! And thanks for verifying my answer because I'm very prone to careless mistakes! =) – user21820 Apr 23 '14 at 14:39
-
@user21820 Oops. Duh.
:)I saw the "repeatedly applying $f(r) \mapsto f(n+1)-rf(n)$, which wasn't how I got my annihilators, so I assumed you were doing something I didn't know about... (I'm new to using the method of annihilators, so I have been looking annihilators up in a table) – apnorton Apr 23 '14 at 14:42 -
-
-
thanks for your answer, may I ask that why we don't need to apply the annihilator of 243$(E-1)$ to the both sides? – user3440427 Apr 24 '14 at 03:04
-
@user3440427 Because we applied $(E-1)^2$ to both sides already. That is, the $(E-1)^2$ from the $n$ term also will annihilate the $243$ term. – apnorton Apr 24 '14 at 03:06
Go for generating functions. Define $A(z) = \sum_{n \ge 0} a_n z^n$, rewrite the recurrence without index subtractions: $$ a_{n + 3} = 12 a_{n + 1} + 16 a_n + 576 \cdot 4^n + 81 n + 243 $$ Multiply by $z^n$, sum over $n \ge 0$, and recognize a few sums to get: $$ \frac{A(z) - a_0 - a_1 z - a_2 z^2}{z^3} = 12 \frac{A(z) - a_0}{z} + 16 A(z) + 576 \frac{1}{1 - 4 z} + 81 \frac{z}{(1 - z)^2} + 243 \frac{1}{1 - z} $$ This gives the formidable: \begin{align} A(z) &= \frac{z + 92 z^2 + 240 z^3 - 1408 z^4 + 832 z^5} {1 - 6 z - 3 z^2 + 52 z^3 - 12 z^4 - 96 z^5 + 64 z^6} \\ &= \frac{14}{1 + 2 z} - \frac{6}{(1 + 2 z)^2} - \frac{5}{1 - z} + \frac{3}{(1 - z)^3} - \frac{4}{1 - 4 z} + \frac{4}{(1 - 4 z)^2} \end{align} Geometric series and the generalized binomial theorem, in particular: $$ \binom{-m}{k} = (-1)^k \binom{m + k - 1}{m - 1} $$ finish this off: \begin{align} a_n &= 14 \cdot (-2)^n - 6 \cdot \binom{n + 1}{2} \cdot (-2)^n - 5 + 3 \cdot \binom{n + 2}{2} - 4 \cdot 4^n + 4 \cdot \binom{n + 1}{1} \cdot 4^n \\ &= (8 - 6 n) \cdot (-2)^n + \frac{2 n^2 + 9 n - 4}{2} + n \cdot 4^{n + 1} \end{align}
- 27,812