Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Instructions for Using Winplot

Winplot is a graphing utility written and maintained by Richard Parris, a teacher at


Phillips Exeter Academy in Exeter, New Hampshire. The program is "totally free" and
the newest version can be downloaded from Parris’s web site at
http://math.exeter.edu/rparris/winplot.html . All of the Winplot modules have fairly
thorough Help menus which give detailed information about the workings of the
program. An online database for Winplot and related programs can be found at
http://www2.spsu.edu/math/Dillon/Peanutdocs/ . This database includes a Winplot
tutorial in pdf format, so you will need Adobe Acrobat to view it. The reader is referred
to these other sources for features not discussed in this tutorial.

Getting Started

Graphs in 2D
Changing the viewing window
Plotting the graphs of equations
Mathematical calculations and demonstrations
Saving, printing and copying a graph

Graphs in 3D
Entering equations and viewing surfaces
Some View Menu Options

Plotting Phase Space Trajectories of Differential Equations


Plotting the direction field of a vector fields in 2D
Generating Phase Space Trajectories for Second Order Differential
Equations

Contacting the author of this tutorial

Upon launching Winplot you will see the following introductory screen.

By clicking on Window you will be presented with the following two plotting options:
2-dim Allows you to generate plots in the x, y plane.
3-dim Allows you to generate plots of surfaces or space curves in x, y, z space.
Guess Gives you a graph; you then guess the equation. If you choose Select in the
guess my equation box shown below
you can select the type of graphs that will be displayed.

If Open last file is checked, then for any option chosen the last file saved will
automatically appear in the chosen window. If Use defaults is checked a standard
viewing window for each type of plot will be initialized. Mapping provides a way to
visualize the graph of a function that maps two-dimensional space to two-dimensional
space. This is especially pertinent for calculus students as they study integration in two
dimensions.

Graphs in 2D
Changing the viewing window

From the introductory screen choose Window 2-dim . You will then see a window
containing an x, y grid. The appearance of this viewing window can be altered using the
View pull down menu.

To change the plot window use the command View. This brings up the following menu.

If the upper right “radio button” or check circle entitled “set corners” is selected you
can set the window’s lower left (left, down) and the upper right (right, up) coordinates
by just entering the appropriate values.Click on the upper right "radio button" or check
circle entitled "set corners". This allows you to set the window’s lower left (left, down)
and the upper right (right, up) coordinates by just entering the appropriate values. In
reference back to the first View menu, if the scales on the two axes are not equal (so
that circles don’t look circular), you can use the command sequence Zoom/Square to
make them so. Click Fit window to make all active examples fit within the window.
Because this might not be possible, results are sometimes unpredictable. Restore returns
to the default window settings. Axes selects the axes menu which allows you to control
how x and y axes are displayed.

The Grid dialogue box allows you to display a Cartesian or polar grid by clicking the
appropriate radio button. If "both" is selected both x and y axes are displayed. Checking
either "x" or "y" displays only the axis selected. If "polar" is selected you can specify
the number of sectors by clicking on the square to the left of "polar sectors" and
entering the number to the right.

Check "labels" to put the letters 'x' and 'y' into the diagram. If you check "arrows", you
get small arrows at the ends of the axes. Check "ticks" to put equally spaced marks on
the axes. The distance between successive ticks is the value of "interval". Click on
"scale" and "mark scale on axes" to put the corresponding numerical values next to the
ticks. Click on "scale" and "mark scale on border" to place the numbers at the edge of
the window. The number of decimal places displayed is entered as "places". If there are
too many values showing, enter a higher number in the corresponding "freq" box.
Check "pi" if you want the ticks labeled using multiples of pi. For this last option to be
effective, the corresponding tick interval should be a rational multiple of pi with a small
denominator and the font in the “Scale on axes” option of the Misc/Fonts menu should
be set to “Pi symbol”. If “rectangular” is checked, grid lines appear in the quadrants
checked. If "dotted" is checked, you will see an array of small crosses where the grid
lines would meet. The polar grid can be on at the same time as the rectangular grid. To
effect the changes of this menu press the "apply" button.
You can insert text into the graphing window by use of the mouse buttons. First use the
"Btns" pull down menu to make sure that the Text option is checked. Second place the
mouse pointer at the spot where you want to enter text, click the right mouse button, and
type in the desired text. If you wish, you can change both the color and font of the text.

