Lesson 4: Linear Discrete Dynamical Systems Of Order Two

Lesson 4:

LINEAR DYNAMICAL SYSTEMS OF ORDER TWO


Objectives of This Lesson:

  • To explore linear discrete dynamical systems of order 2 with your calculator.

  • To develop methods for finding the general and particular solutions to a second-order linear discrete dynamical systems.

  • To examine the stability and long-term behavior of solutions to a second-order homogeneous discrete dynamical system.


Introduction

    Nearly all of the discrete dynamical systems examined in detail up to this lesson have been dynamical systems of order 1. In this lesson, we examine the second-order discrete dynamical systems:

      (I) a0=b0, a1=b1
      (R) an=f(an-1, an-2, n)

    that are linear; that is, systems for which the recurrence relation (R) can be written as

      an=han-1+kan-2+g(n)

    for some constants h and k, and g(n) is a given function of n. The first part of this lesson will deal with such systems that are also homogeneous; that is, for which g(n)=0 for all n.

    Example 4.1: Consider the discrete dynamical system

      (I) a0=0, a1=1
      (R) an=2an-1-an-2 for n>1

    Note here that we have to give two initial values to get the recurrence relation started. Further, the computation of the values for the successive terms always involves reaching back and operating on two previous values. The values for this system can be calculated by hand as follows:

    n

    an

    0

    0

    1

    1

    2

    2(1) – 0 = 2

    3

    2(2) – 1 = 3

    4

    2(3) – 2 = 4

    5

    2(4) – 3 = 5

    Looking at the values, it appears that this system might have the solution a(n)=n for all n. We shall check this out later in the lesson.

Solutions to Homogeneous Discrete Dynamical Systems of Order Two

    In many ways, the solution process for homogeneous discrete dynamical systems of order 2 parallels that for systems of order 1. These latter systems were systems in which the new term was some multiple of the previous term:

      (I) a0 = c
      (R) an = ran-1 for n>0

    We saw that the solution for this system can be written as a(n)=crn for all n.

    Suppose that we look for solutions of the form

      (*) a(n)=an=crn

    to a homogeneous recurrence relation

      (**) an=han-1+kan-2

    of order 2. By substitution, you can see that (*) will be a solution of (**) provided that r satisfies:

      crn = hcrn-1 + kcrn-2

    Rewrite the preceding equation in the form

      crn - hcrn-1 - kcrn-2 = crn-2(r2-hr-k) = 0

    This means that:

      If r is any root of the quadratic equation

        (C) x2-hx-k = 0

      then a(n)=an=crn is a solution of the homogeneous recurrence relation

        (R) an = han-1+kan-2

      of order 2.

    The quadratic equation (C) is called the characteristic equation of the recurrence relation (R).

    If we solve the characteristic equation, we may get two distinct real roots, r and s that play the role played by the ratio r in the first-order recurrence relation and solution. A conjecture for a solution to this second-order homogeneous system of order 2 might be

      a(n) = c1rn + c0sn for all n

    where r and s are the distinct real roots to the characteristic equation and c1 and c0 are constants derivable from the recurrence relation and initial values.

    The solution in this case, like in the first-order cases, is a function that must satisfy the original dynamical systems’ defining recurrence relation. In this case, evaluating the solution for a(n), a(n – 1), and a(n – 2) gives the values:

    a(n) = c1rn + c0sn; a(n–1) = c1rn–1 + c0sn–1; and a(n–2) = c1rn–2 + c0sn–2.

    Substituting these expressions back into the recurrence relation we have:

    c1rn + c0sn = h(c1rn–1 + c0sn–1) + k(c1rn–2 + c0sn–2).

    If we simplify this equation, we find that it can be written as:

    c1rn–2(r2hrk) + c0sn–2(s2hsk) = 0.

    But this relationship will be identically equal to 0 for all values of n if and only if both r2hrk and s2hsk are identically equal to 0 for all values of n. Hence, we would want to choose r and s such that they are the roots to the quadratic equation x2hxk = 0, the characteristic equation associated with the homogeneous dynamical system of order 2 that we started with above. We will show later that if r and s are distinct real roots of the characteristic equation, all solutions of the system can be written in this form.

      Summary:

        If r and s are distinct real roots of the characteristic equation

          (C) x2-hx-k=0

        for a second order, homogeneous recurrence relation

          (R) an=han-1+kan-2 for n>0,

        then

          a(n)=c1rn+c2sn

        is the general solution of the equation, where c1 and c2 are constants determined by initial values.

    Example 4.2: Solve the discrete dynamical system

      (I) F0 = 1, F1 = 1
      (R) Fn = Fn-1 + Fn-2 for n>1

    that defines the Fibonacci sequence

      { Fn } = { 1,1,2,3,5,8,13,21,34,... }

    Solution: The characteristic equation for the system is

      x2-x-1 = 0

    which has roots

      r1 = (1+51/2)/2 r2 = (1-51/2)/2
    Therefore, the general solution of the recurrence relation (R) is

      F(n) = c1[(1+51/2)/2]n + c2[(1-51/2)/2]n

    Now impose the initial conditions F0=1 and F1=1 to obtain the equations:

      1 = c1 + c2
      1 = c1(1+51/2)/2 + c2(1-51/2)/2

    The preceding equations can be solved for c1, c2 to obtain the following solution for the Fibonacci system

      F(n) = (1/2(5)1/2)[(1+51/2)/2]n+1 - (1/2(5)1/2)[(1-51/2)/2]n+1

      F(n) = (1/2n+151/2)[(1+51/2)n+1 -(1-51/2)n+1]

    Although it does not look very likely that this formula for F(n) will produce the Fibonacci sequence 1,1,2,3,5,8,13,..., you can check it on your calculator. For example, if you enter this formula into your calculator, the following tables of values will result.

    Right on the money!

