Big Green Differential Equation Machine 2 |
© 2002-2009 Brian P. Reid
v 2.0.2 www.BPReid.com |

The Big Green Differential Equation Machine integrates systems of ordinary differential equations. The independent variable for the equations is "t". Any number of variables may be entered into the Big Green Ordinary Differential Equation Machine, so that it can be used to model systems with an arbitrary number of equations. The results are displayed graphically.

**Getting Started**

Running the Big Green Differential Equation Machine requires that a Java Runtime Environment (JRE) of version 1.4.2 or higher be installed. Sun offers the Java Runtime Environment for Windows, Linux, and Solaris while Apple offers Java for the Mac OS. Links to download the appropriate JRE can be found at http://www.java.com.

Once a JRE is installed, bgdem2.jar is the only file needed to run the Big Green Differential Equation Machine. To install, copy the bgdem2.jar file to any convenient local directory. Start the Big Green Differential Equation Machine by double-clicking on the bgdem2.jar file.

**Resizing**

Once started, the Big Green Differential Equation Machine window can be resized using the techniques appropriate for resizing windows in the operating system being used. In addition, the text input area on the left and the plotting area on the right can be resized. To do this, position the pointing device (mouse) over the vertical bar separating the input area from the plotting area. The cursor should change to indicate that the bar dragged to the left or right. Click and drag on the bar to change the allotment of window area between the text input area and the plotting area.

**Input**

Title/Name/NotesThe "Title/Name/Notes" text area serves for identification of a project.

Variables, DerivativesFor each variable, the user should enter an initial value (value for t = 0) and a derivative with respect to "t". Variable names, initial values, and time derivatives must be entered in the Variable and Derivatives text area. Variable names can be of any length, but must start with a letter. Capitalization is significant ("a" is different from "A"). The variable "t" is reserved to represent the indpendent variable, the variable with respect to which derivatives are taken.

