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.

 
AAPL
$117.89
Apple Inc.
+1.42
MSFT
$47.85
Microsoft Corpora
-0.14
GOOG
$541.65
Google Inc.
+4.15

MacTech Search:
Community Search:

Software Updates via MacUpdate

Duplicate Annihilator 5.1.1 - Find and d...
Duplicate Annihilator takes on the time-consuming task of comparing the images in your iPhoto library using effective algorithms to make sure that no duplicate escapes. Duplicate Annihilator detects... Read more
Cobook 3.0.7 - Intelligent address book....
Cobook Contacts is an intuitive, engaging address book. Solve the problem of contact management with Cobook Contacts and its simple interface and powerful syncing and integration possibilities.... Read more
StatsBar 1.9 - Monitor system processes...
StatsBar gives you a comprehensive and detailed analysis of the following areas of your Mac: CPU usage Memory usage Disk usage Network and bandwidth usage Battery power and health (MacBooks only)... Read more
Cyberduck 4.6 - FTP and SFTP browser. (F...
Cyberduck is a robust FTP/FTP-TLS/SFTP browser for the Mac whose lack of visual clutter and cleverly intuitive features make it easy to use. Support for external editors and system technologies such... Read more
Maya 2015 - Professional 3D modeling and...
Maya is an award-winning software and powerful, integrated 3D modeling, animation, visual effects, and rendering solution. Because Maya is based on an open architecture, all your work can be scripted... Read more
Evernote 6.0.1 - Create searchable notes...
Evernote allows you to easily capture information in any environment using whatever device or platform you find most convenient, and makes this information accessible and searchable at anytime, from... Read more
calibre 2.11 - Complete e-library manage...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital... Read more
Herald 5.0.1 - Notification plugin for M...
Note: Versions 2.1.3 (for OS X 10.7), 3.0.6 (for OS X 10.8), and 4.0.8 (for OS X 10.9) are no longer supported by the developer. Herald is a notification plugin for Mail.app, Apple's Mac OS X email... Read more
Firetask 3.7 - Innovative task managemen...
Firetask uniquely combines the advantages of classical priority-and-due-date-based task management with GTD. Stay focused and on top of your commitments - Firetask's "Today" view shows all relevant... Read more
TechTool Pro 7.0.6 - Hard drive and syst...
TechTool Pro is now 7, and this is the most advanced version of the acclaimed Macintosh troubleshooting utility created in its 20-year history. Micromat has redeveloped TechTool Pro 7 to be fully 64... Read more

Latest Forum Discussions

See All

Playdek has Annouced a Delicious Thanksg...
Playdek has Annouced a Delicious Thanksgiving Sale Posted by Jessica Fisher on November 24th, 2014 [ permalink ] Playdek, makers of | Read more »
Pair Solitaire Review
Pair Solitaire Review By Jennifer Allen on November 24th, 2014 Our Rating: :: ADDICTIVE. SO ADDICTIVEUniversal App - Designed for iPhone and iPad Welcome to your new ‘five more minutes, oh no, why is it dark outside’ addiction.   | Read more »
DryGin Studios Release a Free-to-Play Ve...
DryGin Studios Release a Free-to-Play Version of Bio Inc Posted by Ellis Spice on November 24th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
The Hunted Review
The Hunted Review By Jordan Minor on November 24th, 2014 Our Rating: :: A GROAN IN THE DARKUniversal App - Designed for iPhone and iPad The Hunted’s multiplayer thrills are overshadowed by bland visuals and average gameplay.   | Read more »
Need for Speed No Limits has Been Unveil...
Need for Speed No Limits has Been Unveiled for iOS Posted by Ellis Spice on November 24th, 2014 [ permalink ] EA and Firemonkeys have announced Need for Speed No Limits, the next mobile installment | Read more »
Space Expedition Review
Space Expedition Review By Jordan Minor on November 24th, 2014 Our Rating: :: ONE SMALL STEPUniversal App - Designed for iPhone and iPad The only thing boring about Space Expedition’s lonely journey is its title.   | Read more »
Ubisoft Gives Everyone Two New Ways to E...
Ubisoft Gives Everyone Two New Ways to Earn In-Game Stuff for Far Cry 4 Posted by Jessica Fisher on November 21st, 2014 [ permalink ] | Read more »
Golfinity – Tips, Tricks, Strategies, an...
Dig this: Would you like to know what we thought of being an infinite golfer? Check out our Golfinity review! Golfinity offers unlimited ways to test your skills at golf. Here are a few ways to make sure your score doesn’t get too high and your... | Read more »
Dark Hearts, The Sequel to Haunting Meli...
Dark Hearts, The Sequel to Haunting Melissa, is Available Now Posted by Jessica Fisher on November 21st, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Meowza! Toyze Brings Talking Tom to Life...
Meowza! | Read more »

Price Scanner via MacPrices.net

Jumptuit Launches One-Tap Windows 8.1 iTunes...
Jumptuit has launched Windows 8.1 support for One-Tap iTunes Sync. with which Windows 8.1 users can now easily sync their iTunes libraries with Microsoft OneDrive. Jumptuit provides easy access from... Read more
CEA Study Finds More People Recycling Electro...
A new study by the Consumer Electronics Association (CEA) finds that electronics recycling receives the continued and growing support of consumers. According to the CEA,s Recycling and Reuse Study,... Read more
15″ 2.2GHz Retina MacBook Pro on sale for $17...
 B&H Photo has the 2014 15″ 2.2GHz Retina MacBook Pro on sale today for $1749. Shipping is free, and B&H charges NY sales tax only. B&H will also include free copies of Parallels Desktop... Read more
27-inch 3.5GHz 5K iMac in stock today and on...
 B&H Photo has the new 27″ 3.5GHz 5K iMac in stock today and on sale for $2299 including free shipping plus NY sales tax only. Their price is $200 off MSRP, and it’s the lowest price available... Read more
21-inch 1.4GHz iMac on sale for $979, save $1...
B&H Photo has the new 21″ 1.4GHz iMac on sale for $979.99 including free shipping plus NY sales tax only. Their price is $120 off MSRP. B&H will also include free copies of Parallels Desktop... Read more
13-inch 1.4GHz/256GB MacBook Air on sale for...
B&H Photo has lowered their price on the 13″ 1.4GHz/256GB MacBook Air to $1059.99 including free shipping plus NY sales tax only. Their price is $140 off MSRP, and it’s the lowest price for this... Read more
Save up to $400 with Apple refurbished 2014 1...
The Apple Store has restocked Apple Certified Refurbished 2014 15″ Retina MacBook Pros for up to $400 off the cost of new models. An Apple one-year warranty is included with each model, and shipping... Read more
New 13-inch 1.4GHz MacBook Air on sale for $8...
 Adorama has the 2014 13″ 1.4GHz/128GB MacBook Air on sale for $899.99 including free shipping plus NY & NJ tax only. Their price is $100 off MSRP. B&H Photo has the 13″ 1.4GHz/128GB MacBook... Read more
Apple Expected to Reverse Nine-Month Tablet S...
Apple and Samsung combined accounted for 62 percent of the nearly 36 million branded tablets shipped in 3Q 2014, according to early vendor shipment share estimates from market intelligence firm ABI... Read more
Stratos: 30 Percent of US Smartphone Owners t...
Stratos, Inc., creator of the Bluetooth Connected Card Platform, has announced results from its 2014 Holiday Mobile Payments Survey. The consumer survey found that nearly one out of three (30 percent... Read more

Jobs Board

*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
*Apple* Solutions Consultant (ASC)- Retail S...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
Project Manager, *Apple* Financial Services...
**Job Summary** Apple Financial Services (AFS) offers consumers, businesses and educational institutions ways to finance Apple purchases. We work with national and Read more
*Apple* Store Leader Program - College Gradu...
Job Description: Job Summary As an Apple Store Leader Program agent, you can continue your education as you major in the art of leadership at the Apple Store. You'll Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.