The Case of Double Roots for the Characteristic Equation

    The homogeneous discrete dynamical system of order 2 studied at the beginning of this lesson:

      (I) a0=0, a1=1
      (R) an=2an-1-an-2 for n>1

    has the characteristic equation

      x2-2x+1 = 0

    This equation can be written as

      (x-1)2 = 0

    so it has a double root x=1. This means that

      an = c11n

    is a solution of the recurrence relation (R) of the system for any choice of the constant. However, no choice of c1 will yield the initial values

      a0=0, a1=1.

    Notice that a second solution of this recurrence relation can be obtained by multiplying this first solution by n; that is

      an = c2n 1n

    is also a solution! To see this, just substitute this expression into the recurrence relation an = 2an-1 - an-2:

      c2n 1n = 2c2(n-1)1n-1 - c2(n-2)1n-2
      c2n = 2c2n - 2c2 - c2n + 2c2
      c2n = c2n : It checks!

    This means that

      an = a(n) = c11n + c2n 1n

    is a general solution of the recurrence relation

      an = 2an-1 - an-2 for n>1

    for any choice of constants c1 and c2.

    Now impose the initial conditions:

      0 = a0 = c110 + c2(0) (1n) = c1
      1 = a1 = c111 + c2(1) (11) = c1 + c2

    Thus, c1=0 and c2=1, so the solution of the given discrete dynamical system is

      a(n) = 1n + (n)(1n) = n for all n

    This squares with the tabular information that we developed earlier.

    The method used in the preceding example to construct the general solution actually always works:

      If a homogeneous recurrence relation

        an = han-1 + kan-2

      of order 2 has a characteristic equation:

        x2-hx-k = 0

      with a double root x=r, then the general solution of the recurrence relation is

        a(n) = an = c1rn + c2nrn

      where c1 and c2 are constants that are determined by the initial conditions.

    The heart of the proof of the preceding result is showing that, if x=r is a double root of the characteristic equation

      x2-hx-k = 0

    then an=c2nrn satisfies the recurrence relation:

      an = han-1 + kan-2 for n>1

    for any choice of c2. This is done by direct substitution and simplification as follows:

      c2nrn = h(c2[n-1]rn-1) + k(c2[n-2]rn-2)
      c2nrn = hc2nrn-1 - hc2rn-1 + kc2nrn-2 - 2kc2rn-2
      c2nrn-2[r2-hr-k] + c2rn-2[hr-2k] = 0

    Note that the first expression in square brackets in the preceding equation is 0 because r is a root of the characteristic equation. The second expression in square brackets is also 0 because if r is a double root of the quadratic equation x2-hx-k=0 then r=h/2 and h2+4k=0. Thus, an=c2nrn is a solution of the recurrence relation.

