This worksheet covers many of the basic operations and functions in MathCAD. It covers simple definitions of constants, variables, and arrays, plotting 2-d and 3-d data and functions, vectors and matrix arithmetic, numerical and symbolic evaluation of integrals and differentials, and animations.

Version 2.0 RLM (20 Jan 2005)
Part 1: Elementary
Literals
Defining variables
Using built-in functions
Display significant digit in result: change to 8 by double-clicking on the answer and changing 'number of decimal places
Using dimensions
a. Example 1
Define some constants
Define custom units in terms of predefined units, express anser in custom units
Angles are normally expressed in radians by default
Replace placeholder with desired angualr unit (deg)
b. Example 2: How long does it take light from the star Vega to reach Earth?
Define constants
c. Example 3: What is the gravitational acceleration on the Earth's surface?
Note mixing of mks,cgs, and English units!
Result is in correct units (MathCAD converts variables to a consistent set of units before evaluation)
d. Example 4: Lost at sea 1 problem (Bennett, p. 109)
At solar transit, the relationship between longitude, UT time of solar transit is
Looking at a world map (e.g. Mapquest, map by coordinates) shows that this location is close to Hawaii
Using Arrays
Use the Insert... matrix to create array X, 3x3 matrix Y
2. Plotting data
Entering and Plotting data
enter by hand using commas
Add a fitting function to the plot
Fitting function (slope and intercept are pre-defined functions)
Function line reports both slope, intercept
Plotting functions: Black body curve
3. Reading and writing data from files
Reading data from a column-based text file
Writing to a data file
Write to a user defined file
4. Vector and matrix arithmetic
define vectors using insert matrix (1 column x n rows))
Dot product
Cross product
Length of vector
Suppose we have matrix equation y = M*x. Given M,y, what is x?
5. Numerical integration (definite integrals)
Planck function, suppose:
Since luminosity is proportional to the fourth power of T, we expect luminosity ratio to be:
6. Symbolic evaluation of expression, integrals, differentials
indefinite integrals
select entire integral, choose Symbolics/ evaluate/ symbolically, or simply select and type control . (period), F9
ordinary n-th order differentials, evaluate symbolically:
Definite integral:
Select entire integral, select Symbolics/Evaluate/Symbolically
Evaluation: floating point: note use large finite upper limit
compare with symbolic result
Symbolic calculation of matrix expressions
select matrix, then symbolics/matrix/invert
factoring of algebraic expressions
solve for variable
Solve for y (note: use ctrl-equal for equal sign in symbolic expressions)
Solve for y
8. Solve blocks: single variable
Guess for b
Solving groups of equations
Guesses
9. Solving for roots of an equation using root function
guesses (from inspection of plot)
10. Plotting 3-d curves
Parametric lines
3-d Surface
Function describing graph to be revolved about axis
Interval determining portion of
graph to revolve
set up a grid in i,j
Another example:
11. Animations!
Define a 2-d function to plot, with the variable to be stepped (g) defined by special MathcAD variable FRAME. Then choose Tools/Animations/record. Select the region to be animated (including the FRAME statement), then. Animate button