Mathematica

Courseware

Paul Abbott
Department of Physics
University of Western Australia
Nedlands, WA  6907, Australia
http://physics.uwa.edu.au/~paul

This talk will present ways of integrating Mathematica into teaching materials. By itself, Mathematica is an excellent teaching tool — but it is not ideal for all applications. However, because it is extensible (using MathLink) and customizable (custom front end and kernel), it can form the basis for a wide range of teaching tools, limited only by ones imagination.  As an example of such tools,  CalculusLive (an electronic maths text which uses a customised interface and kernel) and its associated authoring tool will be demonstrated.

.  Features for Teaching

Mathematica is an attractive tool for teaching because of its:

Extensive numerical and symbolic computation

Plots, graphics, and sound

Interprocess communication — MathLink

Notebook environment

Integrated hyperlinked documentation

Editable typeset mathematical expressions

Fully customisable palette interface

User-defined input and output notations

.  Implementation Ideas

.. Two-dimensional Input

See The Mathematica Book, Sections 1.10.2 and 1.10.3.  Consider

Select and use Cell ⊳ Convert To ⊳ TraditionalForm.

.. Inline and Display Mathematics

Producing formatted two-dimensional equations

Consider the following text:

To convert the formula to two-dimensional form:

Showing the steps in computing an integral

.  Palettes

Add definitions for vector operators,

and generating a palette,

Now we can prove that \(TraditionalForm\`▽×\((▽×𝔸)\) == ▽(▽·𝔸) - ▽·\(▽(𝔸)\)\) for an arbitrary (differentiable) vector field.

.  Notation

Define special notations using the Notation package:

Mappings can now be entered using ordinary mathematical notation:

.  Courseware Examples

.  Electromagnetism

Second-year Electromagnetism interactive lecture notes, e.g,

Three charges

.  Computational Physics

Lecture Notes

Exam

. GridBox, StyleBox, and DisplayForm

GridBox, StyleBox, and DisplayForm are powerful tools for automatically generating and formatting quite general typeset structures.

.. Typeset Objects

Since the typesetting is completely integrated with Mathematica's functional programming capabilities, you can use Nest or NestList to iterate a typeset box structure and then use DisplayForm to display the result.

The Sierpinski triangle can be generated using a SubsuperscriptBox object,

Nest[SubsuperscriptBox[#, #, #] &, Ω, 
        5] // DisplayForm

and the Sierpinski gasket by iterating a simple GridBox matrix.

StyleBox[Nest[GridBox[(({{#, #, #}, {#, "", #}, {#, #, #}}))]&,■,3],GridBoxOptions -> {RowMinHeight -> 0, 
                RowSpacings -> 0, ColumnSpacings -> -0.12}]//DisplayForm

Note that these results are not graphics, but are typeset objects.  Here is another example of a typeset figure:

({{({{130.158.113.98}, {\[MathematicaIcon]}, {Mathematica}}), asdfadfsdfasdfaf, ({{130.158.113.96}, {\[KernelIcon]}, {MathKernel}})}, {•, ⟵, •}, {front end
listening,  , kernel
connecting}})

.. Formatted Tables

To summarise a set of results, it is useful to display them in a (nicely formatted) table. Here is an example taken from my Group Theory course:

Example: The Euclidean Lie algebra e(3) has the Lie subalgebras {(Subscript[R, 1]),(Subscript[R, 2]),(Subscript[R, 3])} and {(Subscript[P, 1]),(Subscript[P, 2]),(Subscript[P, 3])} known as s o(3) and e(3) which generate rotations and translations respectively.

In terms of infinitesimal generators we have

\(TraditionalForm\`R\_1 = \(x\_2\) ∂\/∂x\_3 - \(x\_3\) ∂\/∂x\_2, \ 
    R\_2 = \(x\_3\) ∂\/∂x\_1 - \(x\_1\) ∂\/∂x\_3, \ 
    R\_3 = \(x\_1\) ∂\/∂x\_2 - \(x\_2\) ∂\/∂x\_1, \)

and

(Subscript[P, 1]) = (∂/∂)(Subscript[x, 1]),  
    (Subscript[P, 2]) = (∂/∂)(Subscript[x, 2]),  
    (Subscript[P, 3]) = (∂/∂)(Subscript[x, 3])·

Mathematica Implementation is straightforward.

Here is the table of commutators.

CommutatorTable({(Subscript[R, 1]), (Subscript[R, 2]), (Subscript[R, 3]), (Subscript[P, 1]), (Subscript[P, 2]), 
        (Subscript[P, 3])}, {(Subscript[x, 1]), (Subscript[x, 2]), (Subscript[x, 3])})

Code

. CalculusLive and Authoring Tools

CalculusLive ⟨http://store.wolfram.com/view/ISBN0471317888⟩ is an electronic book resulting from the Harvard Calculus Project.

.  Figures, tables, and solvers

Took ~240 hours (i.e., 6 man-weeks) to complete and consists of

320 live figures (e.g., §§3.1.1, 9.2.2, 20.4.2)

55 live tables (e.g., §§7.6.2, 17.2.2)

72 solvers

.  Authoring tools

. Conclusions

Notebook interface is a good presentation, teaching, and research tool

Good authoring tools simplify the production of good teaching tools

Students use the tools that they are taught which means that it is important that we teach them using the best tools available

Rather than using a collection of small programs designed to elucidate one or two concepts, it is advantageous to teach tools that have wide application

Students enjoy using Mathematica and can use it for mathematics, engineering, economics, physics, geophysics, chemistry, etc.