The Case of Complex Roots for the Characteristic Equation

    The following example explores the solution of homogeneous, linear DDS's of order 2 for the case in which the characteristic equation has complex roots.

    Example 4.3: Find the first 7 values determined by the discrete dynamical system

      (I) a0 = 1, a1 = 2
      (R) an = an-1 - an-2

    Then solve the characteristic equation and explore the construction of the solution of this system.

    Solution: The first 7 terms of the sequence are easy to compute by hand:

      a0 = 1
      a1 = 2
      a2 = a1 - a0 = 1
      a3 = a2 - a1 = -1
      a4 = a3 - a2 = -2
      a5 = a4 - a3 = -1
      a6 = a5 - a4 = 1

    The characteristic equation for (R) is:

      x2-x+1 = 0

    This equation has complex conjugate roots:

      r = 1/2 + 31/2i/2 s = 1/2 - 31/2i/2
    Earlier in this section, we acutally showed that if r and s are distinct roots of the characteristic equation, then the general solution of the system can be written as

      a(n) = c1rn + c2sn for all n

    Thus, in this case, the general solution is

      a(n) = c1(1/2 + 31/2i/2)n + c2(1/2 - 31/2i/2)n for all n

    (The earlier discussion was for distinct real roots r and s, but the algebra is the same for complex r and s!) Now impose the initial conditions a0=1 and a1=2 to obtain the equations

      1 = a0 = c1 + c2
      2 = a1 = c1(1/2 + 31/2i/2) + c2(1/2 - 31/2i/2)

    These equations can be solved for c1 and c2 to obtain

    c1 = 1/2 - 31/2i/2 c2 = 1/2 + 31/2i/2
    so the solution of the given system is

      a(n) = (1/2-31/2i/2)(1/2+31/2i/2)n + (1/2+31/2i/2)(1/2-31/2i/2)n

    Let's check the first few values:

      a0 = (1/2-31/2i/2) + (1/2+31/2i/2) = 1
      a1 = (1/2-31/2i/2)(1/2+31/2i/2) + (1/2+31/2i/2)(1/2-31/2i/2)
      a1 = (1/4+3/4) + (1/4+3/4) = 2
      a2 = (1/2-31/2i/2)(1/2+31/2i/2)2 + (1/2+31/2i/2)(1/2-31/2i/2)2
      a2 = (1/2-31/2i/2)(-1/2+31/2i/2) + (1/2+31/2i/2)(-1/2-31/2i/2)
      a2 = (-1/4+3/4) + (-1/4+3/4) = 1, etc.

    It's working!

    Summary:

      If the characteristic equation

        x2-hx-k = 0

      of a homogeneous linear DDS

        (I) a0 = c, a1 = d
        (R) an = han-1 + kan-2 for n>1

      has complex conjugate roots

        r = a ± ib

      then the general solution of (R) is

        a(n) = c1(a + ib)n + c2(a - ib)n for all n

      where c1 and c2 are constants whose values are detmerined by the initial conditions (I).

    There is a more convenient and descriptive way to write the general solution for the case in which the charactertistic equation has complex conjugate roots r = a ± ib. First, write a + ib in polar (or trigonometric) form:

      a + ib = r[cos(a) + (i)sin(q)]

    where r = (a2+b2)1/2, q = Arctan (b/a)

    Then, as we have seen above, the sequence of complex numbers defined by:

      zn = (a + ib)n = rn(cos(nq) + (i)sin(nq))

    is a solution of (R). Also, because the coefficients in the recurrence relation (R) are real numbers, the sequences of real and imaginary parts of zn:

    Re(zn) = rncos(nq) Im(zn) = rnsin(nq)
    are also solutions of (R). This means that we can also write the general solution of (R) in the form

      a(n) = rn(d1cos(nq) + d2sin(nq))

    where d1 and d2 are real constants that are determined by the initial conditions (I). This form of the general solution is often called the real general solution of (R).

    In Example 4.2, we found that the characteristic equation had complex conjugate roots:

      1/2 ± 31/2i/2 = cos(p/3) + (i)sin (p/3)

    Therefore, the real general solution of that system is

      a(n) = [d1cos(np/3) + d2sin(np/3)] for all n

    To compute the values of d1 and d2 that are determined by the initial values, note that

      1 = a(0) = (1)d1 + (0)d2
      2 = a(1) = cos(p/3)d1 + sin(p/3)d2
      2 = a(1) = (1/2)d1 + (31/2/2)d2

    These equations have the solutions

    d1 = 1 d2 = 31/2
    so the real solution of the system in Example 4.2 is

      a(n) = cos(np/3) + 31/2sin(np/3)] for all n

    The following example shows that the Method of Undetermined Coefficients can be used for non-homogeneous linear discrete dynamical systems of order 2 in essentially the same way as in Lesson 3 for systems of order 1.

    Example 4.4:

      Solve the following non-homogeneous linear DDS of order 2:

        (I) a0 = -7, a1 = 38
        (R) an = 5an-1 - 6an-2 + 2*5n

    Solution:

      The homogeneous recurrence relation corresponding to (R) is

        (R*) an = 5an-1 - 6an-2

      The characteristic equation of (R*):

        x2 - 5x + 6 = 0

      has roots x=2 and x=3. Consequently the general solution of (R*) is

        an = c12n + c23n for all n

      Based on the Method of Undetermined Coefficients for DDS's of order 1, we now seek a solution of the non-homogeneous recurrence relation (R) of the form

        an = c(5n) for all n

      where c is an appropriate constant determined by substitution into (R) as follows:

        c(5n) = 5c(5n-1) - 6c(5n-2) + 2(5n)

        (c-2)(5n) - 5c(5n-1) + 6c(5n-2) = 0

        [25(c-2) - 25c + 6c](5n-2) = 0

        -50+6c = 0

        c = 50/6 = 25/3

      Therefore

        an = (25/3)5n for all n

      is a particular solution of (R) and so the general solution of (R) is

        an = c12n + c23n + (25/3)5n for all n

      where c1 and c2 are constants detmerined by the initial conditions (I).

      Now impose the initial conditions (I) to obtain the equations

        -7 = a(0) = c1 + c2 + 25/3
        38 = a(1) = 2c1 + 3c2 + 125/3

      This pair of equations has the solution c1=-127/3 and c2=27, so the solution of the given DDS is:

        a(n) = (-127/3)2n + (27)3n + (25/3)5n

