Chapter 2. Interactive Use of Mathematica

This chapter covers the use of Mathematica as a supercalculator. It does what an electronic calculator can do, and it does a lot more. We enter input and Mathematica returns the output. As seen in Chapter 1, the nth input is labeled “In[n]:=” and the corresponding output, “Out[n]=”.

Numerical Capabilities

Arithmetic Operations

Table 2.1 lists the arithmetic symbols in Mathematica. Here are some examples of their use:

In[1]:= 2.1 + 3.72
Out[1]= 5.82
In[2]:= 6.882/2
Out[2]= 3.441

In[3]:= 2^3
Out[3]= 8

Table 2.1. Arithmetic Operations in Mathematica

Mathematica Operation

Symbol

Addition

+

Subtraction

Multiplication

*

Division

/

Exponentiation

^

Spaces and Parentheses

Any number of spaces can replace the symbol * for multiplication: ...

Get A Physicist's Guide to Mathematica, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.