Reading these web pages written in Mathematica 3.0

doug  <sweetser@world.com>

I have tried to make these web pages as easy and convenient to read as possible.  They are written in HTML so no plug-in is needed.  Each equation is a GIF file.  A few convensions were followed.  A scalar was written as a small letter (often "t") and the 3-vector as a capital letter with an arrow (often "X").  Parentheses were used to package the two together, like so:  (t, X).  The advantage of this capitalization convention is that it works well in ASCII.

The square of an operator means the operator acts twice in a row on an operand, not that it gets squared first.  Parentheses for operators were kept to a minimum.  The operator closest to the function acts first.  "Del x Del x A" is the same as "Del x (Del x A)".  Taking the derivative of a derivative operator does not make any sense.

All these pages were developed in Mathematica, a symbolic math package which does not follow these convensions.  The way people understand written math is different from the software.  I needed the machine as a form of mathematical proofreading, confirming assertions were true.  That input and output was copied and pasted.  The extra symbols required for the machine to process the information were removed, and ones that people prefer like equals signs were added.  As a default, the simplier form is presented.  If any of the GIFs are clicked, the Mathematica version appears for a 4.0 browser.

The information quality is critical.  I paid a physicist a hundred dollars once just to proofread this web site (it was a waste, oh well :-)  Currently, 10-30 people stop by a day.  It is my responsibility to not waste their time with inaccurate information.  To help me with my efforts, if you find errors, large or small, I would appreciate e-mail.  Converting the equations from the Mathematica format to the simplier form will undoubtedly introduce errors.

Reading the Mathematica 3.0 pages

The problem sets in special relativity have remained as straight Mathematica notebooks.  Unlike the flexible pencil, there are ways that Mathematica, as a fussy computer program, requires that information be handled.  These strange style rules will be explained here.

Each Mathematica "notebook" or file has three parts:  text, input and output.  The text is written just like this.  The input and output appears in the web pages as a GIF file, so the pages cannot be read in a text-only mode.  The input instructs Mathematica to do some sort of manipulation, then returns the result as output.  Output can be suppressed if the input line ends in a ";".  The previous output can be referenced in the next input with a "%".

One of the biggest differences between writing math by hand versus computer is the way equal signs are handled.  Input equals output, but an equal sign does _not_ appear between the two.  There are three types of equal signs in Mathematica.  The familiar one is "==".

(Sqrt[(x^2) +  (y^2)])  ==  r;

For example, sometimes such an equation must be solved for z, substituting the values x goes to 3 and y goes to 4.  Here's Mathematica's syntax.

Solve[(Sqrt[(x^2) +  (y^2)])  ==  r /. {x -> 3,  y -> 4}, r]

Mathematica has a function called Solve[equation, variable] which takes an equation and tries to solve it for the variable given.  The "/." says to substitute x goes to 3 and y goes to 4 into the equation.  The output is r goes to (or equals) 5.  The names of Mathematica functions are always capitalized and followed by a pair of brackets.  The names are usually not abbreviated so the meaning should be clear in context.

The second way an equal sign is used is to assign a value to a variable using only one equal sign.

c   =  3 (10^8) m/s;

In these notebooks, the speed of light is always assigned this round value.  The units will travel with the number wherever c appears in a notebook.

The third use of equals is to define a function with ":="  Two functions are defined and used repeatedly here.  One is for the gamma of special relativity.

γ[β_] := (1/(Sqrt[1  -  (β^2)]))

The name of the function is gamma and its local variable is beta.  I write out Greek letters inside of text because HTML doesn't handle Greek, and a GIF file is not worth the trouble.

The most frequently used function is for a quaternion.  A quaternion is represented as a real-valued matrix in the following function definition.

q[t_,  x_,  y_,  z_] :=  (({{t, -x, -y, -z}, {x, t, -z, y}, {y, z, t, -x}, {z, -y, x, t}}))

Quaternion multiplication is done by placing a dot between two quaternions.

