160 likes | 1.09k Vues
Solving Second-Order Recursive Relations. Lecture 42 Section 8.3 Mon, Apr 16, 2007. Second-Order Linear Homogeneous Recurrence Relations with Constant Coefficients. Second-order – Each term is defined in terms of the previous two terms.
E N D
Solving Second-Order Recursive Relations Lecture 42 Section 8.3 Mon, Apr 16, 2007
Second-Order Linear Homogeneous Recurrence Relations with Constant Coefficients • Second-order – Each term is defined in terms of the previous two terms. • Linear – The terms of the sequence appear to the first power in the relation. • Homogeneous – There is no constant term. • Constant coefficients – The coefficients of the terms are constants.
The Form of Such Recurrence Relations • Such a recurrence relation is of the form an = Aan – 1 + Ban – 2 for all integers n 2, with initial terms a0 and a1 given. • The Fibonacci sequence is a very simple example.
The Characteristic Equation • The characteristic equation of an = Aan – 1 + Ban – 2 is t2 – At – B = 0. • For the Fibonacci sequence, the characteristic equation is t2– t – 1 = 0.
The Characteristic Equation • Let r be a root of the characteristic equation. • Then the sequence an = rn satisfies the recurrence relation.
Solving Such Recurrence Relations – Case I • Theorem: If the characteristic equation has roots r and s which are distinct real numbers, then the recursive sequence is given by an = Crn + Dsn, where C and D are constants, determined by the values of a0 and a1.
Solving Such Recurrence Relations – Case I • Proof: • Since rn and sn satisfy the recurrence relation, it follows easily that Crn + Dsn also satisfies it. • By using the initial conditions, we can solve for C and D. • The resulting formula satisfied the recurrence relation with the initial conditions.
Example • Solve the recurrence relation • a0 = 2, • a1 = 3, • an = an – 1 + 2an – 2, for all n 2. • The first few terms are 2, 3, 7, 13, 27, 53, 107, 213, …
Example • The roots of the characteristic equation are r = 2 and s = -1. • So the general form is an = C(2n) + D(-1)n. • Solve a0 = C + D = 2 and a1 = 2C – D = 3. • We get C = 5/3 and D = 1/3. • The sequence is
Example • Find a non-recursive formula for the Fibonacci numbers. • Find a non-recursive formula for the Lucas numbers: • L1 = 1 • L2 = 3 • Ln = Ln – 1 + Ln – 2, for all n 2.
Solving Such Recurrence Relations – Case II • Theorem: If the characteristic equation has double root r, then the recursive sequence is given by an = Crn + Dnrn = (C + Dn)rn, where C and D are constants determined by the values of a0 and a1.
Example • Solve the recurrence relation • a0 = 0, • a1 = 4, • an = an – 1 – (¼)an – 2, for all n 2. • The first few terms are 0, 4, 4, 3, 2, …
Example • The root of the characteristic equation is the double root r = ½. • So the general form is an = (C + Dn)(½)n. • Solve a0 = C = 0 and a1 = (C + D)(½) = 4. • We get C = 0 and D = 8. • The sequence is
Example • Find a nonrecursive formula for the recursive sequence • a0 = 1 • a1 = 10 • an = 2an – 1 – an – 2, for all n 2.
Case III – Complex Roots • The sequences become more interesting when the roots of the characteristic equation are complex numbers. • Write the first few terms of the sequence • a0 = 0 • a1 = 1 • an = 2an – 1 – 5an – 2, for all n 2.