**Plotting Applet**

The purpose of this applet is to plot functions. It can plot up to 10 different functions at the same time. It can also be used to solve equations numerically. Here is a brief description of how to use this applet and what its features are.

- The
**Viewing Window Parameters**area is used to set the area of the graph the user wishes to see. Use it as follows:- The size of the viewing window is determined by the four numbers
,**XMin**,**XMax****YMin**.**YMax** - Specify the desired values for
,**XMin**,**XMax****YMin**. The applet will do basic error checking. The user can enter a number or any expression which can be evaluated as a number. Scientific notation is allowed (as in 2.1E3). When plotting trigonometric functions, the range can be specified as multiples of pi. For example 2*pi can be entered (the system recognizes pi as the number we all know 3.14159...). Any entry which, once evaluated doe not produce a number, will result in an error being displayed in the Messages area, and the focus will remain in the field which caused the error, until the error is fixed.**YMax** - When
**Use y-range**is checked, the supplied values for the y-range will be used. Otherwise, the applet will find**YMin**and**YMax**from the supplied functions. - Any change in this area will cause the Plot Area to be updated immediately.

- The size of the viewing window is determined by the four numbers
- The
**Function Information**area is where the functions to be plotted are entered. Use this area as follows:- To enter a new function, always press the
**New Function**button. Then, enter the expression defining the function. The syntax is similar to the syntax used in the Java Math Engine. For example, to define the sine function, you would type in. Make sure you use**sin(x)**for the variable in your definition. This field supports the syntax of the Java Math Engine. This site provides further help on the syntax the Java Math Engine understand.**x** - A maximum of 10 functions can be defined at the same time.
- Checking
**Active**means the function will show on the graph. Unselecting it means the function will not show. - Use the + and - buttons to scroll through the list of defined functions.
- Each defined function has a different color assigned to it. The selection is automatic.
- When a function is defined, it is automatically assigned a name of the
form
where i is a number which starts at 1 and is incremented every time a new function is defined. The name a function will be saved under appears to the left of the field where it is defined.**fi** - Once a function is defined, its name can be used in the definition of
other functions. For example, if two functions have been defined, the
definition of function 3 could be
Note that we use**f1(x)+x*f2(x)**and not just**f1(x)**.**f1** - The functions defined will plot as soon as the field where the function was entered loses focus..
**Del Function**will delete the function currently showing. When deleting a function, make sure that it is not used in the definition of another function. An error would occur in this case. For example, ifand**f2(x) = x + f1(x)**is deleted, then the definition of**f1**contains an unknown symbol,*f2*.*f1***What can be plotted?**- Any valid mathematical expression. The restriction is that the independent
variable must be
. A mathematical expression is formed by using the independent variable**x**, operations, built-in functions and user defined functions. See the help in the Java Math Engine to learn more about expressions, variables, built-in and user defined functions. Here are some examples of what can be plotted**x** *x^3-5*x+4**sin(x^3)*yes, the derivative of a function can also be plotted!*diff(x^2-5)*- This site provides further help on the syntax the Java Math Engine understand.

- Any valid mathematical expression. The restriction is that the independent
variable must be

- To enter a new function, always press the
- The
**Zoom and Trace**area is where zooming and tracing take place. Use this area as follows:- There are different ways to zoom in and out.
**Zoom Box:**To**zoom**in, picture in your mind the rectangular region (box) you would like to zoom in. Left click on one of the corners of this imaginary region. While holding the mouse button down, move it to the opposite corner, then release it. As you move the mouse, a rectangle will be drawn to help you visualize the region. Once the mouse button is released, the graph will redraw to display the region you selected,,**XMin**,**XMax****YMin**will be updated.**YMax**- The user can also zoom in using
**PAGE DOWN**or out using**PAGE UP**. - The same effect can be achieved with the mouse wheel (if your mouse has one). Simply place the mouse pointer anywhere over the plot area, press and hold the
**ALT**key. While holding the**ALT**key, turn the mouse wheel. Depending on which direction it is turned, the plot area will zoom in or out. - Press the
**Reset****Zoom**button or the**HOME**key to go back to the original view (XMin = -10, XMax = 10, YMin = -10, YMax = 10).

- Tracing:
- To
**trace**, simply double left click in the plot area. A point will be generated by taking the x-coordinate of the point where you clicked and the y-coordinate on the function currently showing. - To move the point, use the
**Right**or**Left**buttons from the Zoom and Trace area. You can also move the point by using the right and left arrow keys, while the mouse pointer is over the plot area. The point will move on the function currently showing. By selecting a different function using the**+**or**-**buttons, you can select which function you want your point to follow. - The coordinates of the point will be displayed under
**X:**and**Y:**.

- To

- There are different ways to zoom in and out.
**Scrolling the plot area.**

The plot area can also be scrolled to view a different part of it as follows:- The user can use the mouse. Simply hold the
**SHIFT**key and click somewhere on the plot, then drag the mouse. As the mouse moves, the plot area will follow it. - The user can also use the keyboard. With the mouse pointer over the plot area, press and hold the
**SHIFT**key. While holding the**SHIFT**key, use the arrow keys to move in the desired direction.

- The user can use the mouse. Simply hold the
- The
**Control Buttons**area contains buttons which have a global effect for the applet.- The
**Clear All**button erases all the function definitions. - The
**Plot**button is used to update the plot area after changes in the other areas have been made. However, this button is not really needed as the Plot Area is updated as soon as any change is made.

- The
- The
**Messages**area is where the applet communicates with the user. Error messages as well as user information is displayed there. Errors are displayed in red, while information is displayed in black.

*This applet was developed by Dr. Philippe
B. Laval, at Kennesaw State
University.*

*This work was funded in part by:
*

The US Department of Education FIPSE #P116B00178