Direction Fields and Integral Curves
A differential equation dy/dx = g(x,y) corresponds to a "direction field" A direction field assigns to each point (x,y) in the plane the direction of a tiny line segment with slope g(x,y).
We can represent the direction at (x,y) by a vector (that is a little arrow) whose coordinates are
That is, the change in x along the little arrow is 1 unit and the change in y along the little arrow is g(x,y) units.
This page contains a Java applet which draws a picture of a given direction field. The direction field is represented by little line segments of the appropriate slope.
The applet is also able to draw integral curves of a direction field, that is, curves which are at each point tangent to the direction field. That means that the slope of the curve at (x, y) will be g(x,y). Such a curve is a solution to the corresponding differential equation dy/dx = g(x,y).
You can start a curve at a given initial point by clicking the mouse at that point. The curves are animated; they trace out a motion tangent to the direction field, moving in the direction of increasing x coordinate.
You can clear curves which have been drawn by using the Clear button.
Example 1. Direction field correponding to the LOGISTICS DIFFERENTIAL EQUATION,
dy/dt = r y (1 - y/a).
In this equation y(t) represents population density at time t,
the parameter "r" is some intrinsic reproduction rate of the species,
and the parameter "a" represents a sort of carrying capacity of the environment.
In this model, the rate of change of the population slows down as the population density increases towards the value a (and is actually negative if the population density exceeds a).
The population density always approaches the value a for large time.
Here I have taken the parameter "r" equal to 1 and the parameter "a" equal to 3. With these parameters, an appropriate time scale is 10 (in whatever time units we are using). That is, in 10 units of time, the population density will have gone from its initial value to a value close to a.
Example 2. Direction field correponding to the INTRAMUSCULAR INJECTION MODEL developed in class. The amount of medication in the blood satisfied the differential equation
B'(t) = a*50*exp(-at) - b* B(t),
where a and b are parameters, which I take here to be 1.6 and (1/10) respectively -- close to the values used in class.
Note that the corresponding direction fiield will be that which has the following slope at a point (t, y):
a*50*exp(-at) - b* y
dy/dt = sin(t*y)
This gives a wiggly direction field with interesting looking integral curves. It's just here for the fun of it.
The Java program used here is adapted from
Java Components for Mathematics
Hobart and William Smith Colleges
The source and other applets from this project can be found at:
I am grateful to the members of the JCM project for making this excellent tool available.