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.
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.
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.
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.
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 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.
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
6.28319 . The result of graphing both curves in the graph inventory is shown below.
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.
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.
- 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.
- 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.
- 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.
- The Measurement menu allows for a variety of numerical approximations to definite integrals.
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.
- 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.
- 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.
- To add, subtract, multiply, divide, exponentiate or compose two functions select the Combinations dialogue box.
- To numerically approximate the difference of two functions select the Integrate dialogue box.
- 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.
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:
- 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.
- Choose Print from the File menu and press the "OK" button.
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 .
Clicking Explicit from the Equa menu results in the following dialogue box.
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.
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.
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.
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.
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.
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:
- From the Equa pull down menu choose the Differential dy/dt option.
- In the dialogue box shown below enter the equation for F(x, y) in the box for x prime.
- Enter the equation for G(x, y) in the box for y prime.
- Click on the "vectors" radio button.
- 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.
- If necessary, change the graph window parameters in the View menu
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://faculty.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:
- From the Equa pull down menu choose the Differential dy/dt . option.
- In the dialogue box enter y in the box for x prime.
- Enter the equation for the second derivative of x in the box for y prime.
- Click on the "vectors" option. This plots the unit tangent field of the trajectories.
- 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.
- If necessary, change the graph window parameters in the View menu
- 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.
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.
Tidak ada komentar:
Posting Komentar