Mathematica Basics--Arithmetic
Introduction
Mathematica has been described by some as the world's most
expensive calculator. While this description doesn't pay such a powerful
program the tribute it deserves, it can certainly be treated as an on-line
calculator, and that's basically what we're going to be doing in this
laboratory.
The Arithmetic Commands
Now let's quickly go over the symbols used when doing basic arithmetic with
Mathematica:
- + simply means plus, as you'd expect.
- - means minus.
- * means times.
- / means divide.
- ^ means raise to the power of. On the keyboard it is
SHIFT-6.
- ! means factorial, as you'd expect.
- %, the percent sign, refers to the previous result.
On the keyboard it is SHIFT-5.
- N[...] is a function which takes the decimal value
of whatever is placed inside the brackets in place of the dots.
- Pi means the Greek letter , and has its usual
mathematical meaning in Mathematica of approximately 3.14159, or the
circle's circumference/diameter ratio. Mathematica is
case-sensitive, so make sure you capitalize the "P". Version 3.0 of
Mathematica also understands the use of the actual symbol for itself in formulas.
To enter it just type OPTION-P.
- E means the base of the natural logarithm, called e
in most written mathematics, and approximately 2.71828.
Note: All of Mathematica's built in functions start with a
capital letter. Get used to it.
Evaluating Commands
There's one last thing you should be aware of before we dive into a real
notebook. In order to tell Mathematica that you want it to actually
evaluate what you have typed, hit the ENTER key over on the extreme right side
of your keyboard on the numeric keypad.
Do not confuse this with the RETURN key, which merely starts a new line of
text. (Mathematica commands can span many lines if you want them to.)
Well, you're about to go and do the easiest laboratory exercise of the
course, so don't panic too much.
You can now switch
to the actual Mathematica practice notebook by clicking on the button at
left. It will take a while to start up! Don't forget to come back here when
you're done by using the Applications menu! (You can also use this menu just to
come back here to reread the instructions.) See you in a few minutes.
Welcome back! Hopefully everything went well. You're now finishing learning
the Basics of Arithmetic in Mathematica. You may now go to the Table of
Contents for the Mathematica Basics Labs, or simply quit.
Mathematica Basics by Christopher A. Barker
©1998 Christopher A. Barker, 5151 Pacific Ave., Stockton, CA 95207,
USA
e-mail: barker@inreach.com; WWW:
http://calculus.sjdccd.cc.ca.us/home.html