 the last lecture we studied the solution techniques of second order homogeneous linear recurrence relations constant coefficients what we will see in today's lecture is that the technique that we developed very naturally extends to higher order homogeneous linear recurrence relations with constant coefficients instead of going for a general theory and theorems that take care of any order recurrence relations we will consider some third order homogeneous linear recurrence relations with constant coefficients and the cases that we will discuss will equip us to deal with any order linear recurrence relations of course with constant coefficients and of course homogeneous now to start with let us consider the third order linear recurrence relation given by a n plus 6 times a n minus 1 plus 12 a n minus 2 plus 8 a n minus 3 equal to 0 now we note that this is a third order homogeneous linear recurrence relation with constant coefficients third order homogeneous linear recurrence relation constant coefficients we use the technique that we have developed in the last lecture in exactly the same way we assume that the solution is of the form a n equal to c times r raise to the power n then we substitute a n equal to c times r raise to the power n in the recurrence relation to obtain c r to the power n plus 6 times c r to the power n minus 1 plus 12 c times r to the power n minus 2 plus 8 c times r to the power n minus 3 equal to 0 now just as before we take out all the c's and since we can very well assume that c is not equal to 0 we get the equation r to the power n plus 6 times r to the power n minus 1 plus 12 times r to the power n minus 2 plus 8 times r to the power n minus 3 equated to 0 now in the next step we take out r to the power n minus 3 which is a common factor of all the terms and write r to the power n minus 3 equal to r cube plus 6 times r square plus 12 times r plus 8 equal to 0 and again a reasonable assumption of non 0 of r we get r cube equal to 6 r square plus 12 r plus 8 equal to 0 now we immediately observe that this is nothing but r plus 2 whole cube equal to 0 that means we have a solution r equal to minus 2 repeated thrice thus we obtain a solution a n equal to c times minus 2 raise to the power n now at this point we recall that that for the second order case we refer to a general theory which says that the general solution of a second order homogeneous linear recurrence relation will be constant times one solution and another constant times another solution which is not a multiple of the first one now in this case we see that we have obtained only one solution and the same theory is a more general one which says that if you have a kth order homogeneous linear recurrence relation with constant coefficients then you will have the general solution as a linear combination of linearly independent solution whose total number is k therefore in the case of third order equations we will have three linearly independent solutions whose linear combination will generate all the solutions that is the general solution will be some constant times one of one solution plus constant times another and a constant times a third one where each of them are linearly independent of the other two this essentially means that we would not be able to find a linear combination that is a constant times one solution plus another constant times another solution becoming equal to the third one for all values of n now in order to get the other solutions we use the same strategy as before and the final result is very easy to remember that is the second solution will be of the type a n equal to c times well it is something different so c1 times n minus 2 raise to the power n and the third one will be a n equal to c2 times n square minus 2 to the power n therefore the general solution will be of the form a n equal to a constant times minus 2 raise to the power n plus another constant times n into minus 2 to the power n plus the third constant times n square into minus 2 to the power n therefore we can club all the constant terms together all the terms involving constant together and take the common factor minus 2 to the power n out to get c plus c1 n plus c2 n square within a parenthesis and into 2 to the power minus 2 to the power n so this is a general solution of the third order homogeneous linear recurrence elation that we started with now we can from here very easily guess a general pattern suppose I have a recurrence elation of the type a n plus c1 a n minus 1 plus c2 a n minus 2 plus and so on up to c k a n minus k equal to 0 where c1 c2 ck are constants then the characteristic equation will be of the form r to the power k plus c1 r to the power k minus 1 plus c2 r to the power k minus 2 plus and so on the last but one term is ck minus 1 r plus ck equal to 0 this is the characteristic equation suppose there is a root r0 which is repeated let us say s times let me write here suppose r0 is a root the above characteristic equation with s repetitions repeated s times that is technically with multiplicity s then r0 raise to the power n r0 raise to the power n multiplied by n n square r0 raise to the power n and so on up to n to the power s minus 1 r0 raise to the power n are all solutions of the original recurrence elation and all of them are linearly independent so we may write these are linearly independent solutions of recurrence elation under consideration so in general what we do is when we have a recurrence elation of this type we consider a trial solution of the form an equal to c r to the power n and obtain the characteristic equation we then solve the characteristic equation which is after all a an algebraic equation of certain degree with single variable and after solving in general we will get each solution with some multiplicity if the multiplicity is 1 then corresponding to that solution we will get a single solution of the recurrence elation if the multiplicity is 2 corresponding to that solution we will get 2 solutions if multiplicity is 3 corresponding to that we will get 3 solutions and in general if the multiplicity is s we will get s solutions we will sum all of them are taking by multiplying each term by a by an arbitrary constant and like that we will get a general solution of this recurrence elation now we will explain what I have just told by using another example let us now consider a recurrence elation of the form 4 an minus 20 an minus 1 plus 17 an minus 2 minus 4 an minus 3 equated to 0 now like before I will take a trial solution as an equal to c r to the power n and substitute an equal to r to the power n and other values of other values an minus 1 and n minus 2 and if we do that we will get the characteristic equation 4 r cube minus 20 r square plus 17 r minus 4 equated to 0 and now if we solve this equation we will see that r is equal to half repeated twice that is half is the is a root of multiplicity multiplicity 2 and 4 now we have to build the general solution since the value half is repeated twice corresponding to that we will have 2 solutions which are linearly independent to each other one is of course half raise to the power n the other one is n times half raise to the power n whereas the lone solution for which is not repeated will give us another solution for raise to the power n now it is not difficult to see that no solution among these three solutions can be written as a linear combination of the other two solutions for all values of n therefore we can build the general solution of the homogeneous equation as an equal to a constant let us say capital A times half raise to the power n plus B times n times half raise to the power n and then C times 4 to the power n if we remember these examples then we will be able to solve any linear homogeneous equation with constant coefficients next we discuss the situation when we have non homogeneous recurrence relations of course in this case we will not go much away from what we have done we will be considering non homogeneous linear recurrence relations with constant coefficients so we attach one term here that is linear and another term over here constant coefficients so we can write a general form of these recurrence relations as a n plus c 1 times a n minus 1 plus c 2 times a n minus 2 plus so on plus c k times a n minus k equated to a function of n now as I have said that this is not really very far away from what we have discussed just now if we look at it carefully we will see that this non homogeneous recurrence relation is associated to a homogeneous recurrence relation in a very obvious way and that is why that is by putting f n equal to 0 so we write that relation as associated homogeneous recurrence relation associated homogeneous recurrence relation is a n plus c 1 a n minus 1 plus c 2 a n minus 2 plus and so on and we go up to c k a n minus k equal to 0 now what we say is that what if I get the general solution of the last liquor recurrence relation and write that as a n h so a n h is the general solution the well we can introduce this term homogeneous part so we know that a n h plus c 1 times a n minus 1 raise to the power h plus c 2 times a n minus 2 h like that c k a n minus k h equal to 0 now suppose we get a single solution of the non homogeneous equation which we call a particular solution suppose that a n p is a particular solution the non homogeneous recurrence relation okay then of course we know that a n p c 1 a n minus 1 p plus c 2 a n minus 2 p plus and so on up to c k a n minus k p is equal to 0 now we consider these two expressions and add them to get a n h plus a n p plus c 1 times a n minus 1 h plus a n minus 1 p plus c 2 times a n minus 2 h plus a n minus 2 p and so on up to c k times a n minus k h plus a n minus k p equal to 0 thus we see that the sum of two solutions that is a particular solution and the general solution gives me a solution of the recurrence relation so this is a n h the solution of the homogeneous part and a n p a particular solution which together gives me a solution of the non homogeneous equation now here we note that the general solution is not a single solution it is essentially a family of solutions that is obtained by varying the constants related to the general solution and therefore this a n equal to a n h plus a n p is not a single solution but a family of solutions what is very striking is that it can be proved that any solution of the non homogeneous equation of this form can be written in this form that is the general solution with certain values of the constants plus any particular solution therefore if we want to solve a non-homogeneous reconciliation of this type then we will have to first get the general solution of the homogeneous part and somehow find out a particular solution we add them together and then we put the initial initial values and we will get the constants and that is going to be the solution of that we require we now take up examples the first example is a recurrence relation of order one that is a first order recurrence relation which is not homogeneous but of course linear with constant coefficients so we have a situation like this where a n minus 3 a n minus 1 is equal to 5 into 3 to the power n so when we encounter such a such an equation we will consider first the homogeneous part which is a n minus 3 a n minus 1 equal to 0 here as before we put a trial solution if we do that then we will get C r to the power n minus 3 times C r to the power n minus 1 equated to 0 if we take out C and r to the power n minus 1 we are left with r minus 3 equal to 0 that is r equal to 3 therefore the general solution of the homogeneous part is given by a n h equal to some constant C times 3 raise to the power n now what about the particular solution for the particular solution we have to do some guesswork and one can only get some perfection in the guesswork if one solves several problems from several different sources now let us let me let me explain the situation that we have here we see in the right hand side we have 5 into 3 raise to the power n so somehow we know that the left hand side should be something into 3 raise to the power n therefore what we do here we take a trial solution of the type a n p equal to b n 3 to the power n now we will substitute b n 3 to the power n in the original recurrence relation we will obtain b n 3 to the power n minus 3 into n minus 1 3 to the power n minus 1 equal to 5 into 3 to the power n now we see that 3 to the power n is a common factor of the left hand side of the of this equation therefore we can write 3 to the power n we have missed one term over here that is b b will be of course here so we will write 3 to the power n into b which is equal to which is multiplied by n minus n plus 1 and this is equal to 5 times 3 to the power n of course 3 to the power n gets cancelled from both sides and n gets cancelled therefore we are left with the value of b which is equal to 1 therefore we see that a n particular a n p is equal to n times 3 n and therefore a general solution of the original recurrence relation is given by a n equal to a constant times 3 raise to the power n plus n times 3 raise to the power n which in turn becomes c the constant plus n times 3 raise to the power n now if this recurrence relation arose from some real world application where people knew that a 0 has certain value then they could have substituted the value of a 0 in the general solution to obtain the value of c and then they could have gotten a particular solution that agrees with the with the problem or model or a natural phenomena that they were observing as a last part of this talk we will solve another non-homogeneous recurrence relation but this time of second order now let us start with the equation this is a n plus 2 minus 8 a n plus 1 plus 16 a n equal to 8 into 5 raise to the power n plus 6 into 4 raise to the power n now as usual we are going to split this relation into the homogeneous part and the original non-homogeneous part so homogeneous part is a n plus 2 minus 8 a n plus 1 plus 16 a n equal to 0 we consider the trial solution a n h equal to a constant times r to the power n and as usual we substitute this in the homogeneous equation to obtain a constant c times r to the power n plus 1 minus 8 times constant c r to the power n plus 1 plus 16 times c r to the power n equal to 0 and if we take out c and r to the power n then we are left with r square minus 8 r plus 16 equal to 0 that is we obtain the characteristic equation r square minus 8 r plus 16 equal to 0 of course we see that this is r minus 4 whole square equal to 0 so we have 4 as repeated roots of the characteristic equation therefore from what we have discussed already we can write a n homogeneous is equal to some let us say a times 4 to the power n plus b times n times 4 to the power n now we move on to the problem of finding out particular solutions so particular solution now we go for an assumption now so we are assuming that the particular solution a n particular is going to be a constant times c going to be a constant c times 5 to the power n plus another constant d times n square into 4 to the power n of course there is a question that how do I arrive at this one there is no rule as such but one can expect that something like this will happen because we see the right hand side is a linear combination of 5 to the power n and 4 to the power n and then we can if we like take 5 to the power n and 4 to the power n and take some coefficients dependent on n and easiest maybe n n square n cube and like that and we can hit and try to check which gives me a particular solution in this case we know that it will be of this form or right now we assume and we will find out that we are able to obtain the values of c and d by substituting this particular solution in the reconciliation if we do that then we have an expression which is somewhat long so let me write it down so substituting a n particular in the recurrence relation we have c times 5 n plus 2 plus d times n plus 2 whole square 4 n plus 2 minus 8 times c 5 n plus 1 plus d times n plus 1 whole square 4 n plus 1 plus 16 c 5 raise to the power n plus 16 d n square 4 raise to the power n equal to 8 into 5 raise to the power n plus 6 into 4 raise to the power n this we obtain directly by substituting in the original equation now what we do here now what we do after this is collect all the coefficients of 4 raise to the power n and 5 raise to the power n if we do that we will obtain something like this 25 c minus 40 c plus 16 c minus 8 raise to the power into 5 to the power n and then plus 16 d n plus 2 whole square minus 32 d n plus 2 n plus 1 whole square n plus 1 whole square and then we will have plus 16 d n square minus 6 4 to the power n equal to 0 now this means in turn that this term into 5 raise to the power n is equal to this term into 4 raise to the power the negative of this term into 4 raise to the power n for all values of n and this is possible if and only if the individual coefficients are equal to 0 if we do that then we obtain two equations 25 c minus 40 c plus 16 c minus 8 equal to 0 which implies c equal to 8 and the next one involving d reduces to 4 d into 16 minus 8 d into 4 equal to 6 and if we solve it then we will get d equal to 3 by 16 therefore at the end we are getting the general solution of the homogeneous sorry the general solution of the non-homogeneous equation as a n equal to the homogeneous solution that is a raise to the power 4 n plus b n raise to the power 4 n and then the particular solution of the original equation which is c here c is 8 times 5 to the power n plus 3 by 16 times n square n to 4 to the power n now if somebody gives me the values of a 0 and a 1 that is the initial conditions then we will again have two equations involving a and b and then we can solve those two equations and obtain a solution of the of this recurrence elation well let us try that so suppose somebody tells me that a 0 equal to 12 and a 1 equal to 5 then we will have 12 equal to a 0 now put 0 if you put 0 then you will this term will vanish and so will this term and 5 raise to the power n will be 1 4 raise to the power n when n is equal to 0 will be 1 so we will have a plus 8 and this will mean that a equal to 4 alright now we consider a equal to n equal to 1 if n equal to 1 we are told that a 1 is 5 a 1 I already know that a is equal to 4 so I put 4 over here and another 4 which gives me 16 plus now this is b times 4 plus this is 8 times 5 raise to the power 1 so 8 into 5 is 40 plus 3 by 16 into 4 now if we solve this equation then we will get b equal to minus of 207 by 4 thus under this initial conditions we obtain the solution of the recurrence elation as 4 times 4 raise to the power n minus 207 by 4 n raise to the power n into 4 raise to the power n plus 8 times 5 raise to the power n plus 3 by 16 times n square 4 raise to the power n this is what we were looking for thus in this lecture we started by