Extracted by Lyle Long (PSU Aerospace Eng.) from a Mathimatica notebook tutorial, written by Chris Duffy (PSU Civil Eng.)
[ ] function arguments, ie Sin[x]
{ } list elements { 1.2, 2.0, 3.0 }
% refers to previous output line
%% refers to second previous output line
Clear [ x ]
x == y test whether x and y are equal
x := y set delayed
??Plot gives detailed help on Plot
2 Pi / 3
E^(I Pi)
N[E^(I Pi)]
Plot3D[ x^2 + y^2, {x,-10,10}, {y,-10,10}]
ContourPlot[ x^2+y^2, {x,-10,10}, {y,-10,10}]
Plot [ { f[x], g[x]}, { x, -3, 3} ]
ParametricPlot[{Cos[2 x], Sin[2 x]}, {t, 0, 2 Pi}]
Display [ "file.dat", Out[3] ]
Factor [ x^3 + y^3 ]
Simplify [ (x+y) ( x^2 - x y + y^2)]
Apart [ (a x + b) / ( (x-r) (x-s) ) ]
Together [ a/b + c/d ]
Numerator [ ( a + b ) / ( c + d ) ]
Denominator [ ( a + b ) / ( c + d ) ]
Cancel [ x ]
f[1,2]
Solve [ a x + b y == f, c x - d y == g},{x,y}]
FindRoot [ x^3 + x^2 + x + 1 == 0, {x,1}]
Series [ Sin[x], {x,0,7} ]
Re[ z ]
Im [ z ]
Abs [ z ]
Conjugate [ z ]
Solve [ x^4 + x == 0, x ]
D [ x^3, {x, 2} ], second derivative
D [ Exp [ x^2 + y^2 ] , x ], partial derivative
f [ x_ ] := x / ( x^2 + 1 )
f ' [x]
D [ f[x], x ]
Integrate [ Sin[ x + pi ], {x, -Pi, Pi} ]
Integrate [ x^2 + y^2, x, y ]
Inverse [ A ]
Transpose [ A ]
Det [ A ]
B = { 1, 2, -1 }
LinearSolve [ A, B ]
x = Inverse[ A ].B
A.x
NDSolve [ { y'[t] + y[t] == 1, y[0]==0},y[t],{t,0,5}]
Display [ "file.dat", % ], where % is graphics
Read [ "file.dat" ]
Dump [ "file.dat" ]
Write [ "file.dat", Out[1], Out[2] ]
$Path=Join[$Path, {"/tmp_mnt/usr/apps/mathematica2.2/Packages/"}]
On IBM RS/6000:
$Path=Join[$Path, {"/usr/local/math/Packages/"}]
On SGI's:
$Path=Join[$Path, {"/tmp_mnt/usr/local/math/Packages/"}]
<<Trigonometry.m
<<VectorAnalysis.m
etc.
Erf
Exp
Sqrt
Sign
Log
Prime
Mod
N[Pi, 100]
ArcCosh
ArcCot
ArcSec
ArcSin
ArcSinh
ArcTanh
ArcTan
Cos
Cosh
Coth
Csc
Csch
Sec
Sech
Sin
Sinh
Tan
Tanh
Pi
I