MathCAD is one of several competing programs used as a computer aided design tool for scientists, engineers, engineering technologists and engineering technicians. Some of these competing programs include Mathmatica, Matlab, TK Problem Solver, and Maple. Some may consider spreadsheets such as Excel, StarCalc or Gnumeric as competitors as well. However, later in this course, we will see that MathCAD works quite nicely with spreadsheet components, specifically with MS Excel. In fact, a portion of this course is dedicated to the using MathCAD and Excel together providing a very powerful design/calculational tool.

Much like a handheld calculator, MathCAD is NOT a tool that will do your work for you; nor is it a tool that will substitute for poor math skills. The later point is especially important. One must understand mathematics in general as well as the specifics of ones discipline to effectively apply MathCAD. One can even argue that continued use of MathCAD in your other courses and on the job will greatly improve ones mathematical skills.

What MathCAD will do for you is free you from the tedium of performing the mechanics of many mathematical operations. With its built-in symbolic engine, this includes symbolic algebra and symbolic calculus. For example, although the solution of two equations in two unknowns through a hand calculation is a very straightforward process, the use of MathCAD's 'Solve' block allows one to perform such a solution in seconds.

Like any piece of software, MathCAD is easy to use once you know it. However, it does have its share of nuances with which you must become familiar. As such, it requires practice to use it effectively and efficiently. But no course can teach you every aspect of MathCAD, or any other significant piece of software for that matter. Debatably, the most important aspect of any piece of software to learn is its help/tutorial utility. MathCAD has an exceptional help feature.

Using MathCAD Help
MathCAD provides a wide array of help features. These include:

In the end, all three methods of searching for information ends with the same result. Which you use tends to be more a matter of preference.

Access tutorials from the 'Help' menu item. All of the tutorial topics will be of use to you throughout the quarter. But for the this first week, you should review the 'Getting Started Primers' (except for the symbolic primers). These primers cover most of what we do in this first week of class.

The quicksheet feature is one of the nicest features in MathCAD's repertoire of help tools. In short, they are live MathCAD worksheets providing examples of MathCAD's functions, graphing and programming capabilities. You are able to modify or add to the quicksheet as well. Although you cannot save these changes to the original quicksheet file, you can save the file under a different name. You can also copy/paste equations from the quicksheet to your worksheet.

Another unique feature of MathCAD is the inclusion of reference tables. These are simply tables of a variety of physical properties such as specific gravity of selected liquids, fundamental constants, etc. Although by no means an exhaustive resource, they are extremely for a number of applications.

Another feature of MathCAD is the electronic book or E-book. MathCAD comes with several E-books that are installed by default. Additional E-books are available from the MathCAD website. Most are free, but there are some that must be purchased.. E-books are generally dedicated to a particular subject. For example, one of the E-books installed by default is 'Mechanics of Materials'. This is an E-book supplement to a popular strengths of materials text written by Gere and Timoshenko.

The collaboratory is a web-based users forum. This is an excellent way to obtain help from experienced persons. The collaboratory is divided into subject areas such as Mechanical Engineering, Civil Engineering, and Finance to name just a few. Donated worksheets on a myriad of subjects are available as well.

Worksheet Structure
The phrase, "The Engineer's scratchpad", is often used to describe MathCAD. It is an appropriate description. MathCAD allows you to write equations, in fact, to develop full problem solutions, as you would on paper. For the most part, you can place equations, variable definitions, graphs, and text anyplace on the page you desire. This is why I often refer to MathCAD as a 'freeform spreadsheet'. However, there is a minimal set of rules regarding such placement and there is a syntax one must understand regarding mathematical operations.

Basic Mathematical Operations
From basic arithmetic through partial differential equations, MathCAD uses standard nomenclature for all mathematical operations. MathCAD also follows the standard hierarchy for operations. For the time being, let's concentrate on arithmetic operations and variable definitions.

Note: In many cases, it is not necessary to explicitly press the multiplication key when entering an equation involving multiplication. For example, when entering the expression 5x, the multiplier is entered automatically. However, it has been my experience this causes problems under certain conditions. In other words, under some situations, the multiplier is not entered automatically when it should be. As such, I recommend you ALWAYS explicitly press the multiplier key (Shift-8) when entering a formula involving a multiplication.
Variables, variable assignment and evaluation of equations.
Of course, to make full use of MathCAD, one must be able to define a variable, use the variable in an equation or function, then evaluate that function. Obviously, this is done with the equal sign, but there are six different forms of the equal sign depending on whether you defining a variable or evaluating a function. The following explains each of these forms.

