Education Technology

# Knowledge Base

## Solution 11806: Creating and Evaluating User-Defined Functions on the TI-89 Family, TI-92 Family and Voyage™ 200.

### How can I create my own functions on the TI-89 family, TI-92 family and Voyage 200?

User-defined functions can be a great time-saver when the repetition of the same expression is needed multiple times, but with different values. User-defined functions can also extend the calculator capabilities beyond the built-in functions.

Function names follow the same rules as variable names. When defining functions, use unique names for arguments that will not be used in arguments for subsequent functions or programs.

In the argument list, be sure to use the same arguments that are used in the definition. Arguments are placeholders that represent whatever values passed to the function.

Functions can be created using one of the following methods:

1. Using the [STO->] key.

Store an expression to a function name, including the argument list.

Example: To define the function xpower(x,y)=x^2+y^2

1) Input x^2+y^2 in the entry line.
2) Press the [STO->] key.
3) Input xpower(x,y).
4) Press [ENTER]. The message "Done" Will display.
5) Try xroot(3,4) and press [ENTER]. The answer displayed is 25.

2. Using the Define command.

The Define command is under the F4:Other menu. It allows users to define a function name, including the argument list, as an expression.

Example: To use the Define command for the xroot function:

1) From the Calc Home screen, press [F4][ENTER].
2) Input xpower(x,y)=x^2+y^2
3) Press [ENTER]. The message "Done" will display.
4) Try xpower(3,4) and press [ENTER]. The answer displayed is 25.

3. Using the Program Editor.

Follow the steps below to define a new function:

1) Press [APPS] and then select 7:Program Editor. If the Icons desktop is active, select the Program Editor icon and press [ENTER].
2) Select 3:New
3) Specify the applicable information for the new function
Type = 2.Function
Folder = Main
Variable= Type a variable name
4) Press [ENTER] twice to display the function editor
5) Enter the following:
:xpower(x,y)
:Func
:x^2+y^2
:EndFunc
6) Press [2nd][ESC] to exit the editor.
7) To call the function on the Home screen, enter xroot(3,4)

Please see the TI-89 family, TI-92 family and Voyage 200 guidebooks for additional information.