TweetFollow Us on Twitter

Mathematica 40

Volume Number: 15 (1999)
Issue Number: 8
Column Tag: Review

Mathematica 4.0

by Fredrick Olness

A review for developers and programmers

Introduction

Mathematica is a system for doing mathematics by computer. Although this definition does a good job of characterizing Mathematica, it is difficult to convey the full scope in a single phrase. Its various applications include: numeric and symbolic calculation, graphical visualization, high level programming, data modeling and analysis, scientific/mathematical typesetting, and an interactive control environment for external processes.

Mathematica is fundamentally an interactive interpreter. This has the inherent advantage that the user receives immediate feedback for each input, and can build and debug complex projects with ease. Of course, the downside is that an interpreted language is never as fast as a compiled one; however, for many applications, the development speed more than compensates for the execution speed. For some of my projects, I was able to write the code in a day with Mathematica, rather than the week it would take with compiled C code - given this advantage, I wasn't bothered that the code ran in 3 minutes instead of 1 minute.

Where Is This Review Going

The following is an overview of Mathematica aimed at programmers and developers, and highlights some of the recently enhanced features. This is not an exhaustive description of Mathematica; there is a comprehensive 1400 page book which fills this need. (Wolfram 1996, 1999). Nor is this a basic introduction; you can find a succinct tutorial at: http://www.wolfram.com/products/mathematica/tour/.

To make the code in this article easier to read, I have used the Courier font to represent Mathematica Input and Output. Input is shown in bold Courier, and Output is shown in normal Courier.

A Brief History of Mathematica

The first version of Mathematica was released in 1988. One of the key features that distinguished Mathematica from earlier programs was the "notebook" interface which allowed the user to mix input, output, and graphics in a single uniform environment. In the following years, numerous improvements followed.

Mathematica 3.0, released in 1996, represented a major advance over the previous versions. Significant enhancements included: integrated WYSIWYG typesetting capabilities for input as well as output, palettes to simplify input, notebook conversion to TeX and HTML, optimized memory usage, faster kernel algorithms, and support for international character sets and Unicode. Note Mathematica not only supports a wide variety of international languages, but it also supports Klingon making it, I believe, the first intergalactic software program.

So what will you notice when you take the shrink-wrap off Mathematica 4.0? While the "look and feel" is quite similar to version 3.0, you really need to take a good look "under the hood" to see the large number of enhancements and improvements.

A key improvement to the kernel is packed-array technology. This technique significantly reduces the overhead in handling large structures such as vectors and matrices, and thereby speeds the computation. This is one of the critical features which allows an interpreted language such as Mathematica to compete with a compiled program. (Typical improvements are an order of magnitude, cf., Table 1.) And, the casual observer of Mathematica 4.0 won't notice the packed-array implementation by design; it has been seamlessly integrated into the existing framework.

Calculation Mathematica 3 Mathematica 4 Ratio
Sin[M] 2.433 Second 0.130 Second 18:1
(M+1)^100 4.426 Second 0.311 Second 14:1
Min[M] 4.487 Second 0.020 Second 22:1

Table 1.In this example, M is a 500x500 array of random real numbers, the comparative timings are shown for a 300MHz G3 processor.

Another improvement that may not be immediately apparent is the improved algorithms for computing exponential functions. This may not excite you until you realize that the exponential function is at the heart of many special functions; therefore, speeding up this one operation speeds up a wide class of computations.

A large number of functions have been added and extended. For example, a Dirac delta function and other generalized functions have been defined. While this may not catch your immediate attention, as soon as you need to perform analytic operations with Fourier transforms and generalized distribution functions, such functionality becomes essential. (This has important applications in my research field.)

Finally, there have been a number of noteworthy higher-level programmatic improvements. Mathematica's ability to export documents in all flavors of TeX (LaTeX 2.09, LaTeX2e, and custom packages) and HTML (with support for MathML) has been enhanced and expanded. These features, with the addition of a spell checker and automatic hyphenation, allow you to easily compute and publish technical documents in Mathematica.

Overview and Case Studies

It is impossible to catalogue the features of Mathematica in a short article; therefore, I will present sample applications where the abilities of Mathematica might be of use to an advanced programmer. Where appropriate, I will note recent enhancements.

2-D Graphics

One of the strongest features of Mathematica (and one that my physics students are most drawn to) is the very flexible graphics capabilities. Let me illustrate my point by considering the following 2-D plot of the Gamma function:

Plot[ Gamma[x],{x,-5,5}];


Immediately we see some important graphics features of Mathematica.

  • While the Gamma function contains many singularities, Mathematica has no difficulty displaying these. (In contrast, this example will crash in many simple C or Fortran graphics routines.)
  • Mathematica makes some intelligent decisions about what regions of the plot are interesting, and shows us only the region of the plot that contains the most structure. Were it to automatically display all the sampled points, the result (shown in the second figure below) would be less informative.
