## Interpretation and Submission of Mathematica Expressions

### Submission of Mathematica Expressions:

The form of an expression submitted to Mathematica is critical to its proper evaluation, and the following are several tips which will aid one who is not experienced in using this tool:

• All Mathematica functions begin with a capital letter and enclose arguments with square brackets.

Useful Mathematica Functions
General Description Mathematica Equivalent
sin(x) Sin[x]
arcsin(x) ArcSin[x]
ex E^x or Exp[x]
ln(x) Log[x]
x1/2 Sqrt[x]

• Parentheses are used to perform operations on quantities: a*(b + c).
• When using various coordinate systems, one must use the variables specific to the particular coordinate system. Often these include Greek letters which must be spelled out: {r, theta, phi} for the Spherical coordinate system.

Standard Coordinate Systems
Coordinate System Variables
Bipolar (u, v, z)
Bispherical (u, v, phi)
Cartesian (x, y, z)
ConfocalEllipsoidal (lambda, mu, nu)
ConfocalParaboloidal (lambda, mu, nu)
Conical (lambda, mu, nu)
Cylindrical (r, theta, z)
EllipticCylindrical (u, v, z)
OblateSpheroidal (xi, eta, phi)
ParabolicCylindrical (u, v, z)
Paraboloidal (u, v, phi)
ProlateSpheroidal (xi, eta, phi)
Spherical (r, theta, phi)
Toroidal (u, v, phi)

### Interpretation of Mathematica Expressions:

Mathematica outputs mathematical expressions, vectors, and functions in preformatted packages, and the following are several tips to aid one in interpreting the result of one's evaluation:

• Vectors are written as lists {a, b, c, ...} where a, b, c, ... are the coefficients corresponding to the appropriate unit vectors. For instance, the Mathematica equivalent of the vector Ae1 + Be2 + Ce3 is {A, B, C} in the coordinate system whose unit vectors are e1, e2, and e3.

#### Example 1:

In order to submit the scalar (x^2 + y^2 + z^2)-1/2, one would enter the Mathematica expression 1/Sqrt[x^2 + y^2 + z^2]. Upon submission of this expression to the Gradient operation, Mathematica will then return an output expression of the form:

 ``` x y z {-(-----------------), -(-----------------), -(-----------------)} 2 2 2 3/2 2 2 2 3/2 2 2 2 3/2 (x + y + z ) (x + y + z ) (x + y + z ) ```

where the elements of the above list are the components of the vector corresponding to ex, ey, and ez.

#### Example 2:

In order to submit the vector rer + r*sin(theta)etheta + r*sin(theta)*cos(phi)ephi, one would enter the Mathematica expression {r, r*Sin[theta], r*Sin[theta]*Cos[phi]} while in the Spherical coordinate system. In the Mathematica applications in the Appendices section, submit separately the three components of the vector in the three submit windows. Upon submission of this expression to the Divergence operation, Mathematica will then return an output expression of the form:

 ``` 2 2 2 Csc[theta] (3 r Sin[theta] + 2 r Cos[theta] Sin[theta] - r Sin[phi] Sin[theta]) ---------------------------------------------------------------------------------- 2 r ```