Functions of One Variable

Here we wish to plot a function y=f(x) on the interval [a,b]. As an example, let's take the function y=sin(tan(x))-tan(sin(x)) on the interval [0,6]. Here is the simplest command that will do this:

Notice that Axiom compiled a function before the graph was put on the screen. The expression sin(tan(x))-tan(sin(x)) was converted to a compiled function so that its value for various values of x could be computed quickly and efficiently. Let's graph the same function on a different interval and this time we'll give the graph a title. The title is a string, which is an optional argument of the command 'draw'.

Once again the expression sin(tan(x))-tan(sin(x)) was converted to a compiled function before any points were computed. If you want to graph the same function on a number of intervals, it's a good idea to write down a function definition so that the function only has to be compiled once. Here's an example:

Notice that our titles can be whatever we want, as long as they are encloded by double quotes. However, a title which is too long to fit within the viewport title window will be clipped.