q[(Subscript[t, 1]),  (Subscript[x, 1]), (Subscript[y, 1]), (Subscript[z, 1])].q[(Subscript[t, 2]), (Subscript[x, 2]), (Subscript[y, 2]), (Subscript[z, 2])]

\({{t\_1\ t\_2 - x\_1\ x\_2 - y\_1\ y\_2 - z\_1\ z\_2, 
        \(-t\_2\)\ x\_1 - t\_1\ x\_2 + y\_2\ z\_1 - y\_1\ z\_2, 
		
        \(-t\_2\)\ y\_1 - t\_1\ y\_2 - x\_2\ z\_1 + x\_1\ z\_2, 
        x\_2\ y\_1 - x\_1\ y\_2 - t\_2\ z\_1 - t\_1\ z\_2}, 

      	{t\_2\ x\_1 + t\_1\ x\_2 - y\_2\ z\_1 + y\_1\ z\_2, 
        t\_1\ t\_2 - x\_1\ x\_2 - y\_1\ y\_2 - z\_1\ z\_2, 
		
        x\_2\ y\_1 - x\_1\ y\_2 - t\_2\ z\_1 - t\_1\ z\_2, 
        t\_2\ y\_1 + t\_1\ y\_2 + x\_2\ z\_1 - x\_1\ z\_2}, 

      	{t\_2\ y\_1 + t\_1\ y\_2 + x\_2\ z\_1 - x\_1\ z\_2, 
        \(-x\_2\)\ y\_1 + x\_1\ y\_2 + t\_2\ z\_1 + t\_1\ z\_2, 
		
        t\_1\ t\_2 - x\_1\ x\_2 - y\_1\ y\_2 - z\_1\ z\_2, 
        \(-t\_2\)\ x\_1 - t\_1\ x\_2 + y\_2\ z\_1 - y\_1\ z\_2}, 

      	{\(-x\_2\)\ y\_1 + x\_1\ y\_2 + t\_2\ z\_1 + t\_1\ z\_2, 
        \(-t\_2\)\ y\_1 - t\_1\ y\_2 - x\_2\ z\_1 + x\_1\ z\_2, 
		
        t\_2\ x\_1 + t\_1\ x\_2 - y\_2\ z\_1 + y\_1\ z\_2, 
        t\_1\ t\_2 - x\_1\ x\_2 - y\_1\ y\_2 - z\_1\ z\_2}}\)

Mathematica manipulates matrices well, but does not present them to the viewer with as much grace, and quaternion matrices are redundant anyway.  To simplify the output, I often multiply the result by the vector {1,0,0,0} to pick out the first column of the quaternion matrix.

q[(Subscript[t, 1]),  (Subscript[x, 1]), (Subscript[y, 1]), (Subscript[z, 1])].q[(Subscript[t, 2]), (Subscript[x, 2]), (Subscript[y, 2]), (Subscript[z, 2])].{1, 0, 0, 0}

\({t\_1\ t\_2 - x\_1\ x\_2 - y\_1\ y\_2 - z\_1\ z\_2, \ \ 
      t\_2\ x\_1 + t\_1\ x\_2 - y\_2\ z\_1 + y\_1\ z\_2, 
	
      t\_2\ y\_1 + t\_1\ y\_2 + x\_2\ z\_1 - x\_1\ z\_2, 
      \(-x\_2\)\ y\_1 + x\_1\ y\_2 + t\_2\ z\_1 + t\_1\ z\_2}\)

In some cases, only the first term is needed, and it can be plucked from the rest using using [[1,1]] after a matrix.

(q[(Subscript[t, 1]),  (Subscript[x, 1]), (Subscript[y, 1]), (Subscript[z, 1])].q[(Subscript[t, 2]), (Subscript[x, 2]), (Subscript[y, 2]), (Subscript[z, 2])])[[1, 1]]

Since c, gamma, and the quaternion functions are defined in many of these notebooks, the functions are often put in the last section of the notebook.

I hope this clarifies the style of these web pages.  Any further questions can be answered by e-mail to <sweetser@world.std.com>.