Tutorial 2:  Intro to Palettes

by R. Dover, IMSA

This tutorial will show you a bit of the versatility of using palettes.  And we'll review some of the ideas you saw in the first tutorial.  Before that, it is important to understand that commands may be entered in a variety of ways.  This flexibility is one of the major changes in the new version of Mathematica, version 3.0.  Many experienced users work with a combination of palettes, keystrokes, and "longhand," for lack of a better word.  (We'll consider using keystrokes later to do typesetting.)
	First, as a default, the "Basic Input" palette should appear to the right of this notebook.  The symbol (□^□)should appear in the upper left corner.  If not, under the "File" menu, choose "Palettes" and then "Basic Input."

Basic typesetting

We'll create the expression  (2^5) +  (12/7)  +  (Sqrt[18.])   Create a new cell below.  Move the cursor to the  (□^□) in the palette and click. Type "2", and it should replace the lower, darkened box.  Press ⇥.  The exponent box should now appear darkened. Type "5" and press ->, the right cursor key, to get out of the exponent.  Then type "+" and click on the (□/□) symbol in the palette.  Enter 12 and press ⇥ to highlight the denominator box.  Enter 7 and use the right arrow key to move from the fraction.  Type another "+" and click on (Sqrt[□]).  Enter 18 and execute the cell.

Note that one could have also entered the following:

2^5  +  12/7  +  Sqrt[18]

To obtain a numerical approximation of either form of the expression above, we've seen before that one can edit the line to place  "N[  ]"  around the entire expression.  Do that on your expression.  Alternatively, one can type "//N" after an expression.  Do this on the second expression and execute the cell.  (This method is used quite frequently, and it may be used with other commands as well. One simply types "//" followed by the command.  It's handy as an after-thought.)

Next, use the \(TraditionalForm
      \`∑\+\(□ = □\)\%□ 
        □\)  button to find (∑_(k = 1)^50) (1/k).  As before, enter letters and numbers into the location with the black box.  Use the ⇥ key to move around the expression.  Use the right cursor key to move out of the summation expression.

Note that the same command may be entered as shown below.

Sum[1/k,  {k,  1,  50}]

Special numbers

Numbers may also be entered in multiple ways.  Pi may be spelled out or the symbol π may be taken from the palette.  Each of the following terms in the sum below is equivalent.  Any combination is fine.

Sin[(π/6)] + Sin[(Pi/6)] + Sin[Pi/6] + Sin[π/6]

Execute the cell below to see the graph.

Plot[Exp[x],  {x,  -2,  2}]

Instead of using the special function Exp, edit the command above to use (e^x) with the palette.  In addition, one may also use E^x, with the capital E to represent what is built-in.

Open the following subsection on complex numbers.

Complex numbers

(Sqrt[-1]) may be obtained by choosing i  from the palette or by typing I, captitalized of course, since it is known by Mathematica.  Enter each of the following.

(((3  +  4  I))^5)

((4 + 2  I)/(5 - 3  I))

Conjugate[7 - 12  I]

Try some others.

More special numbers

Infinity is the next special "number" in the palette. (Sometimes, this doesn't show up well, especially on sums and integrals.  It may appear as a small black rectangle.)

(∑_(k = 1)^∞) (2/(3^k))

Equivalently, we have:

Sum[2/3^k,  {k,  1,  Infinity}]

Create one of your own in each the of the two forms above.  Any combination of format is allowable.

The last symbol in this line may also come in handy at times.

Sin[30  °] +  Cos[30 Degree]

More palettes

Algebra

Under the "File" menu, choose "Palettes" and then "AlgebraicManipulation."  Click on the very top of the palette and drag it to the right of the screen.  You will see several commands which we used in the first notebook along with many others.  Again, using this palette gives us an alternative method of executing commands.  Consider the fraction below.  Highlight the entire fraction.  Then click on each of the following on the palette one at a time:  Expand, Apart, Simplify.

((5 + 3 x)/((((-2 + x))^2) (1 + x)))

Try a couple other commands if you wish.  Since the command ExpandAll is not in this palette, type "//ExpandAll"  after the fraction to see its effect.

As another example, Expand and then Factor the following.

(((☺ + ☹))^6)

Or would you prefer...

(((3  💡 + 2  🐺))^9)

Use the same method of highlighting and then clicking on TrigExpand, TrigFactor, and TrigReduce to see what they do to the following.  (The α comes from the BasicInput palette.)

Sin[5  α]

Try some other coefficients of α.  Then try Cos or Tan on some angles.

Use ExpToTrig on each of the following.

(E^(2  π I))

4 E^(2  Pi I/3)

Use TrigToExp on the next line.

2 (Cos[θ] + I Sin[θ])

More commands

First, close the "AlgebraicManipulation" palette, just to unclutter the desktop.  Under "File," choose "Palettes" and "BasicCalculations."  Drag the palette to the side if necessary.  As you can see, there's quite a bit to choose from here.  Look around a little it by clicking on the triangles to the left to open or close a subsection.  By now, several of these buttons and commands will look familiar.  (Others will show some of what's yet to come!)   For example, under "Algebra," check "Complex Numbers."  We've used "Conjugate" before for complex numbers, but there are other similar commands.  
	Open the section on "Graphics."  You'll notice a short explanation of the format.  Click on  Plot[■, {□,□,□}].  Enter a function to be graphed in the black box.  Then ⇥ to subsequent boxes, filling them in as you go, with the variable x, xmin, and xmax.  (Don't worry.  We'll come back to a number of the other graphs a little later.)