To insert a circular dot at a point go to the Equa pull down menu and select Point. In the
dialogue box give the point’s coordinates. The value of "dot size" determines the
diameter of the dot and the color can be adjusted via the color button.
Plotting the graphs of equations

To see a graph in Winplot you must either Open an old Winplot file (files with the
extension wp2), or else enter a new equation by clicking on the Equa menu. There you
will be presented with the following four options for generating curves.
1) Explicit Graphs y as an explicit function of x .

2) Parametric Graphs parametric curves of the form x = f (t ), y = g(t ) for f and g


explicit functions of some parameter t .
By letting g(t ) = t this in effect allows you graph x as an explicit
function of y, i.e., x = f (y) .

3) Implicit Graphs implicit relations between x and y defined by a formula f (x, y) =


constant.

4) Polar Graphs polar curves where the polar coordinate r is an explicit function,
f(t), of the polar angle theta (here
designated as t).

Clicking Explicit from the Equa menu results in the following dialogue box.

By typing over the “f(x) =” box you can enter an expression that defines y as a function
of x. Click the “color” button to obtain the color palette and click the small box that
shows the color you want for the graph. You can type an integer into the “plotting
density” box to alter the density of plotted points. This is rarely necessary. If you want
to specify the domain of the function enter the interval in the boxes “low x” and “high
x” and then click on the box “lock interval”. This overrides the default which is to use
the interval defined by the plot window as the domain. More than one graph can be
displayed in the same graph window. Just return to the Equa menu and repeat the
procedure outlined above. In fact, you can mix graphs of y as a function of x with polar
curves, parametric curves, and implicit curves by simply using the different options for
entering equations.

By choosing Inventory from the Equa menu you access the inventory dialogue box.
This allows you to inspect and edit any of the equations already entered and perform
other modifications and constructions. To select an equation, click on it with the mouse.
Only one example can be selected at a time.
The Inventory options include the following:

edit – This button opens the dialogue box that was used to create the curve and allows
you to make changes.

delete – This button causes the curve to disappear from the inventory and from the
screen. There is no "undo". All equations that are dependent on the equation are also
deleted.

dupl – This button copies the selected equation and opens the editing dialogue. This
allows you to create a similar example without changing the original. If you want to
keep the original as well as the copy be sure to click no to the prompt “delete original?”.

clip – This button copies the text of the defining equation to the clipboard where it can
be pasted into other applications.

derive – This button calculates the derivative of the selected curve. This option only
applies to curves defined by the Explicit, Parametric or Polar options. The result is
graphed and added to the inventory. A derivative can therefore also be selected, but only
its attributes (color, thickness, etc.) can be edited.

name – This button gives a selected equation a name which appears in the inventory.

hide graph – This button hides the graph of a selected equation without removing it
from the inventory. A second click restores the graph.
show equa – This button displays the text of a highlighted equation in the upper left
corner of the graph window. A second click removes this display.

web – This button overlays a web diagram which is an iteration used to locate fixed
points of a curve of the type y = f(x). You can specify the starting x-value, the number
of steps, and the color of the overlay. To generate the web diagram select "define". To
delete the web diagram select "undefine".

family – This powerful feature allows you to display a family of curves generated from
a selected equation. The equation must be defined with one or more extra parameters.
For example, the equation y = sin(ax)+b defines a sine wave that depends on the two
parameters a and b. Either one of these can be used to create a family of curves. To vary
the frequency type "a" into the "parameter" box, enter a range of values by filling in the
"low" and "high" boxes, and indicate the number of curves to be drawn by filling in the
"steps" box (this is one fewer than the number of curves). Click "define" to generate the
family. This also modifies the definition of the equation in the inventory. To remove the
family, select the equation and click "undefine".

table – This button opens a text window that displays values of the selected function for
curves defined by the Explict, Parametric, or Polar options. You can alter the contents
of the table by clicking "Params" on the menu bar. To see tables for a different equation
use the command sequence "File/Next example".

Winplot like a graphing calculator has built-in "Zoom" features. To "Zoom in" and thus
obtain a close up view of a smaller portion of the x, y plane choose Zoom/In from the
View menu. Similarly, to "Zoom out" choose Zoom/Out from the View menu. If you’re
not happy with the new image choose Last window from the View menu.

When entering formulas in Winplot the following conventions are used:

