Results 1 to 6 of 6

Math Help - Difference Equations

  1. #1
    Junior Member
    Joined
    Dec 2009
    Posts
    30

    Difference Equations

    I have the following question:

    Find the solution to the difference equation

    y(t) - \frac{1}{4}y(t-2) = 0
    Under initial conditions y(-1) = 1 and y(-2) = 0

    I can't for the life of me remember how to do these, I've looked through my notes and got nothing. I understand how to do PDE's but I'm not sure what a difference equation is??

    Any help would be great

    p.s. Is there a way of solving this in MATLAB?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    14,973
    Thanks
    1121
    Quote Originally Posted by jezzyjez View Post
    I have the following question:

    Find the solution to the difference equation

    y(t) - \frac{1}{4}y(t-2) = 0
    Under initial conditions y(-1) = 1 and y(-2) = 0

    I can't for the life of me remember how to do these, I've looked through my notes and got nothing. I understand how to do PDE's but I'm not sure what a difference equation is??

    Any help would be great

    p.s. Is there a way of solving this in MATLAB?
    Well, just start by writing down some numbers:
    Y(-2)= 0
    Y(-1)= 1
    Y(0)- (1/4)Y(0-2)= 0 so Y(0)- (1/4)0= 0, Y(0)= 0.
    Y(1)- (1/4)Y(1-2)= 0 so Y(1)- 1/4= 0, Y(1)= 1/4.
    Y(2)- (1/4)Y(2-2)= 0 so Y(2)- 0= 0, y(2)= 0.
    Y(3)- (1/4)Y(1)= 0 so Y(3)- 1/16= 0, Y(3)= 1/16= 1/(4^2).
    Y(4)- (1/4)Y(2)= 0 so Y(4)- 0= 0, Y(4)= 0.
    Y(5)- (1/5)Y(3)= 0 so Y(5)- 1/4^2= 0, Y(5)= 1/4^3

    Get the idea? This clearly gives two different formulas, one for even indices, the other for odd.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor chisigma's Avatar
    Joined
    Mar 2009
    From
    near Piacenza (Italy)
    Posts
    2,162
    Thanks
    5
    Let's write the DE in a more 'usual' form...

    y_{n+2} = \frac{1}{4}\cdot y_{n} , y_{0}=0 , y_{1} = 1 (1)

    It is fully evident from (1) that the solution is the combination of two interleaved sequences, one for n even and one for n odd, and both tend to 0...

    y_{n} = 0,1,0,\frac{1}{4}, 0,\frac{1}{16}, \dots (2)

    Kind regards

    \chi \sigma
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member Failure's Avatar
    Joined
    Jul 2009
    From
    Zürich
    Posts
    555
    Quote Originally Posted by jezzyjez View Post
    I have the following question:

    Find the solution to the difference equation

    y(t) - \frac{1}{4}y(t-2) = 0
    Under initial conditions y(-1) = 1 and y(-2) = 0

    I can't for the life of me remember how to do these, I've looked through my notes and got nothing. I understand how to do PDE's but I'm not sure what a difference equation is??
    A difference equation is an equation the solution of which is a sequence. So it might be a bit more suggestive to write your equation like this: y_n-\frac{1}{4}y_{n-2}=0

    Instead of the differential operator you have the "shift operator" (that shifts the sequence by a certain fixed number of places). So your difference equation is a homoegenous second-order linear difference equation.
    Because it is linear and homogeneous the general solution is a linear combination of certain base solutions. The base solutions can be found by setting y_n := z^n, and pluging this into your equation:

    z^n -\frac{1}{4}z^{n-2}=0, the non-trivial solutions of which are z_{1,2}=\pm \frac{1}{2}.
    Thus the general solution of your homogeneous linear difference equation is y_n = c_1 \left(\frac{1}{2}\right)^n+c_2\left(-\frac{1}{2}\right)^n.
    Now bring in the "initial conditions" to figure out what c_{1,2} should be...


    Is there a way of solving this in MATLAB?
    I don't know MATLAB well enough to tell, but most CAS systems do have solvers for difference equations. Typically they are variants of a general solve() procedure.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Dec 2009
    Posts
    30
    Quote Originally Posted by Failure View Post
    A difference equation is an equation the solution of which is a sequence. So it might be a bit more suggestive to write your equation like this: y_n-\frac{1}{4}y_{n-2}=0

    Instead of the differential operator you have the "shift operator" (that shifts the sequence by a certain fixed number of places). So your difference equation is a homoegenous second-order linear difference equation.
    Because it is linear and homogeneous the general solution is a linear combination of certain base solutions. The base solutions can be found by setting y_n := z^n, and pluging this into your equation:

    z^n -\frac{1}{4}z^{n-2}=0, the non-trivial solutions of which are z_{1,2}=\pm \frac{1}{2}.
    Thus the general solution of your homogeneous linear difference equation is y_n = c_1 \left(\frac{1}{2}\right)^n+c_2\left(-\frac{1}{2}\right)^n.
    Now bring in the "initial conditions" to figure out what c_{1,2} should be...


    Ok I put in the two initial conditions:

    y(-1) = c_1 (\frac{1}{2}) ^{-1} + c_2 (-\frac{1}{2})^ {-1}

    This gives me

    2c_1 - 2c_2 = 1

    Solving the other one I get

    4c_1 - 4c_2 = 0

    which I cant solve as it says the constants are equal in the second one. And that they are not equal in the first???
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member Failure's Avatar
    Joined
    Jul 2009
    From
    Zürich
    Posts
    555
    Quote Originally Posted by jezzyjez View Post
    Ok I put in the two initial conditions:

    y(-1) = c_1 (\frac{1}{2}) ^{-1} + c_2 (-\frac{1}{2})^ {-1}

    This gives me

    2c_1 - 2c_2 = 1

    Solving the other one I get

    4c_1 {\color{red}-} 4c_2 = 0
    No, what you get is y(-2)=4c_1{\color{red}+}4c_2= 0, and it follows that c_1=\frac{1}{4}, c_2 = -\frac{1}{4}.
    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. help with difference equations
    Posted in the Advanced Math Topics Forum
    Replies: 2
    Last Post: May 2nd 2010, 02:41 PM
  3. Difference Equations
    Posted in the Advanced Applied Math Forum
    Replies: 6
    Last Post: June 10th 2009, 01:21 PM
  4. difference equations
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: May 19th 2009, 01:33 PM
  5. More Difference Equations
    Posted in the Advanced Algebra Forum
    Replies: 5
    Last Post: January 26th 2008, 08:43 AM

Search Tags


/mathhelpforum @mathhelpforum