Assignment equals (:) - Use this version of the equal sign to assign a value to a local variable or to define an equation or function. Use the colon key. For example, the keystrokes to assign the value of five to the variable 'x' are x:5. The value of 'x' is available only for functions following the declaration.

Global assignment equals (~) - Use this version of the equal sign to assign a value to a global variable. Use the tilde (~) key to do so. This key is usually located immediately below the escape key. This version of the equal sign allows the assigned variable to be available to all equations within the worksheet even if the declaration of the variable occurs after the declaration of the equation. Although this sounds like a good thing, it can make troubleshooting a complex worksheet difficult. I recommend you use this method of variable declaration only for declaring constants. The keystrokes used to assign the value of 13 to the variable 'y' are y~13.

Evaluate equals (=) - This form of the equal sign is used to actually evaluate an equation or function. It is NOT used to assign a value. The evaluate equal operator is simply the standard equal sign on your keyboard. For example, let's assume that variable 'z' is the sum of variables 'x' and 'y', both of which were defined above.. We can enter this using the keystrokes z:x+y which results in the equation:

To evaluate the result, simply enter z=

Boolean equals (Ctl-=) - The boolean equal is actually a logical operator. It is not used to assign values nor is it used to evaluate a function. It is used as a comparison operator and asks the question "Does variable 'x' equal 'y' ? ". If the expression is true, it returns a one, if the expression is false, it returns a zero. The boolean equal operator is used mostly in programming, but we will also use it when we address the solution of simultaneous equations. The shortcut keystrokes for the boolean equal operator is Ctl-=. As an example, we previously assigned the value of five to the variable 'x' and the value of 13 to the variable 'y'. Obviously, we know that 'x' does not equal 'y'. In terms of a boolean expression, we can write and evaluate as follows:

The above expression simply compares the value of 'x' to the value of 'y', determines they are not equal, thus returns the value of zero (false).