Multiplication is indicated by *
Division is indicated by /
Addition is indicated by +
Subtraction is indicated by -

Exponentiation is indicated by placing the ^ (caret symbol) between the expression for
the base and the expression for the exponent. The caret is the upper case of 6 on the
keyboard.

Actually, Winplot does recognize algebraic notation. For example, "two times ex", can
be entered either as 2x or 2*x . Similarly, "three times ex cubed", can be entered as
3x^3 or 3*x^3 or 3*x*x*x or even as 3xxx. The only valid grouping symbols are
parentheses ( ), but these may be nested as in (6x - x^(sqr(5)+3))/(5x + 2). The rules for
the order of operations are the conventional ones used in mathematics and science.

Certain standard functions are "built into" Winplot, but the arguments must always
appear in parentheses. For example, "the sine of 3 times x" should be written as sin(3x).

The names of the principal "built in" functions are given below.

abs(x) is the absolute value of x


sgn(x) is the signum or sign function = abs(x)/x
sqr(x) is the square root of x (for non-negative x)
root(n,x) is the principal n-th root of x
fact(n) is n!
exp(x) is the exponential function evaluated at x
ln(x) is the natural logarithm function for positive x
log(x) is the base 10 logarithm function for positive x
sin(x) is the sine of x (All trig functions assume the argument is in radians.)
arcsin(x) is the arc or inverse sine
cos(x) is the cosine of x
arccos(x) is the arc or inverse cosine
tan(x) is the tangent of x
arctan(x) is the arc or inverse tangent of x
sinh(x) is the hyperbolic sine of x
cosh(x) is the hyberbolic cosine of x
tanh(x) is the hyberbolic tangent of x

pi is the constant pi=3.14159265… To multiply pi and x, enter pi*x, not pix.

More information about “built-in” functions can be found in the file Equa/Library.

As an example, suppose you want a graph of the cubic polynomial


From the Equa menu select Explicit and enter the formula as shown below.

Clicking the "ok" button results in the following: (the grid settings used are also
displayed)

Suppose now we click Polar from the Equa menu. This results in the following dialogue
box for a polar curve. This second curve will be graphed along with the previous
polynomial.
The usual theta domain for polar curves will include at least zero to 2pi. Entering 2pi for
"high t" is the same as entering
6.28319 . The result of graphing both curves in the graph inventory is shown below.

Suppose we wanted to graph the ellipse centered at (2, -1) with major axes parallel to
the x axis, a semi-major axis of 3, and a semi-minor axis of 2. Since y is not a function
of x for this figure, a single y = f (x ) graph can not generate the plot. However, we can
graph it by using the parametric input mode. Selecting Parametric from the Equa menu
and entering the formulas shown below generates the correct result.
The standard equation of this ellipse is . An alternate way to
graph it is to use the implicit input mode. The equation generating the graph must be
stated as f(x, y)= constant. The points on the curve are generated by a numerical search.
If the "long search" option is checked the program will continue searching for points
until you press "Q" (for quit). Failure to type "Q" causes the program "to hang". Implicit
from the Equa menu and entering the formula shown below generates the graph shown.
Mathematical calculations and demonstrations

In addition to graphing equations Winplot can perform numerical and graphical


procedures on curves. These options are found in the Anim, One, Two and Misc menus.

The Anim menu provides for some of the most dramatic and illuminating
demonstrations available in Winplot. In Winplot the letters a ... z always have a
numerical value, and letters other than x, y, and z can be used in equations as
parameters as was discussed in the Inventory/family option. The value of such a
variable can be altered using the scrollbar dialogue boxes listed in this menu. The box
labeled by the upper case name of each parameter controls the values of that parameter.
When a parameter value is changed, all parameter-dependent graphs, including vector
field plots generated under the Equa/Differential option, change accordingly.

The values of a parameter vary from its lowest or left-most value "L" to its largest or
right-most value "R". These values can be entered and then set with the buttons "set L"
and "set R". Within this domain the value of the parameter can be set manually by
moving the scroll bar. This process can be automated by pressing the "autorev" or
"autocyc" buttons. The "autorev" option varies the parameter according to the sequence
L…R…L:… R… , while the "autocyc" option uses the sequence L…R L…R L…R. In
both automatic modes the dialogue box disappears and you must press "Q" to stop the
animation and restore normal program control. By default there are 100 intermediate
values for the parameter between the L and R values. This number can be changed by
clicking on the "1=Scrollbar units" item. In addition, the number of different values of
the parameter for which graphs are displayed in “autorev” or “autocyc” mode can be
controlled by checking “autoshow” the entering the number of “slides” to be displayed.
The linked window option allows a second graph window with a curve controlled by a
parameter to be simultaneously displayed.

