- Thread starter
- #1

- Thread starter dwsmith
- Start date

- Thread starter
- #1

- Thread starter
- #2

$$

\displaystyle\begin{array}{lcl}

\displaystyle \frac{du_1}{d\tau} & \displaystyle = & \displaystyle u_1\left(1 - u_1 - a_{12}u_2\right)\\

\frac{du_1}{d\tau} & \displaystyle = & \displaystyle\rho u_1\left(1 - a_{21}u_1\right)

\end{array}

$$

Where $\rho,a_{12},a_{21}$ are constants.

\displaystyle\begin{array}{lcl}

\displaystyle \frac{du_1}{d\tau} & \displaystyle = & \displaystyle u_1\left(1 - u_1 - a_{12}u_2\right)\\

\frac{du_1}{d\tau} & \displaystyle = & \displaystyle\rho u_1\left(1 - a_{21}u_1\right)

\end{array}

$$

Where $\rho,a_{12},a_{21}$ are constants.

Last edited:

- Thread starter
- #3

- Admin
- #4

- Jan 26, 2012

- 4,193

Any time you want to plot multiple plots simultaneously, you can assign a Plot command to a variable like this:I am pretty sure this works:

Show[StreamPlot[{(1 - x - 2 y), (1 - 2 x)}, {x, 0, 2}, {y, 0, 2},

Axes -> True]]

How can I plot the null clines simultaneously?

For the above phase plane, I used the case $a_{12},a_{21}>1$

PlotOne = Plot[x^2,{x,-2,2}]

PlotTwo = Plot[Sin[x],{x,-Pi,Pi}]

Then you show them simultaneously by doing

Show[PlotOne, PlotTwo]

So, if you can plot everything you need separately, this is a way to combine it all.

- Thread starter
- #5

Plotting the nullclines for these plots dont work the same since I have y and x terms. Do you know how to overcome that?Any time you want to plot multiple plots simultaneously, you can assign a Plot command to a variable like this:

PlotOne = Plot[x^2,{x,-2,2}]

PlotTwo = Plot[Sin[x],{x,-Pi,Pi}]

Then you show them simultaneously by doing

Show[PlotOne, PlotTwo]

So, if you can plot everything you need separately, this is a way to combine it all.

- Admin
- #6

- Jan 26, 2012

- 4,193

It doesn't matter how you generate a plot, you can still assign it to a variable like PlotOne, PlotTwo. You could sayPlotting the nullclines for these plots dont work the same since I have y and x terms. Do you know how to overcome that?

PlotThree = ImplicitPlot[...]

or

PlotFour = ContourGraphics[...]

etc.

Let's back up a bit and ask this question: is your problem the problem of showing multiple plots simultaneously, or is the problem plotting one thing in the first place?

- Thread starter
- #7

plotting the null cline forIt doesn't matter how you generate a plot, you can still assign it to a variable like PlotOne, PlotTwo. You could say

PlotThree = ImplicitPlot[...]

or

PlotFour = ContourGraphics[...]

etc.

Let's back up a bit and ask this question: is your problem the problem of showing multiple plots simultaneously, or is the problem plotting one thing in the first place?

$

\frac{du_1}{d\tau}

$

- Admin
- #8

- Jan 26, 2012

- 4,193

\begin{align*}

\frac{du_1}{d\tau} & = u_1\left(1 - u_1 - a_{12}u_2\right)\\

\frac{du_2}{d\tau} & = \rho u_1\left(1 - a_{21}u_1\right)?

\end{align*}

- Thread starter
- #9

the second one should be rho u_2

\begin{align*}

\frac{du_1}{d\tau} & = u_1\left(1 - u_1 - a_{12}u_2\right)\\

\frac{du_2}{d\tau} & = \rho u_1\left(1 - a_{21}u_1\right)?

\end{align*}

- Admin
- #10

- Jan 26, 2012

- 4,193

And what are $\rho, a_{21}$, and $a_{12}$?the second one should be rho u_2

- Thread starter
- #11

a_{12} and a_{21} have 4 cases. Both greater than 1, less than 1, and then one less and greater. Rho positive.And what are $\rho, a_{21}$, and $a_{12}$?

- Admin
- #12

- Jan 26, 2012

- 4,193

