147
...... . . _ ·. - .,.,..;;. ___ - _----------=--=--=--= - --- -_ --. ,,,¡;• +--' ·C '+- o '--, C/J .e C'CS / 2E ,., .. .. 'I • .. . . A .. . . . : 'FI tf f 1 F1 rFl 1, 1 r:i fP r l 1 ' i j : \ · 1 l 1 lBl l · 1 lil 1 1 l J Uij Hl f R , 111

1987 - MathCAD

Embed Size (px)

DESCRIPTION

1987 - MathCAD

Citation preview

  • ~-~ ~ ~1--=--~----"'_-=~ ...... =--~ .. _.

    -.,.,..;;. _

    __

    -

    _----------=

    --=--=

    --=-----_-

    -.

    ~(

    Y)

    ,,,;

    ~~

    ~!

    +--'

    C

    '+-

    o

    '--,

    C/J

    .e ~

    C'CS

    /

    2E ,.,

    ..

    ..

    'I

    ..

    . .

    A

    ..

    . .

    .

    : 'FI tf f

    r~ f~'

    1F1 rFl 1, 1 f~ 1

    r:i r~1 fP

    r ------tll:lll:l!ll!llllll!Dml:MllG~El!-=111~-- l

    1 '

    i j

    : \ 1 l 1

    lBl l 1 lil

    1 1 l

    J Uij

    Hl f R

    , 111

  • . ....., .... ~~e *'*' ,, ,.t .. - --:- ';~' ' 4~~.~. H"f ft 1 ~ .=a . ... ,, ' . ~--.: . .. .... :;;;.. 1 '~-

    . . . " :~, ,:,j,; ... ,w,'4,. l'clfey In ord" IO be lble lo ubtain llf'datn e! lho f>!0'11'11. 11 must comp!Oll llld rwtum l!>I ..-d Mt!KAO P\lrchuer R~111r11100 C.d to M11t15'JH.

    fh11lrtenM1/\gtttntent1httlbeO!)Ylfntdbv"'4 l....,,of tt'l~atmof M~ltldlhlll Nito tht bttf'l4!ht ol M11hSoft. rtt 1ucte:JOtS, ld."mn1strlfor&, IWirt lnd n19'1 .

    Carefully Read the MathSoft

    f Licensing Agreement Befo re Opening! t f /~

    t

  • Proprietary Notil% \lhSafi. !ne. owns balh lhis software program and iJ.s locumen1.ation. BOlh the program and docwncn1.ation are ;opyrihltd wilh all rig.bts rcser;ed by MalhSoft.. You may:

    Use Lile encloscd program oo a !ingle comput.er. Physically trarufct the program Crom onc comput.er IO U>othct, providcd thal the program is uscd on anly onc oompUlct ata time, and thal you l'W>OYC any copies of thc program from the compulCC from which Lile pragram is being transfcrrcd.

    Mal:c copies ol thc program solcl y ror badup purposcs. Youmaynot: Dislribut.e coyics ol the program or docwnenLaon IO Olhtrs. Reni. loase, or rant sublcense$ ot othcr rihts IO thc

    program. Providc ,,.. "' 'ie program in a comput.er aavice business,

    oowork, timc-sllarin, multiple O'U, or multiple uscr arnn~t witbout the prior wrillell c:onscnt ar MathSoft, lnc.

    Translat.e or Olbcrwisc alter the program or relal.cd documcnw.ion witroul the prior ~ conscnt ol

    ~thSafL

    S11 th1 ~""' Af'f'"''"' '"'" Umiud Warra"'J o //u diJJutu pocu1 fOI' co .. pku r{onna.tWrc.

    Copydghl Noti1% Co{lyrigllt Q 1987 by Maihsoft, inc_ Ooc K.endall Square Cambridge, MA 02139 All nhll rcsuvcd.

    First prinling: OclOber, 198 7.

    N:wwkd1tmeau: Art on page 19 acerptedfrom docwnelll by Tloolnas F. Coll1Va, Univ. o{l/lfoois. Fig1Ve 9, page UJ. ba.std011 tq111UDllJfromJolui G. Tru.:ul ofSUNY Swn ybrook. '

    This manual was produced wiUl the aid ar the follawing hardware and soflware:

    Hardware PC's Limit.ed 28611 Computer, Micro.soft Mous.:, Apple LaserWriter Plus Print.er, HP LaserJet series ll Printct

    Software Xerox Ventura Publishcr, FinalWord ll, Loius Metro, Symscft Ho

  • ~.Wii . _, ,. ~., -fiuing 222

    REFERENCE Ap~ndlx A MathCAD Rd'tttnct , , . 117

    Commands .... 228 Kcy referencc .. 23S Valid cquaon forms 237 Opc:awn .... 238 Built-in Cunctlons , . 239 Predcfincd variables . . ........ 242 Special charnctcrs ................ 243 Suffes Cor numbcrs ....... 243 Cornmand-line options ... 244

    Appcndlx 8 Error Mt958cet , l.45 Ust oC error mcssages ..... 246 Ap~ndlx C SIArlup Optlons :m

    Contenu or your MamcAD dUk.cltcs ....... 254 Options on swting MaU>CAD ....... ns Hard disk shor1cuts .... n1

    Appcndlx D Prlntn- Drhen , , . 15' Printct driv~ and printin , .... U-JJ Components o printer drivtn ....... 261 Ploncr drivers .... 266 Adding a printer drivtt . , ... 2fi1

    Ap~ndlx E Numtrical Mtlbods 1" A nolC aboul numcrial methods ... 270 ZcroasaactororanurnCD!Dr ..... 271 lntcgnlS , , , , . , , , , , . 27\ Dcrivativcs .. m The root unctlon .. m Solvc hlocks , . _. ... 273 M.atrix openttions , , 274

    INDEX

    - --..,

    1 1 ~ ~ ~

    1 1 ti ! 1, .1

  • --------

    ----- - ~---- -----

    ---.

    -'- 111 ................. -- ............. _

    ------=-=--:mmrll!WWW~; -o! .. ,~~ '+ 1, 4 '~ ~ 1 i..~ .. ~ ,,, ..,... __ ..... . . ;,. .. ,. "" " ~ .. m!"!'!IH4Mdmii.t'1\ii'

    \;;.:. ..... ;.;.~.'. .;' '"'"' . .;" ... .4 . .. , .... ...:.~ .. :. , : < . . ) ::::x'."~o:~:-:1 -. -.,~.-:..-... ;~~ .. ~--~ : .. _ --~ ,~ - --: --~---r" --.;_---------------------------====:::::~T~~-~ ,,,j F" J :S ~-~""*" ''b;#;;;,i;a!';L:O'iMflei"?)!itlw< !e&'IHAf'H>t!i" \,Ei,fW:nsduhi' w '4 &,,..;,;.," fl " i..:._j &blcofCorucnta ~-Bfl ..- Prcf.ce 1

    ~ DI!-~ t~

    E r ~J rJ ~ ~ q ~-

    .e.::1 :E--~ 11 :E?'..) .:E i~

    :~ ~-:-j , D ~. l",J1 ~~ ~-=~~~ :e ~ -- "!l _:m ... -- -.!I

    --

    mYmi1'll~lmlltB The MllthCAD [X'Ogram is a unique ncw way to deal with formula.1, numbcrs, u:xt, and plots. MathCAD is as versatile as tlle most powerful computational tools and programming lnn8uug"' yet 11> easy ID use as a u:x1

  • thCADte-.itures ,, , ;: / ,: , .~:f$)'.i . .:};(it~ : is a short li>t oC MalhCAD fea.tURS:

    1rface features Froo-form, ICta!Chpad-

  • < ' . ' .. -.: :~ '' ~ " ...

    -

    _ ... ,, __ ;.,_, _ ... _.;,,,_,~'.61_'. H . _*' _; ... ,,_: .. ~ ._. ._ .. :;~/_,,s=+p' =;, =~ =~: ~__j ll't ~ ~.: ~ rr.r"'. 1 ~- ~~ fr . -=--~ .::~',,;~ . 1 f':;\ 1 . ,,::'.: Getting Started : ~

    r1 il -~ 1 ~ " ""' 3 IJI

    I~ 1 - 3 ~ l li [ 11 r- :72 - - rmr~

    ~ l'-.i-3 111 [ ! 1-- !!l 11 ! _- .:.!!) 11 ( ~ i=3

    l! I'- _l B li ti -~ ~ ~L 1ma _'.:ij 1 ~ ! ~ !]

    11 !~ T- !] lJ.l !,~

    -~ . 1 ~--~-~

    -- JJ -

    1 ::0r;1.,., '1111'*:0l:~S::";:"F .)~!El:' . , ::::l!lC:::'u:.1.dJC:'!ITIIi!ZJ..:i !.1 \;. Ut

    Dos

    ,IC [QlllT ION

    ~ous: a := 1 McMory llcdrlU [ARJ Pri nt 01 Sclcct pri ntcr Config s av e Execu le .l ' C

    Za

    h -J112 -4ac xZ := ------

    Z a

    2 di ser! M : = h 4 a g

    2 + v

    xl : Z

    xZ = 1

    b : = 3 e := Z

    Check , .. shoul d be zero

    z a x1 b x1 e = 0

    2 a xZ hx2 e = 0

    discriM = 1

    X f b

    . :

    t ~ .~ 1

    ,; ,. J ~ii,? :~.

    ~ t: f. ,;:; r ~ . . >-..

    .:, .;. t, ~. ~>: .. i {;i ~ .

    . '. . 1 ,~.;:::\,! ~

    . 11 !, r ~ t

    ~

  • - ~--------- ~--- -- -~------------ -- --- -------

    --- --- - -------- - ----- . - --

    Mlc~~;~-t~~~.~'1\)'fff*''?' -- :; -- .M~~~JiH~!\!iim~ 111- . .. l"I a+ r~ -o=+ !r ftM'tt 'NCl'S'!'

    :u

    -~

    Setting up MathCAD for Your System

    Thls chapter describes how ID ICt up MathCAD for your compute.- symm. Thi$ includes imialling MalhCAD on your han! disk (if you havc one), coriguring MathCAD for your computer's display, and sclecting a printer type. Thi$ chapter coniains lhc following 9CC!lons: Systtm requlrmstnll

    Hanlwa:e rnd software mquiremenls for MachCAD llow to 11.art MatbCAD

    lnslalling and running MathCAD

    Connprln1 MathCAD ro.- yoar prfnltt Scttlng up MalhCAD to run with yotD' prinier or plotta

    / 1 { ' '

    -~ . ---- - ~ . . .. . . .. -~ : '~ .. . - - . .. ---.,.- . . . ' .

    1

    1 J

    1 1 1 1

  • ---....- ------~---

    stem requittmenl! . . , 1 ,:,~ ,, -' ;;; 1thCAD rcquircs lhc Collowin hardwlrC and software:

    mpultr IBM PC, PQXT, PUkdrlv~ Roquirea one S 1}4" or 3 1/2" disk drive; Wo suppccu hard disks

    Malb coprocnsor NO! rcquiwl; lnld 8087, 80287, or 80387 supporlr.d and nx:onunen.cbnl LascrJec. LuuJet P!u.s. or LaaerJet

    sencsll

    Hewlca-Pacbnl plouus

    ----- - -------- - --- -- ------

    Sec the Rtltase Nous included with this package for more dew.ilod informatioo

    !f :i!I

    I~ a

    -------- .,., ----- --------

    - - --- - - - -- ------

    ~ ~l' tlii"'rt"Matli,C~.D11t~~~~;,ii:.J.~7;~-;:i~ ,~ff MalhCAD C-Omes oo 1wo disl

  • ~~~~~

    .. " ! '..' . .. -~ - : , .~:::;:~ .. . " . j , ._ ~-.:.'.:~ . :'.: .~L~ZJ D-0

    1.,' . . .

    -- t. c-1.w ,., -.i.aJt ' ...._,, .. ,. ..... ,.

    1tflC.AO tlar1Up WMn

    tly wiltndLt C. Srartup Op

  • ....

    t:.~ 't

    p-w . . ET -- , -- ----;--:-".'--- -:;::-;---:--- ---- - W B'ril '*~ 1 ' ... i" :.: '.. : .. -:~ - ~ - ----~~-~-

    " #oii''=x~,:i'..-in:ii;.\;J..,k, . . .. . . ~' -------t"'tib" w'l'1i+\f '::tls"i~u"r '*'' .,' . !- 1""" . t b d'Wt"'e 'H0 :1t 'kJ,. !! ' j : . - - - r. i .il 1.cis.b .............. ,;, ., ~"J ~ i :

  • . rfndple1t:lo\'i. \~dHh'ittt!i.ft~-t-;}1' ' .: . V:..1;.;11:. ,i ,_ ~

    ,[) loou simple, and it is. 11 was crcalCd tecording to 1i~n principie lo make it powaful, ncxible, and ""' In MathCAD:

    rythln~ app .. rs In amillar nolallon. IC lherc's a

    ~I you Stt Is "hal yoa &l Tilerc is no hidden "1T"1tion; e.crything alp

  • r?r : ~ _,.,_ :': ::~~)/: : ~)1\;, . ,,. .' J . , , :~:-lo-ln MdlCAO

    Ch"l"l

    This c.tlculation demonsiraics thc way Ma01CAD wcvk PflX:.CUCI and cak:ul.iatcs cach cxuuuon iU y(H.j cntcr il.

    When you are tyi inK w1 111a1ion, U1e cursor l1x1ks like U1is; J. This iJ an apNnd cursor. nic vC11cal pwi uf Uic cur"" shows whcn: Ma1hCAD inseru wlu11 you lypc: ~> 1he rlghl o lhe cut>J 1he col1>1 key (: ). This means "is dcfined iu and a1icars on Uie saw1as1 colon w11J w1 cq1wls si~n (:).

    En1cr an eprcssion to define thc variable: eilher 1 single numbct ora more complK:at..cJ co111binalion o nu1nbcn and pn:viowly dcfined vllliablcs.

    Bcfurc you swt. clear thc equalion you cnltttd bcforc. Typc;

    [l\ac] clan (.J] Now define 1. To malee your scrttn look likc Figure 3, fust movc Oic cursor to posion 2 7 (as indicated by tl>e numbers at lhe IOp right O the scrttn.) Thcn type;

    t: 10 Makt: surc you prcss a colon ( :),noun equals sin (). Thc coloo 1.ells Ma!J1CAD 10 define a variable; an cquals sign iclls MalhCAD to calculatc a rcsulL IC you malee a mistake, use (Bkp) IO erase it and slllll ovcr again. MnU1CAD documenu n:ad from IOp IO bouom. Once you havc dcf>ed a variable lile 1, you can con1pu1c wiU1 h anywherc btlow 1he l>'JUaUon lhat defines iL Now enlCf anolhcr delini1ion. Press [.J) to move lhe cursor beJow the fi.rst cqualion. Then define acc u -9.8 by 1yping:

    acc: -1. 1 [.J] FiKurc J shows lhc two dcfinilions you jusi mlCIW.

    r,;;;..,;r,.- . . --- -.- -- ---- -

    ' ll

    MIO : .....

    Fl{ure J : Equaliono 10 ciol'no aa: and 1

    Calculatin: results Now that acc and tare dcfncd, you Clll use ll>em IO calcu!AIC. Thc Cun;()( should be bclow lhc two dcfinitions. Typc lhis equacioo, which ~cul&s lhc: dislancc iravclcd by thc Calling body:

    acc/2 * tA2

    11

    ..

    (The CAl'Cl shown hae (A) rcpn:senlS rising to 1 powcr; to lypc it, hold down thc [Shitt) ley and prcss lhe 6 kcy 81 the top ol the le y board.) When you cnlCC this equal.ion, MalhCAD computes the rcsult -49() (Figure 4). The scrccn shows two

  • f 3'"~~BJr~;~f :f ~~t~;:~r :1~~~:;~525.].D~ . ~~~-. .JtJ Ch't"
  • llerJllveculculutlons . . . ~, ;'. .;: '1at11CAI> can do rqJICaU:ill or lt.u .. lva calt:ula1itM11 u ~""ilY aa nd1vidlUll ailculaUO\I. ~AD-. IWO "llCltlal kinda ol 'ariablu !'> perfO O and 10. Whcncvu a ranc vuiahlc appean in a t.blhCAO cquatioo, MalhCAO calculalCI u.., o.uation noi jusi aneo. bul oncG far cach value ol Uic tanKO varilhlc. Ranll" vlrilblu""' oftcn l1acd u subocripu in 111 cquation 11111 dcfinca mwtiplo valuu for. variable.

    Vtdon hold multiplc vaha. Uyoucompute allCI of 1111wcn wilh a mo variable. you Cllll llOfC lhcm in a VOCllJI.

    This acctioo dcscribca how IO llSC l'lllc variablca and vcctor1 IO do iterltivc calculalOllL

    Creatin: a ran:e variable To compute equaLions Cor 11'11\ge of values, first =a rango variable. In thc problcm ahown in Figun: 6, Cor e:wnplc, you can oompuie resulls Cor a nnc oC valllCS oC t fran O to 10. ru"SI, chanc 1 inw a ranc variable by cdilin its defitioo. Movc thc CUl'IOI' IO lhe 0 in die equatioo t ; 10, U lhoWll ll F\ure 8.

    . - - --

    1

    Mllt :e -1.I

    - 1 - t --

    r..-u .. .t _.,_ 1 , .... r.111 .................... ..

    f\gul91: Preporing to edt !he oqualion t : 10

    Now erase lhc 10. Backspacc twicc:

    [Bltap] [altap]

    lapt 1

    --'

    This eiascs the numbcr 10 and lcavcs a pW:cholder. You can now defmc l IO takc on a range oC valucs from O to 10. Typc:

    0;10 [.J) MathCAO shows lhc scmicolon u two dou. The variable 1 is now a rane variable. The saccn should look lik.c Figun: 9.

    ,. ~--";: lil'--

    C:---r e.. -#-

    F " ! : 1; [=t

    E:-::::-~ 1

    . 1 . -!!_ l . e

    c;-1-= C::: , L.~ ~ ~r. c:-T~ ~ 1 !l ~- L~ . e:.:-~.

    L: ~L.l,. 1 . ~ l E

    ~ ~ : ~ t~:

    1

    TI\O Huica

    t : .. 11

    Jo.- h ' ~ 1 --1 2

    ,.,....,,,_al -"J"t l -r .. r.1u ... ...,.. ...- ,, .. u,

    Agure O: Cak:ulting wilh 1 rang vana~

    When you makc t 11111ge, MaUiCAD shows lhc last calculation u a table willl one rcsult Cor cach value oC t.

    Defining a vector By using a range variable like 1 as a subscript, you can deflllC a vcclOI' oC calculalCd valucs. Fu.t. use the cut key, [r3], IO gct rid oC lhc table. Movc lhc cur.;or into lhc table and prc:ss:

    [r3J MathCAO CUIS lhc n:gion from the documenL

    You ca.o cut any region-texl,

  • . .. . . .. -., ... 'T;~~f f ~-'/?::~r r t~y;:~~~~:r~:~Jt:'.::}~r.:. '., ..... _'. : . :~::: : r) i~t;:~::.> ;;~:~;:~~!::~J.f N~: :_~

    Lltlple. ~' s how to changc the vcclOI' in Figure l O so ne of lhc numbaS dis;>lay in eponential notalion. Fkst. he cunar anywhcR: belween lhe bnckeu. Tbcn typt:dflcmlmt on the top lino of tho (Figure 11). Thc symbol on thio linc 11:prcscnl ttlt-'lu.:t of 1ho 1fplay f4umni: or r,um11ie. pr means siun ami ti meano "cpcienlial tolerance.

    t : .

    ... : ......

    - l :1-t ' l

    1 ti fll . l ,.._.

    1'5.'' '1:1..,1 m.s 92'.U

    ""' ..... lr.aJ.1

    511

    ... 11: fonn.ll apecil\olllon

    r..-u ... "'...,,_ twhlll .. ..,__,_.,,_tte

    keep numbcn !rom di51'laying in e>poncnal notation, 111ge lhe CJlll cursor jUJI afrtr tht J In l-1. "''''''wu- ,,,,,,.,u~,,., .T. C.,,,it IM frlftdl lo rta4 t' F.nt,, IM MW fn'"""

    Ch'!"t.

    Flf1.n 14: PloC el"'_, MathCAD pfou the points. ronnecu lhcm with stralgh1 fines, ""' fill1 In lhe mlulfts u!J llmlti.

    Tlw half-bro..km"' 1/w btflnn/Jlt and tlld o( 1/w 411J 11"11ts In Flt"" U INUcou 1/tol MotltCAD 1w flll'd In 1~ 4111 /lmlu nM-tlc..U,. Tltt lttrlfMo

  • ---~~.~=-- .,,.~-,-~.., "'-' i" '.o.-c-"---->o --"' '"'" ........ ----~-

    .M i - ' . . . 1 i ., e : .. :, ..... ~,y ... . i ... ; "'".;" .. j 1 ~ : . !_"", ' ... :.;.':'. . . . : .: ; .. ";' .".:.'\.~0:- .: .. . . . . ' , ~ : .. '; ,;

    L 1 - Li-.\1""' .. -u4q : rL , (. . +it " ' f ' ' J:.,u11 "W11,bA itt1'1ildtkB+#10;'.'&1etsNWwe;,!Jel!l+>+d.p1--..... "'hlgpi,,1ti1.1 >11 !.;;+ ,,,,,,beM re*'it 'l'!to *'' " rt!utow1" . w ... ,, ...... ,,AerlL - ~-f~ 24

    For dL1ailtd ir{onnaJJll 011 crtali111 llNi/onnaUlf plou, se Chapler 16, 'l'/ou.

    Formalling a plot Thc plo! in Figun: 14 il lhc defaull plo!: 6 lincs high by IS columns wide, witb lincs conncctin llle points. You can change lhc plo! ~ and typa by /orllt4llill1 lhc ploi, ju u you wiiCAO"'"" ........ Each tem on the 10p 1ine of the sacen reprcscnts a submcnu. T sec the submcnus, lUG lile ( +-] and ( -+) arrow kcys on your keyboard. AJ yoo movc rrom onc ilcm to lile llCJll, the corrcsnldiog submcnu a>pean at lile IDp 1cn o 1he ocnx:n. Figure 18 shows thc submcnu for File.

    m .... ~U-rrrnwcii:mmfiW.1Cm f1\.i #'ttl}_~,.-'- ,,~. .......

    r11 .... ,,..,,.

    -

    Fig

  • :--..,,,..~-~~- --.

    ~~-----~--. --------~-.. --~ ----~ - ----..,....-----~ - - - - ---.,...., - ... , ..,..._...,... __ . - - ----------------......-.--.---.......... ,.,_ ______ ~ . ..,...._. __

    r .. : ... . ; .-"~ " '~?J~r:~2'.'.!!:t":s:~:1>J~':~::;;-;2f~ ,., move thc highligh11en or righ1 IO sclcct Fllt. Your scrccn 01Jld look like Figure 18, with tl1e ubmenu for Fllt showing.

    To tsc~from mtnu.r ONJ rtturn to thcdoc1Un1:nl w/lhoui auuting a command, prcs.r ,,, (JCacJ hy.

    >e currer11 sclcction in tha tubmcnu appean a. a highlightcd O\'CT'Se video) bar. Move the highlighl laulon if you don't rpccify othcrwioe.)

    Chapttt I

    About menus and command Whcn you'rc using commands and mcnus, kccp in mind lhc following:

    You can sclcct from command mcr11n cilhtt with thc arrow keys (u in the example abovc) or by lyping the lirsi lcuer o( lhc command. For example, anothcr way lo sclcct thc S&YTite A In command mt/lllJ reprtstnts tite Control uy (!Ctrl]). For uamplt, (AQJ apptar.r ntJrt /O Quit /111/ie System menu. This mtan.r that [Ctrl]Q Is a shoricuifor the qui! command.

    Whcn MathCAD prompl! you for anything on lhe mcssage linc, press [ll:ac] if you want IO abort the command.

    Whcn MathCAD prompu you rora lilenamc, you can alwa)'J enlet a DOS slllmame (for cxamplc, . *) instcad. MalhCAD will show you a nolling mcnu or cxisting lilenamcs. ~ Chapter 3 for moro infonnalion ou thi featurc.

    To exocutc a cornmam.I by name, instead o( by menu, press [!Cae] Md cntet thc command name. You nccd enter only enough letun IO distinguish the command from 0!11tt com mands. Cornmands names are not case SC11$i tivc.

    For cxample, herc are sevctal oquivalcnt ways IO enter thc qui! command:

    [FlOJ 8 Q [!Cae] QUIT [.J)

    [JCecj qu (.JI

    [ctrlJQ

    Ustflrst ltllcr In mtnu.r. By - ( commandJ ort ""' cau sa1.rt1/w:). By namt (nud nnly "'"KA lt11trs to disrlnguish // from otlter commandJ). Co111rol-uy sltor1c111 for qull

    /; . ~~~==----~~====--.... r:-"I f ,. The Buics I_ n:;-r-MI , ~~T: Printing Prlntlng.j Wbell MalhCAD ha llnlshcd prind.ng. it posu the messagc Prlntlnc complettd 11 the top o! lhc scrccn. .!~ 1 ~

    1~ i !1 l~iJl f~-!-61 e'. .. I~ ill

    iE ! ~;J e;---!:I] ~-- ., ~ :- ii :e-~!.~ ~~!: ~ ! -: ~. 1 ~-~ I, ~-~ ~ -!---J .~

    Thc prlnt command prinl3 thc cuncnt documenl To U3C the prlnt command by name, typc;

    [l' ac] print (.J]

    Warnlnt. lf ycu dldn't .rtlter a prlllltr, MatlrCAD shows this messagt wkn you try to pri111: No prlnttr Mlecttd. To stltct a printtr, IUt the Mltclprlnter command a.r

    de.rcri~d In Chaptu O. Sttti111 11p Mat/CAD for Yow Sys~rn.

    '""" ""5.1 M. 4 1"55'

    .. I~:~ 11z:u .i-. m .! .....

    '83.1 811

    '

    m, A

    Agui. 20: Prompl for print eommand.

    ....

    Tho prlnt command promp13 you for lhc print arca (Figure 20). To print lhc wholc document.just pre.u [.J). Ncxt. MathCAD prompt.s you (ora printa dcvicc. HN is lhc default ~ (.J] if your prin1er is connected to the port called PRN. (For most conliguraons. this is cooect.) lf your prinier is connccted lo sorne othcr port. cra!C the PRN and enta the correct printer port. for cumple, COHl. (Ir you havc no printet, pre.u (l:c) 10 abort lhc comman

  • Olherreuturn. . ,,,.. '.'

    This chaptcr has IOUChed on only 1 fcw MalhCAD C4IUl'CI. From l\en: you can Ir)' OUI MalhCAD on your computa oc o on w lhc rcu or lile man.W.. Herc's whuc LO lcaru aboul MalhCAD'1 Olhct Ccaturca:

    Editlng and docu1t1a1t fcatures

    Edlt1n1 equatlona, o.apta 2

    Cut, palle, aad IXIP7 Chapu:r 3

    Starcll aod replacc. o.apta 3 Wlndows, o.apta l

    Tul n1ion1 aDd lat baoda, Chapia 4

    Marlns a11d pace We.u, o.apta S Prlolin&, Chapta S

    C111tom MalbCAD ccmncuratlo111, o.apta 6

    Compulational fcatures Operawra, preccd.-., alld panalbeaa. Chapta 7

    Vaer..Ulilled fu"""-'. Chaxa 7 Aulomac aod muul calculatloll mode, Chapta 7 l'or111.111lo111umben, Chapia 8 lmaciaary and cotmpkl numbers, Chaplt:r 8 Vnluolme111urc-.Dlaplu9 Dlmensioul anal7*. Chaxa 9 Vecton and malric:a, Chaur 10 llralloo, Chapea 11 Tabln, Chapea 11 Sums and producla, Chapta 12 lk&rall and dcrl...ilna, Oiapea 12 Stslislical functlOlll, Chapcu 13 Cublc splin lnlerpelatioll, Chapia 13

    -------

    \ 1; ' .. . ' .!

    JfM1l l"ourWr tranaoruu. Clw1>tcs 1) Random oumbers, Chapta 13 Condilional< (ir), Chaptcr 13 Solin& slmullaneoua ttuallons, Ctwpta 14 Radin1 aod wrllin& ulemal dais, Chapw IS

    01ap

  • -~:-;. .. ' ~ -.:' >:

    1: 1'.: -.:1 ... __

    1 c;----:J 1 l!-. :ri.-. ---a , e 1 e; -- 7"2 l c -- ~"12 ~"]31 lfE--~ ~. ;~:- ~ 'e~ -:-:J 1 e:---~ :~~! !j -;u-

    Editing Equations

    MalhCAD reprcsc:n11equa!lonlill11me ~onal fomut that i.t as clase as possiblc IO standard mathernatical notation. To edil such an equation, roa mldt posillon thc cinor corroctly lnd lldd or dclcic thc appmprlaie nmncs, numben, or operaun. Thi.t chapccr explaina die ltl1lll and conccpu you neod to lnow 10 edil equations. Thil chaptcr a1Jo explains how IO YCW an cquation as 1 strin& o( keys llld how to place lhe cunor in thc concct spot In 1n equotioft 10 edil IL

    Thls chaptcr conw,. thc Collowln1 >

  • tl11llvrm~ ., ' ;, . 1il acclioo dcacribu lhe LCmU ....,.in lhiJ chapccr.

    .... ...,. A docimal numbtt likc 3.141~9.

    lame A varllblc or runctioo name dial appcwa ill 111 cquatioo.

    )pr&IOO' A 1ymbol lhat pcrforma a ownuicaJ cak:ulllion. likc ..- or +. Each opc:rawr hu a key dlat yoo use co 1ypc it (far cumple \ ror. squarc root, + ror 1 plus ain) and 1 c:h&nlclerislM: Vlllhical llJPC8'WlCO 00 the tcnlCIL

    ()pffand Onc ol lhe objccu acled oo by an opcrallJr. raccora io a multiplication, ierms in lldditioo. w:. IC 3 + 5 appcar1 io 111 cquation. 3 and 5 11e lhc opcrands of lhe plus sin. Opcnnds can be simple oamca or llUlllbcn or more complic.ted expreuiona.

    Billllf7 OJ>"rator An operuor lhal tW:I twO ClpCl1lllda. Conunon cwnplcs are additlon, aubuaction, mlllliplicllian, divisioa, awl rai.sin IO apowcr.

    1 Vaar7opcrator

    An opcratOr llw U.U. ollly ooe operand. Commoo uamplcs are aquarc l'OOl 911C! abx>lu&c valuc.

    Placebolder A srnall l'CC\lllglc (1) lha.t latcJ lhe place ola miuin opcnnd or opcsalOr ill 111 oquatioa..

    l!.lpraolo A "weUormcd" combilwion of operalOrl and operanda. WcU-ormcd in Us COlllCJl lllCllll I combination tbal MatbCAD can cvalualc..

    ---.lp{l>-lcvcl upcuuor is lhc d.1v1sion (fraction har) Cor lhc fnu:lion . Mllny ediling i.ukJ (like lhe lncul comrrumd) use Ore to>-lcvcl opcra1n u 1 '"l11111dlr" for tlie whole e prcssion.

    !'recedence rule1 The rules by which MalhCAD decides which opcntiOlll co pcrform fst. Each opuacoc has a charactt:ristic preeWSI, art:

    SubKripts (/)'J'

  • ~---..... . . - .. . - . .

    ditlngnamesandnumbers:~ .: .. ;r. .;.,~; ~ . < iting namc. and numben in M.alhCAD is as easy as cditing L

    edil a namc or number, loDow thc!C stqn: Place !he cuoor al the oomx:1 place in lhe name or numbcr. Thc vertical pan ol thc J.sh.apcd cur.;or should be al thc spot in !he namc or numbcr wherc you wanl to inscrt or del cte.

    Typc addilional letu:n or digits to inSM inio thc rwne or number. Or, fl"$S (Bkap) or (Del] lO dclcte backward from lhc curror. (In cquations, [Bltsp] and (!>el) an: equivalcnl lO cach O!her.)

    trc 2 shows an cumple: changing .7S ID I0.7S.

    1 J.'n 4.'n.

    1 ll. 7'

    .. 2: Edllng nume.r

    t. Put t ... ..,,..,,. Jut Mf" t ... iechI poi ot.

    . z. hpe 19.

    ---- - - -

    Ch"Pta 2

    "Adding an operatclr:":~~,iq- \,A;., . ~~ il!,-.;;'1;1~~ ~

  • .;,; .Crator afl.Cf a wholc ex pression: lf you pul Oie cun ~.lHl 1 z

    , . 1

    & :a 1i :. 3 X :a 1

    z

    f-~ aln(l Z.4Z3 1 Z. p,.... "w to appl1 e,uare root to MM. z

    AQutw 8: Applyinq a - root tl a noma

    ~ - l .J

    !f.~'l1 l:Jll 1t~ I a:aUil ~ :z3 x ::

    t al,.c:.> ~.&U 1

    mw1111;:iI a :a .li ~ : a 3

    ..WJ. W1t root ID a b\dion

  • ........ ,. ... _ - . ,.. , ....... h .............. ..,...,-~r . .--,. , ..., .. ,_,~ ... ... -. .- -- --.-

    ~~~~~~-~~-;T0~'.~7ZJ72~:~~~22 :::,: ;::~:~-~:'.:: ;: :::~::":'. :::LT:'~~.j, l Ch"l'tctl

    tetlnaoperators ~. ->~ .. kil~i:h~;~:~.~\~~-'1 ,,i~i:) i:N~'7"~~~ 1 scction ~ribes how IO: dcle1e and n:placc si opI~ := 1a ,, J

    z - 1

    :: 19 ;s. 3

    1 " 1 1

    )( :a 1 &lpM. :a Ut

    l. l\at a.- at..,. ..r "tri.."

    :: 1 lri.& : 1a

    l ...... [llbp) s u-to lot .1,i..

    X :: 1 &lph& :: 19

    3. ,,._. lllkopl aralft ta lot. ti.o tlvlllao N.r "' placoi.aUor.

    AvtJrO '' De!.ung 111edonomina1Drota balon

    Deletlng a unary operator To delete a onary opcntor, !oDow lhele sieps: Put thc cinor 111~ on lhe opcraior. Ptcss [Blcap] or (!>el]. MalhCAD dclcle3 thc openror, Figure 11 shows 111 example: deleting a ~uare root.

    ~

    fll-1?;Jll. i11J q . A :# ti l. :& 3 X ;: 1

    ' " M . '. ':1' ";~ ,, r.t ..,,,_ ... .,... .. . root ....... . 1,, . ' a olo T.,13 1 . . . .. .. 1 .. . .

    ":. ) ' . ~ . 1,

    !JiRVI'lft!11I fi a :z Ui ~ : = J : a 1

    ' ..

    oln 1 1 > i. ,....;. (~;: lla~M:AI j ' .. ,..- ti...,.... root.

    . r . , . . .. . . J[~] -.l~ .-: i . . . : i'' .,. _ .. ~; .. . .. ::.r t : 1: f~ .__ . ,..:

    ~11:~-""" .,

    '

    . ~. I

    -----------*1!1111!11!._.!! ... '!I! l!lf.lllll_'!'!.," . ,,\':'.,:'.l!.tf's!'lJ)l!'fb'~,~~;~~" ~~'r,~f,',1t'Ntt'~ 9ii!t~ ".! _ fyf_ ~ '. }'. ., ~ 4 ~+. 1 ~ - ' ~ ' "' 1'

  • . :. ' ' . : . ~ ~:'h '\':: . . ;,; . . 1 . ' ~-~ .. ~~ :--- ., ]--~-1M,w" e..: .. Jt-,f\Mj1i!i1!;ild!ftl"A'W ..i,,,4.:.0 + yq':I , t. ,, : ~ ~ ' ""''''' :,,:.loe ( '>.

    Figure 13: Adding ~ W'CIU"ld a -1 1;~1:il:ffH .i

    a : IW :J x :l \ z

    l. ht c:urtCW 01I 41vhlo. at \Md ~.lHl 1 kr. \

    l l:l!iiifi::;;y - -- -- - - - .;:

    a ; LW ~:J 111: : 1 1

    [}] si< xi 1 o l. Pres apoetro,M ( 1 ) ,

    F~re 14: Adding pom>lhoMe around an ""~

    Expandin: parts of an equation Adding parenlhcscs is useful to cxpand plll1 of111 e pul pam1lhescs aroU11d part ol lhe cquation. lhen add lO lhe exprcssion wilhin lhe pan:nlhcses. MalhCAD expands lhal cxprcSSJon. bul does l10l disturt> lhc suuc1urc oC lhe rcsl of the ctuauon.

    1

    1#05-CN .QIDU4'.UttJ.W~J~3StMJMt1.M!i! .. . ... .. ~/~ ~ .-ii',-l -:{:.'-.1 .. !:rA:"r:~{-:~r:;: j\f. i~~::::P~.d:~~~~}:K~/!~ . ~ , .. ; : ~,' ' . .. !' ' ' .. ' :J. ~ ; ;'!" .r "-.. ~i~ ~} 1.'. :Wfi-1-.J

  • . -.... . : .. ::.~::-:::.:" ::::~: ~::' ' :::;r:0:~;;'? ?:;"'.?. ':::;: i ;" ~. : ~ 1 15 and 16 show !'>] - l 1

    Agu,. 17: Edillng .,ith -"'-

    ''ll.Rolll! :; lQ ;: 3 X !: 1

    . {/ 1ln) 18.415 1

    .... .

    a :: lY ;, J X :: 1

    z ... h

  • ~!IW&WUU A

    . 1'~ .1 .. . ,r. .E:)L:f>, ' \i " ;, :. , .. ;.4;_11 " '' 'dd"V fi'i.j>,. ,\. . ;;;.~ ::. I Movc the cursor IO whcrc you ...ant IO pasie the cquation: eithcr 111 cmpty spaco tdwcei1 rcioos oc a placeholdcr in 111 cxistin rcgon. To pasie the cxrcssion. pus [Ctrl][r,J, the lnputc kcy.

    igurci 19 and 20 show somo cumples.

    .. :. 1i ,. 3

    ; . ]- . ~ r. l

    :a ut :a 3

    : . .;;

    : l

    1. ht cunar o top-tevel .,.,. ... '" ror .. , ........ " .... r.. .. , (U. ,,_ .1,.1.

    :a l l ....... !Ctrllll'3J. JlotM:IUI QIU U.o .. ,,._,.., (,._ lM ...,..u ...

    ~ 1 Q: UUlg lnout"' - ... olljllW&IQn

    a :a 1i :a 3 ;. 1

    V :a f. - 1. "'' -- ... pl-hol .....

    a :a l8 :. 3 K :. l

    l

    : . r. -.]- l. ,,._ !Ctrll!f41 to ,..te .,.... .... lut ""'

    l

    -

    Figuro 20: Pling ,_ olljllW&lon- .........

    t11-..11.a l

    You can pasu w sanui t.:

  • ~

    .1.-,..~~ ---

    ~=~-.. . :i~, ~ ~:: ~:- .~-.;~f ~.1::LY~~:j~: ~:~: :_ ::-':}~1~::}\Timr:1~:}'.t~1; :'.:'.:1::z;r;~1-rrt;~;;f~1:~~ ~~;.\. ~ .. , ... : ~bl1m ~,~~-~~~.!~ ~,~ :~~~~

  • t e' #' - o'P' : n "*"*''#3 i' C' , :ti ' t W' t f, 1 r t:!mS d' Ir ,/L : JI' 1 ., ( '1 . .J "

    Cunurkeyit , :". MlllhCAD ~SI!$ cursor keys (lhc keys on Lhc numcric keypad 11 thc righl of lhc keyboard) and Lhc [Tabj key IO moe Lhc cursor bclween reioos and wilhin regions. Hcze is a comilele list of keys llW move lh CW'50r. fJ1l ll ~; : . ~ 1.1ow on11>( oic:lOIUiM .. opeaMd diftdOI\. (Ta.bl

    [lllUft)[Tal>I

    (llcIJpJ

    (llcDoJ

    l~ 5 lintoll a W... ......,. dowo 5 lineo 11 a lint.

    ........ LI> I0'4 ol PIOt

    ........ down ~ ol PIQI

    ........ ltl lontXI li>gol~;- ClnOllo linl llQion. Scrol to tnd ol do WllUflll l)on ,,.,, ""'

    IUlllJ,l.i.l!l ............................ ..:....,Trn -.ni.i MlttlllOllU a..111C

    ._ .. __

    ,_ .. 1w.u.:

    : 1 e.el 1 -- .t cu .. :~ 14 I ... ! lI J\ :. 1 1 ~ . : ...

    .... 11 o1 .. i.-1. ~ 11 ..... , "-..... ~1 ... r-frltl-~flcl..t

    1 1 l : I fS5 1 hlthl tele......,. 1

    ... 11t1-1~1 : :-

    J : "

    .. H 1 :1 r:. - r\ lt JI J .. Figure 1: Sa"'1 bolo

  • , __ ,. _,,. ,~.,.~ .\'~~ . . :, ~ .. :.~~:! ,~ ' /~~\~5~~;~:'.::,~: n.::: . !r:x ~~ : .. : i '~- ~.: '.~~;~~j l>odorumlf!l Jltoo] out (.JI

    PASTE ~flt.glon {Fil "' (1'101& Jl'9YIOU.tyo.Aor (bol paot (..J) ooPod.

    Co111111111111' lo movr rr:lon~ Ma1hCAD provides sevcml ba.,ic gruu~ of commanlis fuc nMivlnK rr.gioM Mr ,.hct'c the uppa lcft comer crl lhe rrgion 111td to ho (Plv.urn '.\).

    JMN. gie ....

    ... u , ,. --;-J

    e~ Ltt. 1 t L J ll I I .~--

    - -

    '.t. &-1~1 WtWl.ttl._

    1 l"21

    al U. ... 111 -u

    . . .... -

    l

    ... 1 llUZS-L c:u!llng out the f'nl -otion

    Let. t !mi L a t ,._.. 1 : . --.e M- r :. ,,., 1

    - 1

    , .... ..

    ( ...... , ... 1 WlWIMtt ...

    t.L ..... -u

    . . ... -

    1

    ... 1 tat..m -L(,tal Mlat 11

    floo,.. 5: Ahor uolnQ lrJI to

  • :~;:~:::~,1Tr:;2;:,:"::: !f; - . (:~~."~:.~~~-. hiCt + b 1 d ki~:;~ ,;_.: ;,J $2 .

    In paJliAI reiollS, 'JOM C4'I s~tnes obscwe otlou rtgions or pares o/ rtfio/IS. Use IM rtdraw commOIUI, [ctrl)R. to bt"ill1 tJie display "P"' do.Je. To s:, COllMAHDSll TKSSECTION ltfY1TOTYPE llEHU

    INSERTUNE k'IM1tb1WW.in1 [ctrl)lnJ "' [l'lOJI: I """"' ..... [ICol ino-rtli.ne (..J)

    DELETELINE OtiololAonl:- (ctrll!FlOI ot (FlOIE D ................ [ICoo) debt.li.ne [..J) SEPARA TE

    llepw111~ (ICol -parate (..J) (rlOllC 1 NQKI' .,. -..-

    REDISPLAY .................. lctrllll "' trio a ll

    (llool r..d.J.oploy (.JI

    Jnscrtin and dclclin: lne5 To insal oc dclcLC space in your documcnu, use lhe lnsutlloe lnd dektdlne commamh, Press [Ctrll(l'!I) (lhc lnsutline kcy) to inscrt blank lincs in a document. Prcss (CtrlJ[l'lOJ (lhc dtlOI'. (A rcgion is considcrcd below the cursor if ita upper lcfl comct is to the right of the cursor oc below iL) fo do~ up emply spacc in u doc umcnt. move 1hc ClU1IOI" \O a bt..nk line an -''

    F\gu

  • e t~~T:!~~~~f '.7PF~'~;,;;-:~Y~'.:':~r'~',~:'~'n'''3:~ . '"""3 19-;j ~

    can sec how lhe rcgions OYCrlap. To scperate lhe ovcrlapping rcgiom, typc:

    (EecJ .. parat. (J] Figure 10 shoW1 how MathCAD scparnies thc rcgions.

    1 Cil "'t ilii!!llli:.l G 1 ... il_.-e\lo hon!b J

    ~m1

    Flgln G: Ooonnenl-~NO-

    lflml . .1'1 '.\'-fMT'UIW

    rtilwi!Uiii1Ii1 . ,. ; 1 51,.,...th 1i1mJJiJ

    ~ 1-1-11-1 ,_,.,. .... 1. 1 11

    Av-- 10: Ar... ..,,"""11 N "'O-

    Redisplaying the screen ar'ter error mcssages If you gencrate an error whcn rcgions are closc IOgcthcr in a

    documen~ the error mcssages for onc cqunon may obscurc othcr rcgions on the scrccn. You can fu this problcm by editing lhe cquaon that caused the error. Afltt you fix the problcm, you may havc to use [Ctrl]R (lhc ttdlsplay command) IO show thc paru of cquaons that had b

  • ~ ' . ~1 .;.~ . . '" ' ~ t .. , t : ... , .,,, W*MW' . -w..,...i.. .. ~--...::....-_ ..... --?

    , r ] !h dt # ' .~: t .;:.'') > f 'b 1 :l 1 1 \t: n b" ,, d j ,'\te >o _j '"'--;..- '""' e \ #, ; t >ti o d en d >I # ' 1 tf j ' + -g < ' H * "

    '6. '"!''"') ,, - .. r .. !'.! 1:.1; .... , o ... ,. .... .... For cumple, IO rcplacc iNw>cCI o( the name uc with s, rypc:

    [etilllr'I MalhCAD promps widl Searcla Cor. J'ype:

    o Tbw MathCAD l'Olnpll with Rcplact wllll: . Type:

    MathCAD scan:hc.I far lhc f!ISI insWlee of thc namc 11tc in ICXI orinan cquation and movca lhc cursor LO iL TilC prompt ll thc IOp of th... :'rcn (Fiun: 11) ahow1 yoor choicca: Type y ("'yu l IO 11:place lhb l\llance and o on IO tlic ne.u

    onc.

    Tyvc D \110") IO aip lhi in1u1nlaco LhiJ inilance.

    l.. * IO Pf)IPff N., .,..tl~M'M 'l. "*"."f'i' A4 *'' ?f-44EW ' . ; C.UQ,\WWWrq e e *' o u: e ' ;

  • ____ .... ,~~ __.. ____ ... ------~-- -----,...- - ~ , ...

    . ' > .... _. .... . .. .. ..

    .,,.. , ,, _., . ,. ,, ,, , w 1 ,.,, 11 .'&' .:. .. "' ~ l11pttt l

    ...._011 or "'"1111)91\.1 _.oc;,

    ~t ....,,. ,_ .. ,._.u .. :

    ": .- I~ .. : 14 l M I 11 I ": .. ,., ' : ..

    -"-"., .. ,,, ..... i. ,...., .r 41~ "'"'""''~ frhll OMCrtch..t

    1 1 1 I ... JH...... l.tU ..Me l

    .. uu-1.....,.11 ft : .......

    J : .....

    l .. 1 1 1 - ---~ " jI J .. .,.., ... u

    ~ 14: lMa.

  • =-~-~ 1 ----- ,,, .............. ,;;,.& ... ;, . - . . - ..

    . . .1,f. xi~ .;~;;;:Nrit .~2~~:.;,,;.L~.i;~} . . . . J r ~~~===-===::::~::1d~~:;.:, f:=y~ :O".w\.r.4: .. ~ h :~ : J --..r111 ti UllUIU- -llC

    . : ..... . .. : .... . .. : 11 n :. 111-1w-., : ..

    --ca.. .. w1 ... o/...._,

    ,~.,, 11.oe Wl"f (ora (rleil...,.tl.t.t

    1 1 1 I - IC~ 1

    h.UlI ..WI

    Warnlnt. Do llOl lry to edil tire samt documtnl In both willdows. Although MathCAD allows you 10 load and edil lht sanv docwnLnt in bmh wiltdows. il trtats tllCh wifkiaw as a separate tdlting sesslon. Tht changes you 1n1..U In"~ wtnJow are not rtflected In tht othtr wlndow. lf you edil 1ht same documenl in both wi"'1ows, you crcate lwo INc1mu11il>it vtr.fimu of tN .umv. 11cun"'"'

    e~~

    ~1~ [ . ~ . 1 , e~ ~ E- :3

    1 L ~ :3

    Text

    Texl in MAthCAO lk..:u1ncn lJ COIOCI m two v.111 lclic..a:

    'ffxt n1tlon1 aro x.m.111 an:..as in a lkX:umC"m 1J11H conwin texL To creale a texl rcgion, lypc a douolc-4uo1c (" ), Tol

    n:~ions are hclpul for polling commcnu and la beis among thc (.(uu11on111uJ plou 1111 MouliC'AD1Lcx11mcuc.

    ljUIW 1': 6111 IO-'l """' --

    When you cut 1 teMm tom a tlocument, you c;;m paste ic anywherc, eithct in tJM: same docun1c11l tw 1n authcr ,1

  • ;nions ~~~~ ..... ~' ~- ~"; ~~: ~ ; . lff ~i:~~ ~~~~Jt::: 'i~ :ction cleocn"beS hDw to cate te 1'egOllS ...i how 11> use :AD's 1.1111J1T1-.ir: ...,,.i WT"al>-

    tingatext~ ogions 11e deSigi>od to haid smal1 bits o{ tal. Tcitl regionl eful Cor~ bbels or cocnmeats to appcs around and 1 lhe "'l1'9Ol'S llld ploCs ill 'fOVJf doc;unalC. (l! '" ~ lO rith ~ JllD(JQlllS o( 1eXt.. - te bsn typin& IOI md lta\'e the IOI n:gion, jusi me the mrow ~ IO movc the cunor "' o{ die ICXI region.

    To cOJtAOt lt""" a ta:r-.:fiolc 111 prvsiitr {.J]. fo1uruur kaw IN rat rtgiOll 171,.,.,.;,., J.t cursor O&d willi tite arrow U'f1 or orher U,..

    To cdit an citisting text regioo. movc the cunof bsclc in11> lhc r.r:xt rcgion and inscn or dcle1e 1ext. (Funhc:r cditing commmids ..-e dc:ocribcd in the ..:aiorl oa "!citt cdiling command.1" lacer in

    thischa~.

    T1tlt!in 10 coincide wilh the 1ioe lcngtll. lnste2d. MlfbCAD 9CO !be wrap ms-gin ' lhnl the widdl o{ !be ICXl regiOI is " columns, ~ " is !be line lenglb..

    Whcn wrapplng lex1, MalhCAD oar:mptl IO b=k lines the 1pOCCS bctw=l w;as. A$ )'Oll lldd IO or cdit !be leXl., MalhCAD rewraps the ICX1 8CCOrding 10 !be WT"I) m.-gin. Figure 3 shows bow the wnp marin brcab lines ond l::ttps cbe ll:Xl iD a colmnn.

    'h"GilUSrwY?TS~~:s:"Jti;;: ;9~} -6.3

    n,m rJlllftl ....... :

    ......... ,......~ ..... ,..,.n.t n- ...._ u.._.,. ..mn r1.,. ,..-......,_.n-.

    ...,_ ..... p1,. .............. ,......,.._, .. --tle ........................ .. --

    _.....,: =-11. - :. .ll - : .... ..

    - :. a ":a . 1 :t..l-

    1 .. ,.._ : .1--

    ~ J: .. J"'U-*\ loid>CAO- _,,.,. .,...,......, ...

    --~-lf :roa imat or delete 1e:11 in cbe idcle ola ICU rqim. ,.,.. mar end up wit1110

  • 111-.S ...u.: ........... f"llP'W ........ ,., "" n.-... u.._.,. .,cttt ....

    ----"-...... a ... .... -~ twt.l..e. rnctt.-l4 ------...i-.......... -- .

    ......... : .:.a. ' .. -: .... .:. .... -:.u .. :.111

    .. pi"' .S--. -

    . :., ... - -

    '""' MdlCAO,......,.. ....... -.

    llAll- ......... : hw.I u. ......- ,.,. et r .. n.c n .. .._ .... ._. ....... ,, ,. ..

    ----"-__ ,_,t,..cu. ._...._.frlctt11MH ,_, ............. ....... ___ .............. .

    . ., .......... , :.a. :a .ll l .

    -:au .....

    .. .... :..1--

    -

    . 1 :at.-

    l

    -

    Figol30

    -Repnllcu o{ bow yoo calllC a ICXl reion 10 wap, MadlCAD anainulDI lbc lwd line bRab in d>c reioa.

    ,.

    ' .. ~:.~i~(:4J~L

    To lnOWO IU1 reglo11 IOOMW spDI. - IN CIU tutdpasu U.,s ({r3J tutd (r')).

    . ]. ' :. .

    ....

    ;Texi b~nd!( ~ 'l':, ;;;: e;:: V' :. ' ' , ~.' ~ COMMAHOSN TltS SECTIOH ICEYS TO TYft: MEHU

    iEXTeAD Cd. (CUl~"' (rlo)r a

    [Z.Ao]~(.J)

    UNELENGTH Slinelonglhtor &.o)~ cols (.Jj {rlO)W L

    ---

    Text bands vs. text regions Text bandJ are dcsignod for ICXl tbat SU'Cldlcs from onc edc oC a MathCAD documcnl IO lhe odlc:r. Tbcy diJicr from fCXl reions in lhe followin ways: Text bands stan in colwnn O and cxrcnd for lhc full line

    lmgth of che pagc. lf a ICXl band occupics a line oo die .:n:cn. cquatioos or plolS cannoloccupy tbc samc linc. lbc ochcr iegioos musr. be citha lbove die ICXl iegioo or bclow it.

    Text bands pusb odicr rcgioos out oC lhe way. lf adding 1CXl causes a u:xt band to ovcrlap cxisting iegioos, Ma!hCAD pushcs !hose iegioos OOl ol die way. In this way, tcxl bands bcha"C more likc a coa\'Tcxl bandJ are appropriatc for crcating rext in a rcport oc rechnical papcr. A docwncn1 wilh rex1 bands migh1 be O

  • - .. .~f , ~ .~~ -.. ,::: .. :;. ::l~ -t_:::::'.;2 '.'.: :ro oddng a lut t.id

    - ; . ti - l .ltt

    .. : . !t.-

    1

    ... --n.,.. ..

    .. ... 1 .. .n-..1.rMcrt1 ... t

    405, J:MMffttw 1--., ... l .. "'*t Uo ti ....

    "......_.: =a - : .lt - :1 .....

    - :n " : .

    =-

    .. .... : .... -

    1Wlle.tl 11 u ... r,.. tl '-t.._.. ,.,.u....,._,"' ... ,, ... l. l"=V"itill, 1'7'tl, ,..._ D:zn. f'lr ,._.,,, H ( .... h t ..

    11 k1-1 ....,.'- ..- Hf'Yt ...,....1.u- .. , ..... , .. ......,..~ Wltl-.1 tllf-U .... n. ........... '1t1I ............ .

    . ....--. -6 ~1-: 1 : .M -

    1 . ........... ,WJ , t-.j

    ....... -n .. ,..i.

    rn )'? rw a"" bmwl ..;ch IM [r31 uy, MaihCAO "es tM tnllrt tut band and '"'"~' tM rttlons bdow 11 o fil/ IM spacand.

    Ch"!Jler4

    Setting the line length All let !>nn

  • 1 - " ,. :.' M! M _ t _ __ 1 __ --- ~; _:__------------------ trrr"trr-

    exhdilingcommands ,, -" .. , ;' < "'; 11A1AHOSlf. IS SECl10ll 11.EYSTOl'fP! llEllU

    ~RK ..... ...i .. (ct.rl!J: "' ['1'10]'1' 11 Wltlrt (l:oolrk (.J)

    CUT --IOI\ [ct.rl)frJl "' frlO] l X (l:ool iaout (.JI ICOPY ""-*1 (ct.rl)IJ'Z) Of frlO) l C (~c) iaoopy {.J) ~P"5T_E ___

    ..,, !>-..Ir Jct.rllfl'4l "' ['1'10) l >Of\OllOICU. (l:oo) 1JopHt (.JI

    :ooER *""m1tDC*lW. {l:oo) -er (.JJ no'l' e

    Markin:, copyin:, cuttin:, and pastin: text To delclc a single chanaU In 11t:11 rcion, prcaa thc [altpl or n>-ll kcy. [altpl (lhc kcy witll lhc left-pointin arrow al thc "'I' rigl11 of thc keyboud) delelca lhe clww:la befort thc cursor; [l>ell (thc puiod koy m dio auaw:ric ko)'l*I) lklclCI thc thancw oi thc cunar. To dclelc, move, or 0091more!hanonocharacletoC1ex1, U1C1 thc mar ... IDCOP1, lacvt. IDd lpaale (X)lllllllllds, u dcacribcd bdaw: rint. movc thc cuncr IO thc bciwUn& oC thc 1a1 you wllll

    IOClllOl'ropy. Press thc mark kcy, (Ctrl)X. M.athCAD marb thc

    clww:tcr 11 lhc cunar in invene video (bla::k on a brihl t.:kround. likc IS 'f iD Fiure 8).

    Move the cW10I' ID tbo el\d ol the leJl you wanl ID delcic. Utc any "'" ...000. commands you wllll. but k.ecp tbo Cll110I' wilhiD tbo 11111 n:ioa or "'11 band.

    Pral [Ctrl\X aaift. MalhCAD hihlights ali oC the ICX1 bclwccn lhc mar\ .Id lhe cunor (Fiwo 9).

    To delc!C the marW W.I and copy it to tcmporary s1orage, prcu [CtrlJ[r3J, thc loc11I key (Figure 10). (To copy !he ICXl IO lcmponlry atoragc wilhoul dcleting il, pre'-' 1hc lncopy kcy, {Ctrl){r2]. insicad of [Ctrl]lli'J).) U you want IO pac thc W.l most r=ntly cu1 or copicd into a new spot, movc the cursor to the new spot. Y ou can pas!C ICXl into any cxisting ICXl rcgion or texl band in thc documenL Whai the cursoc is in the place you wanl the ten to appcar, pre.u (Ctrl}{r4], the lulpute kcy. MathCAO pastel the ICXl into tht. tell rcgion or texl balld and rcwrapa i1 if ncccssary (Figuno 11). (Y ou musl pas!C tcxl into an exisng lexl rcgioo or ICXl band; you cannOI pasio tex1 into the cmpy spacc betwecn rcgions. You can crcate an cmpy ICXl rcgion, if neassary. as place ID palle the ICXL)

    ~ llM U l'aui .. -"~ ... t1 .. t.e ............. .

    IW .. ol-: ;. 1L "' : 11 - : 1

    - :U ~ .. : UI ..

    ..... :. --

    -

    ' :. -..

    .,.._ ....._ u.A C__. I U. .. .,...1. Ml-) ~l- "'* rlr.t ..,,.,...1-t1 '- tM ~.,,. ....,., ~ anllc.tl.,... a. ui... r,... t UoG1t -rt Rlobul .. rruAa .. \AJ'-,....,..., ......... 1m>. ~ - ' .... u ... 1 ,.,.,..,, _. u. '" ... ,... n.1 .. ..._.kiola.

    Flgon a: TeXI r9gion wll111*1< MI

    ! ~l: , ... 11-rul 1 t::::. -~

    ! !L ~~

    [.:.-~ -:1

    lt::.D re!~ .l I

    [?' Ji . 11 l![-Ti _:~

    l'.:li 13 [[-:-T ii

    id!~ 1ci!:ru I[ \! ~

    IE-~ .!a 1d!j]I -_u ~=p:m

    Tui

    lu.-J .... lhe "'-'" .. ,"'' -. .. u .. t. ..... 1 .. .....-..

    U.1 ta o/ ......,._.: : LL ca : .SI -: .. - :U .. : 111 . :. ,_, __

    .. ,.._ .&--

    -

    .,..,. ""'' -uoa ,__. le,.,. .,.1. ""''""'' e,,..,..., "'>ol rlnt iW.-t!o" ta tM ~""''' ,.. .,., .~fJjfl}H . ~ onimmrvnmn3:. '

    '"' .Ulu-1 1.r .... u .. , ... u. .... ......,... n.1'9 ......,._

    ..

    FlQuro ~ : Whon yw - (ctcl!J: agaln, MaJhCAO melM "".,... In flO lo>t.Z- . -..1-n11111n t..

    Aguf9 11: UalhCAO ,,__ 1llO xt lnto a,_ plooo In IN,.., bond.

    lf JOU marl bo1it ends of piece laJ and llun decide no1 copy or clll 11, you '"" wunarl i1 agaill. l'r

  • ---~- ---- - - --~------- ---~----

    ~':; ~~ :~::~::'~::::~:~:4::?f ~~i:!~~~~~"::;:::'~::;;~:f ;.~.~~:'':~:di:'';'. ~ :: ,'/'.';~;:\--:~:;,~:~:] an cmpl)' line, thc et11ler command add! spr.ccs at the

    inning of thc line 10 move lhe cursor IO .thc ccntu of the e.

    11 linc with texl, the c:ntercommand adds !paces at tho ginning of the linc 10 cenra thc text and lea ves the cursor the end of thc texL nrcr of a ICxt region Lt the point equkftanl betf

  • n

    llow to print 11 docum~nt . COUllAHOSIN TIQ llCTIOll

    SELECTPRINlER UYITOTYPI

    _,,.,...,~"" 11 .. 1 .. i-rwu\ l.JI PRINT ,... .....

    -

    cu11"' l .. l ru .1

    Printin: the currmt document

    llEHU

    1r101 1

    IJ'10J 1 P '

    Whc:n yuu i-w a tlocumau, you mlllt apcclfy lwo lhi~s: lhe lllU "' prinled lhe prinicr dcvice O' fllonamo Whcn you""" llao prlal coaun-s, Mall>CAl> poOln>U you fu< f.8Ch oi :~ ... ,., ln twll.

    Tlu dacrlpdotU btkrw opp/y to prillllrJ. Ma1hCAD lrtals p/.o~rs Jlllllly dif!ewuly, as ikscribed c IM ucao.. "

    "l'lol~rJ." lacr c oU cllopla.

    To prinl ali 0t plft ot 1be CurreAt documenl, ~ (Sac) print [.I)

    (Altem&livdy, use lbt prlal koy, [ctrl)O.) MalhCAD rcspoodl willl a prompl for dio prinl mu, 11 abow iD Fiw'C l ,

    Qyou luJw MI specV!edoprlllUr rypt,MailtCAD pom tlils -=1 " rlu _,, lv WMll )'011 try ID prW: No prlater apecillI. Yow lfWI 11111/v scledpriDl.tr co"""'1114 IOJp

  • ~.-. -.-, -.- - ~ ,- ----

    -- ------

    ~~~s~:.:~~~:ry-::zE;-::i :;;;":.i. 1':!';;:.:J.:;;J .. 1 . . . Chtptcr$ r ~:i3 DocumentFonnattin&andPrintin& 1$ /

    r a printer type. WlC lhc .wltprlnttr command. Type: ] Hlect (.J] l nOI typc out .wltprlnltr- MalhCAD necds only 11crs to distinguish lhis command from olhcr >.)

    ) shows you a scmtling menu or printcr typcs (Figure )flC rc~ts a diffacnt prinier-

  • 76

    To clwle lhc pae lalth, use lhc paeleotb oommand. Far cumple, 10 ICI a paae lcntb o{ 66 linea, typo:

    [r:ecl paqel9119th U [.JI MalhCAD shoW1 paae brcakJ ovay 66 lillc&. To rcmovo lhe oo-oc:reca pae ~ type:

    [r:ecl page~ O [.J) A pac lcngth ol u:ro means oo pac bn:ab.

    /f'Y'JM IU< IM pacdcatb CDlf1ll1Q/ld wi1how a ~umeric ar'"'"""' Mas/CAD shows tlie currtlll pat kith. Yov ca11 ocetp1 lhis y prusin1 (.J) or bad:spac o-11 and tllltr O MW pa1< /ot11JL

    Shiftlni re:ions orr pa:e boundaries 11 a piel gr equalioa rqian CllllSCI a pae boondary, thal plot gr cquaon will be brok.en a;rou two peaca wbca MaihCAD prin&s iL To shift ali plol ll>d cqllllOO recioos oll ol pagc boundarics, uc die breakpa1a alllllllmML Type:

    [&ec] brulcpa9 [.J) 1be breakpace COllUDIDd iDICtll blW w.i in lhc doclllllCal IO IOlke llll1' dial DO ccuatilla gr plOl reioo c:roacl 1 pao bowldaty.

    Tu breakpaa """"'"" "''"'zu olliy plot and eqllDlio rtioN. lf o uxt rt1w11 or IUI baNI crouu o pa~ bo-1ar], IN breal

  • ~~ '''. ~.':~:2::'.:":":.:~~ :.';: .. . '.~.:..... " /~~~~ :gins at the uppcr lefl o< thc screcn ami extends to the l cur>r position. Pre.u (.JI to accepl this .int arca. :AD expanili thc sckcted aru to fiU the pnge on the

    :t plotttrJ al/ow yo to uc IN arta NJtd /or outpNI. 011 IP plotttr.for anmplt, 10 can 1Ut tht bwtoru labtftd Vid l'2 to Jtl IN corn~J o{ tite arto lnw which to plot. hCAIJ rtspuu thtst limlJJ; ifyou pro1ram IN plotter 1 a muJ/ltr prllll orea, MathCAD .,..fl send ilJ oNlpW to 011/y 1/iat rrnalltr area. Su your plotttr tna11ual for mort 1rmatio11.

    rnlnt. lf yo mulplolln 0111pw to afllt lruttado/to a 11tr. ,.,. COMO( copy /l IQ IN plotttr wlth tht DOS OOPY '11"1Jll wlll 1Jr~11l a fo111a ,,...,.,.110lhtl1111111,,1. '

    Tn l11rlu1/1 nn nctun/ />ar.AJ/n1h cllnrncttr In a ttxt rttlon, l'fl~ two bacl1fo.rhn: \ \.

    11. r:;~-t~ 1;11 _ ~ ...... _._1j]

    1 1:11 ~ lif ...... ,!] )'.!! :tJ .11~ lill. :rr9~

    u~J:irijl n~~...:ta E~ J!~::u

    111~ I~ .. .,.:a - 111~ ' 1~ .... ji l~!!:~

    1~!!s. Il~ -!!~::1 llll J!!~=i

    1~-:!!~;1 1 Jll ilt:---~ n

    [)ocumenl form11tinc and rrinn

    Here are >0me possible uses or this fearurc: Sorne printers u>e escape sequences to set print atuibutes

    lile un

  • ~ ; .

    k. .- : .. '.L ._L :'" r.~: ,1 .. :- .. . :._,.: ... .:'. ..... ;,, ' .. .-: .. . : .y.~:~:--.:,~:::-:-:::-~~=::-::..~~ ~~';,: . ;j~;',;': ;-: , . .I bfl#a4rfatY4eY,i~tetdWt aki'tt'e,. .r

    --------------Ch-oxcd ~- - ~ i'i E 3 1 E: .. _~

    1. e::-- ' .::a L-.r:!!S r E~ k=L~

    ,J L. 1.~

    11 1~-11 iii

    1J~ [db; [ !IJiJ l[.L.i .L le::-~~ I~

    1

    Configuration, DOS, andMen1ory

    This clulplet dc.!Cribc3 how 10 gain a::= 10 lhe DOS romx from Ma!hCAD and how 10 monilOC Ma!hCAD's mernory use. This clulpca also describes MalhCAD command file.i, includin thc configUllltion file. This clulpta contains thc following sccticxu:

    DOS acctsa Executing DOS commands rrom within MalhCAD Monitorio~ available mtmory

    1e mtmor7 command; how MathCAD uses memory MathCAD command l\ltS

    1110 oonflgunuim llCJI a11d \Xhcr MathCAD con1nwld fc; Wbtre MathCAO loob for sylCS U> llnd tl1e 1 !clp lle. lhe printa-drivu file, and otha syswn riles

    ~~:;rJJ~tj~J.~t~,,Mii.q ti~:ti'.ti!i~;~!~i[(:1 ~f3ist.tMe~'i.~Ti:t-:i'!'IS'M-1't~~~li.~fa~~~~2lii1h!fa~~:.:;; :~lF~~;~(~-~~~Mi~~I-Tfj~~;:J~~i1~;;[~~~f~~:I.~~;,_}~;:f~:r~~J;t~J4;} .;.~~~~~~.z;::::. -~~~:;:.~~;~:~'.4 ~ ~~~ :.:. ... . ~ .. . : .. .1'

  • Sacw.;s INOlf oCTlOll FIJICTDI aTllT MAllE

    l t.llt>CAO" IJ:o) ... COHnd [.J) DS ...

    :uting a DOS command from within ti CAD

    IT llENU

    [1'10) 1 D

    os command intcrrupu a MllhCAD scssion ' you CID IC. DOS command, SllCb as Dlll, CX>PY, RENAME, or SK. When )'OU havc fuiisbed the DOS comnwid. :AD ICIWllea wherc 7119 left otf.

    nl~r. You CllllllOI 6Tll/1I MOlJrCAD ro uu a DOS rlMONl IUl.SS MOlliCAD loas ocuu ro IM DOSftk l\MAND.CX>M. The CX>MMAND.CX>Mft sltOuld be ll liv 'I dJrmory o{ 1/w driw Jr- wliclt. 10" narud -,OllJ' "'"""

    ICITUpl MalhCAD and CICCUIC 1 DOS command, typc: EacJ do (.J) CAD prompu you IO l)'IJC a DOS command (Figure 1). any commaod you wcUI l)'Jle 11 lho DOS promp1, Cor ple: IIa (.JI CAD clcan lhe scroca llld pwu yOUI command 10 DOS. e 2 shows lhc rcsull ol caccutin a Dlll command rrom 1MllhCAD.

    -.rsll O# UOfClllLI .. , ...

    1:a13111 .. :a lt I .. : . 11 1

    ~ : a im IW" . : ..

    ~ . ~ ;.t~;:~ , 1.~ l-lt--91 ZSI, Ctlll J-1....-r %11,

    fCM .., 11M.l ....,...., 11'"' I ,.,..... tCI w.6 ll$-C7 Utl,. KM tcl lll1 l"'ls-t'f llISe NOLIM l'CJ u1r . .... ~ UlS. lllnY l'CI UTY l .. lHJ 11 U rrus:r ~ nz t1s-n Ult. MUTTMN lt'.:D JIH ll,_..., U14h "LAI tcl 4M ll5'-CJ 11-4\a liUC* l'CI DSt ll,._.f 11'"9 sr.11 ..:v i..sr 1-1Hr Uffl Tll...OU !'CD ll4l l IS-11 U& HU l on MathCAD's messagc linc. Whcn you type lhc sccond Enier key, MalbCAD ahows you an acwal DOS prompl (Figure J), al which you can cnLCt as many DOS commands as you want. To cxit lhc OOS shcU )'OU lc!I off, 11 the DOS promp1 iype:

    ' n

    lll'? [.J] This rttuma you IO MathCAD whac you ten off.

    T.,,. txlT W nt.u'll U MtUClilO

    TU l mit ,._,...._. C~Ur toS U.ni J . 11 cc>CP'l!rhlil lUor-Wtl-1 1-1- ~1- e~ um. . l"

    IC)(Anll1Ji.l "IU"--'l tarp Ull . IW5

    C1VCAD1ol'

    , ,,~---~ ruuo.r.

    (.J]

    CD \ [.JJ c:o11r , ICD CD \)CAD lll'? (.J]

    ResponJ 10 MaihCAD's DOS> prompt by rypi11g {.J]. MathCAJJ J1ar1J a DOS shdl. You can now "'" any DOS co"""'wls -you ""111.

    Ty~ a fcw co'"'"""'1.r ro DOS. \M:AD [.J)

    TM DOS command EXlT re1urns you ro MaihCAD.

    Waminf. Whe11-,ou uu a DOS sliel/, dan' 1/orgtt 10 u.se BXIT ro"""" to MOlltCAD. l/you/orgtt to"'"'" ro MailtCAD, Olf1 "''* )'OU liaw not ~t saw:d wiil bt losl.

  • L.----~.; : e,'ry than Is cunt:nlly nvil1hlt1. '11111 b likr.ly to hawen il yuu ux variables wilh largc suhscrlJl.1 o cmuc calculations dul rt
  • --- ~ . :.:''.:. u: ' ;> .:: .. '.: . ,': .~: :; !, ;: . ' ,, !.. ... J }; .:: L;,; ~d t"Ocese oto 100 ;Ti Yarlablea of intereat )IJld C"'81C lhis file in a lc>.l editor and save itas T-'ICC. (MalhCAD asswncs lhat command mes have the ion .Mee.} To run thc file from MathCAD, typc: :acJ uecute loedit (.J) :AD thcn CXCCUICS eadl command one by one. Aftet :AD CJle
  • JI' ex.amplc: llC'l' NCADl>X-: \ T1Us Ma1/rCMJ IO /Q()kfor

    rynuofllcs I~ w root tlIO?"" tlw B drlw.

    l&f M:Alll>~Jl>oC:\BDI\ T1Us Ma1/rCAD IO /Q()kfor ryJUmjllcs U. tlw BIN dirccwry OftliMCdrlw,

    y seuing !he ;"viroament variable, you ClllURI tlw MathCAD ilJ fW: lho filca U Qf;,C(ja, QO mauc:r Wbal &he CWTClll dircclOl'y,

    ----- - --- --- ---- ---------~~---------- --- -------- ---------

    j . : ; !, , , .', ,J ,,, .. '

    Clap< 6 ~: 3 t=~

    1 ~- 3 . E=! 3

    1 ~-l.! i~ l:= ~ ~J .:~ r;- ! ~ C... - 1-~

    ~: 1 i!i ~~ ~ [: !J;J

    ~J-l ~~

    ~~ 1

    Computational Features

    1 :: H ,.9'J X : : HEllO( '!) U : = HEOD( fZl i 1

    STAT ISIICAL fUNCT IONS (linear regressionl ttc.111(x) : 19~i

    ~t : J:J. 1 IG var = 1096.67?

    2:

    r :: corr(x.u> tt : = slop11Cx .:1> h :: l11tcn:c>lC.,ul

    r : H. '.Jlll'JifJ " ; 9. HJ:J.'I'/ b : 23.HIUH

    l:Jll ----------

    ' " .. 1 J!fir? 1 1 -rtl .. ~ . '1 M 1 . ;({11' ' ir11 l 0

    0 X 1000

    + V X

    /

    J o

    r

    ' i,.

    ~

    l.~: r( . ~ :" .. rr .: .: ' .. , ..

    !!~~~:;'. , ;,.:. ~~ . ~ -. '' .. . . .

    [, (,: ., .,

    ' '

    : t

    i

    ~

    1~~l~~~f41~~1'ifJt~~~;mI~~i4~iiTI,~~T-~Z4:1r.tf~;~~~f~i1)t. : t: :'.,~ .. ;,: .:: " .-- '.:.:.,

  • ,....,.,., -r::r.-.,,-Fr..,. o:~_,,..~";"---.-----

    "' - ---

    ~r~-=r~ :~:!:! .t~ ... ~ J_ ll C: Jll -' ~ ll - . f.pll" B

    ,

    ~ri3 r:~ i. ~ l~~>i

    l~T- tm Tll ~-.,... - illl !FJ!!~ll I~~~ I~ !!:!! I~ !~ :8

    10: 1~~-;i!_ lt!:!!!::a

    IQ

    a& ;;J7Ct}2:~:.:;TI;r~v:n~~4 7:1:., Equations and Computation

    Thls chepter describes how MalhCAD dcals willl oquatiom. lncluding local_ and global dcfmitions and calculalion cquatioos. This chapta contai~ !he rotlowlng occtioni: Typd of equatloDI

    Definitions and calculatlon oqultlonl

    Fundlolll Built-in func;tions; defmin& 'fOOI: own functionl

    ProceSSln& equatloM la automatlc modt How MathCAD evalUllCI equatlons In aotoinallc calculatlon modo

    1'rOttt1ln1 equatloDI la mauaal uiode How MathCAD evalbllel equationa In manml calculallocl mode

    Olsablln& eqaatlonll How IO tum individual equadons olt or on

    ltn'Oft How MathCAD dca1I willl erren; how to ful erron

    . Y' . j,1.,,

    !

    l 1 1

    ,\

    r \

  • '2

    Types or equalions

    lhuc are two b&sic 1ypc1 ol Ma!bCAD equations, deflnidoM nd clllcidation tq""'iolU, ThiJ sectioo dcJcribc:s delinitions and alculalion equaoas and cxplaina bow MalhCAD llJCS lhcm IO ssin valucs and calculaic Rllllhl.

    TIW cloaxtr ducribu ottly how IO compust witlt tquallollS, For lll/orrna111>11 Oll "'1w IO ldiJ cqumlolCJ, su Chapur 2, "fltU.t EqlliJIU..."

    >efinitions 1cfinitiona ICt variable Yaiue&. To ddine a variable, you musi rpe:

    Tbe variable - lo be dcfllled. A del""tnilioa symbol (:).To typc lhe dcfanilioo 1ymbol, press die a>lon (:) key. An cxprcssion. Tbe expr-cuion can be a nwnbct, a variable, or any combinaliaa cJ vuiablca and nurnben.

    iure 1 shows lllCllO dcf~ ol variablca.

    ICll Cl:IC 9111

    l : lLI

    ... -

    . : ...

    , . 11

    1 . :. -

    ,.... 1: Oelnio- "1.m 1

    "1.111

    Agute 2: ~lion..., lle-do_ In.,. _iouo liguro Whencvcr you cnlU a c:alculalioo, MalhCAD shows a fanal plauholdcr M lhc cnd ol the cquatlcn. Al 10011 u you movc lho

    ~;1~iilme\1~.~'Jolfot~(,;ltJ:~;n;: l~~;;u ~~-~t~~~~i1

    .. 1 ~ff3 ~-.!! f - ...1 3 =-u !... '-' -~

    1 [ J!_g I~ - '1 F=;' 1 !!). 1 J

    1 !...-.:.;

    1 - : 1 1 1 ' .~:::i L - 2.!J

    , rI! .~ --1 .!!I [_~~ JJ .

    ~::y 11

    [ '. 1 :iJ r JI ~,--d.:

    '.f!'.L;!Li::;:.:/. ~:::/'.~. Equotion1 and Compuwioo

    cursor out of lhc region. MalhCAD hidcs the placcholdct frorn vicw. You can use lhis placcholder [or unit convcrsions, as cxplained in Cluipiu 9, ''Units and Dimensions.

    ~~:~-JJs~r~ .:~ .~~-:. j~~~~?{:~:. ;: .. : _~ ~~ .. ~::2'. ~.:~ ..

    Fundlons:" ~H~ .... _,,, .:~t;~~}-~ h.~ ... ~-.. ... ,.r1 '!J~f'f-t7n~~4'

    MJllhCAD hJu a w~lc range o[ buill-in func tions likc sin, metion. you must typc an cxrcssion of the . l following fonn:

    FunctionNaaie(&rgl,u:g2, .. ) : 1 In lhis cxrcssion: FunctionName rcprescnts !he name of lhe fwiction. 1

    MalhCAD function narncs are case-scnsitivc; you mUJl u.sc upper Oll lowaca..e loucrs as appropriarc. (Scc lhe l.iSI ol built-in functiom in Chaxcr 13.)

    Thc arguments-arg/ , arK2,and so on - appcar aflcrlhc function namc in parcnlhcse.s, scparaled by commas. Thesc arguments can be numbcn, variables, Oll any otllCl valid . Motl1CAD cxprcssion. A fu1~:11on may Ulke onc arKumcnl Oll IIIO

  • ..

    llUlll '------

    a : S.ICZ

    = z ..Clt) ....

    n..-pean. Once you have defrncd a funct.ion, you can use it

    9~

    1tcr 7 ; -r==. --

    Equations and Comput.ation

    --------

    111ywherc below the definition, jusi as you would use a buih-in function.

    lr.;.-r. tiMW-Ol'iiil@tfffliM,\\1\.i - IOUJTIOll 11 ~ _.-1c -IOll :. 1.9 ... : t When you use the function in an equation, MathCAD evaluatcs lhe arguments, plugs !hose values into the apression on the right side of the defintion, computes the rcsult. and uses it in the equation.

    Figure 4 shows an example.

    -~Ir; IMllnll.D 111 UUI ructlOttl : 1

    rt> : ....... _, ~- lla_,,....... ..

    rtn ((J) '

    ,[f.] t : ""1

    f

  • p-to-bottom computin lhCAD caJ bolt:>ln In. ............

    Y ou can define a variAble IWico In thc: samc documcnt. Thc first definition applics rrom thc: poinl in thc: docwncnl whern it llPPW'S down IO lbe secood dcfution. Thc sccond defanition IP!Jlics below lll8l. Fgw-e 7 illustnllea 1 documcnt in which IOl1lC variAblel are dcfined twicc.

    :' .. J ~"'t1i-'3.;_ .. ,.. ...... ~~ ., ~~ Jt~ .:...t!. Ji ,t.(,J\?]~~t:;"'~ _-1 .... ~! ~ 'hr.l

  • ' "" . ' " .. e ..-. " .,.,f':\lh'VJ'"' '' "'" "" '. . , . .... . . .... " '" 'I . ' . " ., , " ., ., "' t- .. ;">" ' " f] ~ .'~ ,. (, . 1 . .1 1., 'l. ?, :, '" (' ,.' ,h~ }'1 ~t1 \.\ '!{'1 1, (i,J1 1::;r~~. -:.~.t . ~ 'n. ~ -'~ ~\ , . ~ l'h ~ ' .... .;,~ ~ \ ., ,,. .. , . ';J~ , . ., ,. 'r' .; _ . .. ....... _( .. : '" e, ,_ .. ~ 'i;._), .i~t:i. . ~ . , r,~\~X'\'t ~Nf'!t'.''Pl'\o1'N.'t 'd-'!O.l.t .. dt1~'11 l f.::A.'11 ~~/,~'1.,.~'.\~'_), 'tl,i. . .'. ::t ii'~ .r,r..~ i, J 1

    ' '; ' ., ' ,. ' ., ' i : :; :;; : i' ;; '; ::{',' ' ; Y'i'.';: 'I1'?::\'.''\'?.!.t I~ : .~ lt,:f :" ::.~pol

    (1'1) IJ( (1'101 e e

    -~ __ ,_itllo.., ~

    [Xao) a&lcnslate [.J)

    MANUAi.. Enw--

    ---1>1' picit-mond [Xao] ..,..,.. [.J) rr101 e 11 1 lrif. AlJTOMATIC Enw"'10rnllo _,_...., poooulnd f9C9hJf . '. ..,.

    ---PROCESS

    -"""

    [Xao] rrato.atio (.J)

    fbo) proM by typing: . .

    [bol .anual (.J] , .1

    MalhCAD mn~ lhc wonl 1ulo from !he m

  • 100
  • q~ l:_,,~ ~~~-:'----------======= Chopt m.d !be ac:tm1 s:uce oC cnor.

    l f(d :a -

    "". i ............

    ~ 14: Enon In . b-don doftnilion .. m8l"9d cn,,.,. _ "'1ht ""'*"'-

    Common errors Appendix B lisU aJl ol MathCAD' s equation etron. H= is short listo( commoo crron and wsys co try ID ftx them:

    dolllais error You tricd IO evaluate a built-in functioo af an illepl .-umcnt valuc. Check the entry Of tbe functioo in' n. s uilt-in Functioos.

    !lll operand Y ou forol IO lill in a placeholdcr. Entera va1id ~ for lhc placeholdcr.

    ltOC coaerlnc You entettd 111 exprcssion involving intcg111tion. dilfen:ntiation. lhc root function, Find. Of MiMTT bul MalhCAD oould DOl fmd a soluon. Sec the apr

  • t~~ mi~"~' . .. ''

    llllkrlDcd Y Oll meda Vlriable or !unctioo wilbout dcfn iL Makc IUIC :rou 1pellcchbc lllmOc:omclly, iDcludin capital and lowercase lella'I, Allo ~ lhal MalbCAD reads defmitions 6om lop ID bOClom. You must dcr111C a vlriable or funclOD llbolle lbc placo :rou inrcod ro use it. In a loba! defmitioa, :roca musi def111C lhc wriable or Cunclioa lobally above die pllcc :rou illlald IO use it.

    .. i; ~.;2:~&r~~::;,;:,:,;:~,;~~,:~:~: :4 ~,0,~:~ 0i.p

  • : ~, :~: :.~:::~:~;~\:.21:' ~ :'.l~~';f '..) ;f .=r.i~.;I1:;s~1i~1:~:.~~::; .~.Z:iGT:itF::[r,;::;;&?j:~~;; t1:l: ;:2 ';~-:~~ ,.\)' r: .; .. ~~ /' ' , ~ \ 1 ~ 1

    section de5Cn1>cs valid MaihCAD variable and function ..

    :s in MathCAD can oonrain any or lhe following characten: lppcrcMC and lowcrcasc lctten. 'he digil! O through 9. (A name canno< start wilh a digit) he spocialchanctmundc~on: (_) and percent (). criods (. ). MathCAD shows lhe pcriod as a literal 1bscript. as delCribed bclow under "Llieral subsaipu. :n:cl: lctten, typed wilh lhe (Alt) l:cy (see thc lablc on !he :xt page under "How IO lype Gn:ck Jcuers"). he inftnity symbol -,gcncnued by typing [Al.t)I. rime symbols (' ). Ute the backQUOIC l:tj (thc qUOIC on the i/l1C kcy with lhc symbol) lO type a prime symbol.

    CCJ/l/IOl ILtt tht ordinary apostropM to IJ~ a~ In a ablt -; MarhCAD lnterprtU tite apostrop!te as 1111 "UClion 10 put the CllTrtAI txprcsson In partn/Mscs.

    Jlowing ~ valid 111111es: 1ph4l

    K700

    l_B2_C3_DUU l'

    le namcs cannot include spac1:1 or any Olhcr characten han thc oncs flcd abovc. MalhCAD does distinguish :n uppcrcasc and lowm:- lettcn: diam Is a differcnt le from DIAM.

    Ch11p1er 8

    Warnlne. Ntvu ust the sa111 (lltJQ (Altjll [AltJS (AJ.t]r (AltjtJ (llt)W

    T'Mu (Al.ti ley comblnotlons crtott Grttkltllers In tut as wtll os In equotlons.

    Llleral subscrlpts IC you lncludc a pcrlod In a variable namo, MathCAD dlsplayt thc pan or thc variable namo .na tho period IS a subscripl. Thb

    11callcd1 /11mJ/ n.bscrlpt. You can me literal sulncripu IO creace variables wtith 1W11C1 lile vtlina and "ar To creaie a literal sub91:rlpt. include a pcriod (.) In a MalhCA: YSiable name. When you move the ~out or !he equation region, MathCAD shows die pmt or the variable name after th pcriod IS a sub9cript (Figure 1). A vxiablc name with a perioC In lt bchaves lil:e any othcr YSiablo na.me. excep< that lt Is lhown ai two sepmace llnes.

    ttPll0-1!1!1 . . l I W

    Lrr-. ~rm :: .. ~ - .......... , .... u.:

    .. ............ .,. ....... : -

    ...... .. . 1. ~ ~ _ . .. - -. :; . . .-.'

    ..t. loll :o !.mJ

    -t!

    "' r.uo latt , . : ~ ..

    ~ ' .' ":'"";' : ' > ' ' ... :"" . :~ : ~ --' :.; ' !. :.-.... ,. :~ : .... 1 ... '~:.:-, : . : .

    ~ - :...: . ,., . .... ; 1 .. ~ ,,

    -'

  • -------- -------- ---------- ,

    irnM"' ~:.~.._= --------- .IJ---

    ---- "-------- '!"I .-1 - _N11_n_a.N_um_ber_1,__lcllm_11_in_vi_11 __________________ _ ~:!! PttdeRged yarlahlei. '

    MalhCAD lncludcl cihl variablel lhll.. unlike ordinary variables, in already delined wbca )'OU -1 MalhCAD. Theao v..W.lcs are calltd l"d4!-' wvlabus. Prcckfincd varia bici eilhcr bllve a coav..ilonal value, like x and 1, oran: uscd u rySIClll variaba ID ClDDllOI bow MalbCAD worb, likc ORJGJN andTOL Hcre Is a com~ lill ol Ma&bCAI>' predd'lllCd variablel and lheir IW1lll y~

    ---S.1415' ... Dollollioo '"4 -Jill.iiihCAO--iil~ofillO-i5diglL-fo lp a, hold doim 1111 (.Ut.J qy WICI ~

    2.fiizi.. lbl blMOlnlllrll ~. (MllllCAO- 1111 ... ol IO 15 diglla.)

    1ro1

    "ll.01

    ICLalO;

    CllIGllht

    ~lO?

    -l&CllIC.4

    lrtiy: ... Wgeol "'""'* In IA.llhCAO. Thil IPlbai ltplll'lldod b _....,,.., bul do ntll UM , pW; ol &tJli ......... ;, tunri:I/ """"* l lt., lllSull......,., ol Wt mogllude. To tpt ,

    1 llold doowl IUt.J WICI p-. I. P""""- UN in Up.ai>nt IN 10 ' (ll>l*R 10lf.} ot M 1oaillngri11 llt and ol M equlllan .,n., .....

    Tcinnce: tt. lolttMCt llllhCAO UMS In ---~llgorlhml(Wegrall, .......... aquelian ~ole.} Fot ....

    ~ ..... NOblot1fltipedlo oparllian il quMlbl. /.lrwr orivh~ Si*iliM '-RIUOI lhefnl oi11n1n1 1 ..... '

    ~WidlllldliWi!iliiiiM willl WRITEl/llr t.lkln.

    lt.ailbwOl~p...-.iWIWiiiorilnglilOI j 111111 IWrTEP#Wblcllon.

    Allhouh lhcso varilblet alre8dy hlve values whcn you -1 MalhCAD. you CM l'lldcline dlem. For cumple, i! )'Oll WlllU IO - a V9rilblo widl a valuo odia' lhall lho ono MalhCAD

    provldct, ent.ct a now cldlnlon llko : 2. 1l1C varlablc, lakct on lhc now valuo ovcrywhcm in lhc docun>

  • .-~-----~' -::~;:~~: ) '::ecillcaeion

    ChaptCI' 8

    The romponcnl3 o( thc fonnat spcdfication are as follows:

    Elomtrc

    i

    Ci

    fl

    11

    pr

    Me111ing

    Radix, or "- usad IO display a number. d tor decinal, olor Odal, h lar hexadecimal. Dolaul Is decinal. MalhCAD shows hexadecimal and octal 1osulls rounded lo lllo n.arost ntog.

    COOii)iei 10ftn11100:'"' int"9fl bet-.o anc1 :ioe. lf the ratio bot_, lhe '"" part> ol a oompltx numbof Is less than 10Oi:-cor-fDelaul 1.

    Expooootial noL11ioo thr .. hoid: en nl"'JOI bolNI O AnCI t ~. Nt11nbor1 ol rM!Jnlude QfftlM tht1.n or eqUAI to 10" or smalltr than or oqual to 10" .. tllown n oxporll1lal nofallon (lor tx111'4'lo. 1. ,.1o1 \ lnt1ood ol lloatww pol1t notAlioo. 0.lllUI lsl.

    Iero lo'-t"lllCe: an lnti lMtwe*'1O1nd JOO. Nunbofs loss lhM to .,. shown as Ztn:I. Dolaul la 15; numbefs of malciunce nre mii~ing. (You cannot tee tht:~ twouU ol thc spclculatcd rc.~ult.

    Whm you local/y formiJJ a rrsu/1, Ma1hCAf) p141l a .rmall do1 afltr 1he tqun/1 ngn. ThJ.r IJ jwn 10 rtnnd JOM tltat IM numbtr IJ formo.rttd local/y. The dol

  • Cumplex numben und C-Jlculalluns

    /u desaibed lbove in lho KCtioo oo "Numbcn," MaU1CAD 1CCCpta complci 1111111bcn ol lho rorm o+bl, whcre o and b are ordinary floatin11J0in1 numben. You can -1 inslead or 1 iI yoo prcfo1 lhal nncalion.

    Complcx numbc:ncan alJO wisc i( you enla 111 c.pre:.sion wilh 1 c l.11 -1 F\gln 6: Cornple ......-.1n Ud.cAO

    ::~- ~:z !:=t~ [ E= ?!il (

    ~ "B i;:_r e_:~

    ~r:8 [ E..:..~ L-~ ' ~J= E:r:!i [ g:.::-g ~ 1 E ::9 -r ~-r=I d~ ,- 1 .

    Units and Dimensions

    Uniu o( measwemcnt. whilc l\Ol requirtd in M4lhCAD ' ouali00>, c.;. hclp dcrr.c1 ermn and cnhancc thc dL'1 uml aipuh11tuc.s autom.auully ial

  • ~-~-.!"?.;"7""'~-.-' ,;: '.,~ ... 1thCAD providcs th 1.._.uwo ... to l

    M'IO.J 1-.UU

    F1gln 3: l tq!Mlon-~- IXllll Unit emn.,,, -Uy cailCd by ano o( tho folloing: Ali incorrcct miit convcnlon A vwiable widl tito wron units (u In Flurc 3) Ali eipresslo9 thtl mes variables or lnconsi11C11t dlmcnslon To find thc ~ eumine the nluc o each nriablc u shown thc riht in Agote J.

  • .. --- -~~------

    ' . .. ; ' .

    116

    Displaying unils of rl!sults

    When you display a calcu1aud rcsull, MalhCAD aulOmatically shoW1 iu dimcnsions, i/ any. lnianally, MalhCAD compul.CS in lhc base wu IL, IM. IT, and IQ. Until you make thc wlil convenions, MalhCAD lhow1 tho rmults in tllCIC wiiis. Fof cumple, in Fiure 4, F hu dimensions ol _.,.,,.,,,.,i-1.

    z

    -................................... _,_ ........ '"""'_. ...... ,

    -- :.71 ... .

    _, .... -

    .... :.1.1--

    1

    -': ......... ...,

    . ' .. r Ll:llll --1-....u. ~

    Ag.n:MltlCAD"--..""--y ou can convett lhelo dimensioru IO llClal unill by enterin a ICl ol WIIS Coc lho fanal placcholder. Wbcn you cnlU 111

    ~ unit or combinatioa ol units in place ol lho placd>older. MalhCAD converu dio displayed rcault to lllOSO uniu. U lhe combinalXm oC units you eo1er is approprialc, thcD ali die dimcnsionJ (/t11tlt, lll4U, Wrw, cltar11) will diuppear from tbo displaycd vaJua. Fof cumple, carlior ill lhia chaAa we eAICl'Cd lho cquation defining lho unit 11 Cor acWIOnl. In Figure 4, you could enier ill placo o lite ~na! placdloldu. Flain 3 lhow1 lho rcaulL

    ~ -~-.....---....----!'

    O.ap

    J '. l.?Jlll ...

    FlQure 5: U.lhCAO - N v1k>o ohown 10 .,..,.,,.. llcn:'a how thc value shown In an cquuon li.lr.c lhc onc In Pigurc $ ia compul.Cd. lnlunally, MllthCAD divides llic valuc IO be displayed by whaiever you anu for lite final placcholdct and lhows lile rcsulL In olher wmb, MalhCAD makcs swc lhal thc complCIC displ.aycd rcsull - thc numbct it shows limLs lhc u.prcssion you cnlCred for lile placcholdct- is a COIRCI value for lhc equalioo. To convcn IO a diffCIClll set ol unilS, jusi edil or rcplace thc exprcssion Coc thc final placcholder IO crcaic a new exprcssioo. FijUJC 6 lhowa F displayed in sevcsal diCCercnl UnilS. U you enlet lite wrong kind of uniu Cor lite final pluccholdet, MalltCAD will lcl you know by displaying ltngth, mas.s, time, oc cliarge in ilS answer. For u.a.mplc, in lite lasl cquation in Figure 6, you scc lhal kWstc is OOI an appropriaic wl for F. The ltnth'1 means lllll lhue is an cxtn dimcmsion o length in lite wiilS you spccilicd - a dimension Coc which Mall1CAD must compenure by showing len11h1 To corree lhe uniu in thc last cquation, you would havc IO do manaally wha1 MalhCAD is doing aulOmalically - divide kWuc by a lenth uni~ foc u.ample,aot.

    L.r ~ E";~ c . w

    1 e:~ Ee ~ ~!e

    ~ . d .

    l . .. ,m..... , ' , ~,~~-~"I~~z~;r;0;:;0i:~~~~~~;:: :,,:~~~j~r-~-11

    ea te.z'B1 W2 -'tlitMCntr.. Un~ and OimcrWona

    .

    M:C..J :. ' - z

    f : ..... -(MIO t llDD..I)

    J '. l.Zllll

    '. l.z:Jll ll ._

    I , IZ.31 -

    I f l.IUZ 1...U. Wi-

    Figure 1: Converung IC> dlllen>nl , ... ol uni

    Scalin: results and dcgree-radiun conversions The lechniqucs describcd herc are nol rcslriclC tcalo "" on-You cun abo uso tho final plQ(.;eholik:r Cor dunauhH1k.u umu lile dcgrccJ and radians. To coovcn dcgrecs ID radians, define thc uniu rad and dtg as followa (scc Figwc 8):

    rad- 1 .i.q- (Alt]P/180 * rad

    This globally dcfillCS dtg wilh llic vqluc 71/180. Mul1i~ying 1 numba by dtgconveru its valuc from degrus to radians. Yoo can use dtg in trigooomclric functions co convat argumaits from dcgrccs IO radians or lypC il al lhc cnd o a calculation cquation IO convat lite rcsull from rndians co dc:grecs. Figwc 8 shows some c.tamplu of ~ 1eehniqucs will1 dtg.

  • p~:~::m~:2::;::1::;,2;~:~t~rr1r:3::m:,~r::;,::?:;7.~~~t::itW~Yn1~;12:~? '"' MUH wtlttS fM 1"9

    ..... 1

    ..,,_..,. IBI

    314-t 1. 5%4

    hl(43 ... , . "'

    ., ..... '-211:1

    ... ; l.m .. .-.. '" ....,..._. ._.. ...... ,.,. U rtI pl~IW.

    wore~t1.,,.: -....( .Sl t.141 ftlt-~t: ~.5l. '8 &et

    &r:.a.1 ..... : -.-< .Sl 1.m 1

    , e u.ng derl., OOl"1V9ft ~tw.fwl dltor:" and ,_,..,.. inal ploccholder in calculalion oquatiom is 1vailable, not Jr unil,, hui for !!CalinJ re.ulL,, Yoo can cnla 111y ssioo in pin of thc fiMI ploccholder, including numbcn, or arhilnllily complcx combinatioM o( varinblc.,. For ple, lll = a rerult in ltt1n> of 1 ln"ays . While ordinary variables (sc:alm) hold a single value, amy1 hold many values. Amys can be ano-dimensional (vcc1on) or two-dimcnsional (matrices). MalhCAD includr.s a wldc r111ge of operaton and functiom for dealing wlh vccton and matrices.

    This chapter contains lhe followlng scctions:

    Crntln1 tttor ar ... trb: Using [Alt!M lo CIClte 'WtttOn lnd matrices

    Computlnc wltll fttton aad matrices How to define an array variable; vccton and matrices In oquatiom

    Sal>Krlpll Viewlng and deftnlnc vcctt and mattLt ckrocntS whlt subscrip

  • llO.

    Cr~ating a ~ector or matrill

    A inle nwnbcr in MalhCAD is ca1led a ualar. A eolumn ol numbcn is a wcror, anda rccianular array olnumbc"S is callcd a mavLt. TIIC gencnl 1tm1 CO"!' .,. j'"!'""~~ ~f''l'J,,...,....,"T7"~~,,.-0:"(''rlJl,'!"""'"1r'~P -W-"'."'":--nrTTr "1 . r ~\ 1 ("[l 'l \ ., ' I : ,/.f:: ~ :,'. 11 . \ ' . ~ ,1. ~ ' ' :-. , ' - . ; '-. ~. :1i. ti '"' ~~ ~ 1Jl(_., r: .!.' :i. ~'l .. ~t.:1.,Y;.1 " :: \ 'i

    mHlm~

    rlyu;i J AIJ.11"' llJwio W(*M TI1h 1d1li1lon la an cumple of M11hCAD'1 Vt>

  • T~~, ... 4 f' )1~~,~~';~~ ~ ' 041 '~" l'""'"-''~'f"~""l~'1C1:.t'!\'' ' ""' ;J t' ''"" :,:?~:'.>r~~.//'. ~:~1',n\:~,?::::.~ t~,< .. ~ { :~f.3~?~~~[?~~~

    [ r s 1, j J.S 1. t U.S

    ~ng lhe alzt ot a mUi

    1 cntcr two 0111nl:n In rc1~m.'lldrrs. MathCAD imuu rows ~/ow the eurrtnt l"'"1i1W1 ~lcolum11s w th< rlght (ll'ttl currcnt >mition. To inSCfl a row al U1e very top ora column ur ldl ora mauil, pul the cursor on thc lcft bracket m:uri.< befo~ you l>'CSS [Alt)M. negntive numbcr to dclctc ruws or columns.

    :AD dcletc.! rows frum the currcnt cursor position 1an! and columns Crom the cum:nt Cino< pooition to hL

    inor on the loWtt le/\ element, you can dclete the " o( !he mauix (thc column 11 the cirsor) by typing

    nJttt/dt~lt (+/)f'OWI roll prompc cI -1 [.J)

    Chapter 10

    MalhCAD deletC! lhe column at the cunor, lcaving 1 2-by-2 matru. (Figure 5).

    J 1 "l {l.! U.a

    Flgu,. 5: Maorb wtth laat row delolOd

    Wanlint. lfyo tkl~te rows or colwnn.r, MatliCAD puman~ntly dcarrb IM lnfonnarlon In IM rows M mlumnJ you tllmlnnl.

    ~~~~~.~~~~~~~~~

    [ J"F ha :~ ~ijj:~ {f:t~ 1:~r.,~if''..: y ~''"i.-.t! 1:r, ,i-~i :','t i.:i~~ t~::L~.~~~ :~ 1 ,;.!.~ :'. .:; ;~~\:~~.~::.::i ~~:~~fi.'~ l~t~~~:~'.~.~1~;l~~:~~ Vcet.on .nd Mab"ice&

    Computlnl\ wlth vectors ond matrices

    To define a vector or matru. varinble. first type a variable narne and a colon as you would wilh any other dcfinition. Then crcatc a vector or matrix on the other side ol the equation.

    For cumple, to define a vector ., rypc: : [Alt]M

    Then pocify 1ha sir.e of the vecior and fill In thc clemenll. The top equation In Figure 6 shows thc rc.rult: a variable defined u 1 vector.

    ... m .. . n1.wt .... ...,,_ ... - ... -- ~ ..... ,,.u .. ta.HCt.er-ttMlf

    ; t " ., 1 :: . . :

    fo ~ m le 1~ r-:J m m rn m

    Flgu,. e: O.llnlnglllld .. 1ng ...,iorvllriablo

    You c.an now UJC lhe name v in place o( thc IClual vtetor In 1117

  • ---- - - - ----.. ~-- -~------~---- ---------- ----- --~-

    "f .. m I 6 1

    .. w

    'lguf'o 1: O.IWiinQ. ---

    1'

    Mico you define vec10r clcmttits, you may le&vc gapa in lhc 1U:loc. Pa cumple, il w la Wldefined and you define "'Ju 10, 10U lea ve gaps far ''e> w1, lllld "'l- MatbCAD fills lllCSe gaps lh wos unlil YOU Clllet spccific valuca far Jbcm. Furc 9 00ws 111 cumple.

    ;. SI 1

    .. [j)

    0101-10

    Subicript.I and matrlx elemenla To vicw ar define 1 macril ciernen~ UJC Jwo subscripu sq1111111ed

    : by a comm1. In ICIM'ral, lo rer1 "~ the t!ntNU in llW' /th ntw, jlh 'Clwnn ol 111a11u N, typo:

    N( (i.j)

    You mu""' f'llCnlhc."'s k> ktt> hoth "''"cri11u ~NIM'I'. lf you t&.ic1'1UWi11r:1UJM\.e01, M1ht'AJ) wiU no& lc>c-1 dae c:o1m11.a lfld 11., acol defWlio11. C/vviging ORIGIN In tlw tniddlt o/ a docwrv111 can ca..u roll{IUing ff

  • --.------ - -- - -- ___....,,..--...--..~----

    ~'. ~ : ~ .. :~, , ~ ?~~;:t::~iIJF~!~1~~,::~:'.s:1;:,::,:~;~:1:,~;G::?::;,;~J;'.:'2t:r~~:!,;i:.~;~j:n:J 2b

    Thc value of ORIGIN applics lo all any variables, 11 is noc possible to have sane variables use onc ORIGIN and others u.1C a di!Terent ORIGIN, Y oo ooi U3C ORIGIN 10 define variables with ncgatlvc subscript!. If yoo SCIORIGIN -10: thcn ali amys will begin wilh clement -10. MalhCAD does not aUow l>Qn:n~gc:r subocripu.

    Ir you rcfcn:nce an arny clemcnt wilh a subscript lcss than ORIGIN, MalhCAD marka< thc IVTIIY rcfcrcnce with the error mcs:sage lodc1 out or bouoda.

    ,low ORln tita/ Itas slfltd.

    Chapter 10

    Llmilsonarray slio.,. , : ,,,~; .,., . : .... ~, : .: ... MathCAD ha' lhe following limits on !he sizcs of amys you can define, display, or cntc:r CJtplicitly:

    Absolulc llmil oa aruy sltt No array in MaihCAD can hold more !han 8000 clemcnts. This mcans you cannot define or use a vector wilh mom than 8000 clcmcnu, a squarc maaix bigget lhan 88-by-88, or any olhcr maaix wilh more than 8000 clemcnu.

    Llmil on dlsplaycd matrktt MalhCAD ha! 1 limit on thc I7'1 of dl.tilayrd matriCCJ. lf you try lo di'play a matrix bigger lhan this sir.e (in an cquation lhat cnds in an cquals sign), !'.lathCAD shows lho error lllCS$8gc matrlx loo bl lo display,

    Llmlt on lnpul m1trlces You cannot crcate a matrix bigger than 100 clcmcnts wilh [AltJK. You cannot u"' [AltJH to makc an cuing matrix biggCJ than 100 clcments. lf you cnr.cr numbcrs that would acate 100 larxe a matrix in lhe prompt f or [Al t ]M. MalhCAD rcjccts thc numbtts and rctums you to !he prompt so )'00 can entcr legal matrix sizc.

    !~~~-,....~ 1 14

    1 ~11 ~::fj _ , 1 ...

    ' [Ji~=!I ' [ :ru4~ :~~ __ dD" lt- ::!! , ~.to .r

    :~~ .... ,.. .=!! : ~

    i -- .. ~ 1 : I ~~,..~

    1 ~ 1 ' : ~:1-~-:s

    ' . 1 ~-~ -- : ~ 1r-: .. ~ , ~J!;=s

    ~u~ ~ .... - ,-a

    _iU:-::a : ~- '7'=1

    1 o .,,;;,e. ~~ ___ 1 fl~

    :~:>.'{:. : ::~.\' "f :.? . ,_ ...

    V ectorund Mtrice&

    Array operutors and functions Sorne of MalhCAD's opcraton ha-e spccial mcanings for vcctors and matrices. For cxample. the multiplication symbol can be takcn 10 mean scalar multipllcation, dot product. or mattix multiplication, depcnding on the what k.ind of opcrnls ll has.

    MalhCAO alJlo hu spcclal bullt-ln funcdons for 1111trlca and cctors, likc /1n11li for vccton and cols and ,..,,,.,, for maaicca.

    Veetor and matrlx operaton Thc t,iblo on the next ptgc describes MathCA0'1 YCCIDr and matrix opcrations.

    ' Ir an opcration Is noc llsted in lh!s 1able, MathCAD will mart ll .. ith thc error illt1l array opttadoa or non-aular ftlue whca you try to pcrform il on a vector or 11111rix. In thc table on thc ncxt pege, 1 b a scal.u Cllprcsaion, la a vector CJtprcssion, Mis a matrix exprcssion, and /1 rcpn:smll a positivc or ncgativc intcgcr.

    T OU can 11.ft t/tt "wc optrotor /O pcform IJll1 M:olar optrallon or /uncllon, tlemtfll 11] eltmtfll, 01111 wr:t or matrlx. Stt 1/tt m:tio11 Dotn1 calcidao111 /Jt paral/e/, lattr In 1/s chopttr,

    '

    . .

    1

    ,

    11

    figure 12 shows sorne ways to me >ector and maaix opttatioo

    tr1 ... -:-::~~]'". ~ ... .. ! i : l ......__. .. . : 1

    .. [~] ... t ..... 1111 - ... ~i .. r...... ... . . -- .

    -t [ ...... LI l.Ml .. . ' ' ......... 1 ,1'\I

    -

    .... ! . La 1.1 u

    .. . ~. Cll .. ..

    - r ~ . : . .................. .. r. 1 . ;):

    .. .... _. ............ .tct. -- ~

    - 1 ... ~ .... a i a :e 1 ...... Ltl .. t

    ! .,

    F!gln 12: _ _...... i

    .... ; .

    >

    ,

    ' 1

    1

  • -....-.---~---'---~ .... -~~- ._________..,.-~---. -~--....,. -----~- - -----.--...,,.------e-,_,-~, "'~~--. .,..-------,-~,.....--.-,-----,-,~

    ----- --

    =-=============='=--~---===--=-. --~=,~-"~ _: :. :==-....::.=_::__::___..:....._

    hrM& ;;LijfUll!fi:l\!lA;i#f w1iw ~ t'iftteUytxwd.)

    -v1 xYI 1 J.UJ Y2 vi and "2mubo~ -.;mua io ~ Uv-oHlemll

    --(To l)llO lhec:rou ~ hold down lht iut) kay and pi.-lhe 1 kay 11 fle lop ol lhe Uybolnl.)

    oorjugall !!' ar T M oorfglle ol MClt ...,_ ol - 0t INltil. y ..

    Dt IJ.lt)f. &rnol--b.(Tol)l>Olht .... opal0t,bc*ldownlht(Ut)kay and "'-... 4 kay 11 lht lop ol lhe Uytxwd.)

    ij+ (Alt)- TIMI al openi ... in llQ' velomentwiat. S.. lht Mdion"OoilgcalaJlliQ

    11' 11 (.Ut)- k1pn111:111ttn1N1 chaplw, b a c:ofT'lllol ~Ion. (To l)llO lhe -optrlb', hold down lht !Al.ti kay ond pr-lht ..n.. kay 11 lhe lop ol lht Uytxwd.)

    ;rtat ..- 11 IAl.tJ- ldla>UMol mllril 11. ~ ... - . (Tot;pe lht ~,cap-. hold clown lht (Ut] kay and P*1lht6kay11 lhtlopollht Uytxwd.)

    lpl v. ( dllalaawil ol-; (nl~liarnanl olmllrix un1.nl 11( (nl,ll2)

    ] l:-J 9

    11 ~ - ~~ :::]! E: 3

    E:::~ -~ 1c- 11 3 IC- . :_E:qi ~!!!

    [~i! [,.~! 1 C-. t 1 ~ I :n :::I -, ~ '~6:. 1 ' ,_

    '.l.~ 1 . . L 1 ..... ..

    Vector and matrlx t'unctions MalhCAD includcs runctions int.enIM. llWnum ol elonion11 ri Yla v OI iNiiU l. Roeums a tular. 1 v OI 1.1 lt C001>l11, rolu'no iht rnaximum real part pkJs ilimes f\9 maxirrun lona\Jinary part. Lllllnum ol tliwnena '1 vedar ~ OI m.ifu "'-Aocllrdl scalot . ' IJ lt COOl>lol, '""' ihe rninrn ... r..i par1 >M ; ain .. an. minm.wn

    ~arypon.

    FOin a~ onaogor, rlllKlll on "'f-11 d""'Y -"'

    AOCIK!ll lht trw-ot .ltiho wm ot an. ~ ........ ol IJ. 11 musl bo. _. malrix.

    The Krone'O

  • -,-,- , .: ., .. ,. ,, 'i' .. .. ,..,,; .: .Hs~.,-:':tT:?'l~m'!~ . ... -------- .. ------ -~-----=- ~~ .. -.... ';lr'..1;;~1'~ ;- . ~~fJ'l~a\'C\-~'-i:FifP;\i pcrfonn tho ssne opcnuion efficiently on a vector or matrix oC values. Malhematlcnl llO!alloo onen lhowl rqieated opmtlons wlth subscripu. For eumple, IO define a matrix /'by multiplying corrcsponding elemenU of die llUllricea M and N, you would wrltc:

    /'IJ MNIJ (Notlce lhat thls Is not matrix multipllc8tlon, but multipllcatloll cleinent by clemenl) lt Is pouiblc IO pcrfonn lhls operatiol'l In MathCAD using subsaipll, a delaibed In die next cllapter. a .. lt is moch fast.er IO pcrfonn eucdy lhe ame openitlon wlth the vec opctatlon, which il shown u SI arrow above tbe expresslon. In MalhCAD, you could pcrfonn the above opel'&lion wlth IR equatioo that looks like this:

    : :t U1e the m: open!Of IO pcrfonn s:alaroperatlons cffidently elcment by element on vecton or matricea. (The vec operator Is oflen five 10 ten 1imes fmltt than subsalp!S and range variables ror the samc opcratlons.)

    llow lo appl)' the VfC opuator toan npres.lon To apply lhc vec operator IO 1r1 exprculon, put tbe cunor on tho to>-level opentor for tho exprealon and typo (Alt) (hold down the IAlt) kcy and preu tho mlnus slgn lhat 11llClll1IO the O ley on the top mw or the keyboanl).

    Tn apply t/M ~e operauw io a flutcdott IJltd 111 -"'' pUI the CllrSCW Olt~rt 011 IM/)ulcllbt1 ""11'tt ond pre u IAlth

    tr you can'1dclmnlnetbe1o>-levd opcntor ror die exm.ulo you CIR pul the exprculai In parcntlle.cs and 1pply the ve.: operaior u follows: ln3Crt a lef'I p.=thesll 11 the beglnnlng o( tho expn:aslo1

    . and 1 right psenlhesil the end. a Move tho cunor IO the lcft psmthesis and type [.U t )- . When you ipply the m: opmtcr, MaltiCAD pu111r1 arow O' lhe top oC the whole expression.

    How tbe vec operator changes the meanlng orar expraslon Thc vec opmtcr changes die meanlng ol the other openlorl : functions 10 whlch lt applies. Thc vec openuor tells MathCIJ apply the opentors and limctions wlth their scalar-anbtis, 1/trrwlll by tlelntnt. Mere se llOIDe eumples ol how t.ht vec operaior changes lhe meanlng oC ~ wlth _, and mllricel: lh Is a vei::tor, m.(Y }lun illegal exprcssion. But ll you

    apply tho vec opetltllr 10 s. 'l. the rcsun lt a new veer.o who9e elements are the ainel oC the .Jements in v. .

    ll M Is a matrU. ~Is IR Ulegal exprcssion. But ll you apply die vec opcratOt 10 .,/M, lhen MathCAD compult:$ new matrix whote clements a.' lhe Jqume roou ol tho dements in M.

    lf y and w - W>Ckn. thcn ... ,. ....,.,. tho dol product of and w, But ll you apply the vec opet'llor 10 ,.,.., the = u! a ncw vector whote /th elemcnt Is obWned by muhlplyii 1' and "'l This la llOI the WtlC U the do( producL

    1he9o pmpcrtlet oC lhe vec openror mc lt IUCful ror makh a:alar C:Xpres3iollll oompucc with veclOtl \vcctorizing" lhe expreWonl). F e.umplc, tuppoec yoa wan1 to 1PPIY lhe quadnltlc formula to lhrne vecton ot oocmclenu o, b, .00 c. f'luro 14 lhowa tho quadn

  • llllUaS.11--IC-S.

    .crla1-. .. r.n-: :. i :. -a :. 1

    -'"-' .... J. ...... .

    -----

    1 . . .... ..............

    1 .... , ......... .

    M...tl

    n14:Th9..,.nic~

    lllll.lal lt--IC-S. .rn ........ ,..._,

    ........... " ~ ~] I ~] e : ~]

    .. [ ... r.a=]

    ! [ .... L"~I . l.IWI

    ; .

    .. .. ] . ~] ... ~ ...... ..... a~ ....... ]

    -HI .. 11:~-- ........ __ ..,, 'voc opcnaar ia &bowa srow lbooe lbc qUldnlic nula ll fl&l" 1 ~. Tbc - opaalOr I oaenal iD lhis :Walioo. Wilhout il. MldiCAD would UelJlR( "'' u veclllr pcoducl and would CCllllplU Iba& lbo ~ IOOl ola veclOI'

    Ouipl.erlO

    la illcpl. But wilh lbc vec opctllOC, lhe multiplicatioo u pcrfonncd elemen& by clcmClll, .. is lhc squaie root. &ro n lhc propcnica ol lbo vcc opcrator: Tbc voc opctllOC clwlgcs lho meaning oC lhc othct

    opuaJors 111d/M11crins IO which it appliea, but not lhe lllUlling of lhe aclU&l IWllCS llld numben. U you apply lho vcc opclalOC IO a single lllllle, l changcs lho appearanco ol lhat rwne (from v IO i', Cor cumple), but llOl lho

    ~OIL (U dcsired, you can use Ibis arrow for ClO'DlClic purpcllCI, IO iDdicaie VCC10r1 in your documau.)

    An expn:ssion undcr lho vcc opcralOf may contain amyi IKld IC8lan. Tbc amyi must be ali vcclOn of !he same si2o or ali malricea o( lhc SllllC siz.c. Opcralions bclwoen two 1my1 are pcrfonned element by elcment. Opcralions bctwoen 111amy111

  • t4u*::::r~~:~ ~ ~.::;':'J: 1'.' l~~. ;. :;.'. .~\;~i~:}1;;~1t\:;iJf~~1'.rg~\~~l~Xti:~"t~ItE1~:~ IJ.C

    Arrays ond ll!ltr l\anctlont-{'k ,,. .~ " . -.;".: ",, ... The "'Ruments in a (unctlon dcfinitloo nced OOl be scalar variables. They CAl1 abo be $ymbol! lhnt.SIAJld for VtttON, matrices, or evcn Olhcr functiom - IMt is, anylhing lhat has a rwne. Functioru can rtlUtll valucs thal are scalars, vccion, or matrices.

    Figur" J 7 '1>ow1 nnc eurnplci or Cuncllom wilh vecto -et>

    .......... ~ :1 '] 111.m ... ...,

    ..t.ta; ia.m t .1'1PJ

    ..._.,...tt- ...........

    -'-'') : - ....... , ': .. , ... l t

    ..t..th)

    ..... u .

    -'-4.( .....

    -:::::,~.:'-. . . [ ~]] r:'~] -'"'' l l..,,

    .. l. 1g

  • e variables

    ilive woccases in MalhCAD depcnd on '""'' Wlrlablu. variable taku on ""''' ol valucs, for cumple, ali !he betwcen O and 10. Unlike OCha variablea, rane

    s don '1 Aold valuca; inslead, lhcy ranc ~twu11 valuca, MalhCAD' 1 ilcralivc pra;cuea.

    Wll ahoW1 how io defino and uso rango variables IO 1 iltntion.

    ni: and usln ran:e varlablet ic a 1W1ge variable, typc lhe variablo name followed by a Id a ranc ol valuca. For Cllllllplc, ID define lhc variable j from O IO IS, typc: O:U

    W shoW1 lh

  • r~.1C:-:1-'1'r.;,~~~~ ''

    _, .. :;;~:~;0s~:r2i~1~~-~::~:}~:r~:t:::.;:ji::t~~:?:~'.::~t~:}~?'.'.:)'.d ll8

    OutpuUabl '>.'~: :r.ti~.;. ,.,. " :"'' .. -When you type a ranga! cxprcssion (an cxpression lhal lncludcs range variables) followal by an cquab sign, MathCAD shows !he compul ""' lnM i.ab~

  • ~~IAallal~~~~~~~WJ~c Chapta 11 , 1 :3

    l :el 11 ... u. :e .ll l :Lit ...

    1

    ~ ...

    ~ .... , ...... c .............. wi

    - WI c.IU. ol- _. .. loe 1-Wl

    ..... ~ -~ .....-- .......... .................. _,_,

    1:w.,...,_'PI"_ .. u ab

  • ~-:. :7e"'1;;[["~1~)~}2?1::' ;~f~:tr;1 ~1;rr,1'r:nn11w~ 12 .

    1/ 1/rt two rQ/lgt YOriciblts havo m and n valutJ, rtJpcclivt/y, llrtn ""tquadon ILJin! l>o1/r rtJllgt WJriabltz ..,;11 calcula1e mn rnulu. lf )'O 1ry "' UJt two rangt Wlrillblu t an owpw tahlt, Ma11tCAD wll/ sliow tlrtu mn rt 1u/1J In a lun1 1ohlt wl1A OM tnlry for tac/r rts"11. /f )'ON "-" /""1 rangt Wlrf4b/ts t a plot, MathCAD will plot OM point fur ach of 1/rt mn rwJtJ.

    Choprll

    eededlteratlon ..... , ...... ,, _ '-i .... , .,, ..

    Stttd lttrat/on Is a \.ariation on ordinary MalhCAD hcrntion. In a !Ceded itcnition, you begin wilh a value and lhen compuic olhcr succcs,,Jvc value! basod on lhc rll'St valuc. Thls 9CCl.lon describes lhrce types of scodcd iicrntion: hcrating a single variable, ilenu.ing multiple variables, and leratlng a vector.

    Seeded ilerallon on one variable Thc classiclll mcthod for esdmating square roou arilhmcdcally Is as follows: To find ./O, bcgin wilh a gucss, Compurc a new guess ba:led on lhc old guess, wilh lhls

    fonnula;

    NewGue66 (1/2)*(0ldGue66 + &/Old~&66) Condnue until the gucsses converge toan answer. Figure 8 shows how IO lmplemcnt lhis mcthod in MathCAD.

    r /mportant. Wlrtn )'OU tnltro subscript /IU i-1, iur partntlrtstz k> htp tlrt wlio/t exprtJJfon In tlrt subscrlpt. l'rtss opostroplrt }MSI afltr you J'f'eSJ tht ltft brad:tt for tlw lubscript. MathCAD sltow1 partntlrttts arolUld t/w 1ubscrip1; you can IM11 typt ln.rt" tlrt part:11tlrttt1 and htp t/w wltolt Uprtssl0tt In tlrt sllbscript.

    ~a c-ai J /f-wi GI

    i 1 I~ LI 1 di1:1 1~!~ 11 /~]?) 1Jl1n

    1~~ 1 f=--- ~1 .

    :=!: :11 lE>.:a L~-.:iJ ~l!1~ ~!!. 6

    1 /111 .

    ' .. ,.,.~~-r~rtt;~J. :{ p~:r:\f~r~~~ .~: :: .. r:(T'.

    Rane Vuiablea. ltcruion. md Tabl

  • - ----------- ----- -

    vl:DY wou:u1 n cxunplo ol poblcml