As an example, suppose we wish to animate the parameterized function f (x) = sin(a*x)


+ b . Use the Anim menu and select A and B in succession to set the range for each
parameter. In the figures shown below B was set to 0 and A varied from 0.1 to 10.
The One pull down menu lists procedures that Winplot can do to one function at a time.

1. To "trace" along a curve select Slider. A scroll bar appears along with a
crosshair cursor that slides along the non-implicitly defined curves in the
graphing window. If there are multiple curves in the graph’s inventory, use the
drop-down list at the top of the dialogue box to select the desired equation. The
cursor will move along the curve and the tracer box will display its coordinates
as you slide the scroll bar. You can position the cursor by entering a value for
the independent variable into the edit box. To save a cursor position in the
inventory press the "mark point" button. Use the "degree" drop-down list to set
the degree of a Taylor polynomial of a curve of the y = f(x) type calculated at the
current cursor position. Press the "Taylor approx" button to display a graph of
this approximating polynomial. This Taylor polynomial will then be added to
the graph’s inventory. If "secant demonstration at" is checked and a fixed point
on the curve has been set using the "base point" button, the program will graph a
moving secant line to the curve as the scroll bar is moved. If "tangent-line
demonstration" is checked, the program will graph a moving tangent line to the
curve as the scroll bar is moved.

2. To find the roots or x intercepts of a graph y = f(x), select the Zeros dialogue
box. If there are multiple equations in the graph’s inventory use the drop-down
list at the top of the dialogue box to select the desired equation. Step through the
equation’s roots from left to right by clicking on the "next" button. After you
have found the roots of a function, you can see a list of these zeros by selecting
Data/Inspect from the Misc pull down menu.

3. To find the extremes (maximums and minimums) of a graph y = f(x), select the
Extremes dialogue box. If there are multiple equations in the graph’s inventory
use the drop-down list at the top of the dialogue box to select the desired
equation. Step through the extreme values from left to right by clicking on the
"next extreme of " button. After you have found the extremes of a function, you
can see a list of these results by selecting Data/Inspect from the Misc pull down
menu.
4. The Measurement menu allows for a variety of numerical approximations to
definite integrals.

To approximate integrals of y = f(x) select the Integration dialogue box. If there


are multiple equations in the graph’s inventory use the drop-down list at the top
of the dialogue box to select the desired equation. Enter values into the "lower
limit" and "upper limit" boxes and specify a value for the number of
"subintervals" (n). Indicate with the check boxes which numerical quadrature
methods (parabolic is Simpson’s rule ) are to be used. If "overlay" is checked,
the program will graphically illustrate the approximation. Press the "definte"
button to display the numerical results of the approximations. The number of
decimal places shown can be adjusted with the command sequence
Misc/Decimal places. The "indefinite" button generates the graph of the
antiderivative of f(x) that is zero at the lower limit of integration. This function is
then also added to the inventory.

The Area of a Sector option evaluates the area of the sector (centered at the
origin) swept out by a selected arc defined by a non-implicit curve. If there are
multiple equations in the graph’s inventory use the drop-down list at the top of
the dialogue box to select the desired equation. The starting and ending values of
the independent variable are entered into the “arc start” and “arc stop” boxes
respectively. Specify a value for the number of “subintervals” (n) and press the
“area” button to obtain the numerical result.

The Length of arc option computes the arc length of a non-implicit curve. If
there are multiple equations in the graph’s inventory use the drop-down list at
the top of the dialogue box to select the desired equation. The starting and
ending values of the independent variable are entered into the "lower limit" and
"upper limit" boxes respectively. Specify a value for the number of
"subintervals" (n) and press the "length" button to obtain the numerical result.

To compute a volume of a solid of revolution select Volume of revolution. If


there are multiple non-implicit function equations in the graph’s inventory use
the drop-down list at the top of the dialogue box to select the desired equation.
The starting and ending values of the independent variable are entered into the
"arc start" and "arc stop" boxes respectively. Specify the axis of rotation by
either selecting the x axis, the y axis, or by entering values for a, b, and c in the
equation ax + by = c . Enter a value for the number of "subintervals" (n) and
press the "volume" button to obtain the numerical result. To compute the surface
area of a solid of revolution select Surface area of rev and follow the same
procedure as for a volume of revolution, but press the “area” button to obtain the
numerical result.

