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

Quick Start for Beginners

The purpose of this help file is to show pre-calculus students how to use the JKGraph program to graph a
function. There is another tutorial help file that is 103 pages long that introduces more of the advanced features
of the JKGraph program that are used to analyze functions. This Quick Start for Beginners help file is
deliberately brief because it assumes you just want to quickly learn how to enter a function and have the
program make the graph. The steps we will demonstrate are basically the same ones you would perform if you
were using a graphing calculator. You could think of JKGraph as a graphing calculator for computers that is
on steroids!

For this quick start tutorial let's assume you want to enter and graph the function given by the formula:

$B#  "'B
0 ÐBÑ œ
B(

First, look at the toolbar and note the group of gray-colored buttons.

The fourth gray button from the left may take on any one of the five following captions where Y=F(X) is the
default.

Each time you left-click this same button its caption will change. For each next left-click that same button will
show the next caption in the above sequence of captions and it will wrap around and re-make the first caption.

If the 4th gray button does NOT show you need to left-click that button enough times until its caption
shows Y=F(X) which means Y is expected to be a function of the variable X.

When the 4th button's caption shows Y=F(X) then you can right-click that same button to bring up the
dialog box for entering and editing the current function formula. You should see a dialog box similar to the
following:

page 1
Of course the formula that appears in the first edit box 3*SIN(X) will need to be changed to your formula.

$B#  "'B
To type in the function 0 ÐBÑ œ you should enter only the right side of this equation by typing the
B(

expression (3*X*X-16*X)/(X-7) in the first edit box. The edit box should look like:

You have to type everything on one line. All operations must be explicitly entered. There are no implied
multiplications so you must type a * character for a multiplication. You also use / for division, and for the
current function formula you must use grouping symbols for both the numerator and denominator of the
algebraic fraction.

The subexpression part $B# is entered by typing 3*X*X. This could also be entered by typing 3*SQR(X) or by
typing 3*X^2. However, using the exponential ^ operator is not as accurate as writing either 3*X*X or
3*SQR(X) because when an expression with ^ gets evaluated the program computes a logarithm and an anti-
logarithm and these two operations can introduce rounding errors. So it is best to avoid using the ^ operator
when an exponential expression has a small positive integer exponent. Note that SQR( ) is the squaring
function whereas SQRT( ) is the inverse that is the square root function.

page 2
In addition to entering a formula, you normally specify an interval domain for that formula. In the above dialog
box you can see you have the option of including or excluding the endpoints of the interval by checking or
unchecking the check boxes for the starting and ending interval values. Thus your domain interval may be open
or closed or half-open.

The default range in the above example allows B to vary between -100 and +100 and this should be sufficient
for most functions. However, it is important to know that the range you specify here has little or nothing to do
with the domain you will use for your graph. When entering a function formula using the above dialog box you
should normally always make the interval as large as you will ever need for any computations or graphs that
you will make. It does no harm to make a large interval that includes more values than what you know you will
be using in a graph. Of course you must insure you don't violate the domain of your function. So if you were to
enter a logarithm function you should not use an interval like -100 to  100, but you could enter an interval
like 0 to  100 provided you excluded the left endpoint.

The only other significant setting is the choice of the Function Curve Type that can be made using Discrete
Points or Connected Points.

The default is Connected Points. We will show the difference between these two settings later in this help file.
When you click the OK button to close the above formula dialog box the JKGraph window may look like the
following:

page 3
The upper part of the graph in the first quadrant looks like it is cut off a little bit. Thus this first graph may not
be totally satisfactory. As with most graphing calculators, we need to define the rectangle that determines what
is shown in the main window. To do this you should right-click the Zoom Mode button in the toolbar that
appears as either or . Note that left-clicking this Zoom Mode button does not perform
zooming. Left-clicking this button only changes the current Zoom Mode between In and Out. Whenever you
right-click a button in the toolbar you will bring up a dialog box that allows you to edit items associated with
that button. When you right-click the Zoom Mode button you should see a dialog box similar to the following.
This dialog box is what determines the rectangular section of the BC-plane that you see in the function graph
window.

There are four main values in the above dialog box that greatly affect what your graph looks like. Those four
values are the Graph X Minimum, Graph X Maximum, Graph Y Minimum, and Graph Y Maximum. In
general these four values determine the rectangular part of the BC-plane that makes the graph window. We call
these four numbers the BC-plane extent values. In particular, the Graph X Minimum and Graph X
Maximum values are unrelated to the function domain interval that you specify with your formula.

One other significant check box is the one that appears as . When this check box is
checked, then the program will automatically compute the Graph X Maximum value for you. You should turn
this check box off if the graph you are making does not have a 1-1 aspect ratio in both the B and C directions.
Otherwise, the program will not let you re-size your graph without having the program automatically compute
the Graph X Maximum value for you, no matter what value you may type in the edit box.

page 4
Note that our function should have a vertical asymptote at X=+7 and because this value is just out of range for
the graph, we don't see the vertical asymptote.

Uncheck the checkbox to and key in the following four values in the BC-plane extent
values edit boxes.

Graph X Minimum Value = -2.25


Graph X Maximum Value = 11.75
Graph Y Minimum Value = -2.18
Graph Y Maximum Value = 7.82

Then click the OK button to close the above dialog box. You should see the following graph.

Now we can better see the maximum of the function that occurs in the first quadrant. However, we still don't
see the vertical asymptote at X=+7 and we still don't see another major part of the graph. In the above graph the
grid lines partition the BC-plane into what look like little squares.

Now right-click the Zoom Mode button again and make the following changes to the BC -plane extent values.

Graph X Minimum Value = -2


Graph X Maximum Value = 15
Graph Y Minimum Value = -10
Graph Y Maximum Value = 70

page 5
After you click OK to close the dialog box you should see the following graph:

When you read the scales on the two axes you can understand that the above graph has been distorted, mostly in
the vertical direction. That is because the C -values range between -10 and +70. Note the somewhat odd scale
values that are printed for the C-axis. We are going to make one more change in our graph. Right-click the
Zoom Mode button and when the dialog box comes up change both the Y Scale and Y Space values to 5 each,
but leave the X Scale and X Space values at 1 each.

Click OK to close the dialog box and you should then see the following graph.

page 6
Now the scale values printed on the C -axis are multiples of 5 and they match the vertical spacing between the
horizontal grid lines.

Next we will show even more of the BC-plane by changing the extent values one last time. Right-click the
Zoom Mode button and enter the following values

Graph X Minimum Value = -11


Graph X Maximum Value = 24
Graph Y Minimum Value = -47
Graph Y Maximum Value = 115

The graph changes again to the following.

page 7
Now right-click the button and when the dialog box comes up change the Function Type from
Connected Points to Discrete Points.

Then click OK to close the dialog box and you will see the following graph.

page 8
Note how the graph thins out near the vertical asymptote. Comparing this last graph with the one above it gives
you a good idea of the difference between having Connected or Discrete points in a graph. Usually, graphs
with Connected Points look more solid and smooth, but sometimes the Discrete Points choice is better.

Since we prefer the Connected Points choice for this example, right-click the button and make the
Function Curve Type Connected Points. Then close the dialog box.

When graphing regular functions you will spend most of your time using the two dialog boxes that you bring up
by right-clicking the button or by right-clicking the Zoom Mode button . Actual zooming
operations are discussed in the more advanced tutorial help file for new users.

Performing Small Horizontal & Vertical Graph Window Translations

Sometimes you just need to make small horizontal and/or vertical translations with the current graph window.
For example, you might need to move an area of interest to make it more centered in the window. Or you may
just want to move an object a little more left or right or up or down to bring more or less of it into view.

page 9
You can perform small graph translations by holding down the CTRL key on your keyboard. Then left click the
mouse near the graph center and while continuing to hold down the CTRL key and the left mouse button, drag
the mouse around in any direction. You should see the mouse cursor change to a hand and the graph should
appear to move with the hand. As you move the graph around note how the four numbers at the middle screen
edges track along with the mouse movements. You can see the four BC -extent numbers dynamically change so
you can always tell where you are, especially when either or both axes go out of view. Let up on the mouse and
then the CTRL key on the keyboard to fix the current graph window position. Try moving the current graph
window around by simultaneously holding down the CTRL key on your keyboard and slowly dragging the
mouse with the left mouse button held down.

The program may not respond to dragging the mouse with the CTRL key held down if any yellow trace mode
buttons are active. If you ever find the program is not responding to mouse dragging with the CTRL key held
down, then click the Redraw button. The mouse dragging mode always gets reset whenever you press the
Redraw button or whenever any active yellow trace mode button is made inactive.

Numeric Formats and Fonts

We would like to make a comment regarding the format of the numbers that the program outputs. Select the
menu item Options | Numeric Formats…, you should see a dialog box like the following.

The Numeric Formatting Options dialog box.

For those times when you wish to display more decimal digits, you will need to bring up this dialog box and
increase both the Significant Digits count and the Decimal Places count. As you increase these numbers the
sample numbers shown in the dialog box will expand to show more digits. The General format is the default
format, but you can force numbers into Scientific Notation by selecting that format. Normally the program will
not show trailing zeros in decimal numbers. In fact this is the reason why the default scale marks on the
coordinate axes usually do not show any trailing digits.

page 10
If you want to see the most number of digits, you can click the Maximum button to increase both the
Significant Digits and the Decimal Places to 18 each. Clicking the Default button sets both the Significant
Digits and Decimal Places values to 5 each, as shown in the above dialog box.

There are two format categories, one for Calculated Results and one for the scale and extent numbers
associated with Graph Labels. Usually you will want the graph scale labels to show a minimal number of
decimal places and significant digits, but you will want Calculated Results to show many more decimal places
and significant digits. Click the OK button to close the dialog box.

The Built-In Functions

JKGraph is quite versatile in allowing you to enter almost any function expression. Perhaps it would be easiest
to just say that JKGraph provides all the functions you would find on a scientific or graphing calculator and
then some.

The following is a list of all 61 built-in functions. There are 39 unary functions, 18 binary functions, and 4
functions that take on three arguments. In the list below we show the variable X as the input for each unary
function, but X can represent any expression. When working with parametric equations you can think of
replacing X with the variable T that represents time. When working with polar equations you can think of
replacing X with the variable @ that is the variable JKGraph uses to represent angles. When working with
B œ 0 ÐCÑ functions think of replacing X with Y. We show (A,B) as the two inputs for the binary functions and
we show (A,B,C) as the inputs for the functions with 3 arguments. As with X, any one of A, B, or C may
be any general expression.

If you use polar functions, all angle ranges you enter for the variable @ in dialog boxes should be considered in
degrees. Internally JKGraph works in radians, but angle domains in terms of degrees are much easier for
humans to work with and type in. All the polar functions in JKGraph that use the variable @ have the default
domain from 0 to 360 in any dialog box where you might enter an @-value. You should think that all
trigonometric functions work only in radians mode and you should think that when @ appears as a variable in
any polar function formula then @ will be treated as a radian value. The degrees nature of @-values only applies
to entering constants in dialog boxes for the @ variable. Later, when a function formula is evaluated, JKGraph
will automatically convert any and all degree constant @-values to radian measure. But you will only see and
enter degree values in edit boxes that accept @-values.

Function/Description Syntax
------------------------------------ -----------
Absolute Value ABS(X)
Inverse Cosine ARCCOS(X)
Inverse Hyperbolic Cosine ARCCOSH(X)
Inverse Cotangent ARCCOT(X)
Inverse Hyperbolic Cotangent ARCCOTH(X)
Inverse Cosecant ARCCSC(X)
Inverse Hyperbolic Cosecant ARCCSCH(X)
Inverse Secant ARCSEC(X)

page 11
Inverse Hyperbolic Secant ARCSECH(X)
Inverse Sine ARCSIN(X)
Inverse Hyperbolic Sine ARCSINH(X)
Inverse Tangent ARCTAN(X)
Inverse Hyperbolic Tangent ARCTANH(X)
Binomial Coefficient (A choose B) BinCoef(A,B)
Between logical function tests A<C<B BT(A,B,C)
Between logical function tests A<C<=B BTE(A,B,C)
Between logical function tests A<=C<B BET(A,B,C)
Between logical function tests A<=C<=B BETE(A,B,C)
Ceiling Function CEIL(X)
Cosine COS(X)
Hyperbolic Cosine COSH(X)
Cotangent COT(X)
Hyperbolic Cotangent COTH(X)
Cosecant CSC(X)
Hyperbolic Cosecant CSCH(X)
Digit (extract the Nth digit) DIGIT(X,N)
Equal logical function tests A=B EQ(A,B)
Even logical function EVEN(X)
Factorial FACT(X)
Floor Function FLOOR(X)
Fractional Part FRAC(X)
Greatest Common Factor GCF(A,B)
Greater than logical function tests A>B GT(A,B)
Greater than logical function tests A>=B GTE(A,B)
Integer Part INT(X)
Least Common Multiple LCM(A,B)
Natural Logarithm (base e) LN(X)
Less than logical function tests A<B LT(A,B)
Less than logical function tests A<=B LTE(A,B)
Common Logarithm (base 10) LOG(X)
Logarithm base B LOGB(B,X)
Maximum of A and B MAX(A,B)
Minimum of A and B MIN(A,B)
Modulo function (remainder A/B) MOD(A,B)
Not Equal logical function tests A!=B NEQ(A,B)
Odd logical function ODD(X)
Parity Function = (-1)^X PARITY(T)
Quotient function (integer part A/B) QUOTIENT(A,B)
Normal Random Number (A=Mean, B=Std.Dev.) RandomG(A,B)
Uniform Random Number (between A and B) RandomU(A,B)
Nth Root (N=radical index) ROOT(N,X)
Round function (Nth decimal position) Round(X,N)
Secant SEC(X)
Hyperbolic Secant SECH(X)
Signum or Sign SIGN(X)

page 12
Sine SIN(X)
Hyperbolic Sine SINH(X)
Square (X^2) SQR(X)
Square Root SQRT(X)
Tangent TAN(X)
Hyperbolic Tangent TANH(X)

That is a pretty healthy list of basic functions. You might note that all 6 trigonometric functions and their
inverses are present, as are all six hyperbolic functions, including all their inverses. The best news is that you
can compose all these basic functions to build expressions with any level of complexity you desire. See the
regular help file to learn the technical details for any of the above functions.

In addition to the above 61 built-in functions, JKGraph has 5 binary operators and two unary operators. The
binary operators are addition, subtraction, multiplication, division, and exponentiation. Negation is one of two
unary operators. Plus also acts as a unary operator that essentially does nothing. For example +SIN(+X) gets
parsed as just plain old SIN(X), where essentially both + signs are thrown away because they have no effect.

JKGraph uses the caret symbol ^ to represent exponentiation. Some examples are:

8^3 = the cube of 8.


8^(1/3) = the cube root of 8.
SIN(8)^3 = the cube of the sine of 8.
SIN(8^(1/3)) = the sine of the cube root of 8.
SIN(8)^(1/3) = the cube root of the sine of 8.
SIN(8^3)^(1/3) = the cube root of the sine of 8 cubed.
E^X = the natural exponential function
10^X = the common anti-logarithm function
B^X = general exponential with constant base B ÐB Á 0 and B Á 1)

JKGraph also uses two special constants for the numbers Pi=3.14159265359 and e=2.71828182846.
Just type PI or E whenever you need to use these constants in an expression. Note that JKGraph expressions
are entered in all UPPER CASE. You don't really need to worry about UPPER CASE because JKGraph
automatically traps and changes all characters you type into UPPER CASE. Maybe you just need to know that
it is pointless to try and enter anything in lower case. (One exception is infinite series formulas. The formulas
that define infinite series can be entered using all lower-case letters if you prefer.)

JKGraph has the special feature that whenever you are asked to enter a numerical value, you can enter any
expression that evaluates to a constant. Rather than type in the long decimal constant 0.866025403785 you
can just type in the simpler but equivalent expression SQRT(3)/2. This means you should never have to
manually calculate a decimal constant on a hand calculator to enter any decimal values in any edit box that is
expecting you to type in a number that can be represented by a simpler mathematical expression. It is faster and
more accurate to just type 2*PI rather than try to type the decimal digits 6.28318530718. As other less
useful examples, the number -14 could be entered by typing in the equivalent expression
COS(PI)*SQRT(196)and the number +5 could be entered by typing in the expression LOGB(7,7^5).

page 13
Some of these functions require their arguments to be non-negative integers, (in some cases just a signed
integer), but you can still feed them any kind of a signed decimal value and the program will automatically first
compute the integer part (and perhaps absolute value) of the argument before it evaluates the function. For
example, computing FACT(-PI)=6 is the same as computing the factorial of +3. Also, computing
LCM(SQRT(50),E)=14 is the same as computing the Least Common Multiple of 7 and 2 even though
SQRT(50)=7.07106781187 and E=2.71828182846. In these cases the arguments are automatically
truncated to an appropriate integer value before the real function gets evaluated. Those functions that require
integer-only arguments are BinCoef(A,B), DIGIT(X,N), EVEN(X), FACT(X), ODD(X), GCF(A,B),
LCM(A,B), PARITY(X), and Round(X,N).

DIGIT(X,N) expects its second argument to be a nonzero integer. DIGIT(X,N) extracts the Nth decimal
digit from X where the counting is done starting at the decimal point. A positive N gets the Nth digit to the right
of the decimal point while a negative N gets the |N|th digit from the left of the decimal point. For example,
DIGIT(354.129,-2)=5 while DIGIT(354.129,3)=9. The Round(X,N) function uses its second
argument in the same way as DIGIT does when N is nonzero. Round(X,N) allows the 2nd argument to be
any signed integer. When N is positive the rounding is to the right of the decimal point. When N is negative the
rounding is to the left of the decimal point.

For examples, Round(3.14159,4)=3.1416 while Round(314159.0,-2)=314200. Round(X,-1)


rounds X to the nearest integer. Round(X,0) yields the sign or signum of X. ROOTN(N,X) expects only its
first argument to be a positive integer. Note however that MOD(A,B) does NOT require A or B to be integers
and does NOT truncate A and B to integers. When B=0, then MOD(A,B)=A whereas when B is nonzero then
MOD(A,B)=A-B*INT(A/B).

Showing Two Function Graphs Simultaneously

Now that you know how to enter a function formula and make a single graph, we can explain the purpose of the
two gray buttons that appear together as:

For each function type, such as Y=F(X), the JKGraph program actually holds two functions called the
primary and secondary functions. You can associate the number 1 with the primary function and you can
associate the number 2 with the secondary function. Initially the secondary function is turned off. The lower
button shows whether the secondary function is turned on or turned off. If the lower button shows as

and you left click it, it will turn on the secondary function and the caption of that same button will change to
show the secondary function is turned on.

Thus you can tell at a glance when the secondary function is turned on and that means both primary and
secondary functions are displayed together. The program title bar will also show the formulas for both
functions.

page 14
When you turn on the secondary function, the first function's BC-plane extent values get copied into the second
function's BC -plane extent values so that both functions share a common world graphing domain so that they
may be displayed together in a common graph window. If you don't turn on the secondary function, then that
secondary function can have an entirely different graph window (i.e., BC -plane extent values) than the primary
function. In general, each function has its own independent set of graph parameters, including colors and line
styles.

The purpose of the top button is to exchange the primary and secondary functions and make what was
the secondary function the new primary function and vice versa. If you show only one function at a time then
clicking this button can allow you to quickly switch between two entirely different graph windows and
functions. However, at other times you may wish to combine both functions in a single graph so you can see
their points of intersection. In that case you just need to turn on the secondary function.

If you want to directly edit the secondary function formula you can do so by right-clicking the lower button
, or , whether the secondary function graph is currently turned on or turned off. Otherwise,
whenever you right-click the function button you are editing the primary function only. Without this
feature you would otherwise have to exchange the two functions before right-clicking the function button to edit
the secondary function.

For just making graphs it doesn't really matter which function is primary and which is secondary when you wish
to show two functions simultaneously in the same graph window. However, other more advanced features of
the JKGraph program depend on the order of the primary and secondary functions. The primary function is
considered to come first. When the two functions are out of order you can quickly exchange them by simply
left-clicking the button .

Conclusion

This concludes this brief introductory quick start help. Have fun experimenting with JKGraph. If you should
get stuck try consulting the on-line help that contains more information than could be included in this short
tutorial. You should also use the menu item under the Help menu that contains the 103 page Tutorial For New
Users. That tutorial contains more even examples and explains most of the advanced operations and other
features of the program. Enjoy!

You should also know there is a whole suite of other programs related to math and computer science at the
author's homepage. See also: http://homepage.smc.edu/kennedy_john.

page 15

You might also like