In the first example, we illustrate some of the algebraic and graphical capabilities of Mathematica. Here is an example of an expression that defines y, a function of x:
y = x^3 - x^2 - 9 x + 9
The above line is called a command, or "input". When you enter such an input, Mathematica processes it and returns "output" (or a result). To make things easier for you while you are starting off, all Mathematica input statements in this chapter will have a box around them. That is not usually done in notebooks and we will do so only in this chapter andthe next one. For now the boxes should prove helpful. Click anywhere in the box above and hit the ``Enter'' key to execute the Mathematica input line. (see below)
To obtain the result you must first "execute" the command by following these steps:
1. Move the cursor to the end of the command; in this case, after the
second 9.
2. Click the mouse to select the command,
3. Hit the Enter key, located on the extreme lower right of the keyboard.
(Note: this is NOT the same as the Return key that you have been
using.)
The above command is repeated below. Follow the directions above to execute it now. There will be a short delay while Mathematica performs the command. Once the command is completed, you will see an input line labeled In[1] that contains the original command, and an output line labeled Out[1]. Notice that the result in the output line is written differently than the way we typed it; Mathematica prefers to write polynomials in increasing powers of x.
y = x^3 - x^2 - 9 x + 9