Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simultaneous difference equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30607] Re: [mg30600] Simultaneous difference equation
  • From: BobHanlon at aol.com
  • Date: Fri, 31 Aug 2001 04:09:32 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 2001/8/30 4:19:39 AM, 
shusaku.yamamoto at buseco.monash.edu.au writes:

>Hello, I have just started using (or more appropriately trying to use)
>Mathematica. As you expect, I have a problem. I would like to know
>Mathematica code for solving simultaneous difference eqation; for
>example:
>
>a_11*x(t)+a_12*y(t)=a_13*x(t-1)+a_14*y(t-1)+k_1
>a_21* x(t)+a_22*y(t)=a_23*x(t-1)+a_24*y(t-1)+k_2
>
>Or, in matrix notation,
>
>A_1*Y(t)=A_2*Y(t-1)+K
>
>t denotes time t, and t-1 is one period before time t.
>
>I have go through help menu in Mathematica. Yet, I could not get reached
>to the topic of difference equation. If you know the code (or what to be
>typed), could you reply this message? 
>

There is an entry in the Master Index for difference equations which refers
to a standard add-on package.

Needs["DiscreteMath`RSolve`"];

Using specific coefficients

{{a11, a12, a13, a14}, 
      {a21, a22, a23, a24}} = 
    {{1, 2, 1, 1}, 
      {1, 1, 2, 1}};

and specifying the initial conditions

RSolve[
  {a11*x[t]+a12*y[t] == a13*x[t-1]+a14*y[t-1]+k1, 
    a21*x[t]+a22*y[t] == a23*x[t-1]+a24*y[t-1]+k2, 
    x[0] == y[0] == 0}, {x[t], y[t]}, t]

%//FullSimplify


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: RE: problems with simple things
  • Next by Date: Re: Simultaneous difference equation
  • Previous by thread: Re: Simultaneous difference equation
  • Next by thread: Re: Simultaneous difference equation