Simple Mathematica Expressions

Mathematica can be used to calculate variables for the fitter "on the fly" by entering Mathematica expressions into the appropriate fields in the Fit Setup screen. Here we give a brief overview of some of the more common Mathematica expressions. We assume that the dataset has two variables named voltage and temp.


Arithmetic Expressions
Name Symbol Example
Plus + voltage + temp
Minus - voltage - temp
Times * voltage * temp
Divide / voltage / temp
Power ^, Power voltage^2 or Power[voltage,2]
Square root Sqrt Sqrt[temp] or temp^0.5

In the power and square root examples above, we see an example of three general principles of Mathematica:


Common Transcendental Functions
What Examples
exponential function, etemp Exp[temp]
natural logarithm, ln(temp) Log[temp]
logarithm to base b, logb(temp) Log[b, temp]
trigonometric functions (arguments in radians) Sin[temp], Cos[temp], Tan[temp], Csc[temp], Sec[temp], Cot[temp]
sine of "theta" when theta is in degrees Sin[theta Degree]
inverse trigonometric function, returning results in radians ArcSin[temp], ArcCos[temp], ArcTan[temp], ArcCsc[temp], ArcSec[temp], ArcCot[temp]
inverse sine of temp in degrees ArcSin[temp] / Degree
argument of temp + i*voltage where i is the square root of -1. ArcTan[temp, voltage]
hyperbolic functions Sinh[temp], Cosh[temp], Tanh[temp], Csch[temp], Sech[temp], Coth[temp]
inverse hyperbolic functions ArcSinh[temp], ArcCosh[temp], ArcTanh[temp], ArcCsch[temp], ArcSech[temp], ArcCoth[temp]

Miscellaneous
What Example
A pseudo-random number between 0 and 1. Random[]
The square root of temp squared plus voltage squared. (This is not a Mathematica built-in, but is part of the Experimental Data Analyst package which is the "engine room" for the fitter.) Quadrature[temp, voltage]

This document was written by David Harrison, October 1999.