# Using &kmplot;

&kmplot; deals with named functions, which can be specified in terms of Cartesian coordinates (called explicit functions), polar coordinates or as parametric functions. To enter a function, choose Functions Functions or click on the Functions button on the toolbar. You can enter new functions in the Function equation text box. Each function you enter must have a unique name (&ie;, a name that is not taken by any of the existing functions displayed in the list box).

For more information on &kmplot; functions, see reference.

## Function Types

### Explicit Functions

To enter an explicit function (&ie;, a function in the form y=f(x)) into &kmplot;, just enter it in the following form:

    f(x)=expression

Where:

- `f` is the name of the function, and can be any string of letters and numbers you like, provided it does not start with any of the letters x, y or r (since these are used for parametric and polar functions).

- `x` is the x-coordinate, to be used in the expression following the equals sign. It is in fact a dummy variable, so you can use any variable name you like, but the effect will be the same.

- `expression` is the expression to be plotted, given in appropriate syntax for &kmplot;. See math-syntax.

As an example, to draw the graph of y=x2+2x, enter the following into the functions dialog of &kmplot;:

    f(x)=x^2+2

### Parametric Functions

Parametric functions are those in which the x and y coordinates are defined by separate functions of another variable, often called t. To enter a parametric function in &kmplot;, follow the procedure as for an explicit function, but prefix the name of the function describing the x-coordinate with the letter x, and the function describing the y-coordinate with the letter y. As with explicit functions, you may use any variable name you wish for the parameter.

As an example, suppose you want to draw a circle, which has parametric equations x=sin(t), y=cos(t). In the &kmplot; functions dialog, do the following:

1. Enter the function for the x-coordinate, then press &Enter;:

       xcircle=sin(t)

2. &kmplot; automatically changes the function name for you to enter the y-coordinate function. Enter the function you want:

       ycircle=cos(t)

### Entering Functions in Polar Coordinates

Polar coordinates represent a point by its distance from the origin (usually called r), and the angle a line from the origin to the point makes with the x-axis (usually represented by the Greek letter theta). To enter functions in polar coordinates, prefix the function name with the letter r. The dummy variable is now the angle, theta.

For example, to draw the Archimedes' spiral r=theta, enter:

    rspiral(theta)=theta

## Combining Functions

Functions can be combined to produce new ones. Simply enter the functions after the equals sign in an expression as if the functions were variables. For example, if you have defined functions f(x) and g(x), you can plot the sum of f and g with:

    sum(x)=f(x)+g(x)

Note that you can only combine functions of the same type, ⪚ an explicit function cannot be combined with a polar function.

## Changing the appearance of functions

To change the appearance of a function's graph on the main plot window, select the function in the functions dialog, and click on the Attributes button. In the dialog which appears, you can change the line width in the text box, and the color of the function's graph by clicking on the color button on the right hand side. If you select Save as default, then the line width and color you select will be used as the default for the `n`th function in the list. ⪚, if the function for which you are changing the attributes is the first in the list, the settings will be saved as the default for the first function entered in the &kmplot; list.