|
|
|
|
||
|
|
|
|
|
Numerical
Approximation of Zeroes: If you're willing to take a little time, you can learn to write programs on your graphing calculator. Programming is a useful skill, and I highly recommend that you at least dabble, as it can be a great exercise in logic and planning. To write a good program, one usually starts with "pseudo-code", which is a sketch of the general logic of the program. Decide what you want the program to do, and figure out the steps needed to accomplish the task. Another important thing to do, especially if you don't want to be dealing with the program "hanging" or crashing, is to try to anticipate problems. For approximating zeroes numerically, the user could, say, put in "bad" test points (points between which the function doesn't actually cross the axis, for instance). A good program would anticipate this and make allowances. If you have a TI-84 calculator, you can download a program I wrote. If you do not have the ability to connect your TI-84 to your computer in order to upload the file directly, you can enter the program yourself. The coding is below. I think the program will also work on a TI-83. For other calculator models, you can imitate the logic, but the specific commands used by your model will differ from those displayed below. In what follows, "STO>" means "store in", "ClrHome" means "clear screen", and "!=" means "not equal to". The purple bracketed items are explanatory comments, and are not entered as part of the coding. [Clear the screen and introduce the program.] [The following label lets you re-run the program
without re-running the introduction.] [Check that the function is entered. Accept
the function, if it is not already stored elsewhere.] [Go here if function needs to be entered; otherwise,
go to N1.] [Explain required formatting for entry, and
accept entry.] [Go here if function is already stored elsewhere.] [Clear screen and request bounds on the zero.] [Check that "lower bound" is actually
lower than "upper bound". If not, go to re-entry menu at N5.] [Find y-values at given bounds.] [Check that y-values have opposite signs. If
not, go to re-entry menu at N5.] [If there is a problem with the entered bounds,
offer to take new bounds, or to quit.] [Come here once bounds are okay.] [Clear screen and see if either bound is itself
a zero.] B STO> X If Y1=0 [Come here to enter the desired accuracy.] [Clear the screen and request desired accuracy
for the zero.] [Check the validity of the value for "number
of decimal places". Allow for re-entering or quitting.] {Store the initial bounds in variables for computation.] [Check to see if the bounds are already sufficiently
close together.] [Clear the screen and put up a message to let
the user know the program is running.] [Do the following until either you find the
exact zero or you find a sufficient approximation.] [Check the signs on the y-values to pick which
end the midpoint needs to replace.] [Come straight here if computations are unnecessary.] [Fix the display at the chosen number of decimal
places. Clear the screen to display result.] [Check to see if the zero is apparently exact
or approximate. Return the appropriate message.] [Come here when the program has successfully
found a zero.] [Clear screen and offer options: quitting, or
re-running various aspects of the program.] [Come here when the program is done, and do
some clean-up before quitting.] [Return calculator's number display to "floating
point". Clear the screen. End the program.] Feel free to use or modify the above program. Just make sure you understand the logic of it.
|
|
|
|
Copyright © 2006-2008 Elizabeth Stapel | About | Terms of Use |
|
|
|
|
|
|