Computer Project # 1

advertisement
Computer Project # 1
This project is meant to be done using the software DFIELD, which can be found at
http://www.math.rice.edu/∼dfield/dfpp.html (or follow the link from the class website).
To open DFIELD, download the webpage above, and click on the button marked DFIELD 2005.10
and the java applet will start. Click OK in the dialog box that pops up. You should now see three
windows, one for input, one with a slope field graphed in it, and another for output information
(which we’ll ignore).
In the input window, the top line is where you can type in the differential equation. It reads
something like “BOX ’= BOX”. This means that you need to put the ODE in the form y 0 = f (x, y)
if it is not already. You can then type the ODE in, just as it is written. Remember to change the
independent variable in the box on the next line, if necessary, to match the equation that you have
in mind.
Figure 1: The input box as it appears when opening DFIELD
Below are several other input boxes. The ones on the left let you define parameters that can be
used in the ODE, and then changed by changing the values in the input box rather than deleting
and retyping things in the top line. The input boxes on the right let you change the size of the
output window. In the lower right is the button that graphs the phase plane (slope field) when
clicked, as long as everything you have entered makes sense to the software. If something doesn’t
make sense, the box containing the nonsense will be red.
Once you have graphed the slope field, you can click anywhere within the graph to generate a
solution to the ODE that satisfies the initial condition that you clicked on. For example, if you
click on the point (2, 3) in the graph window, the software will plot a solution that satisfies the initial
condition y(2) = 3. Each time you click on the graph, a new solution curve will be generated.
1
Figure 2: A slope field along with a solution satisfying the initial condition y(2) = 3
Problems
1. Print a slope field and several (∼ 10) solution curves for the equation
y 0 = 2x2 y 2
in the window −2 ≤ x ≤ 2, −2 ≤ y ≤ 2.
2. Print a slope field and several solution curves for the equation
y 0 = x2 − y
in the window −5 ≤ x ≤ 5, −5 ≤ y ≤ 5.
3. Print a slope field and several solution curves for the equation
y 0 = x2 − y 2
in the window −5 ≤ x ≤ 5, −5 ≤ y ≤ 5.
4. (a) Enter the equation
y0 = y2 − b
2
in the equation window. In the parameter expression boxes, set b = 1. This equation has two
solutions which are constant functions (horizontal lines on the graph). Locate these constant
solutions by graphing several solutions with different initial conditions. Report your results.
(b) Try several different values of the parameter b, and locate the two constant solutions in each
case. Formulate a hypothesis for where the constant solutions will be located for a given value of
b.
(c) Repeat the same process with the equation y 0 = y 2 + by. That is, plug in several values for the
parameter b and find where the resulting constant solutions are. Then formulate a hypothesis that
predicts where the constant solutions are located from the value of b.
Note: As long as b > 0, there are always two constant solutions to the equation in problem 4(a).
In part (b), there are two constant solutions regardless of how b is chosen. If you can’t see them, it
may be because your viewing window is too small.
A Note on Printing: When printing the graphs, if you run into trouble, you might try taking a
screenshot of the graph and printing that. On a Mac, to take a screenshot, press command+shift+4.
The mouse arrow will then become a crosshair, and you can select a section of the screen that will
be saved as a .png file on your desktop. If you press the spacebar, the crosshair will turn into a
camera, and the window that you click will be copied as a .png on the desktop.
For operating systems other than Mac, you’re on your own.
3
Download