Well, ok, but you're going to have to have actual values in order to plot anything in Mathematica. Perhaps, if you're allowed to pick values, you could show me what commands you've used so far. The way I see it, you've got the two axes, and two other straight lines.

Last edited:

- Thread starter
- #13

For all my cases, I just used 2 and 1/2Well, ok, but you're going to have to have actual values in order to plot anything in Mathematica. Perhaps, if you're allowed to pick values, you could show me what commands you've used so far. The way I see it, you've got the two axes, and two other straight lines.

Last edited by a moderator:

- Admin
- #14

- Jan 26, 2012

- 4,193

So, using those values, what commands have you used so far?For all my cases, I just used 2 and 1/2

- Thread starter
- #15

So, using those values, what commands have you used so far?

Here are my phase planes and one null cline since I can't get mathematica to graph a vertical line

View attachment 25View attachment 26

- Admin
- #16

- Jan 26, 2012

- 4,193

Code:

```
PlotOne = StreamPlot[{x(1-x-2y),y(1-2x)},{x,0,2},{y,0,2}];
PlotTwo = Plot[{(1-x)/2,{x,0,2}];
<< Graphics`ImplicitPlot`
PlotThree = ImplicitPlot[x==1,{x,0,2},{y,0,2}];
Show[PlotOne,PlotTwo,PlotThree]
```

- Thread starter
- #17

Was the phase plan and null clines correct for that system of DEs?

My PlotThree line probably does not have the right equation in there. You might need x == 0, or whatever. Does this solve your problem?Code:`PlotOne = StreamPlot[{x(1-x-2y),y(1-2x)},{x,0,2},{y,0,2}]; PlotTwo = Plot[{(1-x)/2,{x,0,2}]; << Graphics`ImplicitPlot` PlotThree = ImplicitPlot[x==1,{x,0,2},{y,0,2}]; Show[PlotOne,PlotTwo,PlotThree]`

That worked too thanks.

- Admin
- #18

- Jan 26, 2012

- 4,193

The first two lines of code in Post # 16 were taken directly from your first .jpg. To be honest, the version of Mathematica I have doesn't support the StreamPlot command, so I don't know much about it. One thing that puzzles me is what are the axes on these plots corresponding to? That is, what variables in your system of DE's are being plotted against which variables?Was the phase plan and null clines correct for that system of DEs?

That worked too thanks.

Your system is

\begin{align*}

\frac{du_{1}}{d\tau}&=u_{1}(1-u_{1}-a_{12}u_{2})\\

\frac{du_{2}}{d\tau}&=\rho u_{2}(1-a_{21}u_{1}).

\end{align*}

Null clines are by definition regions in the $u_{1}-u_{2}$ plane where the derivatives of the system are zero simultaneously. That is, we must have

\begin{align*}

0&=u_{1}(1-u_{1}-a_{12}u_{2})\\

0&=\rho u_{2}(1-a_{21}u_{1}).

\end{align*}

The $\rho$ disappears. The logic goes like this:

(Either $u_{1}=0$ OR $1-u_{1}-a_{12}u_{2}=0$) AND (Either $u_{2}=0$ OR $1-a_{21}u_{1}=0$).

There are four possibilities:

1. $u_{1}=0$ and $u_{2}=0$

2. $u_{1}=0$ and $1-a_{21}u_{1}=0$ (this one seems unlikely)

3. $1-u_{1}-a_{12}u_{2}=0$ and $u_{2}=0$

4. $1-u_{1}-a_{12}u_{2}=0$ and $1-a_{21}u_{1}=0$.

Each of these possibilities describe a single point in the $u_{1}-u_{2}$ plane. So, if the goal of your problem is to plot the null clines, then I'd say you need to plot the three points described by 1, 3, and 4.

- Thread starter
- #19

- Admin
- #20

- Jan 26, 2012

- 4,193

- Thread starter
- #21

Those lines are plotted already plotted. You sent the syntax to include them all prior.

- Admin
- #22

- Jan 26, 2012

- 4,193

Ah, but the null clines for your system are three POINTS, not lines. Now, if you think it's clearer to just plot lines so that people can see the intersection, I suppose that'd be one way to present your solution. However, not all of the line represented by $1-a_{21}u_{1}=0$ is a null cline. Only one point on that line is a null cline.Those lines are plotted already plotted. You sent the syntax to include them all prior.