To see a three dimensional solid of revolution select Revolve surface If there are
multiple equations in the graph’s inventory use the drop-down list at the top of
the dialogue box to select the desired equation. The starting and ending values of
the independent variable are entered into the "arc start" and "arc stop" boxes
respectively. Specify the axis of rotation by either selecting the x axis, the y axis,
or by entering values for a, b, and c in the equation ax + by = c . Press the button
“see surface” to display a 3D perspective plot of the solid which you can rotate
by using the left, right, down and up arrow keys.
5. To reflect a curve about a given mirror line choose the Reflect option. The
mirror line can be specified as the x axis, the y axis, the line y = x (this generates
the inverse relation to the original curve) or any line of the form ax + by = c .
After designating the mirror line, press the reflect button to perform the
reflection.

The Two pull down menu lists four procedures that Winplot can do to two functions at a
time.

1. To find the points of intersection of two curves select the Intersections dialogue
box. If there are more than two functions of this type you choose which two to
use by using the drop-down lists. The "next intersection" button is used to find
the next meeting point. Only points of intersection within the graphing window
are found. The results are added to the data text file and may be viewed by
selecting Data/Inspect from the Misc pull down menu. The intersection
coordinates may be saved to variables and the "mark point" button can be used
to highlight them on the graph.

2. To add, subtract, multiply, divide, exponentiate or compose two functions select


the Combinations dialogue box.
3. To numerically approximate the difference of two functions select the Integrate
dialogue box.

From the Equa menu Shading can be used to shade the area between two curves over a
specified domain.
4. To visualize 3D solids that have a base in the x, y plane and specified cross
section select Sections. The base is the region between two curves each defined
by an equation of the form y = f(x). The specified cross sections are generated by
planes perpendicular to the x axis and may be chosen from a variety of
geometric forms. Pressing the "see solid" button displays a 3D perspective plot
which you can rotate by using the left, right, down and up arrow keys. The
“volume=” button displays a numerical approximation to the definite integral
representing the solid’s volume.
Saving, printing and copying a graph

To save all of the equations, windows and related settings associated with a Winplot
graph choose Save or Save As from the File menu. Type in the desired file name and
click the "Save" button. If you want to save to a particular location, insert the path
before the file name or use the pull-down list to access the desired device or directory.
For example, to save a Winplot graph called "mygraph" to the floppy drive, type
a:\mygraph in the File name: box. To retrieve a graph, choose Open from the File menu
and give the desired path and filename of the previously saved Winplot file.

To print your graph:

1. Choose Format from the File menu. This opens the printing format dialogue
box. Here you specify the width of the graph to be printed and the vertical and
horizontal offsets of the graph from the upper left-hand corner of the page. A
width of 15 cm or 16 cm (5.9 in to 6.3 in) will fill up most of the width of a
page. Click on the "frame image" check box if you want a rectangular frame
around your graph. Click on the "color printer" check box if you have a color
printer and want your graph to print in color.
2. Choose Print from the File menu and press the "OK" button.

To paste a copy of a graph into another Window’s application (such as a word processor
or a graphics editor) choose "Copy to clipboard" from the File menu for applications
that recognize the Windows "metafile" format. If this doesn’t work, try "Bitmap to
clipboard" from the File menu.

Graphs in 3D
Many of the features (the inventory dialogue box, the conventions for entering formulas
and function names, the insertion of text, the use and control of parameters, the printing
and saving of files, etc.) of Winplot’s 2D graph module are implemented identically in
the 3D graph module.

Entering equations and viewing surfaces

There are six primary ways of generating a 3D graph by entering an equation.

1) Explicit Graphs a surface with z as an explicit function of x and y.


