permission of the author. BASICS of Mathcad: Arithmetic, constants, units,
complex numbers, editing. One can have math regions or text regions in a
document.
Problem Solving in Physical Chemistry Introduction to Mathcad (vs12) R. D. Poshusta Department of Chemistry Washington State University Pullman, WA 99164-4630
[email protected] edited for Mathcad 12 by Theresa Julia Zielinski Monmouth University Department of Chemistry, Medical Technology, and Physics West Long Branch, NJ 07764
[email protected] © Copyright Theresa Julia Zielinski and Ron D. Poshusta, 2006. All rights reserved. You are welcome to use this document in your own classes but commercial use is not allowed without the permission of the author.
BASICS of Mathcad: Arithmetic, constants, units, complex numbers, editing One can have math regions or text regions in a document.
Text Regions: Start a text region by typing ". Alternative: Start typing and depress space bar after the last letter of the first word. Click outside the text region when you are done. Now, select the text in the region you have created by clicking and dragging over the text in it. Use the formatting bar to change all the text in the region to bold, then increase to
14 point font size.
Save your work to your own storage medium. For this, pull down the File menu and select save as. Save to the your storage drive giving your file a name that will help you find it later. Arithmetic, variables, constants, units, equal signs. The = sign means to calculate and print The : sign means to define a variable [You type : but mathcad prints :=] The ~ sign means to define a global variable before the rest of the work sheet is evaluated. Use the global
Can't get started even with this Intro? Refer to mathcad's tutorial: Books menu and click tutorial.
Don't have the formatting font bar? Pull down the View/Toolbars menu and click on Formatting.
g variable sparingly. The =, = , means to set equal "logically", that is without numerical evaluation.
Note: there are editing tips on the right side of this page
Arithmetic a. To the right, type the following (NOT IN A TEXT REGION) [For tips on editing and typing expressions, see the mathcad page at far right.] 2/3= 2*3= 2^3= compare to 2/3:
b. Now type the following: x:2 y:3 x/y= x*y= x^y= c. Mathcad has several built-in constants. That is, Mathcad "knows" these constants. Find the values of the following constants by typing e= p= [This means type p and hold down the Ctrl key while you press g.] R= Note that R is NOT the gas constant. You will need to enter the gas constant in each document you prepare if needed.
Editing: Correcting a typing error: place the mouse just to the right of the wrong character or symbol. Click and press the delete (back arrow) key. Try this: change 3 to 9 in the math expressions you created at left. Editing: Whole mathcad expressions or text regions can be removed. Just select the desired region and press the delete or backspace key. There are two ways to select a region. Either click and drag into the region, or click once in the region and press repeating until whole region is outlined.
HELP Do you need help? Try Mathcad's help menu. Click on Help and choose index for a list of help topics. Try equation editing for guidance with editing equations.
d. Mathcad also knows units and can convert between different units. Investigate this by typing the following: m= a:2*in a= b:3.5*ft b= a*b= You can find the complete list of mathcad units from the Insert/Units pull-down menu What do you find to be the units Mathcad knows for current? Write your answer here: What units are available for pressure? Write your answer here: To convert from one unit to another, select the value and use the up-arrow until a black box (place holder) appears to the right of the units. Type the desired units in the box and enter. Do this for a (defined in the previous step), converting from in to ft, m, mi, km, cm.
e. Mathcad also knows imaginary and complex numbers. Type the following: x:2+1i y:7-2i x*y= x/y= x"=
f. Mathcad 12 gives you 10 "palettes" to make it easy to enter complicated math operations. Click on the "calculator" palette (looks like a calculator), select the square root sign and type 2=. This will give: 2 = 1.414 Use the calculator palette to find the square root of x := 2 + i, the complex conjugate of x, the magnitude of x, and the inverse of x. Show the results to the right. Close the arithmetic palette.
Editing: Expressions can be edited for variables and constants or for operators. To remove (and replace) and operator, click on the expression and use the up-arrow or down-arrow to select the part of the expression that contains the offending operator. Press the back-arrow to remove it and press the desired operator key to replace it.
Help can be found in the Help pull-down menu. Fairly detailed explanations will be found for any topic in the search list you can reach by pulling down Help, selecting index, and then clicking on the search button. For example, get help for square root.
Note well the use of the " operation with imaginary numbers.
Editing: Regions can be cut and pasted too. Select a region, then pull down the Edit menu and choose cut - the region will be removed to a scratch pad. You can also use the scissor icon on the Standard toolbar. Then click on the new location where you want the region to be pasted - pull down the edit menu and choose paste. Note the shortcuts for edit-cut: and edit-paste: . The paste icon is also available on the Standard toolbar.
Note: The up and down arrows are very important to change your selection in an arithmetic region. Try them to discover by experiment what they do. Save your worksheet often because if the program crashes you do not want to lose a significant part of your work. Print using the File pull-down menu. A networked printer may be available or you may have to switch between your computer and your neighbors by using an "AB switch".
g. You can move regions around the worksheet. First, select a region. To do this, click outside the desired region continue to hold down the mouse button while you drag into the desired region. Release the mouse button. A dotted line surrounds a selected region. Second, without holding down the mouse button, drag the arrow into the region you have selected. A hand appears. Now hold the button down and drag. At the right, select the LOWER definition of b (the b:=4 line) and drag it up between b:=10 and a*b=. Remember that Mathcad evaluates the worksheet from top to bottom and from left to right.
Save your worksheet
Additional drill exercises: Work these with Mathcad at your leisure. PRINT your worksheet [the entire sheet]. Submit for grading at the next class meeting. Include your NAME and ID if directed to so so by your instructor. 1. Calculate the square roots of 3, 2.5, and 101.
a := 90
b := 10
a⋅ b = 900 b = 10 b := 4 b=4
1 3
3
2
2. Find the following powers: 2 , π , and e .
3. Find the logarithms: log( 2 ), ln( 2 ), log ( 10), ln( 2 ).
4. Consider the complex numbers u := 0.5 + 0.8660254i i
v := 3 and calculate the values of each of the following: 1 2
3
u , u , u ⋅ v, u , v ,
2
v,v .
Save your worksheet, be sure your name and id appear on it, print it, and submit for grading if directed to do so by your instructor.