       Re: question RE: difference equations

• To: mathgroup at smc.vnet.net
• Subject: [mg26118] Re: question RE: difference equations
• From: "Paul Lutus" <nospam at nosite.com>
• Date: Tue, 28 Nov 2000 01:56:04 -0500 (EST)
• References: <8vfrkj\$jjp@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```"John McArthur" <john.mcarthur at brasenose.oxford.ac.uk> wrote in message
news:8vfrkj\$jjp at smc.vnet.net...
>
> I am a new Mathematica user so apologize for the basic nature of my
> question:
>
> I want to set up a system of simultaneous difference equations but am
> having trouble with the syntax. Essentially I would like to map the growth
> of a system as follows:
>
> y1(t)=y1(t-1) + a*y2(t-1) + b*y3(t-1)... + xx*yn(t-1)
> y2(t)=y2(t-1) + c*y1(t-1) + d*y3(t-1)... + yy*yn(t-1)
> ...
> yn(t)=yn(t-1) + x*y1(t-1) + z*y2(t-1)... + zz*y[n-1](t-1)
>
> I know how to set up a univariate recursive equation, but am not clear on
> how to set up a multivariate form. My most common error message is one of
> "recursion limit reached."  Any suggestions (and possibly advice
> on the simplest way to set up a system like the one above) would be
> greatly appreciated.

First, please understand I haven't read and absorbed the specific details of
your problem. Here is my *generic* advice -- when you see this error
message, it means you have two expressions that rely on each other for
resolution, like:

b = a * k
a = b * k

Or something of that sort. In programs like Mathematica (or a spreadsheet,
or any sophisticated program), a sufficiently complex circular reference
will not be easy to detect. The program may simply commence trying to sort
out the relationships between the equations, and discover it has run out of
recursion stack space.

Here is a simpler example than yours (Mathematica 3.0):

In:=
a := b * k
b := a * k
In:= a

\$RecursionLimit::"reclim": "Recursion depth of \!\(256\) exceeded."

Out=
\!\(k\^255\ Hold[a\ k]\)

My point is the program may not be able to pinpoint the error for you -- it
may only be able to say there is one. The rest is up to you -- you must
locate the circular reference on our own.

--

Paul Lutus
www.arachnoid.com

```

• Prev by Date: Re: Re: frontend problem: common characters automatically translated
• Next by Date: Re: vector multiplication
• Previous by thread: Re: question RE: difference equations
• Next by thread: 3D movement