### Combinations and Transformations of Functions

Graphs up to 5 functions simultaneously in rectangular coordinates, allowing
definitions of one function in terms of others.

How to use
||
Examples
||
Other Notes

**How to Use**

- Enter a function
*f*_{1}(*x*) in the text input field
marked "*f*_{1}(*x*)="
(Example:
*f*_{1}(*x*)=*e*^{x})
- Click the "Graph" button
(this button also refreshes the graph)
- To see two functions graphed simultaneously:
- Enter the second function
*f*_{2}(*x*) in the text input field
marked "*f*_{2}(*x*)="
- Click (to its "on" state) the check box next
to this input field
- Click the "Graph" button

(Example:
*f*_{1}(*x*)=*e*^{x}
and *f*_{2}(*x*)=*x*^{2})

Up to 5 functions can be graphed simultaneously
- A function can be defined in terms of another
function -- for example, to define
*f*_{2}(*x*)
using the function *f*_{1}(*x*), such as
*f*_{2}(*x*)=*f*_{1}(*x*)+2,
you can type "`f1(x)+2`" in the text input field marked
"*f*_{2}(*x*)=".

(Example:
*f*_{1}(*x*)=*x*^{2}
and *f*_{2}(*x*)=*f*_{1}(*x*)+2)

- To remove a function from the graph, click (to its "off" state)
the check box next to the associated text input field and click
the "Graph" button to refresh
- To erase the graph and all input fields, click the
"Clear" button

The text input fields can accept
a wide variety of expressions to represent functions, and the
buttons under the graph allow various manipulations of
the graph coordinates.

**Examples**

- Vertical shifts:
*f*_{1}(*x*)=*x*^{2},
shifted: up 2, up 4,
down 2, down 4
- Horizontal shifts:
*f*_{1}(*x*)=*x*^{2},
shifted: right 2, right 4,
left 2, left 4
- Addition:
*f*_{1}(*x*)=*x*^{2},
*f*_{2}(*x*)=*x*+1,
*f*_{3}(*x*)=
*f*_{1}(*x*)+*f*_{2}(*x*)
- Subtraction:
*f*_{1}(*x*)=*x*^{2},
*f*_{2}(*x*)=*x*+1,
*f*_{3}(*x*)=
*f*_{1}(*x*)-*f*_{2}(*x*)
- Multiplication:
*f*_{1}(*x*)=*x*^{2},
*f*_{2}(*x*)=*x*+1,
*f*_{3}(*x*)=
*f*_{1}(*x*)^{.}*f*_{2}(*x*)
- Division:
*f*_{1}(*x*)=*x*^{2},
*f*_{2}(*x*)=*x*+1,
*f*_{3}(*x*)=
*f*_{1}(*x*)/*f*_{2}(*x*)
- Composition:
*f*_{1}(*x*)=*e*^{x},
*f*_{2}(*x*)=*x*^{2},
*f*_{3}(*x*)=
*f*_{1}(*f*_{2}(*x*))

**Other Notes**

The graphs of the functions are color-coded, corresponding to the colors
of the labels marking the text input fields:
the graph of
*f*_{1}(*x*) is blue,
*f*_{2}(*x*) is red,
*f*_{3}(*x*) is green,
*f*_{4}(*x*) is orange, and
*f*_{5}(*x*) is magenta.
In order to avoid recursion-related problems, a function cannot be
defined in terms of itself -- for example, trying to define
*f*_{1}(*x*)=*f*_{1}(*x*)+5
will generate an error, shown similar to a syntax error (the text input
field will be highlighted). This check for recursion is not very
sophisticated, and can be easily subverted by specifying a circular chain
of function definitions, but in that case the applet will generate a
Java stack overflow exception and no graph will be generated.