Local assignment ( { ) - This version of the equal sign is identical to the colon equal except it is used under the framework of a MathCAD program. It has the appearance:

Local assignment has absolutely no purpose outside the framework of programming. We will discuss this in a future lecture on MathCAD programming.

Symbolic Evaluate (Ctl-.) - Whereas the evaluate equal sign discussed above provides an approximate solution, the symbolic evaluate provides an exact solution using MathCAD's symbolic engine. It is most frequently used to evaluate symbolic calculus expressions. As an example, evaluate the quotient 17/51 approximately and exactly as follows:

Approximate solution using evaluate equals.

Exact solution using symbolic evaluate

At first glance, it appears the symbolic evaluate simply reduces a fraction. In the case of simple arithmetic, this is essentially true. But the symbolic engine actually does much more. To keep it short and simple, the symbolic engine provides an exact solution by keeping all numbers in their rational form (ie: 1/3 instead of 0.3333) or by expressing the solution in terms of a symbol (ie: p instead of 3.14159). For example, the natural log of 5 is an irrational number. It cannot be expressed as a rational fraction, the approximate and exact solutions are:

Approximate solution
Exact solution
Defining Variables
When defining variables, it is important not to redefine a built-in variable or to redefine a previously defined user variable. Another important issue regarding variables is MathCAD is case sensitive. The following variables, although they might appear the same to you and me, are unique to MathCAD due simply to capitalization.

Note the green squiggily line under the last definition. This indicates a redefinition of a variable. In this case, lower case 'gpm' is a MathCAD unit for gallons per minute. NEVER redefine a MathCAD variable or unit unless you know exactly what you are doing and the ramifications of your action. As we'll discuss later, this will likely redefine a number of other units thus resulting in erroneous results difficult to troubleshoot. Pay attention to that little squiggle. It will save you time.
Built-in Constants
MathCAD has a number of built-in constants. These are:

Infinity (Ctl-Shift-z) - When used algebraically, infinity has a value of 1x10307 and -1x10307.
When used symbolically, it is treated as a true infinity.

Algebraic definition
Symbolic definition

Pi (Ctl-Shift-p) -

Acceleration due to gravity (g) -
Although MathCAD does define the acceleration due to gravity, it does not define the gravitational constant. In the SI system of units, the gravitational constant is equal to one. However, in the English system of units, the gravitational constant, gc, is equal to
32.174 (ft-lbm)/(lbf-sec2).

Naperian Base (e) -
This is the value of 'e' used when dealing with natural logarithms.

Percent (%) -
A percentage is always a decimal. Thus the percent symbol actually multiples the number preceding it by 0.01. For example,

Speed of Light (c) - Small letter 'c' is the speed of light in a vacuum

Complex numbers (i) - The square root of negative one is identified by either the letter 'i' or the letter 'j'. I recommend you choose the nomenclature with which you are most comfortable and stay with it. To enter a complex number, simply enter the coefficient followed by the letter 'i' or 'j' (whichever you prefer).

IMPORTANT: The small letter 'i' or 'j' entered by itself does NOT represent the square root of negative one. You MUST precede the 'i' or 'j' by the number one. For example, the expressions below are two different numbers, despite the fact they have an identical appearance.

Square root of negative one
The variable 'i' assigned the value of three
Greek Letters
As we all know, the use of Greek letters in engineering is quite prevalent. Greek letters are available through the Greek palette, which in turn, is accessible from the Math palette. If your Math Palette is not visible, turn it on through the menu bar by going to 'View > Toolbars > Math'. If you know the relationship between the Greek alphabet and the Roman character set, you can simply type the Roman letter, then press Ctl-G to convert it to the corresponding Greek letter.

Be very cautious when using capital Greek letters that look like capital Roman letters. For example, capital letter 'A' and capital letter alpha are shown below.

Capital letter Roman 'A'
Capital letter Greek alpha

Although they look virtually identical, they are two different variables. This can result in significant difficulty when troubleshooting, or even just using, a worksheet. Also note capital letter Roman 'A' is marked as a previously defined variable (remember the green squiggle?). In this case, MathCAD uses it as the engineering unit for an amp. It's probably not a good idea to use 'A' as a variable. On the other hand, one could use capital alpha instead, but you would need to remember that the symbol that looks like a capital Roman 'A' is actually a capital Greek alpha. I think you can see the problem.
Writing your own equations and functions
Before we actually write equations and functions, let's discuss two more items. The first regards the use of subscripts when defining variables. MathCAD employs the use of two different types of subscripts: literal subscripts and array subscripts. The literal subscript is quite useful for distinguishing between similar variables. You can provide a subscript by simply pressing the period (.) key while defining your variable. For example, lets define the variable 'ex sub see' (xc) and set it equal to 10. The keystrokes in doing so are x.c:10.

Array subscripts will be addressed in a couple of weeks when we address matrices and vectors.

The final item is the use of the space bar. The space bar is useful for manipulating the blue cursor surrounding the development of an equation. Debatably, the most frequent use is to move the cursor out of the denominator of a fraction or out of an exponent. For example, assume you wish to write the formula multiplying ten by one third then adding 20. The fraction, one third, is entered with the keystrokes 1/3. However, before pressing the keys +20, you must move the cursor out of the denominator or the the +20 will end up in the denominator of the fraction rather than as the independent term you desired. Enter the equation with the following keystrokes: 1/3{sp}+20= where {sp} denotes the spacebar. One should also note that repeated presses of the space bar cycles the blue Math cursor through the equation at hand.

Now let's put our skills to practice. Borrowing from a statics course, duplicate the definition of the following variables and the following expression.

Try to reproduce the above equation off to the side. Note the square root symbol can be found from the calculator palette or you can use the shortcut key, a forward slash (\). If your completed equation turns red, this means there is a mistake. Clicking on the equation will result in a popup tool-tip telling you what the problem is. If you do not understand the message, press the F1 function key for context sensitive help. The keystrokes for the above equation are:

S Ctl-g M.o:4/5{sp}*(R.1)-5/ \ 41{sp}{sp}*(R.2)+(1/2{sp} ) ^ 0.5{sp}*(R.3)

Note: {sp} is the spacebar
Ctl-g is the the key sequence of holding the control key while pressing and releasing the 'g' key.
It is frequently more desirable to define your equation as a function. User defined functions are defined as easily as an equation. For example, the equation for a parabola might be defined as:
Since the variable 'b' is not defined, the equation generates an error. But if one were to define it as function 'f' in variable 'b', we would write it as follows:
We can now evaluate the function at discrete points by simply substituting a number or a defined variable for the argument of the function.
Functions may also be defined in multiple variables
Note that the variable 'c' is marked as a predefined variable; again, note the green squiggle. Small letter 'c' is reserved by MathCAD as the speed of light. If your calculations do not involve the speed of light, directly or indirectly, it's probably alright to use this variable. But realize you no longer have access to this constant for the remainder of the worksheet.
Built-in Functions
MathCAD has a plethora of built-in functions, more than any one person will probably ever use. Definitely more than we have the time to discuss. This is why the MathCAD help feature is so important. If you need to be able to do something, use the help utilities to find out how.

Functions can be accessed by clicking on the f(x) icon on the menu bar. The resulting dialogue box shows a complete list of functions in the right hand panel. Do not be intimidated by the functions that exist. This program is designed for use over a wide range of disciplines. We will only use a small subset of available functions.

The functions we need to address today include trigonometric functions, logarithmic functions and rounding/truncation functions. When dealing with trigonometric functions, it is important to understand that MathCAD expects angles in radians. All arc functions return angles in radians. If we want to use degree measurement, we must explicitly state as such. For example, the syntax for the sine function is sin(x) where 'x' is the angular measurement in radians. To use degree measures, multiply the argument by the unit 'deg'. Some examples follow.
When using arc functions, the result is an angular measure in radians.
If you click on the above expression, you will see a placeholder, a small black square, immediately to the right of the result. This placeholder is where you enter a unit. If you wish to display the above in units of degrees, enter 'deg' in the placeholder.
Logarithmic functions include functions involving the Naperian base, base 10 and base 'n'.
Natural log. Requires a single argument with no units.
Common log. Requires a single argument with no units
The Naperian base, e, raised to a specified power. You can use either the built-in constant 'e' or the function exp(x). Both require a single argument with no units
The base 'b' logarithm of x. The example shown is a base 2 logarithm of the decimal number 3.
Rounding and truncating functions
  • The floor function rounds to the first integer value less than the argument
  • The ceiling function rounds to the first integer value greater than the argument
  • The truncation function simply lops off the decimal portion of the argument
  • The round function rounds the argument to a specified number of decimal places
The floor and ceiling functions work quite nicely if one needs to determine an integer number of objects. For example, in concrete beam design, one does a calculation to determine the number of reinforcement stirrups. Obviously, the number of stirrups must be integer, but the calculation yields a decimal number. The use of the ceiling function allows MathCAD to return an integer number of stirrups which then can be used in subsequent calculations to determine stirrup spacing.
Basic Units
Units can be considered a variable and are applied as such. In other words, if one wants to declare the value of 'x' to be five feet, one would define this using the keystrokes x:5*ft
MathCAD has the ability to handle unit conversions without you explicitly providing the conversion factor. For example, define the variable 't' as 10 seconds, and the variable 'v' as the quotient of 'x' and 't'.
The above example displays in units of feet per second. If one desires the solution in different units, one can substitute any equivalent unit in a manner similar to how we converted radians to degrees (as discussed above).
MathCAD does a pretty good job at displaying the resulting units of a calculation. However, there are times when the resulting units are reduced to something more fundamental. In these circumstances, you will need to substitute the unit you desire. For example, in thermodynamics, a basic heat transfer calculation states that energy is equal to the mass of an object, multiplied by the specific heat of that object, multiplied by the change in temperature. Assume an object with a mass of 30 slugs, a specific heat of 12 Btu/(lb R) with a temperature change of 30 degrees Rankine. The resulting energy content should be in BTU's.
Note the result does not display in BTU's. The result displays in a set of units that are dimensionally equivalent to a BTU. In order to display the proper unit, click on the result and manually insert the unit of BTU in the placeholder.
A note about temperature in MathCAD
MathCAD cannot handle temperatures expressed in degrees Farenheit or in degrees Celcius. You can only use temperatures expressed in degrees Rankine (R) or in Kelvins (K). This is because the conversion from Rankine to Farenheit and Kelvins to Celsius involve an additive component.

Rankine = Farenheit + 459.69
Kelvins = Celsius + 273.17
Farenheit = 1.8(Celsius)+32

However, the conversion between Rankine and Kelvins is multiplicative, so unit conversion is easily handled.

Rankine = 1.8 Kelvins

However, none of this is a problem. In the disciplines of thermodynamics and heat transfer, most calculations involve a temperature difference. Since the Rankine scale and Farenheit scales are actually the same scales, just labeled differently, a one degree temperature difference expressed in Rankine is a one degree temperature difference expressed in Farenheit. This is also true of the Kelvin and Celsius scales. The most common problem a student has in working with temperature is understanding this concept. Assume you had a body that started at a temperature of 120 F and ended at temperature of 150 F. Obviously, this is a 150 - 120 = 30 F degree temperature change. But what is the temperature change in degrees Rankine? Simply convert the Farenheit temperature to Rankine by adding 460, then subtract the two temperatures as follows.

(150 + 460) - (120 + 460) = 610 - 580 = 30 R

A temperature change on the Farenheit scale is the same on the Rankine scale. Again, this makes sense. They are the same scales with different labels.

Those calculations that do involve the current temperature of a body, rather than a temperature change, are always based on an absolute temperature expressed in Rankine or Kelvins. As such, issue surrounding the Farenheit or Celcius are irrelevant.

A note involving mass and force units in MathCAD
There is nothing special about the use of mass and force units in MathCAD. However, the use of the respective units for mass and force appears to be a point of difficulty for many students, especially in the English system. Typical units for mass and force in the English and SI system are shown below

English SI

Mass slug kg (kilogram-mass)
lb (pound-mass)

Force lbf (pound-force) N (Newton)
kgf (kilogram-force)

By now, we are all aware of Newton's law, force is the product of mass and acceleration. The application of Newton's law is rather straightforward when using the SI system of units. What many do not know is how to apply Newton's law in the English system of units when mass is given in terms of a slug or a pound-mass.
For example, in the SI system, Netwon's law requires mass be expressed in kilograms, acceleration due to gravity is 9.807 m/s2, and the resulting force will be expressed in Newtons.
In the inch-pound system, Newton's law requires mass be expressed in slugs. A slug is an old English unit of mass. It is equal to (lbf s2)/ft. The resulting force is measured in terms of a pound-force. In MathCAD, a pound-force is expressed as lbf. It should be noted that both units of mass. pound-mass and slug, are still used today in engineering and engineering technology. One needs to be familiar with both.
However, a more common unit of mass, in the inch-pound system, is the pound-mass. In MathCAD, the unit for pound-mass is simply lb. But to use the pound-mass in Newton's law, one must modify Newton's law slightly by introducing the gravitational constant. Many persons do not realize the acceleration due to gravity is NOT a constant. It is actually slightly variable over the surface of the earth. However, the gravitational constant is a constant. It is assigned to the variable gc and has a value of 32.174 (ft-lbm)/(lbf-sec2). As such, Newton's law is modified as shown with the resulting force expressed as a pound-force.
While all of this is true, and very important to understand, much of it becomes irrelevant when working in MathCAD. That's because MathCAD handles all unit conversions for you. For example, it can be shown that one slug is equal to 32.174 pounds-mass.
Since MathCAD does handle all unit conversions, it is not necessary to explicilty write Newton's law using the gravitational constant when working with mass in pounds-mass. Consider the following example.
In the above discussion, Newton's law was explicitly written as the product of mass and acceleration divided by the gravitational constant. If you were solving this problem with pencil and paper, it is necessary to do so. However, in the example to the left, Newton's law was defined simply as the product of mass and acceleration even though mass was defined as a pound-mass rather than a slug. Note the result is still the same BUT ONLY BECAUSE MathCAD handled the unit conversions for you. None the less, it is considered good form to define and use the value of the gravitational constant when working with the English unit of pound-mass.

We can just as easily redisplay the solution in other units of force as shown. To do so, simply redisplay the value of force (by writing force=), click on the result, and enter the desired unit in the placeholder. This negates the need for one to explicity provide your own unit conversions.
What's this non-sensical unit?
When using units in MathCAD, the program will always maintain dimensional integrity, even if you make a mistake in specifying a unit. This often results in some odd (non-sensical?) unit displays. For example, consider the following equation for finding the horspower output of a motor given the developed torque and rotational speed. In the equation shown, torque is expressed in units of foot-pounds force and rpm is expressed in units of per minute (1/min). The MathCAD unit for horsepower is hp. Dimensionally, a horsepower is a foot-pound force per unit of time. Find the horspower output of a motor if the developed torque is 1000 ft-lbf and the rotation speed is 3600 rpm.

Simply define the variables torque and rpm as shown
Write the equation for horspower
Display the solution. Looks valid, doesn't it?
Redisplay the solution and enter the unit 'hp' in the unit placeholder. Note the result. Exactly what does this mean? In short, it means one made a mistake. In this particular case, the reason the unit is displayed as shown is because we improperly defined torque. Note that torque was improperly defined with units of foot-pound mass. Torque is suppose to be defined as a foot-pound force. This mistake, coupled with the fact that a horspower is a foot-pound force per unit of time, forces MathCAD to insert a 'corrective' unit to maintain dimensional integrity relative to how the orginal data was defined. This is easily corrected. Simply define torque with the proper unit of ft-lbf.
If this situation occurs when you are doing your homework, interpret it for what it is, YOU DID SOMETHING WRONG. As such, correct the error before you hand-in the assignment. I see little sense in submitting an assignment you know is incorrect.

There are two reasons for this to occur. The first reason is as explained above, using the wrong units. The second reason is [accidentally] redefining a built-in unit. For example, many persons like to use the variable 'm' to define mass in an equation. However, MathCAD uses the variable 'm' to define the unit of meter. Since meter is also part of force unit of Newton, such a redefinition will cause significant problems. Two ways to determine if a particular variable is safe to use (ie: you are not inadvertantly redefining it).
Type the variable followed by the evaluate equal (ie: m=). If the unit is defined, you will get something as shown to the left. This is obvious evidence the variable is a built-in unit or has been previously defined by you.

On the other hand, if a variable is not in use, then typing it in (ie: n= ) results in an error. Basically, MathCAD cannot find a definition for the variable. Since MathCAD cannot find a definition, it assumes you are trying to define it and substitutes a colon equal sign for the evaluate equal sign.
The second way is to acutally define the variable. If the variable results in a green squiggly line underneath it, the variable is in use. Depending upon whether or not the variable is a built-in MathCAD variable or a user defined variable, you must make a decision to choose a new variable or redefine the existing one. It's almost always alright to redefine user-defined variable. Very seldom do you wish to redefine a MathCAD built-in variable or unit. It might have negative consequences that are VERY difficult to troubleshoot.

CAUTION: One should realize that MathCAD's ability to identify the redefinition of a variable is new as of the first service pack update to MathCAD 11. In the original release of version 11, and in all versions prior, MathCAD won't squiggle :). Also, this is an option that can be turned off by the user (Tools > Preferences > Warnings). This being the case, don't rely on this feature unless you know it is available (ie: proper version of MathCAD and the feature is enabled).