Plot[ Gamma[x],{x,-5,5},PlotRange->All];

While these features may seem only a matter of convenience, it is precisely such capabilities that make Mathematica a powerful graphics programming language. For example, you can automatically generate graphics inside a complex program without specific information about the singularity structure, or prior knowledge of the viable plot range. These features can be used to automatically plot various quantities at intermediate stages of a long calculation. This allows a visual cross check as the calculation proceeds, and serves as an early warning if an error has occurred. As I may be generating ~100 plots per run, I cannot concern myself with fine-tuning plot ranges or stepping over singularities; that's Mathematica's job.

3-D Graphics

Mathematica also supports a variety of 3-Dimensional plots. A simple example is to plot the real part of the Sin function in the complex plane. (Here, "I" represents the imaginary number squareroot of -1.)

Plot3D[Sin[x+ I y] //Re,{x,0,10},{y,0,2}];

However, another way of displaying this information is via a contour plot shown in the following figure.

ContourPlot[Sin[x+ I y] //Re,{x,0,10},{y,0,2}];

Note here how the arguments of the function calls are identical. Mathematica is careful to provide a consistent interface, and this helps the user climb the learning curve quickly.

The new version of Mathematica also includes experimental and developer contexts providing the user access to features still under development. One exciting feature is the ability to perform RealTime3D rotation and zooming of 3D graphics - a nice feature that is frequently requested by users. (Note, RealTime3D is not yet available on all platforms.)

Graphics and Animation

In many examples, graphical animation can convey information much more effectively than either words or equations. An example I use for my physics students is demonstrating how two traveling waves comprise a standing wave. One can either wade through complex trigonometric identities, or one can simply animate the graphs. The animation immediately yields an intuitive understanding of the underlying principles. But enough words. Since I can't show you here, go to my web site, and try it: <http://www.physics.smu.edu/~olness/ftp/misc/math4>.

In this graphics animation, the blue and green curves (thin lines) represent traveling waves moving in opposite directions. The red curve (thick line) is the sum of the two. The animation clearly shows that the sum forms a standing wave.

Graphics Programming

One of the strongest features of Mathematica is that if you don't like the way something is implemented in Mathematica, you can easily change it or build your own version. Particularly with respect to graphics, Mathematica has a large number of graphics primitives that the user can easily assemble into complex constructs.

A Simple Graphics Programming Example

I provide a simple example below. This example is of little practical use, but it does demonstrate how one can easily build up complex graphics from simple steps. This simple example illustrates how one can use Mathematica primitives such as Polygon and Line to quickly construct more complex objects, as depicted in the following.

makeList[x_,y_,scale_:1] =
	Table[	{x+scale Cos[n 2 Pi/6]/10
				,y+scale Sin[n 2 Pi/6]/10},{n,0,6}]
point[x_,y_]= 	{Polygon[	makeList[x,y,1]]
							,Line[			makeList[x,y,2]]};
group[x_,y_]=
{	RGBColor[1,0,0], point[x+1,y+1],
	RGBColor[0,1,0], point[x+1,y+0],
	RGBColor[0,0,1], point[x+0,y+1/2]
}
( Table[group[Random[],Random[]],{i,5}]
 //Graphics 
 //Show[#,AspectRatio->1]&
)

This simple example uses makeList to generate a list of 6 points in a hexagonal pattern. point generates a filled hexagon surrounded by a line with twice the radius. group places three of these objects together with various RGB colors, and the final Table generates 5 random sets of these for display in the figure.

Fractals

A more interesting example is shown in the next instance where I have generated a fractal structure. Such an exercise is a simple task (at least in Mathematica) for an average student.

reduce[point_]:= point/3;								(* Reduce by x3  *)
transx[point_]:= point + (2/3 {1,0});		(* Translate in X *)
transy[point_]:= point + (2/3 {0,1});		(* Translate in Y *)
p0={Random[],Random[]}									(* Initialization *)
list={};
Do[
  p1=reduce[p0]; 											(* Reset p1 *)
  p1=If[Random[]>0.5,transx[p1],p1]; 	(* Translate in X *)
  p1=If[Random[]>0.5,transy[p1],p1]; 	(* Translate in Y *)
  list=Append[list,p1];								(* Append to list *)
,{i,1,3000}]
ListPlot[list
  ,PlotStyle->{PointSize[0.005]}
  ,PlotRange->{{0,1},{0,1}}
  ,Axes->False
  ,AspectRatio->1
  ];

This fractal structure is generated by mapping the unit square onto a 1/3-scale unit square, and then randomly translating along the x- and y-axes. The pattern is infinitely recursive and only limited by the resolution of our plotting device.

Getting Help

Mathematica has a number of facilities for providing assistance to the user. The Help Browser contains the entire 1400 pages of the Mathematica book on-line at the users fingertips. This is a complete source of information covering built-in functions, add-on packages, tutorials, demos, and simple examples that can be cut-and-pasted into Mathematica.

Below, I provide a few examples of how this information is easily accessible to the user. If you want to make a plot, but can't recall the exact name, you can ask Mathematica for everything that begins with "Plot,"

?Plot*
Plot     PlotDivision PlotPoints  PlotRegion
Plot3D    PlotJoined  PlotRange  PlotStyle
Plot3Matrix PlotLabel

Having found the name, you can ask for more detail on the function in which you are interested:

?Plot3D
"Plot3D[f, {x, xmin, xmax}, {y, ymin, ymax}] generates a three-dimensional plot of f as a function of x and y. Plot3D[{f, s}, {x, xmin, xmax}, {y, ymin, ymax}] generates a three-dimensional plot in which the height of the surface is specified by f, and the shading is specified by s."

Then, you can have Mathematica create a template for the function so you know the exact calling sequence.

Plot3D[f, {x, xmin, xmax}, {y, ymin, ymax}]

For external packages, you can determine all functions which are defined by a particular package.

Needs["Graphics'Graphics'"]
?Graphics'Graphics'*
BarChart	LinearLogPlot	PieExploded
BarEdges	LinearScale	PieLabels
 ...  (* I've omitted some to save space *)
GeneralizedBarChart	PercentileBarChart	TransformGraphics
LabeledListPlot	PieChart	UnitScale
LinearLogListPlot

With this range of on-line help, you can go a long way without having to reach for the hard copy manuals on the shelf.

Typesetting

With version 3.0, mathematical typesetting was integrated into Mathematica. I give a simple example below, but the reader can find a wide range of examples on the web at: documents.wolfram.com/v4/MainBook/Contents/None.html in the Formula Gallery.

Here, I provide a simple example which demonstrates how Mathematica can combine integrals, sums, fractions, Greek and special characters uniformly into an expression.

This may not seem so impressive until we compare the above with what the expression would have looked like without the typeset form:

Integrate[Sum[phi[alpha,n,y]/(1+beta/(1+gamma/(1+delta))),{n,1,Infinity}],{y,- I Infinity,I Infinity}]

Clearly, the typeset notation greatly enhances our ability to assimilate Mathematica's input and output. More important than simply displaying the output in typeset form, Mathematica can easily work with such expressions in a seamless manner. For example, the user can highlight a portion of the above expression, and paste it as input elsewhere in the notebook; this feature is critical in handling typeset expressions as both input and output. While this short description is highly inadequate to cover the typesetting enhancements, it does provide a glimpse of what is available.

Import/Export: TeX, HTML, Adobe, etc. ...

Mathematica has a wide variety of features useful in generating publication quality graphics and text. In version 3.0, Mathematica's ability to handle technical typesetting (multiple fonts, superscripts and subscripts) was greatly enhanced. In version 4.0, the range of Import/Export features has been expanded so that you can use Mathematica to collect calculations, figures, and text from a variety of sources and assemble them into a polished document.

One can export the finished Mathematica notebook as an HTML document for web publishing. The HTML output supports MathML which, although a bit verbose, ensures mathematical HTML expressions can be converted unambiguously back into unique Mathematica expressions.

For some applications, such as journal submissions or books, TeX output is preferred. Mathematica supports TeX, LaTeX 2.09 and LaTeX2e. And the ambitious user can actually fine-tune the TeX conversion to accommodate custom macro packages.

Mathematica's capability to generate publication quality plots has been greatly improved, and these are suitable for most needs. If the user has some particular need, the Mathematica plots can be easily exported in a variety of formats including EPS, PICT, and Adobe Illustrator.. For my presentations, I often generate plots in Mathematica, and export them as an Adobe Illustrator file. I can then manipulate them as needed with Illustrator or FreeHand (i.e., I can change my color scheme at the last minute), and then paste them into PageMaker.

Symbolics

Mathematica is of course adept at solving a variety of symbolic problems, and contains the necessary ability to Expand, Factor, Simplify, and Solve.

A new feature in Mathematica 4.0 is the ability to perform a simplification with assumptions. For example, a common expression we encounter in quantum physics is: Sin[np] where n is an integer. Mathematica can now handle this very elegantly as follows:

Simplify[Sin[n p], n ë Integers] 0

Mathematica contains complete solutions for quadratic, cubic, and quartic equations. Although there is no general closed-form solution for higher order equations, Mathematica represents the result in a symbolic form which can be evaluated numerically if desired.

eq1= 0 == 1 + 2 x + 3 x^2 + 4 x^3 + 5 x^4 + 6 x^5;
solution= Solve[eq1,x]
{{x->Root[1 + 2 #1 + 3 #1^2 + 4 #1^3 + 5 #1^4 + 6 #1^5&, 1]},
 {x->Root[1 + 2 #1 + 3 #1^2 + 4 #1^3 + 5 #1^4 + 6 #1^5&, 2]},
 {x->Root[1 + 2 #1 + 3 #1^2 + 4 #1^3 + 5 #1^4 + 6 #1^5&, 3]},
 {x->Root[1 + 2 #1 + 3 #1^2 + 4 #1^3 + 5 #1^4 + 6 #1^5&, 4]},
 {x->Root[1 + 2 #1 + 3 #1^2 + 4 #1^3 + 5 #1^4 + 6 #1^5&, 5]}
}
solution //N
{{x->-0.670332}
,{x->-0.375695-0.570175 I}
,{x->-0.375695+0.570175 I}
,{x-> 0.294195-0.668367 I}
,{x-> 0.294195+0.668367 I}}

This example illustrates how Mathematica can transparently switch from symbolic to numerical operations. We'll see this feature below for the case of interpolating functions.

Numerics

A common problem I encounter is that I want to take a curve from journal publication, and manipulate this result using my own analysis. The following example illustrates how one might do this with the use of interpolating functions. Given a set of data points, we generate an interpolating function fun[x], which is defined on the interval x=[1,4]. As expected, we can evaluate fun at intermediate points, such as fun[2.3].

data={1,4,9,16};
fun=Interpolation[data];
fun[2.3]
5.29

What might not be appreciated is the ability to perform operations on the interpolating function such as differentiation. Here, we plot fun, as well as its first and second derivatives. Note, that we can treat the interpolated function as though it were an analytic function.

Plot[{fun[x],fun'[x],fun''[x]},{x,1,4}];

MISSING IMAGE FIG09.GIF!!!!

If the data contains uncertainties, it may be preferable to fit the data to a smooth function. In Mathematica, this is a simple one-line calculation which reveals that the function is a pure quadratic.

Fit[data,{1,x,x^2},x]
1. x^2

Finally, to check the quality of the fit, we can overlay a plot of the function fit with the data points in order to visually verify the accuracy.

plot1= Plot[fit[x],{x,1,4}];
plot2= ListPlot[data,PlotStyle->PointSize[0.030]];
Show[plot1,plot2];

This combination of analytical, numerical, and graphical tools make the Mathematica environment the ideal platform for such analysis.

Integration

Analytic Integration

With Mathematica, you can essentially throw out your integral tables. For example, Mathematica can do all the integrals in Gradshtyen and Ryzhik (Gradshtyen and Ryzhik, 1994), and do them correctly. [For a compilation of mistakes Mathematica found in Gradshtyen and Ryzhik; see: <http://www.mathsource.com/Content/Publications/Other/0205-557>.] How can we be sure Mathematica did the integrals correctly? Because the results can be cross-checked using the numerical integration features. New in Version 3.0 is the ability to generate assumptions, as illustrated by the following.

This capability has been further enhanced in Version 4.0. And, of course, you can turn this option off if you only want the generic solution. Furthermore, you can extend Mathematica's capabilities by defining your own Integration exceptions.

Integrate[ MacTech[x_] ,x_] ^:= iMacTech[x]
Integrate[ MacTech[y],y]
iMacTech[y]

In this instance, we teach Mathematica that the integral of MacTech is iMacTech This rule will be added to Mathematica's built-in rules in a seamless manner.

Numeric Integration

Mathematica can also handle numerical integration with the same syntax. Here is a simple example to compute the volume of a sphere.

NIntegrate[ 2 Sqrt[Max[0,1-(x^2+y^2)]],{x,-1,1},
{y,-1,1}]
4.18879

A little checking reveals the answer is in fact (4/3 p), as it should be. To help visualize what we have computed, we can plot this function.

Plot3D[ Sqrt[Max[0,1-(x^2+y^2)]],{x,-1,1},{y,-1,1}]

Programming

The Mathematica language is flexible enough to allow for a variety of programming models. While Mathematica itself is written in an extended version of C, it borrows many constructs from other languages. Here, we use the computation of the Fibonacci sequence {1,1,2,3,5,8,13,21, ...} as an example to illustrate different approaches.

Fortran Style Programming

We start with a Fortran type of procedural approach using a Do loop.

n=6; tot[0]=tot[1]=1;	(* Initialization *)
Do[ tot[i] = tot[i-1] + tot[i-2],{i,2,n}] (* Loop *)
{n,tot[n]}	(* Output *)
{6,13}

C Style Programming

Here is a variation using a C style approach.

n=6;
For[ tot[0]=tot[1]=1; i=2	(* Initialization *)
   ,i<=n	(* Test *)
   ,i++	(* Increment *)
   ,tot[i]=tot[i-1]+tot[i-2]	(* Body *)
 ]
{n,tot[n]}	(* Output *)
{6,13}

Rule-Based Programming

Finally, we show the very efficient rule-based method.

f[0]=f[1]=1;	* Initialization *)
f[n_]:=f[n-1] + f[n-2]	(* Rule *)
{6,f[6]}	(* Output *)
{6, 13}

Since Mathematica can accommodate all of these styles of programming, the user is then free to select the style that best matches the needs of the task and the user's background.

Contexts and Subroutines

To create large complex applications, it is essential to decompose the problem into smaller tasks. Mathematica provides functionality to do this in a number of ways.

Function Subroutines

For example, one can create a function:

times[x_,y_]= x*y

Mathematica also has elaborate features to include default parameters:

times[x_,y_:2]= x*y

In this case, times[x] returns 2x. Mathematica also has elaborate features to perform pattern matching to arguments.

times[x_?NumericQ,y_Integer]= x*y

In this case, the above definition will only be used when the first argument is numeric, and the second is an integer. Again, this is a simple example, but we can use these features to produce some powerful results. For example, we can use this feature to test that the argument of the Fibonacci function (see above) is a positive integer, thereby avoiding an infinite recursion.

fibonacci[x_Integer]:=f[x] /; x>0
{fibonacci[6],fibonacci[-6],fibonacci[3.4]}
{13,fibonacci[-6],fibonacci[3.4]}

Procedure Subroutines

For more complex procedures, there is the equivalent of a subroutine available.

subroutine[length_,width_]:= 
	Module[{area},
		area= length * width;
		Return[area]
	];

Note here that the scope of the variables {length,width,area} are all local to the subroutine, and would not conflict with similarly named variables defined elsewhere by the user. This concept is key to building up a variety of functions without a conflict of function names.

Packages, Contexts, and Scopes

To go even further Mathematica allows us to create new contexts, or scopes. This is similar to the namespace concept in C++, cf., (Hommel, Hinnant, Mark, 1998).

x=1;					(* Define x in Global' context *)
Context[x] 	(* Verify x lives in the Global context *)
"Global'"
BeginPackage["package'"];		(* Begin package *)
x=2; 				(* Define x in package' context *)
Context[x] 	(* Verify x lives in the package' context *)
"package'"
EndPackage[];	(* End package *)
{x,Global'x,package'x}		(* Examine defined variables *)
{1,1,2}

In this example, the two assignments are not in conflict. The first assignment (x=1) assigns the Global variable Global'x to 1. The second assignment (x=2) assigns the package'x variable to 2. It is this contextual scoping capability which allows many independent packages to live together in harmony.

I can provide only a brief overview of Mathematica's programming ability. For an excellent description appropriate to an advanced level, see (R. Maeder, 1996).

Customization

One important underlying principle of Mathematica is: if you don't like the default implementation, you can customize it to your liking. With Mathematica 3.0, the Options Inspector was introduced which gives you access to literally hundreds of options and parameters. For example, you can specify formats for input, output, graphics, menus, and the details of notebook conversion to TeX and HTML. And, if you are really ambitious, you can even specify a time dependent function for the size of the line break cursor.

Mathematica provides a collection of sample notebook styles to choose from, but again, it is easy to customize these to your specific needs. Also, with version 3.0, Mathematica introduced palettes and buttons; these also come with pre-defined sets, but can be modified for special needs. Therefore, it is easy to create a custom palette linked to some chosen commands for use by introductory students. One application might be a set of palettes and buttons that would allow a beginning student to view an animation with a single click, and modify particular parameters with the use of a custom palette. Such functions provide a powerful collection of tools to customize the Mathematica interface.

Packages: Using Other's, and Writing Your Own

The standard distribution of Mathematica comes with many add-in packages for specific applications including the general categories: Algebra, Calculus, DiscreteMath, Geometry, Graphics, LinearAlgebra, Miscellaneous, NumberTheory, NumericalMath, StartUp, Statistics, and Utilities. This is a nice extra. What is even better is that the user has the ability to modify these standard packages, or easily write their own packages, at the same level that the Mathematica programmers write their packages. Therefore, should you discover that Mathematica does not quite cover some esoteric corner of a particular sub-field, you can write your own package to implement any desired features.

For example, in particle physics we often need to manipulate anti-commuting Dirac g matrices (a Clifford algebra) which have the property: {gm,gn} = 2 gmn. There have been many packages written to compute traces of Dirac matrices in an efficient manner including the very elegant package FeynCalc. FeynCalc will also do a whole lot more; it can actually perform entire 1-loop and 2-loop calculations of Feynman diagrams, cf. (Mertig 1999). The ability to write such custom packages allows one to teach Mathematica all the subtleties of one's field of expertise.

MATHLINK: Talking to C and Fortran Routines

In general, most everything you want to calculate can be done within Mathematica. However, there are instances where you may want communication between the Mathematica kernel and the outside world. The MathLink protocol provides a standard interface between Mathematica and any program that can understand C or Fortran. In my research, we have a few hundred thousand lines of legacy Fortran code. While it is impractical to import this functionality into Mathematica, using MathLink we can control these external programs from within the Mathematica environment. Given an external C or Fortran program, I can plot the function with Mathematica's 2-D and 3-D routines, perform interpolations and fits, and integrate and differentiate the function by using MathLink.

Portability and Platform Independence

A key advantage of Mathematica is that the code is platform-independent, and therefore completely portable. If you write it on a Mac, it will run the same on Windows, Unix, Next, VMS, etc. (Contrast this situation with running complex C code on two different flavors of Unix.)

This underscores the fact that the Mathematica environment provides a consistent interface to the underlying operating system - no matter what it might be. In fact, the operating system parameters are catalogued and controlled just like Mathematica objects. For example, the system search path is a list of ASCII strings that can be manipulated like any other Mathematica object. File access is also platform independent, and Mathematica performs the conversion of file identifiers to absolute file names.

Portability is essential when I distribute Mathematica homework solutions to my introductory students. For some students (fortunately, not many), my course is their first exposure to a mathematical computer program; therefore, it is important that the programs work correctly the first time on all platforms. These students do not posses the debugging skills necessary to trace down minor incompatibilities.

Mathematica now allows multiple kernels to be linked to a single notebook in a coordinated manner. For example, you might choose red cells to run the version 3.0 kernel, and blue cells to run the version 4.0 kernel.; this allows you to compare and experiment with different kernels on separate CPU's. One can also use this feature to compare different versions of a user's program side-by-side to quickly uncover differences and bugs.

Conclusion

Mathematica 4.0 provides a powerful set of tools in a flexible and customizable environment. It is flexible enough for the beginning student to use for simple math problems, yet powerful enough to solve highly technical analytic and numeric problems for the advanced user. Now with the increased speed of Mathematica 4.0, in addition to faster code development, the final Mathematica program will run on par with compiled programs. The ability to handle integrals, differentials, and special functions for both analytic and numeric computations is unsurpassed. This combination of capabilities and increased speed allows one to model realistic physical processes and display the output as a visual animation. The flexible interpreted environment is ideal for rapid development and prototyping of a diverse range of tasks.

Bibliography and References

  • Gradshteyn, I. S., and Ryzhjk, J. M. Table of Integrals, Series, and Products. 5th edition, Academic Press, 1994.
  • Hommel, Andreas, and Howard Hinnant, Dave Mark. The New C++ Standard: Namespaces. MacTech Magazine Vol.14, No.7, July 1998, p.61.
  • Maeder, Roman E. Programming in Mathematica. 3rd edition, Addison-Wesley, 1996.
  • Mertig, Rolf. FeynCalc 3.1.14 Manual, Tools and Tables for Quantum Field Theory Calculations. http://www.feyncalc.com/
  • Wolfram, Stephen. The Mathematica Book. 3rd edition, Cambridge University Press, 1996.
  • Wolfram, Stephen. The Mathematica Book. 4th edition, Cambridge University Press, 1999.
  • Wolfram Research, Inc. Errors in the Integral Tables of Gradshteyn and Ryzhik with Correct Results from Mathematica. Errors found by Mathematica in Gradshteyn and Ryzhik, "Tables of Integrals, Series, and Products" (4th Edition). http://www.mathsource.com/Content/Publications/Other/0205-557
  • Zimmerman, Robert L. and Olness, Fredrick I. Mathematica for Physics. Addison-Wesley, 1995. www.physics.smu.edu/~olness/www/book/

Useful Web Links:

  • My web page with sample Mathematica Notebooks: http://www.physics.smu.edu/~olness/ftp/misc/math4
  • New features in Mathematica version 4.0: http://www.wolfram.com/products/mathematica/newin4/
  • The Mathematica Book. A complete online version: http://documents.wolfram.com/v4/MainBook/Contents/None.html
  • Tour of Mathematica 4.0 Features: http://www.wolfram.com/products/mathematica/tour/
  • Mathematica Graphics Gallery: http://library.wolfram.com/graphics/

Fredrick Olness is an Associate Professor of Physics at SMU in Dallas, Texas. His research is in Theoretical Particle Physics, and he works with experimental collaborations at Fermilab in Illinois, and CERN in Geneva, Switzerland. He is a member of the CTEQ collaboration—a novel collaboration of theorists and experimentalists. He co-authored the textbook Mathematica for Physics, which integrates new computer algebra programs into the core physics curriculum. The Mathematica notebook containing the examples and animations discussed in this review is available on the web at: http://www.physics.smu.edu/~olness/ftp/misc/math4, and the author can be reached at olness@mail.smu.edu.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Yasu 4.0.0 β - System maintenance app; p...
Yasu was created with System Administrators who service large groups of workstations in mind, Yasu (Yet Another System Utility) was made to do a specific group of maintenance tasks quickly within a... Read more
Skype 7.37.0.178 - Voice-over-internet p...
Skype allows you to talk to friends, family and co-workers across the Internet without the inconvenience of long distance telephone charges. Using peer-to-peer data transmission technology, Skype... Read more
EtreCheck 3.0.5 - For troubleshooting yo...
EtreCheck is an app that displays the important details of your system configuration and allow you to copy that information to the Clipboard. It is meant to be used with Apple Support Communities to... Read more
Amadeus Pro 2.3.1 - Multitrack sound rec...
Amadeus Pro lets you use your Mac computer for any audio-related task, such as live audio recording, digitizing tapes and records, converting between a variety of sound formats, etc. Thanks to its... Read more
NeoFinder 6.9.3 - Catalog your external...
NeoFinder (formerly CDFinder) rapidly organizes your data, either on external or internal disks, or any other volumes. It catalogs all your data, so you stay in control of your data archive or disk... Read more
WhatsApp 0.2.1880 - Desktop client for W...
WhatsApp is the desktop client for WhatsApp Messenger, a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS. WhatsApp Messenger is available for... Read more
Hazel 4.0.6 - Create rules for organizin...
Hazel is your personal housekeeper, organizing and cleaning folders based on rules you define. Hazel can also manage your trash and uninstall your applications. Organize your files using a familiar... Read more
Apple iBooks Author 2.5 - Create and pub...
Apple iBooks Author helps you create and publish amazing Multi-Touch books for iPad. Now anyone can create stunning iBooks textbooks, cookbooks, history books, picture books, and more for iPad. All... Read more
MYStuff Pro 2.0.26 - $39.99
MYStuff Pro is the most flexible way to create detail-rich inventories for your home or small business. Add items to MYStuff by dragging and dropping existing information, uploading new images, or... Read more
MarsEdit 3.7.8 - Quick and convenient bl...
MarsEdit is a blog editor for OS X that makes editing your blog like writing email, with spell-checking, drafts, multiple windows, and even AppleScript support. It works with with most blog services... Read more

How to get past Vulture Island's tr...
Vulture Island is a colorful and quirky mish-mash of platforming and puzzles. It’s creative and fresh, but sometimes the game can throw a curveball at you, leaving you stuck as to how you should progress. These tips will help you explore smoothly... | Read more »
The new Clash of Kings is just for Weste...
If you’ve played the original Clash of Kings, you’ll probably recognise the city building, alliance forging and strategic battles in Clash of Kings: The West. What sets this version apart is that it’s tailor made for a Western audience and the... | Read more »
Frost - Survival card game (Games)
Frost - Survival card game 1.12.1 Device: iOS Universal Category: Games Price: $3.99, Version: 1.12.1 (iTunes) Description: *Warning: the game will work on iPhone 5C and above and iPad Pro / 4. Other devices are not supported* | Read more »
How to build and care for your team in D...
Before you hit the trail and become a dog sledding legend, there’s actually a fair bit of prep work to be done. In Dog Sled Saga, you’re not only racing, you’re also building and caring for a team of furry friends. There’s a lot to consider—... | Read more »
How to win every race in Dog Sled Saga
If I had to guess, I’d say Dog Sled Saga is the most adorable racing game on the App Store right now. It’s a dog sled racing sim full of adorable, loyal puppies. Just look at those fluffy little tails wagging. Behind that cute, pixelated facade is... | Read more »
Let the war games commence in Gunship Ba...
Buzz Lightyear famously said, “This isn’t flying, this is falling – with style!” In the case of Gunship Battle: Second War, though, this really is flying - with style! The flight simulator app from Joycity puts you in control of 20 faithfully... | Read more »
How to get a high score in Fired Up
Fired Up is Noodlecake Games’ high score chasing, firefighting adventure. You take control of a wayward firefighter who propels himself up the side of a highrise with blasts of water. Sound silly? It is. It’s also pretty difficult. You can’t... | Read more »
NBA 2K17 (Games)
NBA 2K17 1.0 Device: iOS iPhone Category: Games Price: $7.99, Version: 1.0 (iTunes) Description: Following the record-breaking launch of NBA 2K16, the NBA 2K franchise continues to stake its claim as the most authentic sports video... | Read more »
Dog Sled Saga (Games)
Dog Sled Saga 1.0.1 Device: iOS Universal Category: Games Price: $3.99, Version: 1.0.1 (iTunes) Description: A game by Dan + Lisa As a rookie musher, foster a dogsledding team whose skills will grow if they're treated right. Week by... | Read more »
60 Seconds! Atomic Adventure (Games)
60 Seconds! Atomic Adventure 1.2 Device: iOS Universal Category: Games Price: $2.99, Version: 1.2 (iTunes) Description: 60 Seconds! is a dark comedy atomic adventure of scavenge and survival. Collect supplies and rescue your family... | Read more »

Price Scanner via MacPrices.net

21-inch iMacs on sale for up to $120 off MSRP
B&H Photo has 21″ iMacs on sale for up to $120 off MSRP including free shipping plus NY sales tax only: - 21″ 3.1GHz iMac 4K: $1379 $120 off MSRP - 21″ 2.8GHz iMac: $1199.99 $100 off MSRP - 21″ 1... Read more
13-inch 2.7GHz/256GB Retina MacBook Pro on sa...
Amazon.com has the 13″ 2.7GHz/256GB Retina Apple MacBook Pro on sale for $151 off MSRP including free shipping: - 13″ 2.7GHz/256GB Retina MacBook Pro (sku MF840LL/A): $1348 $151 off MSRP Read more
Apple TVs on sale for up to $50 off MSRP
Best Buy has 32GB and 64GB Apple TVs on sale for $40-$50 off MSRP on their online store. Choose free shipping or free local store pickup (if available). Sale prices for online orders only, in-store... Read more
Apple refurbished 13-inch Retina MacBook Pros...
Apple has Certified Refurbished 13″ Retina MacBook Pros available for up to $270 off the cost of new models. An Apple one-year warranty is included with each model, and shipping is free: - 13″ 2.7GHz... Read more
Duplicate Sweeper Free On Mac App Store For O...
To celebrate the launch of Apple’s latest macOS Sierra, Stafford, United Kingdom based Wide Angle Software has announced that its duplicate file finder software, Duplicate Sweeper, is now available... Read more
13-inch Retina MacBook Pros on sale for up to...
B&H Photo has 13″ Retina Apple MacBook Pros on sale for up to $150 off MSRP. Shipping is free, and B&H charges NY tax only: - 13″ 2.7GHz/128GB Retina MacBook Pro: $1174.99 $125 off MSRP - 13... Read more
Evidence Surfaces Pointing To New A10X Chip F...
Citing a job description for a Project Lead position at Apple’s Austin, Texas engineering labs, Motley Fool’s Ashraf Eassa deduces that development is progressing well on Apple’s next-generation in-... Read more
Check Print’R for macOS Allows Anyone to Easi...
Delaware-based Match Software has announced the release and immediate availability of Check Print’R 3.21, an important update to their easy-to-use check printing application for macOS. Check Print’R... Read more
Apple refurbished 11-inch MacBook Airs availa...
Apple has Certified Refurbished 11″ MacBook Airs (the latest models), available for up to $170 off the cost of new models. An Apple one-year warranty is included with each MacBook, and shipping is... Read more
Apple refurbished 15-inch Retina MacBook Pros...
Apple has Certified Refurbished 2015 15″ Retina MacBook Pros available for up to $380 off the cost of new models. An Apple one-year warranty is included with each model, and shipping is free: - 15″ 2... Read more

Jobs Board

Sr. *Apple* Mac Engineer - Net2Source Inc....
…staffing, training and technology. We have following position open with our client. Sr. Apple Mac Engineer6+ Months CTH Start date : 19th Sept Travelling Job If Read more
*Apple* Retail - Multiple Positions-Norfolk,...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
Restaurant Manager (Neighborhood Captain) - A...
…in every aspect of daily operation. WHY YOU'LL LIKE IT: You'll be the Big Apple . You'll solve problems. You'll get to show your ability to handle the stress and Read more
Lead *Apple* Solutions Consultant - Apple (...
# Lead Apple Solutions Consultant Job Number: 51829230 Detroit, Michigan, United States Posted: Sep. 19, 2016 Weekly Hours: 40.00 **Job Summary** The Lead ASC is an Read more
US- *Apple* Store Leader Program - Apple (Un...
…Summary Learn and grow as you explore the art of leadership at the Apple Store. You'll master our retail business inside and out through training, hands-on Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.