Important Point: The following Just Do It! questions are Assignment 4 for this module. There is an Assignment 4 shell file in the download folder for this module that contains the statements of these questions. Open that shell now and complete Assignment 4 according to the instructions in that document.

Just Do It!

    Problem 4.1

      Find the solution of the following recurrence relation of order 2:

        (R) an = -an-1 + 6an-2

      for each of the following sets of initial conditions

      1. (I) a0=1, a1=2
      2. (I) a0=1, a1=-3
      3. (I) a0=1, a1=1

      In each case, include a screenshot of a table of the first 6 values in the space below the solution formula.

    Problem 4.2

      Find the real solution of the discrete dynamical system

        (I) a0=1, a1=2
        (R) an = 2an-1 + 2an-2

      Verify that the first 6 values computed from your solution formula agree with the first 6 values computed from the discrete dynamical system. (You can do this by including screenshots from your calculator or you can do it by hand).

    Problem 4.3

      Find the general solution of the recurrence relation:

        (R) an = -an-1 - (1/4)an-2

      Then find the solution that corresponds to the initial values

        (I) a0=1, a1=1

    Problem 4.4

      Morse code messages are composed of two types of signals, a dot and a dash. Suppose that it takes 1 time unit to transmit a dot and 2 time units to transmit a dash.

      Problem: Compute the total number Sn of different Morse code messages (message=any string of dots and dashes) that can be sent in n time units? To solve this problem, complete the following steps:

      1. Show that S1=1, S2=2, S3=3, S4=5 by just listing all of the possible messages in each case.

      2. Explain why the following recurrence relation holds for Sn:

          Sn = Sn-1 + Sn-2 for n>2

      3. Find a formula for Sn as a function of n; that is, solve the discrete dynamical system:

          (I) S1 = 1, S2 = 2
          (R) Sn = Sn-1 + Sn-2 for n>2

    Problem 4.5

      1. Find the general solution of the recurrence relation:

          (R) an = 7an-1 - 10an-2 for n>1

      2. Find the solution of the DDS consisting of the recurrence relation (R) and the initial conditions

          (I) a0=2, a1=7

      3. Create with your calculator and paste in below a table of values for n=0,1,2,3,4,5,6 for the "ratio sequence"

          un = an / an-1 for n>0

        for the solution to (b). Then do the same for two other sets of initial conditions of your choice. Are there any conjectures that you can make about the values of this ratio sequence?

      4. Can you explain what you observed in (c) on the basis of the general solution computed in (a)?