# Using XPP from the CIS Public Labs

Bard Ermentrout

January 6, 1996

In XPP in the public labs, follow the same procedure as getting MATLAB started up to the point at which it says setup matlab. This is not necessary. Type the following:

```cp ~phase/oned.ode .
```

This copies a simple file to your directory. Then type:

```~phase/xppaut oned.ode
```
and this should start up XPP. Click on Dir.field/Flow to make direction fields and then choose Direct Field from the subsequent menu and use a grid size of 10. You should see the direction fields plotted. Click on Initialconds and choose Mouse and then click the mose somewhere in the graph. A trajectory will appear. Do this several times. You will see a bunch of trajectories.

Click File and then Bell to turn off the bell. To change the right-hand sides of the equation, click File and then Edit and then Functions to change the function f(x,y) The current one is -y+sin(x). Change this to sin(x*y). Then click on OK. Click on Erase to clear the screen. Draw the direction fields again. Draw a bunch of trajectories. Describe what happens.

Click File Quit and answer Yes to exit.

I have tried this in Benedum and in the Calculus Labs in Gardner Steel and they both work. You cannot run xppaut from home since it requires X windows.

#### HOMEWORK

Draw direction fields and trajectories for the following equations and descibe the behavior:

1. f(x,y)=y*(2-y)
2. f(x,y)=sqrt(max(y,0))
3. f(x,y)=exp(x-y)
4. f(x,y)=y*ln(abs(x))/x
5. f(x,y)=y*(2+sin(x)-y)