2) Parametric Graphs a parametric surface of the form x = f (t, u), y = g(t, u), and z =
h(t, u), for explicit functions f , g and
h and a pair of parameters t and u .
3) Implicit Graphs an implicit surface defined by the relationship expressed in the
equation f(x, y, z) = constant.
4) Cylindrical Graphs a surface with z as an explicit function of r and t , where r and t
are polar coordinates.
5) Spherical Graphs a surface with r (the spherical coordinate “Rho” or distance from
the origin) as an explicit function of t
(the spherical coordinate theta, the azimuthal angle about the z axis) and
u (the polar coordinate phi measured
from the z axis).
6) Curve Graphs a parametric space curve of the form x = f (t), y = g(t), and z =
h(t), for explicit functions f , g and h of
a single parameter t .
For surfaces generated by explicit functions it is probably best to use the "quick"
drawing mode. This provides greater speed and ease in both generating and modifying
surfaces. This option is on when the item Fast draw mode is checked in the View menu.
For this reason it is probably more convenient to generate a surface with several explicit
formulas rather than use a single implicit formula. For example, to generate the surface
of the elliptic hyperboloid of two sheets described by the equation

solve for z and graph the following explicit functions:

Using these two Cylindrical equations generated the figure shown below.
Below is a bitmap copy of an Explicit surface generated using the fast draw option.

This same surface could be generated using a parameter in the decaying exponential as
shown below. This parameter could then be controlled from the Anim menu to give a
dynamic "breathing" surface!

Clicking Explicit from the Equa menu results in the following dialogue box.
Define the domain of the function by entering the extreme values for x and y. Only
rectangular domains are allowed. This means a surface whose base is a region in the x, y
plane defined by non-constant boundary functions of y in terms of x or x in terms of y
can not be generated by this option. The methods for drawing the graph make use of the
x and y division values. Increasing these gives a "smoother" graph but at the expense of
greater computation time. The upper and lower sides of the surface will be shaded
differently if the "shade" box is checked and if different colors are picked via the "col 1"
and "col 2" boxes. Click on the "ok" button to see the graph.

In the following example the value of the parameter A was set at 0.24 by the scroll bar
selected from the Anim menu.
To compute a numerical approximation to the double integral of f (x, y) over its
rectangular domain choose Integrate from the One pull down menu.

The procedure for entering a surface z = f(r, t) in Cylindrical mode is essentially the
same as for entering a surface with
z = f(x, y) . Entering a surface in Spherical mode is similar, but one needs to remember
that it is the radial distance rather than the z coordinate which is given as a function of
the spherical angles.

From the Inventory menu you can select “levels” which generates level curves for a
given surface.

Enter a value into the box labeled “level values for z”. For surfaces defined by the
Explicit option the surface from z = “low” to z = “high” is sliced by this number of
equally spaced planes parallel to the x, y plane. The intersections between each plane
and the surface are then projected onto the x, y plane resulting in a given level curve.
The location of these intersection points involves a numerical search. The quickest
method is press the “auto” button and let the program search over all the levels in
succession. For some of the level curves this may miss some points. If this happens you
can refine the search by specifying the value of z in the “curr” box and press the “search
curr” button. Because the program does not know when to stop, it is necessary to press
“Q” to quit. To obtain a contour plot press the button “see all”. This draws all of the
level curves in a single 2D graph. To superimpose the level surfaces onto the 3D
perspective surface plot uncheck the “Fast draw all” item in the View menu.

Graphs of implicit surfaces f(x, y, z) = constant are generated by using the "levels"
menu. Choose a level by selecting one of the three coordinate variables x, y or z and
entering a value for that variable into the "current level" box. To see the level curves in
the 2D window, click the "search level" button. The program will search for starting
points and then draw the resulting contours, until you press "Q" to quit that level. The
level values can be chosen individually, or you can set up a uniform selection by
entering a count into the "level values for" box and extreme values into the "low" and
"high" boxes. Click the "next level" or "previous level" buttons to enter a value into the
"curr" box for you. As before, clicking the "auto" button will automatically search each
level.

As the level curves are found, they are displayed in a 2D window and entered into a
drop-down inventory box. You can delete unwanted curves from this list. When the
level-curve inventory for the surface is satisfactory, click the "keep changes" button to
exit the dialog and see the levels in 3D perspective. If you click the "discard changes"
button, all editing is ignored and no changes are made to the 3D figure.

As an example of entering a space curve consider the periodic trajectory defined as


follows:

The parameter t could be interpreted as the polar angle theta. For this curve to "retrace"
itself the domain of t needs an interval of length 4*pi. Sample inputs and outputs for this
trajectory are shown below.
Some View Menu Options

As in Winplot’s 2D graph module the View menu in the 3D module allows you to alter
the appearance of graphs.

