Author > Function Definition command
Use the Author > Function Definition command or press Ctrl+Alt+F to declare a function and optionally assign it a definition or clear an existing definition. This command displays a dialog box with fields for entering a function name, its arguments, and its definition. After entering a name and a list of arguments, enclosed in parentheses and separated by commas, in the Function Name and Arguments field and an expression in the Function Definition field, click on OK to make the name a defined function having the unsimplified expression as its definition. Leave the Function Definition field blank to make the name an undefined function (also called an arbitrary or unspecified function).
Click on the pull-down menu button at the right end of the Function Name and Arguments field to display an alphabetical list of all the currently defined function names. If you click on one of the function names, the current definition of the function is displayed in the Function Definition field.
While entering an expression in the Function Definition field, you can use all the line editing features normally provided by Derive (see Entering Mathematical ExpressionsEntering_Mathematical_Expressions). In particular, you can use the Greek and math symbol toolbars, and the F3 and F4 function keys to insert the highlighted expressions and subexpressions in the Function Definition field.
Declared function names can be multi-character and of mixed case, no matter what the current Input Settings are (see the Options > Mode Settings > Input command1MJ.MVB).
The Author > Function Definition command over-rides any previous definition of the function name. Also it can turn the name of a user-assigned variable into a function name. However, it cannot redefine one of the Built-in Functions and ConstantsBuilt_in_Functions_and_Constants.
Use the Author > Variable Value command2SGW02B to turn the name of a user-defined function back into a variable name.
Instead of a Author > Function Definition command, you can use the Author > Expression commandFJQ5GW to declare a function and optionally assign it a definition or clear an existing definition. On the expression entry line, enter: the function name and a list of some or all of the variables in the function's definition, enclosed in parentheses and separated by commas; then enter the := assignment operator and the function's definition. Omit the definition for arbitrary functions.
For example, entering
ACCELERATION(f, m) := f/m
assigns the function ACCELERATION(f, m) the definition f/m.
When an expression containing calls to a function is simplified, all function calls are replaced by a copy of its definition in which the variables have been replaced by the values specified in the call on the function. For example, if ACCELERATION is defined as above, then
ACCELERATION(6, 2)
simplifies to 3. If a function is called with fewer arguments than there are variables in its definition, the excess variables are not replaced. For example,
ACCELERATION(6)
simplifies to 6/m. Entering
ACCELERATION(f, m) :=
clears any definition previously assigned to ACCELERATION and makes it an arbitrary function.
Other Author commandsAuthor_commands
Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator