Mathematica Testing  Examples

Select "Evaluation/Evaluate Initialization Cells" from the menu above!

In this notebook we test some often used built-in functions of Mathematica with the use of

?Timing

Click the symbol  » !

Results. The remarks "Max time used " show the time needed years ago with earlier versions of Mathematica under Windows or Linux, on personal computers more than 12 years ago. The minimal results are reached now with Mathematica v. 7.0, under SuSE Linux 11.1, on a Dell Prewcision 370 workstation with 4 GB Ram, bought 2004.

?Date

Date[]

Timing[1000!]

Max time used:  0.219, Min: 0. s

?N

?Pi

Timing[N[π,5000]]

Max time used 5.218, min 0.004 s

The standard path where Mathematica looks for Files

?$Path

$Path

?Plot3D

Timing[Plot3D[Sin[x y],{x,0.,4.},{y,0.3,4.},PlotPoints->80]]

Max time used, 58.057, min 0.996062s

Timing[Plot3D[Sin[(x/y)],{x,0.,4.},{y,0.3,4.},PlotPoints->50]]

Max time used 9.117, min 0.472029 s

Timing[Plot3D[Cos[x y],{x,0.,4.},{y,0.,4.}]]

Max time used 1.099, min 0.204013 s

?FactorInteger

Timing[FactorInteger[1001!]]

Max time used 2.197, min 0.012 s

We define a function. For getting information about  this matter select the words function with the mouse and press the key F1! Click and read the item "Defining Functions".

ft[x_]:=Cos[Sin[Sqrt[1/x]]]

ft[x]

?D

Timing[D[ft[x],x]]

Max time used  0.329, min 0. s

?NIntegrate

Timing[NIntegrate[ft[x],{x,0.01,5}]]

Result: 3.97412
Max time used  1.977, min 0.008 s

?Plot

Timing[Plot[ft[x],{x,0.001,.5}]]

Max time used 1.043;, min =.02 s

Modern computers have and modern programs need more memory:

MaxMemoryUsed[]

Earlier: 946800.

MemoryInUse[]

Earlier:805496,  Dell 1349680;  1725184;