# Modeling with diff eq

1. Aug 1, 2008

### aquaregia

I have read some papers where they say they are using a computational approach to modeling something complicated, like a simplified stock market or something, and they usually say that one of the reasons they are using a computational approach is becuase it would be "very difficult" to come up with a some differential equations to do the same thing. This seems to imply that it would be possible to come up with a set of differential equations which could perform the same function as a agent based computer simulation. Is this actually possible? And, if it is possible to model something as complex as the behavior of a stock market using differential equations, then it seems that it would be possible to model pretty much anything using differential equations.

This kind of makes sense to me because another thing I understand is that differential equations are like continuous versions of difference equations. And difference equations can describe all kinds of iterative proccesses, because difference equations are kind of like writing a loop in a computer program which repeatedly changes some intial value according to some rule. Now, since it is possible to write a simulation of some physical system using this same principal (some intial value is repeatedly evalueated according to some rule or interaction of rules), then it should be possible to model this proccess using a difference equation, and it should be possible turn the difference equation into a differential equation. Thus, it should be possible to model anything with a differential equation. Is this correct?

2. Aug 1, 2008

### HallsofIvy

It's not at all clear what you are saying, but yes, it is always possible to convert an difference equation into a differential equation, with some additional simplifications. Of course, the solution to the differential equation will not be exactly the same as the solution to the difference equation- they necessarily models different things. But you certainly can have a continuous version of a discrete process (that equals the discrete process at the integers) or a discrete version of a continuous process (that ignores values of the continuous process other than the integers).

3. Aug 1, 2008

### aquaregia

I will make it simpler:

1. If a difference equation is basically the same as a loop in a computer program, then can a difference equation be used to find out the final value that a loop will return when it has finished?

2. Can you solve a difference equation with less steps than it takes to go through the loop?

If this is possible it seems like it could be useful in some cases where going through the loop would take an extremely long time.

4. Aug 5, 2008

### aquaregia

Is what I said just way off?

5. Aug 6, 2008

### HallsofIvy

No, not "way off" but, in fact, solving the difference equation corresponding to a loop in a computer program would be exactly the same as working through the loop. They are equivalent and neither is easier to solve than the other.