The format for entering variables is to enter one variable on each line. Start the line with the variable name, enter an equals sign (=) and then enter the initial value of the variable. On the same line then enter a comma (,), the variable name with a prime ('), another equals sign, and then a formula for the derivative of the variable with respect to "t". The formula can contain the any of following:

Operators:+ for addition

- for subtraction

* for multiplication

/ for division

^ for power

Parentheses:( )

Constants:any number, e.g. 1.23, -6, 5.55E-5

Variables:any defined variable stringValid Functions:ABS - absolute value, ABS(x) = |x|

SQR - square, SQR(x) = x^{2}

EXP - exponential function, EXP(x) =e^{x}

LN - natural logarithm, LN(x) = log_{e}(x)

LOG10 - base 10 logarithm, LOG10(x) = log_{10}(x)

SQRT - square root

SIN - sine

COS - cosine

TAN - tangent

ATN - arc tangent in the range of -π/2 to π/2

INT - nearest integerHere is an example showing the variables and derivatives input. There are two real variables (in addition to time, t): hare and lynx. There are five constants, a, b, c, f, and g. A constant has a derivative of zero.

hare=30, hare'=(a - b*hare - c*lynx)*hare

lynx = 25, lynx' = (-f+g*hare)*lynx

a = 1.8, a' = 0

b = 0.001, b' = 0

c = 0.051, c' = 0

f = 0.23, f' = 0

g = 0.005, g'=0

DataWhen data exists for a system that is being modeled with the differential equations, Big Green can plot them on the same graph as its calculated output. Data should be entered in the "Data" text area. The first line should contain the names of the variables for which data exist, including "t". The variable names should be separated by commas. Each subsequent line, should contain the numerical values of each data point. The values should appear in the same order as the variable names on the first line, with values separated by commas.

Below is an example of data representing relative hare and lynx populations, as it could be entered in the Data area. The times (t) are years since 1900. The hare and lynx values are in thousands of pelts obtained by the Hudson Bay Company.

t, hare, lynx

0, 30, 4

1, 47.2, 6.1

2,70.2, 9.8

3, 77.4, 35.2

4, 36.3, 59.4

5, 20.6, 41.7

6, 18.1, 19

7, 21.4, 13

8, 22, 8.3

9, 25.4, 9.1

10, 27.1, 7.4

11, 40.3, 8

12, 57, 12.3

13, 76.6, 19.5

14, 52.3, 45.7

15, 19.5, 51.1

16, 11.2, 29.7

17, 7.6, 15.8

18, 14.6, 9.7

19, 16.2, 10.1

20, 24.7, 8.6

**Output **

The Big Green Differential Equation Machine provides two types of graphical output. In the first type of output, Integrated Solutions, the program uses a Runge-Kutta fixed-step method for the numerical integration of the differential equations between a starting time and an ending time. In the second type of output, Nullclines, is available for systems with two independent variables. Here the program numerically determines points where the derivatives of the independent variables are zero. These points provide a map of the nullclines, or zero-growth isoclines.

To switch between output modes, click on the appropriate tab on the left side of the output parameter area. Alternately you can select the appropriate item from the Output menu at the top of the window.

Integrated SolutionsWhen investigating integrated solutions, Big Green will plot the variables listed in the "Vertical var(s)" field against the variable entered in the "Horizontal var" field. If more than one vertical variable is to be plotted, the variable names should be separated by commas in the "Vertical var(s)" field.

Enter a beginning time in the "Time Start:" field and a final time in the "Time End:" field. The program performs the integration using the integral number of steps entered in the "Number of Steps:" field. A number of steps on the order of a couple hundred will produce a reasonable plot. However, the number of steps chosen is usually a compromise between speed and accuracy. Entering too few steps may lead to inaccurate integration. Entering too many steps may lead to a lengthy calculation time.

When the "Calculate" button is pressed, Big Green will attempt to calculate an integrated solution to the differential equations. The progress of the calculation is represented by the progress bar to the right of the Calculate button.

For the hare-lynx example, reasonable values are:

Vertical var(s): hare, lynx

Horizontal var: t

Time Start: 0 Time End: 40 Number of Steps: 200For systems with data, Big Green will give the mean square deviation between the calculated values and the data.

NullclinesFor systems with two variables, the Big Green Differential Equation Machine can also plot nullclines, the curves where the derivatives are equal to zero.

One of the two independent variable should be entered in the "Vertical var" field while the other independent variable is entered in the "Horizontal var" field. Minimum and maximum limits for the vertical and horizontal variable must be entered in the appropriate fields. The numbers of steps entered in the "Vertical steps" and "Horizontal steps" fields determine how many points Big Green will calculate along the nullclines. Numbers of steps on the order of a hundred is often sufficient.

For the hare-lynx example, reasonable values are:

Vertical var: hare

Horizontal var: lynx

Vertical min: 0

Horizontal min: 0

Vertical max: 80

Horizontal max: 80

Vertical steps: 100

Horizontal steps: 100

** Menus **

File Menu

NewSelecting New will clear all input, parameters, output, and graphs.

Open Input File...The Big Green Differential Equation Machine will read data and parameters previously saved with the Save Input File option.

Save Input File...The Big Green Differential Equation Machine will write a text file containing the Title/Name/Notes, Variables and Derivatives, and Data text areas, as well as the plotting parameters for both the integrated solutions and the nullcline plots.

Save Plot File...The Big Green Differential Equation Machine will save the currently displayed plot as a file in png image format.

Output Menu

Plot DataSelecting this option will toggle the plotting of optional data on and off. Data points are plotted as solid squares or circles, with light dashed lines between.

Display Calculations as TextWhen this option is selected, Big Green will display calculated values in the feedback text area below the plotting parameters. For integrated solutions, Big Green will list the time, the value of each variable, and the value of each variable's derivative, for each calculated point. For nullclines, Big Green lists estimates of all points found where the derivative of either of the two independent variables is zero.

The data are separated by tab for easy copying and pasting into other applications such as Microsoft's Excel.

For systems with data and when calculating integrated solutions, Big Green will reproduce the data in the feedback area and give an estimate of the calculated value at each data point.

Help Menu

About The Big Green Differential Equation Machine...Selecting the About the Big Green Differential Equation Machine menu will show the version number for the Big Green Differential Equation Machine.

Help for The Big Green Differential Equation Machine...Selecting Help for the Big Green Differential Equation Machine will display this help file in a separate window.