Worksheet Structure
A MathCAD worksheet is comprised of three regions: a math region, a text region and a graph region. As one may deduce from the names, a math region contains only mathematical formulae, a text region contains only text while a graph region contains only a graph.

By default, when you begin typing in a worksheet, MathCAD automatically creates a math region. Some examples are shown below.
If the first character you type is an alpha character, MathCAD assumes you are typing a variable name.
If the first character you type is a number, MathCAD interprets it as a number.
If the first character you type is a number followed by a string of alpha characters, MathCAD interprets this as a number multiplied by a variable. The multiplication sign is not apparent but is implied. Click on the entry to see the implied multiplication sign.

NOTE: I recommend you NEVER enter an expression like this. It has been known to cause difficulties. In some cases, the implied multiplication does not occur. This appear to happen frequently when working with symbolic math.
A text region is a region that contains pure text. All the text you've been reading is in a text region. The easiest way to start a text region is simply to begin typing. Once you begin typing, MathCAD creates a math region. But as soon as you strike the spacebar, the region is converted to a text region. However, there are some difficulties with this implicit method of creating a text region. Most punctuation marks are shortcut keys in MathCAD for entering certain functions. As such, if you begin the text region with a number or a punctuation mark (ie: apostrophes) or if you must enter a punctuation mark before you hit the space key, MathCAD will interprets the keystroke as a desire to enter some type of function or formula. In such cases, START the text region by pressing the double quote key.

