--------------------------- INTRODUCTION TO MATHEMATICA CTJ Dodson --------------------------- If you have Mathematica 3 or 4 on your machine, then download a copy of the beginners NoteBook: http://www.ma.umist.ac.uk/kd/mmaprogs/TRYMMA.nb open it inside Mathematica and follow the instructions to get started. Mathematica provides a language and a compute engine for doing mathematics analytically, numerically and graphically in an interactive environment. It has built into its core all of the standard properties of special functions from analysis, calculus and statistics. These functions are accessible through a simple syntax that uses the standard mathematical name for functions and an easily remembered argument form. For example, to plot the function sin(xy) over the domain -Pi to +Pi for x and y we command: Plot3D[Sin[x y], {x,-Pi,Pi}, {y,-Pi,Pi}] [commands are entered by ] and to integrate the function over the same region we command: Integrate[Sin[x y], {x,-Pi,Pi}, {y,-Pi,Pi}] To differentiate sin(xy) with respect to x we command: D[Sin[x y],x] and to find the third derivative with respect to x we command: D[Sin[x y],{x,3}] You can copy and paste these commands into a Mathematica NoteBook. A question mark before a command will yield details of how to use it: ?Plot3D yields the information Plot[f, {x, xmin, xmax}] generates a plot of f as a function of x from xmin to xmax. Plot[{f1, f2, ...}, {x, xmin,xmax}] plots several functions fi. and similarly we obtain: ?DSolve DSolve[eqn, y[x], x] solves a differential equation for the functions y[x], with independent variable x. DSolve[{eqn1, eqn2, ...}, {y1[x1, ...], ...}, {x1, ...}] solves a list of differential equations. Try the introductory Mathematica NoteBooks in this directory: [Note that *.ma files can be used for Mathematica Version 2 and for Version 3 (just click the `convert' option when asked in 3)] TRYMMA.nb (Self-Tutor for beginners in Mathematica) MI.nb (Longer Self-Tutor for beginners in Mathematica) MathIntro.ma (General introduction for mathematical work) StatsIntro.ma (Mathematica for elementary statistics) StatsIntro.nb RSA1.nb (RSA Encryption using Mathematica) ODEtry.ma (Mathematica for ordinary differential equations) ODEtry.nb (Uses the Gray-Mezzino ODE.m package---see below) CurvOnSurf.ma (Plotting a curve on a given surface) CurvOnSurf.nb study.ma (Outline sample NoteBooks for those needing to prepare study.nb an assignment on curves and surfaces) ## NOTE: All *.ma NoteBooks may be used in Mathematica 2.2 and 3.0. ## In 3.0 you select the option to convert them to *.nb format for ## running and saving. In both versions you can call in the files ## of type *.m to install the special functions (eg SURFS.m etc) ## using <<~/SURFS.m where ~/ is the full pathname for the ## location in which you have saved your copy of SURFS.m To use these NoteBooks fully you need to have access to the package Mathematica (available to staff and students at UMIST) but you can read NoteBooks with the free package MathReader (see below*) First save the files you want from http://www.ma.umist.ac.uk/kd/mmaprogs/ onto your system. Do this using eg Netscape to call up the file you want, then select `File' `Save-As' and choose where locally you wish to save it, eg c:\ on your PC. Start a Mathematica session (or launch MathReader) and then select `File' then `Open' MI.ma [commands are entered by or by `Action' `Evaluate' from the menubar] **************************************************************** **************************************************************** *MathReader MathReader is available free for downloading from Wolfram's webpages: For PCs: http://www.wolfram.com/mathematica/MathReader/win.html For Macs: http://www.wolfram.com/mathematica/MathReader/mac.html For Suns: http://www.wolfram.com/mathematica/MathReader/unix.html --------------------------------------------------------------------- Back to --------------------------------------------------------------------- You can find more Mathematica NoteBooks via the webpage http://www.ma.umist.ac.uk/kd/stmath/stmath.html Note that Mathematica NoteBook files (ending with .nb) and Mathematica function definition files (ending with .m) are ASCII text and can be transferred by ftp or email. The first few lines of a .ma file will tell you more about this if you open it in a text editor. For general information on Mathematica see the webpage: http://www.wolfram.com/ To hunt for Mathematica packages on any particular topic use the search engine at: http://www.wolfram.com/mathsource/ To use the integrator package to do an indefinite integral online go to: http://www.integrals.com/ For a gallery of graphics: http://www.wolfram.com/look/gallery.html -------------------------------------------------------------------------------- ----------------------------------------------------- ORDINARY DIFFERENTIAL EQUATIONS: MATHEMATICA PROGRAMS A.Gray and M.Mezzino ----------------------------------------------------- The files in this section are available by anonymous ftp from: Gray and Mezzino ODE materials and were written by Alfred Gray and Mike Mezzino to support the book: "Ordinary Differential Equations" due to be published in 1997. For more details, a full hypertext documentation and source code see http://www.ma.umist.ac.uk/kd/ode/ode.htm Gray and Mezzino ODE materials ICTCM.ma Teaching notebook for using the ODE package CompNum.ma Comparison of numerical methods for ODEs DirField.ma Direction fields and integral curves of some ODEs LinPhPor.ma Linear phase portraits: repellors and attractors of ODEs Resonance.ma Illustrates resonance conditions of ODEs Sound.ma Illustrates sound generation from a solution of an ODE VarInit.ma Illustrates effect of variation of ODE initial data --------------------------------------------------------------------- ------------------------------------------------ CURVES AND SURFACES: MATHEMATICA INPUT FUNCTIONS A.Gray ------------------------------------------------ README (Version 1.1 Curves and Surfaces) The files in this section are available in compressed form by anonymous ftp from: bianchi.umd.edu/pub/ and were written by Alfred Gray of the University of Maryland to support his book: "Modern Differential Geometry of Curves and Surfaces" Published by CRC Press, Boca Raton, 1993. Professor Gray has kindly allowed them to be used on our system. This material won the 1993 EDUCOM prize for software development. Mathematica input files include CSPROGS.m, CURVES.m, CURVES2D.m, ICURVES2D.m, PCURVES2D.m, CURVES3D.m, PLOTPROG.m, SURFS.m, ISURFS.m and ACRO.m The Notebooks, include CURVES2D.ma, CURVES3D.ma, SURFS.ma. etc and *.mov for movies. See a summary below. The Mathematica notebooks provide a guided tour of curves and surfaces; note that some movie files are quite large, and some computations of graphics may take a long time on computers that have slow processors or too little RAM. For the general curves and surfaces programs, first call in <<~/CSPROGS.m The files CURVES.m and SURFS.m contain most of the known curves and surfaces from classical geometry in a form ready to use in a Mathematica session. ICURVES.m and ISURFS.m contains the parametric versions and ImplicitPlot3D. To call in the files CURVES.m and SURFS.m in a Mathematica session use <<~/CURVES.m <<~/SURFS.m where ~/ is the full pathname for the location in which you have stored your copy of CURVES.m (eg C:\CURVES.m etc) You only need to input the defining files once; Mathematica seems to be upset if some packages are called in twice! Note that the *.m files are plain ASCII so you can read and search through them with a text editor---this is very useful if you quickly want the definition of a particular curve or surface. If you wish, you can use the Mathematica function "Needs" to call in the above packages, but then you will have to use the command: AppendTo[$Path,"~/CandS"] where ~/CandS is the full pathname of the directory in which you have put the files. For the NoteBooks, when you call them in and are prompted whether or not to initialize them, decline initialization to try out. They run as they are; if you get an error it is probably because one or other of the special functions has not been input. See Alfred Gray's book for full details of which functions are needed for which operations. In order to rerun the commands in a NoteBook, you need to initialize it, or equivalently, run the commands like <<~/CURVES.m to call in the packages as needed. You can view CURVES.m in any text editor and search through it to find particular curves and their defining equations. You can hunt through the appropriate file to find the defining function for a curve or surface whose name you know. Also, you can use the programs in CSPROGS.m to do operations on the curvaes and surfaces. The book "Modern Differential Geometry of Curves and Surfaces" contains images of the curves and surfaces, including colour graphics of many examples. Here's a summary of files and their contents: CSPROGS.m contains miniprograms for manipulating curves and surfaces. CURVES2D.m contains parametrizations of plane curves. CURVES.m ICURVES2D.m contains implicit definitions of plane curves. PCURVES2D.m contains polar definitions of plane curves. CURVES3D.m contains parametrizations of space curves. SURFS.m contains parametrizations of surfaces. ISURFS.m contains implicit definitions of surfaces and the package: ImplicitPlot3D MINCURVS.m contains definitions of minimal curves. DRUMPLOT.m contains drum programs. METPROGS.m contains definitions of abstract surface metrics. PLOTPROG.m contains useful plotting commands that supplement those of Mathematica. ACRO.m contains programs to convert Mathematica graphics to files readable by Acrospin. MM2MESH.m contains programs for writing mesh files for Geomview. TUBES.m contains precomputed formulas for tubes about space curves. GMCUR.m contains precomputed formulas for the Gaussian and mean curvature of surfaces. The Mathematica notebooks CURVES2D.ma, CURVES3D.ma, SURFS.ma provide a guided tour via Mathematica of "Modern Differential Geometry of Curves and Surfaces". The other notebooks explain various topics. In particular, Moebius.ma is a notebook about the Moebius strip. PlaneCurves.ma is a notebook about plane curves. Steiner.ma is about Steiner's Roman surface. ROMAN.mov is an animation of Steiner's surface FundTheor.ma illustrating the fundamental theorem of plane curves. KLEIN.ma gives an embedding of a Klein bottle BesselDrum.ma is a vibrating drum movie. CycloidMovie.ma is a cycloidial pendulum movie. FermatSpiral.ma is a Fermat spiral movie. HelixMovie.ma is an animation of a Frenet frame moving on a helix. HENNEBERG.ma is an animation of Hennebergs minimal surface Spherical3Hel.ma Spherical helix movie SphericalNephroidMovie.ma Spherical nephroid movie Spring3D.ma Vibrating spring movie SpringMovie.ma Vibrating spring movie---more details THOMSEN.mov is an animation of Thomsen's surface TORUSKNOT.ma is notebook that draws some knots VivianiMovie.ma is an animation of a Frenet frame moving on Viviani's curve. ----------------------------------------------------------------------------- ------------------------------------------------------------------------------