MA 360 Lecture 17 - Summary of Recurrence Relations Friday, November 30, 018. Objectives: Prove basic facts about basic recurrence relations. Last time, we looked at the relational formula for a sequence (1 A n = A n 1 3A n. This form makes sense in generating the sequence, but in solving for an explicit formula, it s more convenient to move everything to the left side ( A n A n 1 + 3A n = 0. We ll call this a recurrence relation. The big trick was to assume that an exponential function would be an explicit formula. That is, we guessed that (3 A n = Cx n was an explicit formula. The C doesn t really matter until the end, so we can just drop it. Plugging ( A n = x n into the recurrence relation gives (5 x n x n 1 + 3x n = 0, and dividing by x n makes this a quadratic equation (6 x x + 3 = 0. Clearly, we will always get a quadratic equation with the same coefficients as the recurrence relation, so we can always immediately jump to this equation, which we ll call the characteristic equation. Solving the characteristic equation, we get (7 (x 3(x 1 = 0, and two solutions x = 3, 1. This gives us two exponential functions (8 A n = 3 n and A n = 1 n, which we ll call the two basic solutions, and we conclude that all possible explicit formulas take the form (9 A n = B 3 n + C 1 n. This we ll call the general solution. From here, knowing the first two terms of the sequence allows us to solve for the constants B and C. What if the characteristic equation has a double root? This example is a little different from the ones we ve seen so far. Consider the relational formula (10 A n = A n 1 A n, which goes with the recurrence relation (11 A n A n 1 + A n = 0. The corresponding characteristic equation is (1 x x + = 0, which factors as (13 (x = 0. This quadratic equation has only one solution x =, and we only get one basic solution (1 A n = n. This is not enough to generate all of the sequences that satisfy this recurrence relation. 1
MA 360 Lecture 17 - Summary of Recurrence Relations Quiz 17A For example, consider the sequence (15 1,,,,19,... which is generated by the explicit formula (16 A n = n n. 1. Check that A = A 3 A.. With A n = n n, what are A n 1 and A n? 3. What is A n 1 A n?. Is your answer from Problem 3 equal to A n? (Hint: factor out n. Fact. If r is a double root of the characteristic equation, then (17 A n = r n and A n = nr n are your two basic solutions, and the general solution is (18 A n = Br n + Cnr n. The general solution to the example we re in the middle of is (19 A n = B n + Cn n. General Proof. Suppose you have a recurrence relation of the form (0 A n + ba n 1 + ca n = 0, and the corresponding characteristic equation has a double root (1 x + bx + c = (x r = 0. Since ( (x r = x rx + r, b = r and c = r. My claim is that A n = nr n is a solution. If we plug this into the left side of the recurrence relation, we get (3 nr n + b(n 1r n 1 + c(n r n = nr n + ( r(n 1r n 1 + (r (n r n. Simplify nr n + ( r(n 1r n 1 + (r (n r n. Quiz 17B A quadratic equation What if the characteristic equation has complex roots? ( ax + bx + c = 0 always has two solutions (5 x = b ± b ac. a When b ac > 0, we get two real solutions. When b ac = 0, we get two real solutions that are equal (i.e., a double root. When b ac < 0, we get two complex solutions, and the square root is imaginary.
MA 360 Lecture 17 - Summary of Recurrence Relations 3 The two complex solutions always take the form r = P ±Qi, and so the two basic solutions of the recurrence relation are (6 A n = (P + Qi n and A n = (P Qi n. The general solution would take the form (7 A n = B(P + Qi n + C(P Qi n. This is fine, except that the i s complicate things a bit. It turns out that we can make everything real, but looking at it sideways. It turns out that (8 P + Qi = Rcos(θ + ir sin(θ, where R = P + Q, and θ is the angle P +Qi makes with the positive real axis in the complex plane. The most important thing is something called DeMoivre s Theorem, which says that when we raise a complex angle to a power n, the distance from the origin increases by a power of n, and the angle increases as a multiple of n. In other words, (9 (P + Qi n = R n cos(nθ + ir n sin(nθ. The other basic solution takes the similar form (30 (P Qi n = R n cos(nθ ir n sin(nθ. The only problem is that these are complex functions. The last trick is to note that adding and subtracting these two basic solutions will give us two new basic solutions that work just as well. So we have (31 (3 (P + Qi n + (P Qi n = R n cos(nθ (P + Qi n (P Qi n = ir n sin(nθ. Constant multiples don t really matter, so we can just drop the and i. This gives us the alternative set of basic solutions (33 A n = R n cos(nθ and A n = R n sin(nθ. The general solution in this case takes the form (3 A n = BR n cos(nθ + CR n sin(nθ. For example, consider the sequence (35 1,,, 0,, 8, 8, 0,16,... described by the relational formula (36 A n = A n 1 A n. Find an explicit formula for A n. The corresponding recurrence relation is (37 A n A n 1 + A n = 0. The characteristic equation is (38 x x + = 0, which has (39 x = ( ± (1((1 = 1 ± i. If you plot this in the complex plane, you can see that the angle is θ = π, and R =. Our two basic solutions are (0 A n = ( ( nπ n cos and A n = ( ( nπ n sin. The general solution is (1 A n = B( ( nπ n cos + C( ( nπ n sin.
MA 360 Lecture 17 - Summary of Recurrence Relations To find B and C, we use the first two terms of our sequence A 0 = 1 and A 1 =. A 0 = B( ( 0π 0 cos + C( ( 0π ( 0 sin = B + 0 = 1 A 1 = B( ( 1π 1 cos + C( ( 1π (3 1 sin = B + C =. This gives us B = 1 and C = 1, and so our explicit formula is ( A n = ( ( nπ n cos As a quick check, consider (5 A 5 = ( 5 cos ( 5π + ( n sin ( nπ + ( ( 5π 5 sin = ( + ( = 8.. Quiz 17C 1. Consider the sequence (6 1, 3, 1, 3, 1, 3,... which satisfies the relational formula (7 A n = A n. Find the two basic solutions, the general solution, and the explicit formula for this sequence.. Find the two basic solutions for the following recurrence relations. a. A n A n 1 8A n = 0. b. A n A n 1 + A n = 0. c. A n + 6A n 1 + 9A n = 0. Homework 17 1. Consider the sequence that satisfies the recurrence relation (8 A n + A n 1 6A n = 0,. Consider the sequence that satisfies the recurrence relation (9 A n + A n 1 + A n = 0,
MA 360 Lecture 17 - Summary of Recurrence Relations 5 3. Consider the sequence that satisfies the recurrence relation (50 A n 3A n 1 + A n = 0,. Consider the sequence that satisfies the recurrence relation (51 A n + 3A n 1 A n 1A n 3 = 0, and starts with the terms A 0 = 1, A 1 = 1, and A = 1. a. Multiply out (x (x + 3. b. List out the first five terms. c. What is the characteristic equation? (Note: You ll end up with a cubic equation. c. Give the three basic solutions, and the general solution. d. Don t worry about the particular solution.