13.07.2015 Views

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Notebooks</strong> and <strong>Documents</strong> 65In any <strong>Mathematica</strong> session, <strong>Mathematica</strong> is always effectively using ToExpression to interpretthe textual form of your input as an actual expression to evaluate.If you use the notebook front end for <strong>Mathematica</strong>, then the interpretation only takes placewhen the contents of a cell are sent to the kernel, say for evaluation. This means that within anotebook there is no need for the textual forms you set up to correspond to meaningful <strong>Mathematica</strong>expressions; this is only necessary if you want to send these forms to the kernel.FullFormInputFormStandardFormexplicit functional notationone-dimensional notationtwo-dimensional notationThe hierarchy of forms for standard <strong>Mathematica</strong> input.In[4]:=Here is an expression entered in FullForm.Plus@1, Power@x, 2DDOut[4]= 1 + x 2In[5]:=Here is the same expression entered in InputForm.1 + x^2Out[5]= 1 + x 2In[6]:= 1 + x 2Out[6]= 1 + x 2<strong>And</strong> here is the expression entered in StandardForm.Built into <strong>Mathematica</strong> is a collection of standard rules for use by ToExpression in convertingtextual forms to expressions.These rules define the grammar of <strong>Mathematica</strong>. They state, for example, that x + y should beinterpreted as Plus@x, yD, and that x y should be interpreted as Power@x, yD. If the input yougive is in FullForm, then the rules for interpretation are very straightforward: every expressionconsists just of a head followed by a sequence of elements enclosed in brackets. The rules forInputForm are slightly more sophisticated: they allow operators such as +, =, and ->, andunderstand the meaning of expressions where these operators appear between operands.StandardForm involves still more sophisticated rules, which allow operators and operands to bearranged not just in a one-dimensional sequence, but in a full two-dimensional structure.<strong>Mathematica</strong> is set up so that FullForm, InputForm and StandardForm form a strict hierarchy:anything you can enter in FullForm will also work in InputForm, and anything you can enter in

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!