# General Function

To define a general function select this command from the Function Menu.

Selecting this menu item produces the "Define Function" window. This is something like a calculator. You can define a function using a composition of any of the following standard operations and functions:

-, +, *, / , ^(power), sin, cos, tan, ln, (log base e), log (log base 10), arcsin (inverse sine), arccos (inverse cosine), arctan (inverse tangent).

As you tap on one of the calculator buttons the associated symbol appears in the function definition next to the “New Function 'y(t)=' prompt. You cannot type in the function directly. If you make a mistake while defining the function select the Delete button to erase the last entry or the Clear button to clear the function definition and start again.

Note that all operators must be explicitly entered. * is used for multiplication and ^ is used to represent power. The + and - buttons can only be used to define binary operations, as in log(t)+3*sin(t) or 400-t*t. The function y(t) = -sin(t) must be entered as -1*sin(t).

To enter a constant value, i.e. a number or a special number like e or pi see Entering Numbers.

The "Define Function" window also has OK, Clear, Delete and Cancel buttons. On selecting OK the application checks the format of the function and will produce a warning message if the function format is incorrect. In this case either select Clear, to redefine the function or use the Delete button to delete entries in the function until you come to the position you want to amend. You may also select Cancel to revert to the last defined function. If the function format is correct the sampled function is plotted in blue over the currently defined t-axis range with the currently defined sampling interval, and the derivative is also plotted in red. By default the exact derivative (at the sample points) is plotted. Axes are drawn in black. The key, including the function expression, is shown on the left- hand top corner of the drawing. Other features of the display may be changed by from Settings.

The function expression may have been entered correctly and yet it may be that there are Undefined Values over the axis limits defined for t. If you attempt to create a function using t-values where it is not defined you have actually defined a relation, not a function. It is preferable to change the t-axis limits so that the function is defined at all points, for instance you could change the axis limits for log(t) so that the minimum value of t is 0.01. In the case where there are undefined function values the numerical derivative and integral will not be calculated or the Frequency View. The exact derivative may be determined for those regions where the function is defined.

## Examples

### y(t)=(t*t)^0.5

To define the modulus function y(t)= |t| use the equivalent function: y(t)=(t*t)^0.5

To enter this function tap the following buttons in the order given here:

(

t

*

t

)

^

Constant (tap on the space next to the E button) - tap 0.5 on the keypad and then tap enter.

### y(t) = 3cos(4pi t + pi/2)+1

To define a sinusoidal function (wave) of amplitude 3, frequency 2 and phase pi/2 with an offset (bias) of 1 i.e. the function: y(t) = 3cos(4pi t + pi/2)+1

Tap the following buttons in the order given here:

3

*

cos

(

Constant (tap on the space next to the E button) - tap 4 on the keypad and then tap enter.

*

PI

+

PI

/

Constant (tap on the space next to the E button) - tap 2 on the keypad and then tap enter.

)

+

Constant (tap on the space next to the E button) - tap 1 on the keypad and then tap enter.