Mthcd Lecture #1 In-clss Worksheet Mthcd Bsics At the end of this lecture, you will be ble to: Evlute mthemticl epression numericlly Assign vrible nd use them in subsequent clcultions Distinguish between the different types of Mthcd "equl signs" nd use ech ppropritely Construct comple mthemticl equtions involving ()'s, eponents, squre roots, etc. Perform symbolic lgebric mnipultions using both the menu-bsed method nd toolbr method. Formt Mthcd sheets for redbility by highlighting regions, chnging nswer precision, nd ligning regions. 1. Evluting Epressions Numericlly Eplntion The red crosshir indictes the insertion point on the worksheet. You cn begin typing numbers nd mthemticl symbols + is for ddition - is for subtrction / is for division * is for multipliction Try typing 15-8/104.5= 8 15 14.93 104.5 Try typing 15-8<spce>/104.5= 15 8 104.5 0.067 The blue horizontl line indictes wht is currently selected The blue verticl line indictes the insertion point Chnge the selection portion by pressing <spce> Toggle the insertion point between one end of the selection to the other by pressing <insert> Left nd right rrow keys cn be used to move the insertion point.. Assigning nd Using Vribles Eplntion Vribles cn be creted to store vlues A vrible cn be given lmost ny nme, from single letters to words
Assign vrible by typing the desired nme followed by : followed by numericl vlue. Once vrible is ssigned, it cn be used in subsequent clcultions. 5 b 10 b 15 Notice tht the result of typing : is := Colon (:) is clled the ssignment opertor. Cution: The order of vrible ssignment is importnt. y 5 y 10 y 15 Mthcd evlutes epressions from Left to Right nd Up to Down Consequence: Vribles must be ssigned before they re used. 3 Different Types of Equl Signs Eplntion Up to this point, we hve seen two types of equl signs; = nd := There re ctully four types of equl signs in Mthcd 1. Assignment Opertor (discussed bove) f 3 Keystroke is :. Disply Vlue (seen bove) f 3 Keystroke is = 3. Globl Assignment Opertor h Keystroke is ~ h is defined everywhere "bove" nd "below" 4. Symbolic Assignment PV = nrt Keystroke is <ctrl>= We will use this more lter. Notice the keystroke nd ssocited symbol of ech type of equl sign Usully don't wnt to use globl vribles ecept for such things s Avogdro's
number or the gs constnt. Cutions Mthcd hs severl predefined vribles. (Help => Built-in Constnts) g 9.807 m s c.998 10 8 m e.718 s π 3.14 1 10 307 You cn ressign vribles. Be sure you don't do so indvertently. g 100 g 100 Notice the green underlining on g. This mens you ressigned the vrible. (You cn turn off this wrning in the Tools/Preferences menu.) 4. Common Mthemticl Opertions Eplntion Mthcd hs lmost ny mthemticl opertor you need. These re found on Tool Plettes or cn be inserted with vrious keystrokes The tble below hs list of common opertions nd the ssocited keystrokes The min Tool Plette cn be ccessed by selecting View/Toolbrs/Mth. Severl other plettes cn then be ccessed by clicking on the icons. The clcultor icon hs severl common opertions. Keystroke Description + Add - Subtrct * Multiply / Divide <Shift>6 Power ^y Absolute Vlue \ Squre root <Ctrl>\ Nth root Enlrges the selected prt of n epression. Spce within vrible <Spce Br> nme turns it into tet <Ctrl><Enter> Addition with line brek (To plce long epression on two lines) Toggles the insertion point between the front nd bck of the <Insert> epression. Cretes tet bo.. Tet subscript s prt of vrible nme. [ Vector/Mtri subscript <Ctrl>g Chnges the preceding chrcter to the corresponding Greek letter.
5 1.414 Prctice Evlute the following when = 11 nd y = -3 y, /y, y, y y,,, (+3) -y 11 y 3 y 33 y 3.667 y 7.513 10 4 y 1.331 10 3 3.317 y.4 y ( 3).744 10 3 : Lbel vs. vector subscripts A vrible lbel my contin subscripts. Two types of subscripts re found in Mthcd. Ech does something different. Typing period (.) will give you "lbel" subscript. Typing brcket ([) will give you vector subscript. Lbel Subscripts Using the Period Key T in 80 T out 100 Vector Subscripts Using the Brcket Key T 1 T 0 1 T 1 We will lern more bout this type of subscript lter. Using the wrong subscript is common mistke tht brings long hours of debugging. Note tht ech type looks identicl when not selected. When vrible with "lbel" subscript is selected, smll period ppers in the subscript to remind you how the subscript ws mde. 5. Editing Epressions Editing is often frustrting in Mthcd becuse s you delete or dd numbers or vribles Mthcd might dd ()'s when they re not wnted. In generl, the best wy to do it is to plce the insertion br before the vrible nd number to be deleted nd press the delete key. If you try to go behind the vrible to be selected nd press the bckspce key, you hve more problems. More specific tips re now discussed. Chnge vlue Plce the insertion point where the error is nd either delete or bckspce. R g 8.14 Should be 8.314
Chnge n opertor Plce the insertion point where the error is nd either delete or bckspce. r A = πr Should hve := Add minus sign Plcing the insertion point to the right of the open plce holder will dd minus sign, not subtrction opertor. Plcing the insertion point to the left of the opertor will yield subtrction sign. r B = 18 3y left of plceholder right of plceholder B = 18 3y B = 18 3y 6. Symbolic Mnipultions Essentilly two methods re vilble to perform symbolic mnipultions. You cn use either the Symbolics menu or the Symbolic tool plette. The difference between the two is in reclcultion. If you use the tool plette, ll previous clcultions nd vrible ssignments re honored nd the symbolic opertion is reclculted whenever chnge is mde. If you use the pull-down menu, previous clcultions re not honored nd symbolic opertion is only done once (is not reclculted when chnges re mde). The output of the pull-down menu cn be mde more redble by chnging the Evlution Style. Tool plette Pull down menu z 3 ( z 1) z 4z 1 w simplify w 33 ( z 1) z 4z 1 simplifies to w 3z z w Notice tht if the vlue of z is chnged, the nswer to the first symbolic opertion chnges but not the second. Notice tht if the z is deleted, the nswer to the first symbolic opertion second re the sme. Remember to select the entire epression to be simplified when using the pull-down menu.
Remember to select the entire epression to be simplified when using the pull-down menu. Prctice Use both the symbolics pull-down menu nd the symbolic tool plette to perform the following opertions. 3 4 1. Simplify 5 4. Epnd y 3. Fctor 8 16 3 4 4 5 simplify 9 3 4 4 5 simplifies to 3 4 ( y) epnd 64 epnds to ( y) y y 8 16 fctor 3 5 by fctoring, yields 8 16 ( 4) 7. Formtting Mthcd You cn do severl things to mke Mthcd esier to red. Chnge the mrgins to 0.5 or 1.0 in insted of the 1. inches Highlight results 1 b b 3
Align regions b 1 b 3 b 1 Chnge precision You cn chnge the number of significnt digits shown by first clicking on the eqution or nswer of interest nd then go to Formt then Results nd then type in the number significnt digits. Greek Letters Greek letters cn be obtined using the Greek Tool Plette or by typing the corresponding Romn letter nd hitting <ctrl>g. 8. Mthcd Help The Mthcd Help menu is ctully very good. Often, the help menu hs Quick Sheets which re ctul Mthcd documents tht you cn copy nd pste into your worksheet. if you hve problem with Mthcd, or don't know how to do something, check the help menu. 9. More Prctice A. Entering/Editing Equtions Input the following equtions into Mthcd. c b d ns ns = c b d k dl e (6 ri ) k dt / erf (6 ri ) k dt 1 1
k dt 6ξ ri k dl e π 6ξ ri k dt erf 1 = 1 π B. Trig Functions Answer the following nd eplin how you determined your nswer. When using trigonometric functions, wht re the units on the ngle? tn( 45) 1.6 tn π 4 1 At wht ngle will the cosine be equl to 0.5? cos( 0.5) 1 π 3 C. The pressure of n Idel Gs In n industril process, you re compressing lbmol of nitrogen. The temperture nd volume before the compression re 500 R nd 600 ft 3 respectively. After the compression, the temperture nd volume re 600 R nd 400 ft 3 respectively. Wht is the chnge in pressure if nitrogen cn be ssumed to be n idel gs. Note: Rg = 10.73 ft 3 psi lbmol -1 R -1. n v 1 600 v 400 T 1 500 T 600 Rg 10.73 nr g T 1 nr g T P 1 P v 1 v ΔP P P 1 ΔP 10.95 psi