If you must perform repeated calculations in Mathematica, it is useful to define a function. A function is an equation that can take several numbers and calculate a result based on those numbers. In algebraic form, we would define a function as:

f(x1,x2,x3,x4) = some function

where x1, x2, x3, and x4 are variables.

In Mathematica, we can do the same thing so that we can feed a function a set of variables, and it will run those variables through the function and return the result. For example, let's say that our professor has provided us with a function

Notice two important features of defining functions. First, you must follow the name of the variable as it appears in the function definition with an underscore. Also, you must follow the function name and variable definition (the

You can use as many different variables in a function definition as you like. In this way, you can define a complex function in Mathematica once and then never have to worry about typing the equation again-all you need to do is give the equation the variables, and it will run the numbers through the function and return a result.

Some important things to keep in mind about function definitions are 1) the variable name you define in the brackets (the

Mathematica can integrate functions both analytically and numerically. To integrate a function f(x), use the

If you think about it, the square root of a number is the number raised to the 1/2. Likewise, the cube root is the number raised to the 1/3. In this way, we can represent a root of a number as an exponent. In Mathematica, we can calculate the roots of a number by representing them as exponents and then raising the number to a fractional exponent. For example, if we wanted to find the cube root of 8 in Mathematica, we would type

An important problem in geology is the calculation of uplift rate. However, many methods which measure uplift rates measure the rate of uplift of a rock relative to the earth's surface. Geomorphic processes may change the elevation of the surface (the surface elevation is different on the East Coast and Tibet is quite different), thus our measures of uplift may not be the uplift we are after. For example, if the surface is moving up at the same speed the rock is being uplifted, the uplift relative to the surface is zero. This is not the uplift rate that we are after.

For this reason, we define three types of uplift shown in Figure 1. The exhumation (E) is the distance between the earth's surface and the rock. The surface uplift (SU) is the elevation of the surface is the elevation of the earth's surface relative to a stationary datum. The rock uplift (RO) if the elevation the rock is at relative to the stationary datum. This is usually the uplift that we are after.

Pages maintained by

Prof. Ramón Arrowsmith

Pages last modified on Wed Nov 26 1997.