Results 1 to 5 of 5

Math Help - Difference equations

  1. #1
    Senior Member Twig's Avatar
    Joined
    Mar 2008
    From
    Gothenburg
    Posts
    396

    Difference equations

    Hi!

    We just started on this new topic, and I donīt understand how to solve even the first problems.

    If someone could walk me through how to solve the following, I would be immensly grateful!

     y_{n+1} - 2y_{n} = n \; \; \; \; n\geq 0 \; \; \;  y_{0} = 2

    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Aug 2008
    Posts
    120
    What is the question?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Senior Member Twig's Avatar
    Joined
    Mar 2008
    From
    Gothenburg
    Posts
    396

    Hi!

    The question was 'How do I solve this equation' basically.
    I did however do some research on the web, and ask around a bit, and
    I think I got at least a bit hang of it.

    If any of the following is incorrect, let me know.

    Equation (1):
     y_{n+1} - 2y_{n} = n \; \; \; \; n\geq 0 \; \; \; y_{0} = 0<br />

    The characteristic equation is:  r - 2 = 0 \Rightarrow \, r = 2
    Meaning that the homogenous part of the solution to  y_{n}
    is  y_{h} = A\cdot 2^n
    Now we need to find the particular solution to the equation (1).
    Since the right side is a polynomial of degree q = 1, we will look for a
    polynomial of the same degree.
     P(n) = C*n + D \; \mbox{where C and D are constants}

    Now we take this polynomial  P(n) and put it
    into equation (1). Giving us:
     C*n + C + D - 2*C*n - 2*D = n
    Now we have a equation system which can be solved:
    n(-C) = n \; \; \mbox{and} \; \; C-D = 0
    This gives us  C = -1 \; and D=C=-1
    So we get:
     y_{n} = A*2^n -n -1
    And with  y_{0}=0 \; \mbox{we get} \; y_{n} = 2^n - n - 1
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,548
    Thanks
    539
    Hello, Twig!

    Ugh! This is a messy one!

    I'll show you a method that I was taught . . .


     y_{n+1} \:=\:2y_n + n \qquad n\geq 0 \qquad y_0 = 2
    Crank out the first few terms . . .

    \begin{array}{ccccccc}& y_0 &=& 2 \\<br />
n=0\!: & y_1 &=& 2(2) + 0 &=& 4\\<br />
n = 1\!: & y_2 &=& 2(4) + 1 &=& 9 \\<br />
n=2\!: & y_3 &=& 2(9) + 2 &=& 20 <br />
\end{array}



    We have been given: . . y_{n+1} \:=\:2y_n + n. . . . . .[1]

    Write the "next" term: . y_{n+2} \:=\:2y_{n+1} + (n+1) .[2]


    Subtract [1] from [2]: . y_{n+2} -y_{n+1} \:=\:2y_{n+1} - 2y_n + 1 \quad \Rightarrow \quad y_{n+2} -3y_{n+1} + 2y_n \:=\:1


    Let y_n = X^n
    . .
    We assume that the general term is an exponential.

    Then we have: . . . X^{n+2} - 3X^{n+1} + 2X^n \:=\:1 .[3]

    "Next" equaton: . X^{n+3} - 3X^{n+2} + 2X^{n+1} \:=\:1 .[4]

    Subtract [3] from [4]: . X^{n+3} - 4X^{n+2} + 5X^{n+1} - 2X^n \:=\:0

    Divide by X^n\!:\;\;X^3 - 4X^2 + 5X - 2 \:=\:0

    This factors: . (X - 1)(X - 1)(X - 2) \:=\:0

    . . and has roots: . X \;=\;1,\:1,\:2


    The general form is: . y(n) \;=\;A + Bn + C\cdot2^n


    Plug in the first three terms:

    . . \begin{array}{ccccc}y(0) = 2\!: & A + C &=& 2 & {\color{blue}[5]}\\<br />
y(1) = 4\!: & A + B + 2C &=& 4 & {\color{blue}[6]}\\<br />
y(2) = 9\!: & A + 2B + 4C &=& 9 & {\color{blue}[7]} \end{array}

    \begin{array}{cccccc}\text{Subtract {\color{blue}[6] - [5]}:} & B + C &=& 2 & {\color{blue}[8]}\\<br /> <br />
\text{Subtract {\color{blue}[7] - [6]}:} & B + 2C &=&  5 & {\color{blue}[9]}\end{array}

    Subtract [9] - [8]: . C \:=\:3 \quad\Rightarrow\quad B \:=\:-1 \quad\Rightarrow\quad A \:=\:-1


    Therefore: . \boxed{ y(n) \;=\;-1 - n + 3\!\cdot\!2^n}


    Is there a better way? . . . I hope so!
    .
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Senior Member Twig's Avatar
    Joined
    Mar 2008
    From
    Gothenburg
    Posts
    396

    Hi soroban

    Hi!

    Yes, this can get quite messy.
    I read through your solution and then tried to compare it to mine.
    I couldnīt really figure any advantages/disadvantages with a certain method though..
    The method I was taught today (I made a post higher up this page) with a different solution. I think itīs correct, and it felt like less steps.
    The similarities with differential equations becomes quite clear by doing this.
    You are using a "characteristic equation", just as you solve equations like
    y'' + y' + y = f(x)
    Then you look for a particular solution, that satisifies just this equation.
    And the general solution becomes:
     y_{n} = y_{h} + y_{p}

    Thanks for your help!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Difference Equations
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: November 17th 2010, 06:43 PM
  2. difference equations
    Posted in the Algebra Forum
    Replies: 1
    Last Post: August 23rd 2010, 12:39 PM
  3. Difference Equations
    Posted in the Differential Equations Forum
    Replies: 5
    Last Post: April 27th 2010, 04:48 AM
  4. Difference Equations
    Posted in the Advanced Applied Math Forum
    Replies: 6
    Last Post: June 10th 2009, 01:21 PM
  5. difference equations
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: May 19th 2009, 01:33 PM

Search Tags


/mathhelpforum @mathhelpforum