You can assign a value to a variable using Define.
To assign the value 5 to z
- or -
Thereafter, until you close the document or undefine the variable, the system recognizes z as 5, evaluating the expression 3 + z as 8. (Definitions can be saved with the document when you exit Scientific Notebook as explained in Saving and Restoring DefinitionsDM5-3.tex#Saving definitions.)
Variables normally have single-character names. The value assigned can, however, be any mathematical expression. For example, you could define a variable to be any of the following.
The symbol p defined here represents the expression x3 +3x2 - 5x + 1. It is not a function, and in particular, p(2) is not the expression evaluated at x = 2. In fact, p(2) = 2p = 2x3 +6x2 - 10x + 2.