You can distinguish a math region from a text region in two ways. The most reliable is the appearance of the cursor. In a math region, the cursor is blue and will surround the math entry, or portion thereof, on two sides of the entry. A text cursor is a vertical red line.

The second way is to recognize the difference in font style and font size between a math region and a text region. However, a user has the ability to change font styles and sizes for both math and text regions. In other words, it is possible for the fonts in both regions to be identical. However, by default, they are not.

All numbers and formulas entered in a text region are text strings. They are not live formulas. However, MathCAD does allow one to enter a Math region inside of a text region. In fact, this technique is used extensively in this worksheet as well as other lecture worksheets used for the remainder of this course. To enter a math region inside a text region, go to the Insert > Math Region menu item. For example, I may want to define the variable:

and the formula:

Note that both 'x' and 'y' are accessible even though they are defined inside a text region. This is a great feature that allows one to write reports that flow well. In other words, you don't have to make an obscure reference to a variable or function within the text you are writing, then break the text to enter the variable or formula in a separate Math region. You can simply enter the math region inside the text region. You will have plenty of opportunity to practice this in your first homework assignment.
A graph region is simply a region in which a graph is entered. Graphs are entered from the insert menu. MathCAD has the ability to produce a number of different types of graphs. However, we will only concetrate on the creation of a standard X-Y plot. A graph can also be entered by pressing the @ (Shift-2) key. A simple graph is generated by simply inserting the graph, entering the function in the center y-axis placeholder, then placing the dependent variable on the center x-axis placeholder. The other four placeholders are for defining x- and y-axis limits. If you do not fill them in, MathCAD plots the function for an x-value of -10 to 10. We will discuss graphing in more detail in a future lecture. For now, let's define and plot the function:
Page layout
By now, it is evident that MathCAD has word processing capabilities. Although these capabillities are not as extensive as those of MS Word, et. al., they are more than sufficient to develop a nice looking document. I'll let you investigate the text and paragraph formatting capabilities on your own. Let's talk about page formatting.

In MathCAD, the only page formatting options you have are margin width, page orientation, page size, and page breaks. For purposes of proper documentation (such as your homework), you need to be familiar with this in order for your paper to look professional.

To set margins, paper size and page orientation, go to the File > Page Setup menu item. Set the parameters as you see fit.

As in MS Word, page breaks come in two flavors: hard breaks and soft breaks. Immediately above this text is a horizontal solid line (Not visible if you are reading this on a printout or as an HTML page). Further up, above the graph, is a horizontal dotted line (Also not visible on a printout or HTML page). The dotted line represents a soft page break. Except for the ability to change the margins of your page, you cannot move or in any other way control the location of a soft page break. However, you can insert, delete or move a hard page break. The solid line immediately above is such a page break. To insert the break, place your cursor where you want the break and select 'Page Break' from the 'Insert' menu. To move or delete the page break, use your mouse and do a 'Shift-Click' on the break. The break will be highlighted with a pair of dotted lines. Use your mouse to drag the break. To delete, Shift-Click on the break and select 'Cut' from the edit menu. When doing your homework, make sure you use page breaks properly so your homework displays logically. There is no reason for a page break to cut across an equation! You will be graded on homework presentation.
When calculating a worksheet, MathCAD is sensitive to relative location of formulas and variables. As with a spreadsheet, MathCAD calculates left to right and top to bottom. This means you must make sure your formulas and variable definitions are properly located. Usually, this is simply a matter of dragging the relevant math region to an appropriate location . On the other hand, there are times you want formulas to line up either horizontally or vertically. To do this, use the two align buttons on the icon bar. MathCAD will warn you if the regions you are aligning overlap. If they do, you may have to make some minor adjustments as to the location of the regions before you auto-align.
You can also insert a MathCAD 'Area'. Simply select 'Insert > 'Area' from the Insert menu. Such an area is extremely useful for hiding calculations. The area can be collapsed and locked if desired. Using your mouse, right click on the arrow immediately above and to the left. The context sensitive menu allows you to collapse the area (if it is expanded) or to expand the area (if it is collapsed). It also allows you to lock
the area with a password. DO NOT LOOSE YOUR PASSWORD. There is no way to unlock an area if the password is lost.

NOTE: This area is not visible if viewing as an HTML page; it will appear as a normal paragraph. The demarcatoin for an area is printed on a prinout, but can be hidden if desired.