Mathematica
NoteBook Cells

by
K. D.  Stroyan
University of Iowa

copyright 2007 by Keith Stroyan - All rights reserved.

Closed and Open Mathematica Cells

This NoteBook has several parts.   Some of the parts are in a "closed" Mathematica "cells."  Notice the various kinds of brackets at the right side of this window.  These brackets mark cells.  The Closed cells are the ones with the small dark half-arrowheads at the bottom (and the open boxes to the left of that).

To open a closed cell, use your mouse to position the cursor over the dark arrowhead and click the button on the mouse twice rapidly.  (This is called "double clicking.")

Open the next cell containing "A Mathematica Section Cell 2" now..

A Mathematica Section Cell 2

When you are done looking at a section, you can position the cursor at the far right bracket again and double click to close that section.  Close the preceding cell.

Now open successive cells within this cell.

Subsection: Text vs. computation.

Subsubsection: Addition

This is a Mathematica  text cell.  It contains typing for the user to read, not for the computer to compute.  The cell after this is a Mathematica Input Cell (containing the computer command "2 + 3").  Input Cells are for Mathematica commands such as adding two numbers.
			
	Computations can only be executed if they are entered in "input" cells.  These are marked with the plain square brackets at the right of the window (with no flags or arrows.)  Inactive text and "output" cells have the little tick mark (or flag) at the top.  Mathematica  cannot do a computation if you type it in an inactive cell.  You can open and close groups of both kinds of cells that are grouped in another cell.
				
	Once the computation is typed you must press the <Enter> key at the far right of the keyboard (you can also use <Shift> + <Return>).  Your typing will be in an input (or active computation) cell and the answer will be in an output (inactive) cell.  The pair looks like the following:

2+3

Subsubsection: Multiplication

The Input cell below here contains a command to multiply two numbers.  You can execute the command by moving the cursor into that cell with the mouse and clicking.  Once you have done this a thin vertical line will appear in the cell.  Once this is done, press the <Enter> key on the number pad or hold down the <Shift> key and press <Return>.  This will maks Mathematica do the computation.  Go ahead and try.

2*3

Subsection: Where do I learn more Mathematica computing?

Subsubsection Basic Computing: Numerics, symbolics & graphics.

There are separate NoteBooks in the Chapter 1 folder that show you the three main aspects of scientific computing:

Numeric, both exact arithmetic and approximate or floating point arithmetic.

Symbolic.

Graphic.

All three are combined in the next Input cell.  <Enter> that computation now, but open the other NoteBooks to learn how to do these various commands yourself.

Clear[x,y];
y=(1/(x+1))-(1/(x-1))
Simplify[Together[y]]
Plot[y,{x,-2,2}]
x=3;
Print["y = ",y," when x = ",x];
x=0.3`;
Print["y = ",y," when x = ",x];

Subsubsection More Computing: Lists, rules and examples for Chapter 1.

The Chapter 1 folder also contains introductory NoteBooks on defining rules with Mathematica and on using Lists.  These are more advanced ideas and yu can return to them later.

The section "Previews of Coming Attractions" in Chapter 1 studies linear functions from the point of view of local coordinates and looks at a few basic derivatives.  The NoteBooks LinearIntro.ma and DerivLimit.ma are related to that work.  The next cell gives a preview of those NoteBooks if you wish to <Enter> the computation now.

Clear[f,x,y,dx,dy];
f[x_]:=(x^3);
Print["A Plot of the change in  f[x] = ",f[x]];
x=1;
y=f[x];
dy=f'[x] dx;
Print[" and its tangent dy = ",dy," at x = ",x];
Plot[{f[x+dx]-y,dy},{dx,-2,+2},AxesOrigin->{0,0},AxesLabel->{"dx","dy"}]

Exercises

The only important point of this NoteBook is to have you answer this question:
What is the advantage of having the different kinds of cells that you opened and closed above?  (HINT: How do you "turn pages" when you are reading on the computer?)

TYPE YOUR ANSWER HERE: