Disclaimer: This is for homework...

I'm attempting to understand how to find the first integral of the Volterra-Lotka Predator/ Prey model in order to plot the level curves in Matlab.

The model is defined as:

xdot = ax - bxy

ydot = bxy - cy

I've defined

1) x = x1 = dx1/dt

2) y = x2 = dx2/dt

After some work, I'm arriving at

3) x1*x2*(b*(1/2)*x1^2 - c - a + b*(1/2)*x2^2) = Constant

You can see my derivation at

http://imageshack.us/photo/my-images/337/img20120208171048.jpg/

Now, I've seen several write ups that explain that it has an "explicit integration" and they make the jump to here:

4) ((−c+b*x)/x )* dx/dt - ((a−b*y)/y)*dy/dt = 0

Which leads to:

5) d/dt (bx + by−clogx −alogy) = 0

What I'm not seeing is how they got to 4)...

I ask because implementing 5) is easier to do in Matlab than 3). Sort of.

Which leads to my next question... when writing the Matlab code, what do I set the variables a, b, and c to? Initial conditions? Or do I do a mesh/ for loop...?

Any help would be appreciated.

Thanks,

J

## Volterra-Lotka equation

**Moderators:** gmalivuk, Moderators General, Prelates

- eta oin shrdlu
**Posts:**449**Joined:**Sat Jan 19, 2008 4:25 am UTC

### Re: Volterra-Lotka equation

I think you're overthinking it. Divide your xdot equation through by x, to give you a left side with only xs and a right side with only ys; similarly divide the ydot equation through by y. Now multiply the x sides of these two equations to get the left side of a new equation, and multiply the y sides to get the right side.brain_ofj wrote:Now, I've seen several write ups that explain that it has an "explicit integration" and they make the jump to here:

4) ((−c+b*x)/x )* dx/dt - ((a−b*y)/y)*dy/dt = 0

[...]

What I'm not seeing is how they got to 4)...

a, b, and c are not "variables" in the LV equation (they are not modeled as changing with time); they are fixed parameters, related to the predation and reproduction rates of predators and prey. [Read the Wikipedia entry to understand what they mean, if you don't already know.] So you probably want to choose reasonable values, either from data and/or models of the species you're looking at or to display some particular behaviors of the model.Which leads to my next question... when writing the Matlab code, what do I set the variables a, b, and c to? Initial conditions? Or do I do a mesh/ for loop...?

### Re: Volterra-Lotka equation

I think you're overthinking it. Divide your xdot equation through by x, to give you a left side with only xs and a right side with only ys; similarly divide the ydot equation through by y. Now multiply the x sides of these two equations to get the left side of a new equation, and multiply the y sides to get the right side.eta oin shrdlu wrote:brain_ofj wrote:Now, I've seen several write ups that explain that it has an "explicit integration" and they make the jump to here:

4) ((−c+b*x)/x )* dx/dt - ((a−b*y)/y)*dy/dt = 0

[...]

What I'm not seeing is how they got to 4)...

I think that's the step I'm having a brain-fart about... are you able to do this because they are part of the same system?

RE: Matlab code... ok. That makes sense. Thanks.

- eta oin shrdlu
**Posts:**449**Joined:**Sat Jan 19, 2008 4:25 am UTC

### Re: Volterra-Lotka equation

Well, whenever you have two equations A=B and C=D, you're allowed to write AC=BD; that's all you're doing. I'm not sure what your question is.brain_ofj wrote:I think that's the step I'm having a brain-fart about... are you able to do this because they are part of the same system?eta oin shrdlu wrote:Now multiply the x sides of these two equations to get the left side of a new equation, and multiply the y sides to get the right side.

### Re: Volterra-Lotka equation

eta oin shrdlu wrote:Well, whenever you have two equations A=B and C=D, you're allowed to write AC=BD; that's all you're doing. I'm not sure what your question is.brain_ofj wrote:I think that's the step I'm having a brain-fart about... are you able to do this because they are part of the same system?eta oin shrdlu wrote:Now multiply the x sides of these two equations to get the left side of a new equation, and multiply the y sides to get the right side.

That IS my question.

Any idea what that equality/ proof is called? I guess I don't remember that one.

### Re: Volterra-Lotka equation

brain_ofj wrote:That IS my question.

Any idea what that equality/ proof is called? I guess I don't remember that one.

The substitution principle? It's basically the rule that makes formulas work. The substitution principle says any time you have A=B, you can substitute B for A and get another true statement.

So, start with AC=AC (by the fact that equality is reflexive) and then change that to AC = BC (by substituting B for A) and then change that to AC = BD (by substituting D for C).

### Re: Volterra-Lotka equation

Ok... that's what I was looking for then.

Thanks, I guess.

Thanks, I guess.

### Who is online

Users browsing this forum: No registered users and 8 guests