00:01
The problem, we are given the recurrence relation, a .n is equal to 4 times a .n minus 1, minus 3 times a .n minus 2 plus 2 plus 2 to the power of n plus n, where a0 is equal to 1, and a1 is equal to 4.
00:20
So the first step is to find the roots characteristic equation.
00:24
And so we're just going to take this recurrence relation and set a .n.
00:31
N equal to r squared, a n minus 1 equal to r, and a n minus 2 equal to 1.
00:47
And we're just going to treat the other functions of n to be 0.
00:51
So that's going to be the last 3.
00:53
And what we get then is r squared is equal to 4r minus 3.
01:03
Okay, so we can solve this, right? we can rewrite it so that we get r squared minus 4r plus 3 is equal to 0.
01:13
Then we just need to factor.
01:15
And so when we factor this left -hand side, we get r -minus 3 times r -minus 1 being equal to 0.
01:24
And so our roots then are going to be 1 and 3.
01:30
So now we're going to use these roots to write our homogeneous linear recurrence relations.
01:39
So the homogeneous portion, we'll put a little h at the top here for that, is going to be equal to alpha 1 times 1 to the power of n plus alpha 2 times 3 to the power of n.
01:58
So this 1 and this 3 were our roots, and these alphas are going to be some sort of constant.
02:09
And of course, 1 to the power of n is 1 no matter what.
02:12
So this is really equal to alpha 1 plus alpha 2 times 3 to the power of n.
02:23
Okay, so now we need to find the particular solution, right? our total solution is the homogeneous portion plus the particular portion.
02:32
So to find the particular solution will take f of n to be equal to, it's going to be equal to these remaining three portions that we initially ignored.
02:45
So that's going to be equal to two to the power of n plus n plus three.
02:56
Okay, but we can rewrite this.
02:58
This is going to be the exact same as two to the power of n.
03:01
N plus n plus 3 times 1 to the power of n.
03:13
Okay, and since 1 is a root and 2 is not a root, then we will write this as our particular portion.
03:37
That's what the p is for.
03:38
It's going to be equal to q times 2 to the power of n plus n times p1 times n plus p not okay and we can simplify that a little bit to be q times two to the power of n plus p1 times n squared plus p not times n and so now that we have this we can go ahead and solve it because it needs to satisfy our recurrence relation so what that's going to look like is we'll take our a n is equal to the homogeneous and the particular portions right so we get that a n is equal to 4, an minus 1, minus 3 times a .n minus 2 plus 2 to the power of n plus n plus 3.
05:02
And we'll put in our particular solution on the left -hand side because we know it needs to solve it.
05:09
So then we get q times 2 to the power of n plus p1 times n plus p .1 times n squared plus p -not times n.
05:23
Is equal to, and we can rewrite the right hand side as well a little bit.
05:30
So it's going to be equal to four times q times two part of n minus one, plus four times p1 times m minus one squared, plus four times p not, times n to minus 1 right so we really just put 4 times a n minus 1 which would be 4 times this left hand side replacing all the ends with n minus 1 and now we're going to do the same for this next portion so it's minus 3 times q times 2 to the n minus 2 minus 2 minus 3 times p 1 times n minus 2 squared minus 3 times p not n minus 2.
06:31
Okay, this is going to add 4 times 2 to the n minus 2.
06:42
And in that case, we just took a 2 out.
06:47
We took two, twos out, so that's where the 4 came from.
06:52
And then we add n and add 3.
06:55
So that's the flushed out expression on the right hand side.
06:59
And so now if we move things around, we can add and subtract.
07:06
On the left -hand side from the right -hand side, we will get that 0 is equal to negative 4 q plus 8 q minus 3, q plus 4 times 2 to the n minus 2, plus p1 times negative n squared, plus 4, times n minus 1 squared, minus 3 times n minus 2 squared.
08:07
And then we're going to add p .0 times negative n plus 4 times n minus 1, minus 3 times n minus 2, and then plus n plus 3 times n minus 2, and then plus 3...