Checking Axes displays x, y, and z axes in the 3D plots. This is useful in establishing
the orientation of the figure.
Rotate changes orientation. In particular, adjusting Up (use the up arrow key), Down
(use the down arrow key), Turn (use the right arrow key), or Back (use the left arrow
key) rotates the figure. Pressing the up arrow decreases the polar angle, “phi”, by a fixed
amount (the default is 6 degrees, but this can be reset in the Angle dialogue box).
Pressing the right arrow key increases the azimuth, “theta”, about the z axis by this
same fixed amount.

Zoom/Out (use the Page Down key) shrinks the size of the figure by a fixed ratio (the
default is 1.1 but this can be changed in the Zoom/Factor dialogue box). Similarly,
Zoom/In (use the Page Up key) increases the size of the figure.

Plotting Phase Space Trajectories of Differential


Equations

The Differential option from Winplot’s 2-Dim Equa menu can generate graphs of slope
fields and solutions for first order differential equations (the dy/dx option) or graphs in
two dimensional phase space for a system of first order differential equations in two
dimensions (the dy/dt option). Such systems are often referred to as dynamical systems
and even an introduction to such problems is outside the scope of this tutorial. The
discussion here will be limited to using the dy/dt module to plot the direction field of a
vector field or to generate phase space trajectories for second order ordinary differential
equations.

Plotting the direction field of a vector fields in 2D

The 2-dim Differential dy/dt module is designed to generate plots in x, y space of


solutions to the dynamical system defined by the first order system:
If the functions F and G are independent of the parameter t the system is called
autonomous. Suppose this is the case, then from the chain rule

Thus, the solutions in x, y space follow the direction of the vector field

To plot the direction field of a vector field use the 2-dim Differential dy/dt module as
follows:

1. From the Equa pull down menu choose the Differential dy/dt option.
2. In the dialogue box shown below enter the equation for F(x, y) in the box for x
prime.
3. Enter the equation for G(x, y) in the box for y prime.
4. Click on the "vectors" radio button.
5. Adjust the color, the length of the vectors in "lengths (pct of screen width)", and
the number of "horizontal rows" to give a reasonable graph within the graph
window.
6. If necessary, change the graph window parameters in the View menu

This is illustrated in the following two examples.

Example 1: Plot the direction field of the radial vector field


Example 2: Plot the direction field of the circulating vector field
Generating Phase Space Trajectories for Second Order Differential Equations

The use of phase space to describe solutions of second order ordinary differential
equations is introduced in the following web site:
http://matcmadison.edu/alehnen/webphase/sld001.htm.

To plot the phase space trajectories of a second order ordinary differential equation use
the 2-dim Differential dy/dt module as follows:

1. From the Equa pull down menu choose the Differential dy/dt … option.
2. In the dialogue box enter y in the box for x prime.
3. Enter the equation for the second derivative of x in the box for y prime.
4. Click on the "vectors" option. This plots the unit tangent field of the trajectories.
5. Adjust the color, the length of the vectors in "lengths (pct of screen width)", and
the number of "horizontal rows" to give a reasonable graph within the graph
window.
6. If necessary, change the graph window parameters in the View menu
7. From the One menu select dy/dt trajectory to access the IVPs dialogue box to
superimpose on the unit tangent field particular solutions corresponding to
various initial conditions. The radio button "fwd" runs these solutions forward in
the parameter t. The radio button "rev" runs these solutions backward in the
parameter t. The radio button "both" runs these solutions both forward and
backward. Pressing either the "draw" or "watch" buttons graphs the solution in
phase space. If you choose "watch", you can slow the drawing of the solution by
entering a positive number in the "delay" box. Additional solutions are entered
by entering additional initial conditions. Each new solution is added to the
inventory list. Remove any unwanted solutions by highlighting them and
clicking the "delete" button.

This is illustrated below for the second order differential equation describing a simple
pendulum.
These notes were authored by Al Lehnen, a math instructor at Madison Area Technical
College in Madison, Wisconsin.
I welcome any comments and suggestions. Please feel free to E mail me at
alehnen@matcmadison.edu or write to me at the following address.

Madison Area Technical College


3550 Anderson Street
Madison, WI 53704

My special thanks to high school math instructor Beverly Leacock of Lewisville, Texas
who has updated and modified these notes for her colleagues and students and whose
suggestions have helped me to improve this document.

You might also like